Project budget control method and device based on budget occupation and execution synchronization
By building hierarchical relationships and interface technologies between master and sub-projects in the database, budget decomposition is frozen and execution is synchronized, which solves the problems of insufficient budget control and delayed data feedback in large-scale engineering projects, and realizes real-time fund management and improves decision-making efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-17
- Publication Date
- 2026-03-10
AI Technical Summary
In large-scale engineering projects, existing technologies suffer from insufficient budget control, delayed data exchange, disconnect between funding status and execution data feedback, leading to increased overall project budget overruns and management decision-making risks.
By constructing a hierarchical mapping relationship between master and sub-projects in the database, and using interface technology to achieve budget decomposition and freezing as well as execution and synchronization, a database mutex lock mechanism and a data state machine are adopted to ensure real-time control of the budget and real-time data synchronization.
It has achieved closed-loop control across the entire chain from budget breakdown to business execution, eliminating duplicate allocation of funds and hidden overspending, improving the security and transparency of budget management, and ensuring the compliance of project investment and the efficiency of decision-making.
Smart Images

Figure CN121638983A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and in particular relates to a project budget control method and apparatus based on the synchronization of budget occupancy and execution. Background Technology
[0002] With the booming development of large-scale infrastructure construction, the financial management of engineering projects is becoming increasingly complex, especially in areas involving multi-level main network infrastructure, where a "main project - sub-project" management model is typically adopted. Under this model, the total investment of the main project needs to be broken down into several sub-projects for specific business execution and fund utilization to ensure the rational allocation and flow of project funds.
[0003] However, existing project budget management practices commonly suffer from insufficient budget control and lagging data interaction. Traditional budget breakdown often remains at the level of "bookkeeping" or "quota allocation," merely recording the flow and allocation of funds on the financial books, lacking a strong constraint mechanism at the underlying data technology level. Specifically, when budget quotas are allocated to sub-projects, the corresponding financial resources in the main project database are not truly physically locked or isolated. This leads to the risk of duplicate allocation or misappropriation of funds, potentially causing overall project budget overruns and failing to meet the needs of refined management.
[0004] Furthermore, budget allocation and actual execution are often disconnected. Data on sub-project execution (such as contract settlement, expense reimbursement, and cost accounting) typically remains within subsystems or independent business modules, unable to be automatically and promptly fed back to the main project management platform. Main project managers often rely on manually compiling periodic reports or delayed batch data synchronization to understand execution status. This "information silo" phenomenon means that the execution data seen by management is always lagging behind the actual business transactions. Due to the lack of real-time data linkage and automatic verification mechanisms, when sub-projects incur actual expenditures, the main project struggles to conduct immediate compliance checks and deductions, making dynamic control of the total project investment throughout the entire process difficult and increasing decision-making risks in project management. Summary of the Invention
[0005] This invention provides a project budget control method and apparatus based on the synchronization of budget occupancy and execution, which solves the problems of disconnect between the main and sub-project funding status, ineffective budget control, and delayed execution data feedback in the prior art.
[0006] In a first aspect, embodiments of the present invention provide a project budget control method based on the synchronization of budget occupancy and execution, the method comprising: Construct a hierarchical mapping relationship between main network project data and local fee project data in the database, and store the configuration parameters of the main network project budget control strategy. The configuration parameters include the control method identifier, control percentage threshold and absolute tolerance value. In response to the received budget breakdown request data packet for the local fee project, the project budget control occupancy interface is called to calculate the total available investment amount for the main network project based on the configuration parameters. If the breakdown amount in the budget breakdown request data packet is less than or equal to the total available investment amount, a corresponding local fee budget occupancy index record is created in the main network project database table, and the resource data of the corresponding amount is marked as frozen. In response to the received business execution accounting request data packet for the local fee project, the project budget control consumption interface is called to verify the matching of the business execution accounting amount based on the local fee budget usage index record; If the verification passes, an atomic update operation is performed to convert the corresponding frozen local fee budget occupancy record in the mainnet project to the executed state, and trigger a data synchronization transaction to update the cumulative execution data field of the mainnet project, thereby achieving real-time synchronization of local fee project execution data to the mainnet project database.
[0007] Preferably, the configuration parameters for the mainnet project budget control strategy include: The system receives parameter inputs for the control scheme through a configuration interface and sets the timestamp interval for the scheme to take effect. Define a control method identifier, which corresponds to the total budget control logic or the annual budget control logic; For the control method identifier, establish a mapping for the controlled budget attribute field, and store the reminder percentage threshold, control percentage threshold, and absolute tolerance value respectively; Define control range filtering conditions and establish a main network project data set index applicable to the control scheme by combining project classification codes, voltage level codes, or responsibility center codes.
[0008] Preferably, the total available investment for the mainnet project is calculated using the following formula: Available amount of total investment in mainnet project = Total investment in mainnet project × Control percentage threshold - Mainnet project occupied amount - Mainnet project executed amount - Local fee project occupied amount - Local fee project executed amount + Absolute tolerance amount; Among them, the value occupied by the main network project is the budget occupied field value triggered by the main network project's own business; the value occupied by the local fee project is the frozen status field value of the local fee project that has been allocated to the local fee project but has not yet triggered actual business execution.
[0009] Preferably, calling the project budget control usage interface includes: Parse the budget decomposition request data packet and extract business parameters. The business parameters include at least: business type identifier, execution action instruction, period type code, local fee item code entity ID, budget attribute code, execution stage identifier, business occurrence timestamp, current occurrence amount, and main network project code. The execution stage is identified as a local fee occupancy code, and the execution action instructions are parsed into control and written into the instructions; The mainnet project code index is used to match the corresponding project budget control strategy configuration parameters to perform data logic verification on the amount value in this transaction. If the verification result indicates that writing is allowed, a control pass status code is returned, and a unique business detail UUID is generated and the local fee budget occupancy record is persistently stored in the database.
[0010] Preferably, the project budget control consumption interface is invoked to verify the matching of the business execution invoicing amount based on the local fee budget usage index record, including: Parse the business execution posting request data packet and extract the business parameters. The business parameters should include at least: the local fee item posting document number, the execution stage identifier, the execution and cancellation stage identifier, the amount incurred this time, the execution carrier code of the previous stage, and the release amount. The identification process is marked by the local fee consumption code, and the identification process for execution and reimbursement is marked by the local fee occupation code. Based on the carrier code and main network project code executed in the previous step, retrieve the local fee budget occupancy records with the status bit set to frozen in the database; Compare whether the released amount is less than or equal to the balance in the local fee budget occupancy record; If the amount released is less than or equal to the balance, the matching verification is considered successful and data writing is allowed; otherwise, the verification is considered unsuccessful, an error code is returned, and data writing is blocked.
[0011] Preferably, the local fee budget occupancy record in the corresponding frozen state in the main network project is converted to an executed state, including: Perform a value update operation on the land use fee budget occupancy record. The update logic is: Updated frozen land use fee budget occupancy value = Original frozen land use fee budget occupancy value - Amount released this time. The amount released this time will be added to the "Executed" field of the mainnet project execution data table; Store the invoice information for the local fee project, mark the amount released this time as the type of local fee project that has been executed, and establish a data association index between the executed data of the local fee project and the local fee project code.
[0012] Preferably, the cumulative execution data of the mainnet project is stored in four independent dimension fields of the database. The four independent dimension fields include: The Mainnet Project Occupancy field stores the budget occupancy value of the Mainnet Project's own business that has occurred but not yet been settled. The "Executed" field of the mainnet project is used to store the consumption value of the mainnet project's own business that has been settled. The "Local Fee Project Occupancy" field is used to store the budget values of the main network projects that have been allocated to the local fee project and are currently in a frozen state. The "Executed" field for the local fee project stores the cost value returned to the mainnet project after the local fee project has been completed and its costs have been recorded.
[0013] Preferably, the method further includes a frozen state transition step performed based on a data state machine, the transition step including: The preset budget resource data has three status indicators: initial availability status indicator, budget usage frozen status indicator, and executed consumption status indicator; When processing budget allocation requests, the data for the corresponding amount is updated from the initial available status flag to the budget occupied frozen status flag, and a mutex lock mechanism is applied to lock the data for the corresponding amount to prevent it from being modified by other concurrent requests. When processing a business billing request, the corresponding amount data will be updated from the budget usage frozen status flag to the executed consumption status flag. When a signal indicating that a local fee item is closed or the budget has been completed is detected, the remaining data in the budget-occupied frozen state will be released back to the initial available state.
[0014] Preferably, when calling the project budget control usage interface or the project budget control consumption interface, it also includes: Generate and return interface response data, which includes: status code, whether it can continue (Boolean value), controlled category code, control strength level code, remaining budget value, and execution status in progress; When the control strength level code indicates that writing is prohibited, the request processing flow is interrupted on the local fee project side, and an error message interface is rendered. The interface displays the difference between the remaining budget value of the current main network project and the amount requested this time.
[0015] Secondly, embodiments of the present invention provide a project budget control device based on the synchronization of budget occupancy and execution, the device comprising: The strategy configuration module is used to build a hierarchical mapping relationship between main network project data and local fee project data in the database, and to store the configuration parameters of the main network project budget control strategy. The configuration parameters include control method identifier, control percentage threshold and absolute tolerance value. The budget occupancy control module is used to respond to the received budget decomposition request data packet of the local fee project, call the project budget control occupancy interface, calculate the total available investment amount of the main network project according to the configuration parameters, and if the decomposition amount value in the budget decomposition request data packet is less than or equal to the total available investment amount, then create the corresponding local fee budget occupancy index record in the main network project database table and mark the resource data of the corresponding amount as frozen. The business execution verification module is used to respond to the received business execution accounting request data packet of the local fee project, call the project budget control consumption interface, and verify the matching of the business execution accounting amount based on the local fee budget usage index record. The execution status synchronization module is used to perform an atomic update operation when the verification passes, converting the corresponding frozen local fee budget occupancy record in the main network project to the executed state, and triggering a data synchronization transaction to update the cumulative execution data field of the main network project, thereby realizing real-time synchronization of local fee project execution data to the main network project database.
[0016] Beneficial effects: This invention provides a project budget control method based on the synchronization of budget allocation and execution. By constructing a hierarchical relationship between master and sub-projects at the database level and implementing strict budget status management using application programming interface (API) technology, it achieves closed-loop control across the entire chain from budget decomposition to business execution, effectively overcoming the shortcomings of loose budget control, delayed data feedback, and low efficiency of manual management in existing technologies. In the budget decomposition stage, instead of simply allocating funds, it creates index records in the database and marks the corresponding amount of resource data as frozen, achieving resource exclusive control similar to a database mutex lock. This eliminates the risk of duplicate allocation of funds and hidden overspending, significantly improving the security and compliance of budget management and ensuring the rigid constraint of the total investment limit. Simultaneously, it solves the problem of information lag by triggering data synchronization transactions. In the business execution and accounting stage, it automatically triggers verification and status transition based on index records, confirming the frozen amount as the executed amount in real time and synchronously updating the cumulative execution data of the master project. It breaks down data barriers between main and sub-projects, enabling real-time penetration and sharing of execution data. This greatly improves the transparency and decision-making efficiency of project investment management, ensuring that management can grasp real and accurate financial dynamics at any time, thereby achieving efficient and intelligent project cost control. Attached Figure Description
[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention; Figure 2 This is a flowchart illustrating the steps of a project budget control method based on budget occupancy and execution synchronization provided by an embodiment of the present invention; Figure 3 This is a schematic diagram of the functional modules of a project budget control device based on budget occupancy and execution synchronization provided in an embodiment of the present invention. Detailed Implementation
[0018] To more clearly illustrate the technical solutions in the embodiments of the invention or the prior art, the invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the drawings is merely some embodiments of the invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of aiding understanding the invention, but does not constitute a limitation on the invention. The solution of the present invention will be further described below in conjunction with the accompanying drawings.
[0019] Reference Figure 1 , Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of the present invention.
[0020] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (Wi-Fi interface). The memory 1005 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0021] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0022] like Figure 1 As shown, the memory 1005, as a storage medium, may include an operating device, a data storage module, a network communication module, a user interface module, and an electronic program. In the illustrated electronic device, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and memory 1005 in the electronic device of this invention can be disposed within the electronic device. The electronic device uses the processor 1001 to call the project budget control device based on budget occupancy and execution synchronization stored in the memory 1005, and executes the project budget control method based on budget occupancy and execution synchronization provided in this embodiment of the invention.
[0023] Reference Figure 2 This invention provides a project budget control method based on the synchronization of budget allocation and execution. The method aims to address the problems of budget management disconnect, opaque funding status, and difficulty in controlling overspending risks between large-scale engineering projects (e.g., main network infrastructure projects) and their sub-projects (e.g., local government fee projects). By constructing a tight hierarchical relationship at the database level and utilizing interface technology to achieve "decomposition and freezing" and "execution and synchronization" of the budget, rigid control and real-time, transparent management of the total project investment are achieved. The method may include the following steps S101 to S104: S101. Construct a hierarchical mapping relationship between main network project data and local fee project data in the database, and store the configuration parameters of the main network project budget control strategy. The configuration parameters include the control method identifier, control percentage threshold, and absolute tolerance value.
[0024] This step primarily involves initializing the basic data and defining control rules, providing a logical baseline for subsequent dynamic budget control. It includes the following detailed sub-steps: S1011. Construct a hierarchical mapping of projects. In the project management table of the database, establish a one-to-many relationship between main network projects (parent projects) and local fee projects (child projects). Specifically, use the main network project code (ProjectDefinition, PrjDf) as the unique primary key, and set a "parent project code" field in the local fee project's data record, filling in the corresponding main network project code. Through this foreign key relationship, all subordinate local fee projects can be indexed at any time through the main network project code, and the parent main network project can be retrieved through the local fee project. This hierarchical mapping relationship is the physical basis for subsequent fund transfers and status synchronization.
[0025] S1012. Receive parameter input for the control scheme through the configuration interface and set the timestamp interval for the scheme to take effect. Provide a project budget control scheme management interface through which users input basic information about the control scheme. The configuration interface receives the following parameters: The scheme name is used to identify the name of the control strategy, such as "Local Fee Project Controlled by Main Network Project Scheme".
[0026] The effective timestamp range of the scheme includes the activation date (e.g., 2024-01-01) and the end date (e.g., 2025-12-31). When processing each subsequent business request, the system will first check whether the business occurrence time (uDate) falls within this timestamp range. If it does not fall within the range, the control policy will not take effect.
[0027] Create unit information, recording the unit ID (e.g., 061X) and unit name that created the plan, to ensure policy access control.
[0028] S1013. Define the control method identifier, which corresponds to either the total budget control logic or the annual budget control logic. Set the "Control Method Identifier" field in the configuration parameters. This identifier is an enumerated value or a binary bit: If marked as "Total Budget Control," subsequent calculations will be based on the total investment over the entire project lifecycle; if marked as "Annual Budget Control," the calculations will be based on the annual budget for that year. This embodiment focuses on the "Total Budget Control" mode to provide a safety net for the total investment in the mainnet project.
[0029] S1014. For the control method identifier, establish a mapping between the controlled budget attribute fields and store the alert percentage threshold, control percentage threshold, and absolute tolerance values respectively. This allows for setting refined control parameters for different budget attributes (such as "tax-inclusive amount" or "tax-exclusive amount"). Specific operations are as follows: Controlled budget attribute mapping defines the types of funds that need to be controlled. For example, setting `budgNature = 0` means the amount excluding tax is controlled. A warning percentage threshold is set, with a value (e.g., 90%). When the budget utilization rate reaches this threshold, only an alert is issued, but business operations are not blocked. A control percentage threshold is set, with a value (usually 100%), which is the red line for rigid control. An absolute tolerance value is set, with an allowed fluctuation amount (e.g., 5.00 yuan) to address minor discrepancies or small amount fluctuations during calculation. These parameters are persistently stored in the strategy configuration table for subsequent calculation modules to access.
[0030] S1015. Define control range filtering conditions and establish a main network project data set index applicable to the control scheme through a combination of project classification codes, voltage level codes, or responsibility center codes. To determine which main network projects are suitable for the above strategy, a control range index is established.
[0031] Users can configure filter conditions in the interface, such as: the project category includes "infrastructure projects" and the voltage level includes "220KV".
[0032] These conditions are parsed to generate the corresponding SQL query logic or rule engine expression.
[0033] Traverse the project library and add the mainnet project IDs that meet the criteria to the "Controlled Project Set Index". This way, when a business occurs, it can determine in milliseconds whether the project needs to execute budget control logic.
[0034] S102. In response to the received budget breakdown request data packet for the local fee project, call the project budget control occupancy interface, calculate the total available investment amount of the main network project based on the configuration parameters, and if the breakdown amount value in the budget breakdown request data packet is less than or equal to the total available investment amount, create a corresponding local fee budget occupancy index record in the main network project database table, and mark the resource data of the corresponding amount as frozen.
[0035] This step is the core of implementing the decomposition and freezing process, preventing the false allocation of the budget. The specific execution process is as follows: S1021. Parse the budget breakdown request data packet and extract business parameters. When a business initiates a locality fee budget breakdown operation, the backend service intercepts the request and assembles it into a data packet, calling the "Project Budget Control Occupancy Interface". The interface parser extracts the following key business parameters from the data packet: Business type identifier (bizType), for example, a value of 7 indicates project budget control service. Execution action instruction (action), for example, a value of 3 indicates "control and write," meaning both checking budget adequacy and performing the occupancy operation. Cycle type code (cycleType), for example, "00000001" represents annual control. Local fee project code entity ID (entityId), which is the sub-project ID for which the budget needs to be obtained this time. Budget attribute code (budgNature), for example, "0" indicates excluding tax. Execution stage identifier (exacuStage), a key parameter, with a value of "51," explicitly identifies the current stage as "local fee occupancy." Business occurrence timestamp (uDate), used to match the policy validity period. Amount incurred this time (occAmt), which is the budget amount planned to be allocated to this local fee project (e.g., 1,000,000.00 yuan). Main network project code (prjDf), which is the parent project ID.
[0036] S1022. The execution stage identifier is identified as the local fee occupancy code, and the execution action instruction is parsed into control and written into the instruction. The interface logic layer reads the exacuStage field, identifies the code "51", and determines that the "budget occupancy" process has been entered. At the same time, the action is read as 3, indicating that a database write operation needs to be performed.
[0037] S1023. Using the mainnet project code index to match the corresponding project budget control strategy configuration parameters, perform data logic verification on the amount value incurred. Using the prjDf (mainnet project code) extracted in step S1021, search for the applicable control strategy in the index established in S1015. Obtain the "control percentage threshold" (denoted as...) of this strategy. ) and "absolute tolerance value" (denoted as ).
[0038] S1024. Calculate the total available investment amount for the mainnet project based on the configuration parameters. To ensure that the budget is not overspent, the processor executes the following rigorous mathematical calculation logic to calculate how much of the mainnet project theoretically still has available funds remaining at the current moment (i.e., the total available investment amount). ):
[0039] The physical meanings of each parameter are as follows: (Total investment amount for the mainnet project), the total estimated amount approved for the mainnet project; (Control percentage threshold): The percentage configured in the strategy, such as 100%; (Mainnet Project Occupied Value): The amount pre-occupied but not yet settled for business directly initiated by the mainnet project itself (such as direct procurement of materials); (Executed Values for Mainnet Projects): The amount of money that has been settled and credited to the account for the mainnet project's own business. (Local fee item usage): The total amount that has been allocated to various local fee items and is in a "frozen" state but has not yet been actually consumed; (Actual values for local fees): The total amount of all local fees that have been actually incurred, recorded, and returned to the main network for synchronization. (Absolute tolerance value): The allowable small error margin; this formula accurately calculates the remaining water level by deducting all "occupied" and "potentially occupied" amounts; S1025, Perform budget adequacy assessment and persistent storage. Store the "amount incurred this time" ( ) and the calculated "total available investment amount" Compare: like The system has determined that the budget is insufficient. The API returns the status code "Over budget" and returns isContinue=false, while also including remainingBudget (the remaining budget amount) in the returned information for the front-end to display.
[0040] like The verification result is "write allowed". Perform the following operations: Generate a unique identifier: Generate a globally unique business detail universally unique identifier (UUID) or use the passed-in entityDtlId.
[0041] Create an indexed record: Insert a new record into the "Budget Usage Table" of the mainnet project database. This record contains: Mainnet Project Code, Local Fee Project Code, and Usage Amount (…). ), timestamp.
[0042] Mark frozen status: Mark the status field of this record as "Frozen" or "Occupied". This means that the money logically belongs to the territory fee project, the mainnet project can no longer allocate it to others, but the territory fee project has not actually spent it.
[0043] The state transition is performed based on the data state machine: the data of the corresponding quota is updated from "initial available status identifier" to "budget usage frozen status identifier", and the database row-level lock or distributed mutex lock mechanism is applied to lock the record to prevent data inconsistency caused by concurrent requests.
[0044] S103. In response to the received business execution accounting request data packet for the local fee item, call the project budget control consumption interface and verify the matching of the business execution accounting amount based on the local fee budget usage index record.
[0045] This step occurs when the local fee item actually involves business transactions (such as reimbursements or contract payments) and is about to be credited to the account after approval, in order to verify the legality of the use of funds.
[0046] S1031. Parse the business execution accounting request data packet and extract business parameters. When the local fee project initiates cost accounting, the "Project Budget Control Consumption Interface" is called. The interface parser extracts the following parameters: The invoice number for the local fee item (entityId) is the unique voucher number for this transaction. The execution stage identifier (exacuStage), with a value of "52," indicates the "local fee consumption" stage. The execution reversal stage identifier (chrgOffExacuStage), with a value of "51," explicitly indicates that this consumption is to reversal the previous "local fee occupation." The amount incurred this time (occAmt) is the actual amount recorded (e.g., 20,000.00 yuan). The previous stage execution carrier code (chrgOffEntityId), i.e., the local fee item code, is used to trace previous occupation records. The released amount (chrgOffAmt) is usually equal to the amount incurred this time, indicating how much amount will be released from the frozen limit.
[0047] S1032. The execution stage is identified as a local fee consumption code, and the execution reimbursement stage is identified as a local fee occupation code. By identifying exacuStage=52 and chrgOffExacuStage=51, it is determined that this is a standard process of "consumption reimbursement occupation", rather than a direct expenditure without a budget.
[0048] S1033. Based on the carrier code and main network project code from the previous step, retrieve the local fee budget occupancy records with the status bit set to "Frozen" from the database. Search the "Budget Occupancy Table" in the database using the input main network project code (prjDf) and local fee project code (chrgOffEntityId). The query criteria are: status bit = frozen and matching project association.
[0049] S1034. Compare whether the released amount is less than or equal to the balance in the local fee budget occupancy record. Read the "balance" (i.e., how much money was initially frozen, or how much frozen amount remains) from the retrieved occupancy record. Perform a logical comparison: If the released amount exceeds the occupied balance, it indicates that the local fee item attempted to spend more than its allocated (frozen) budget. The verification fails, the interface returns an error code, and data writing is blocked to prevent overspending. Balance occupied: The matching verification is passed, and data writing is allowed.
[0050] S104. If the verification passes, an atomic update operation is performed to convert the corresponding frozen local fee budget occupancy record in the main network project to the executed state, and a data synchronization transaction is triggered to update the cumulative execution data field of the main network project, so as to realize the real-time synchronization of local fee project execution data to the main network project database.
[0051] This step ensures the consistency of data between the master and sub-projects through atomic operations, completing the final transfer of funds.
[0052] S1041. Perform a value update operation on the local government fee budget occupancy record. The update is performed within a database transaction. The update logic is as follows:
[0053] in, This is the updated value of the frozen territory fee budget. It is the original balance. This is the amount of money released this time. If... If the value becomes 0, the status of the occupancy record may be marked as "fully written off"; if there is still a balance, it remains in the "partially frozen" state. This process corresponds to the logic in the data state machine that updates the data of the corresponding amount from the "budget occupancy frozen status identifier".
[0054] S1042. Trigger a data synchronization transaction, adding the released amount to the "Executed" field of the mainnet project execution data table. Within the same database transaction, update the "Mainnet Project Cumulative Execution Data." This specifically involves maintaining four independent dimension fields of the mainnet project data structure: The "Mainnet Project Occupied" field remains unchanged (this is the Mainnet's own occupation). The "Mainnet Project Executed" field remains unchanged (this is the Mainnet's own execution). The "Local Fee Project Occupied" field is reduced by the amount released this time. The field for the territorial fee item has already been executed, plus the amount released this time (). Through this addition and subtraction operation, the values in the formula of "total available investment amount" of the mainnet project changed, but the overall balance remained unchanged, realizing the precise "relocation" of execution data - from "occupied state" to "execution state".
[0055] S1043. Store the invoice information for the local fee project and establish a data association index. Insert a new record into the "Execution Details Table" of the mainnet project, storing the invoice number, summary, amount, and other information for the local fee project, and mark this record as "Local Fee Project Executed Type". Simultaneously, establish a bidirectional index between the executed data and the local fee project code. This allows the mainnet project report to not only see the increase in the total number of executions, but also to drill down to see which specific local fee project and which document contributed to this increase in executions, achieving a penetrating query.
[0056] S1044. Closed-loop processing of frozen state transitions based on data state machine execution. When a signal indicating that a local fee project is closed or the budget has been completed is detected (e.g., project completion settlement), if there is still a balance in the "Local Fee Project Occupied Field" (i.e., frozen but not spent money), a "Release" operation is triggered, releasing the remaining data in the "Budget Occupied Frozen State Identifier" back to the "Initial Available State Identifier," allowing it to return to the main network project fund pool and be used for other purposes.
[0057] S1045. Generate and return interface response data. After the operation is complete, the interface returns a response data packet, including: Status code (code), such as "6100000" indicates success. IsContinue (boolean), true. Controlled category code (ctrlCategory), "2" represents the project budget. Remaining Budget, the updated available budget. TransitAmount, the current total amount used.
[0058] If step S1034 fails the verification (the control strength level code indicates that writing is prohibited), the request processing flow will be interrupted at the local fee project end, and an error message interface will be rendered. The interface will display the difference between the remaining budget value of the current main network project and the amount requested this time, clearly informing the user of the specific situation of "overspending".
[0059] Through the detailed steps S101 to S104 described above, this embodiment constructs a rigorous closed-loop control system. Unlike traditional post-event accounting, it utilizes API interfaces, database locks, and state machine technology to embed management rules into the data processing flow, ensuring real-time perception and rigid control of the local fee project's fund flow by the mainnet project.
[0060] This invention also provides a project budget control device based on the synchronization of budget occupancy and execution, referring to... Figure 3 The diagram illustrates a functional block diagram of a project budget control device 300 based on the synchronization of budget occupancy and execution according to the present invention. The device may include the following modules: The strategy configuration module 301 is used to build a hierarchical mapping relationship between the main network project data and the local fee project data in the database, and to store the configuration parameters of the main network project budget control strategy. The configuration parameters include the control method identifier, the control percentage threshold and the absolute tolerance value. The budget occupancy control module 302 is used to respond to the received budget decomposition request data packet of the local fee project, call the project budget control occupancy interface, calculate the total available investment amount of the main network project according to the configuration parameters, and if the decomposition amount value in the budget decomposition request data packet is less than or equal to the total available investment amount, then create a corresponding local fee budget occupancy index record in the main network project database table and mark the resource data of the corresponding amount as frozen status bit. The business execution verification module 303 is used to respond to the received business execution accounting request data packet of the local fee project, call the project budget control consumption interface, and verify the matching of the business execution accounting amount based on the local fee budget occupancy index record. The execution status synchronization module 304 is used to perform an atomic update operation when the verification passes, converting the corresponding frozen local fee budget occupancy record in the main network project to the executed state, and triggering a data synchronization transaction to update the cumulative execution data field of the main network project, thereby realizing real-time synchronization of local fee project execution data to the main network project database.
[0061] Based on the same inventive concept, another embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; When a processor executes a program stored in memory, it implements the project budget control method of the present invention based on budget occupancy and execution synchronization.
[0062] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus. The communication interface is used for communication between the aforementioned terminal and other devices. The memory can include Random Access Memory (RAM), or non-volatile memory, such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.
[0063] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0064] Furthermore, to achieve the above objectives, embodiments of the present invention also propose a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the project budget control method based on budget occupancy and execution synchronization of embodiments of the present invention.
[0065] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable hardware devices (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0066] The embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (apparatus), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0067] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0068] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0069] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. "And / or" indicates that either one or both can be chosen. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.
[0070] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A project budget control method based on budget occupancy and execution synchronization, characterized in that, The method comprises: Building a hierarchical association mapping relationship between the main network project data and the local fee project data in the database, and storing configuration parameters of the main network project budget control strategy, the configuration parameters comprising a control mode identifier, a control percentage threshold value and an absolute tolerance value; In response to a received budget decomposition request data packet of the local fee project, calling a project budget control occupation interface, calculating a total investment available amount of the main network project according to the configuration parameters, if a decomposition amount value in the budget decomposition request data packet is less than or equal to the total investment available amount, creating a corresponding local fee budget occupation index record in a main network project database table, and marking resource data of a corresponding amount as a frozen state bit; In response to a received business execution entry request data packet of the local fee project, calling a project budget control consumption interface, and checking the matching of a business execution entry amount based on the local fee budget occupation index record; If the checking passes, performing an atomic update operation to convert the corresponding local fee budget occupation record in the frozen state bit in the main network project to an executed state, triggering a data synchronization transaction, updating a cumulative execution data field of the main network project, and realizing real-time synchronization of local fee project execution data to the main network project database.
2. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The configuration parameters of the main network project budget control strategy comprise: Receiving parameter input of a control scheme through a configuration interface, setting a time stamp interval for the scheme to take effect; Defining a control mode identifier corresponding to total budget control logic or annual budget control logic; For the control mode identifier, mapping a controlled budget attribute field, and respectively storing a reminder percentage threshold value, a control percentage threshold value and an absolute tolerance value; Defining a control range filtering condition, establishing a main network project data set index applicable to the control scheme through a combination of project classification codes, voltage level codes or responsibility center codes.
3. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The total investment available amount of the main network project is calculated according to the following formula: Total investment available amount of main network project = total investment value of main network project × control percentage threshold value - main network project occupation value - main network project executed value - local fee project occupation value - local fee project executed value + absolute tolerance value; Wherein, the main network project occupation value is a budget occupation field value triggered by corresponding main network project business; and the local fee project occupation value is a frozen state field value of a local fee project that has been decomposed but has not triggered actual execution business.
4. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The calling of the project budget control occupation interface comprises: Parsing a budget decomposition request data packet, extracting business parameters, the business parameters at least comprising: a business type identifier, an execution action instruction, a period type code, a local fee project code entity ID, a budget attribute code, an execution link identifier, a business occurrence time stamp, a current occurrence amount value and a main network project code; Identifying the execution link identifier as a local fee occupation code, and parsing the execution action instruction as a control and writing instruction; Using the main network project code index to match corresponding project budget control strategy configuration parameters, performing data logic checking on the current occurrence amount value; and If the checking passes, performing an atomic update operation to convert the corresponding local fee budget occupation record in the frozen state bit in the main network project to an executed state, triggering a data synchronization transaction, updating a cumulative execution data field of the main network project, and realizing real-time synchronization of local fee project execution data to the main network project database. If the check result is to allow writing, a control pass status code is returned, a unique business detail UUID is generated, and the local fee budget occupancy record is stored persistently in the database.
5. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The calling project budget control consumption interface checks the matching of the business execution entry amount based on the local fee budget occupancy index record, including: The business execution entry request data packet is parsed, and business parameters are extracted, including at least: local fee project entry bill number, execution link identifier, execution and cancellation link identifier, this occurrence number, upper link execution carrier code, and release amount value; The execution link identifier is identified as a local fee consumption code, and the execution and cancellation link identifier is identified as a local fee occupancy code; According to the upper link execution carrier code and the main network project code, the local fee budget occupancy record with a frozen state bit is retrieved in the database; It is compared whether the release amount value is less than or equal to the balance value in the local fee budget occupancy record; If the release amount value is less than or equal to the balance value, it is determined that the matching check passes, and data writing is allowed; otherwise, it is determined that the check fails, an error code is returned, and data writing is intercepted.
6. The project budget control method based on synchronization of budget occupancy and performance according to claim 5, wherein, The corresponding local fee budget occupancy record in the main network project in the frozen state bit is converted to an executed state, including: A numerical value update operation is performed on the local fee budget occupancy record, and the update logic is: updated frozen local fee budget occupancy value = original frozen local fee budget occupancy value - this time release amount value; The this time release amount value is added to the executed field in the main network project execution data table; The local fee project entry bill information is stored, and the this time release amount value is marked as a local fee project executed type, and a data association index of the local fee project executed data and the local fee project code is established.
7. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The cumulative execution data of the main network project is stored in four independent dimension fields in the database, including: The main network project occupancy field is used to store the budget occupancy value of the main network project itself business occurrence and has not been settled; The main network project executed field is used to store the consumption value of the main network project itself business completed settlement; The local fee project occupancy field is used to store the budget value of the main network project decomposed to the local fee project and in the frozen state bit; The local fee project executed field is used to store the consumption value of the local fee project back to the main network project after completing the cost entry.
8. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, The method further includes a freeze state conversion step performed based on a data state machine, including: Three state identifiers of the preset budget resource data: initial available state identifier, budget occupancy frozen state identifier, and executed consumption state identifier; When processing a budget decomposition request, the corresponding data is updated from the initial available state identifier to the budget occupancy frozen state identifier, and a mutual exclusion lock mechanism is applied to lock the corresponding data to prevent modification by other concurrent requests; When processing a business entry request, the corresponding data is updated from the budget occupancy frozen state identifier to the executed consumption state identifier; When a local fee item is closed or a budget execution is completed, the remaining data in the budget occupancy frozen state is released back to the initial available state.
9. The project budget control method based on synchronization of budget occupancy and performance according to claim 1, wherein, When the project budget control occupancy interface or the project budget control consumption interface is called, the method further includes: Generating and returning interface response data, including: status code, whether the boolean value can continue, controlled category code, control intensity level code, remaining budget value, and in-transit execution value; When the control intensity level code indicates that writing is prohibited, the request processing flow is interrupted in the local fee item, and an error prompt interface is rendered, which displays the difference data between the remaining budget value of the current main network project and the request amount value.
10. A project budget control device based on the synchronization of budget occupancy and execution, characterized in that, The device includes: A policy configuration module is configured to build a hierarchical association mapping relationship between main network project data and local fee item data in a database, and store configuration parameters of main network project budget control policies, including control mode identifiers, control percentage thresholds, and absolute tolerance values; A budget occupancy control module is configured to, in response to a received budget decomposition request data packet of a local fee item, call a project budget control occupancy interface, calculate the total investment available amount of a main network project according to the configuration parameters, and if the decomposition amount value in the budget decomposition request data packet is less than or equal to the total investment available amount, create a corresponding local fee budget occupancy index record in a main network project database table, and mark the corresponding amount of resource data as a frozen state bit; A business execution verification module is configured to, in response to a received business execution entry request data packet of a local fee item, call a project budget control consumption interface, and verify the matching of the business execution entry amount based on the local fee budget occupancy index record; An execution state synchronization module is configured to, when the verification passes, perform an atomic update operation to convert the corresponding local fee budget occupancy record in the frozen state bit in the main network project to an executed state, trigger a data synchronization transaction, update the cumulative execution data field of the main network project, and realize real-time synchronization of local fee item execution data to the main network project database.