Enterprise expense full-link processing technical method and device
By using deterministic finite state machines to drive the entire lifecycle of enterprise expenses, the problem of fragmented business processes in existing technologies has been solved. This has enabled full-process automation and strong consistency control, improved processing efficiency and compliance, and met the requirements of single-system auditing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANCHANG HESI INFORMATION TECH CO LTD
- Filing Date
- 2026-05-14
- Publication Date
- 2026-07-07
AI Technical Summary
The existing enterprise expense control system consists of heterogeneous systems for each business link, which makes it impossible to synchronize business status in real time, resulting in breakpoint processes, serious lag in financial data, lack of strong system-level constraints, and easy occurrence of discrepancies between accounts and actual data. Reverse processes such as refunds require manual red-inking, resulting in a high error rate and broken audit trails. Electronic files lack a complete chain of evidence and cannot meet the requirements of single-set audit.
By driving the entire lifecycle of enterprise expenses through deterministic finite state machines, strong consistency control of cash flow and invoice flow is achieved, a full-link evidence chain is established, and a unidirectional irreversible finite state machine is configured to set a unique pre-entry condition for each business link. Timely data from the entire process is collected to dynamically adjust the state machine configuration.
It achieves full-process automation and strong consistency control, improves processing efficiency and compliance, solves the problems of process fragmentation and lack of unified control in existing technologies, meets the requirements of single-set audit, and reduces the risk of human intervention.
Smart Images

Figure CN122347481A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of digital management of enterprise finance, and in particular to a method and apparatus for full-chain processing of enterprise expenses. Background Technology
[0002] With the widespread adoption of e-invoices and the deep implementation of bank open APIs (direct bank-enterprise connection), corporate financial digitalization is moving from online approval to a new stage of automated closed-loop management where consumption is recorded immediately. This places demands on expense control systems to meet real-time, consistency, and compliance requirements across the entire process of application, payment, invoicing, accounting, and archiving.
[0003] Current mainstream expense control systems still adopt a loosely coupled architecture centered on the approval process. Although they partially integrate payment gateways and invoice verification interfaces, each business link belongs to a heterogeneous system and no unified data model or collaborative execution mechanism has been established.
[0004] In existing technologies, the various business processes (application, payment, invoicing, accounting, and archiving) operate in a fragmented manner in heterogeneous systems, resulting in the inability to synchronize business status in real time, forming a breakpoint-like process, and causing serious lag in financial data. Summary of the Invention
[0005] The purpose of this invention is to provide a technology method and apparatus for full-link enterprise expense processing, which drives the entire expense control process through the state changes of a finite state machine, thereby alleviating the technical problem of fragmented and unsynchronized real-time heterogeneous businesses.
[0006] In a first aspect, the present invention provides a method for end-to-end enterprise cost processing, comprising: In response to a user's consumption request, a deterministic finite state machine is configured for the fee transaction instance corresponding to the consumption request and set to the initial state; Based on the real-time state of the deterministic finite state machine, the various processing stages of the cost transaction instance are driven to be executed. Continuously collect full-process flow timeliness data of completed fee transaction instances and dynamically adjust the configuration parameters of the deterministic finite state machine.
[0007] In an optional implementation, the step of configuring a deterministic finite state machine and setting it to an initial state for the fee transaction instance corresponding to the consumption request in response to a user-submitted consumption request includes: In response to a user's consumption request, a corresponding fee transaction instance is generated for the consumption request; Configure a deterministic finite state machine for the cost transaction instance and irreversibly initialize the deterministic finite state machine to an initial state; wherein the state of the deterministic finite state machine is triggered based on a unidirectional irreversible finite business process.
[0008] In an optional implementation, the steps of driving the execution of each processing stage of the cost transaction instance based on the real-time state of the deterministic finite state machine include: The budget control engine is invoked to perform budget verification and limit freezing only when the deterministic finite state machine is in the initialization state; If the verification passes, a globally unique transaction identifier is generated for the cost transaction instance, and the deterministic finite state machine is irreversibly transitioned to an authorized state.
[0009] In an optional implementation, the step of driving the execution of each processing stage of the cost transaction instance based on the real-time state of the deterministic finite state machine further includes: Listening is initiated only when the deterministic finite state machine corresponding to the fee transaction instance is in the authorized state for the payment settlement event matching the transaction identifier of the fee transaction instance; When a matching payment settlement event is captured, funds are deducted after idempotency verification, and the deterministic finite state machine is irreversibly transitioned to the paid state.
[0010] In an optional implementation, the step of driving the execution of each processing stage of the cost transaction instance based on the real-time state of the deterministic finite state machine further includes: Only when the deterministic finite state machine of the fee transaction instance is in the paid state, a matching compliant electronic invoice is automatically retrieved based on the transaction information of the current payment; Based on the compliant electronic invoice, a two-way alignment verification is performed on the fund flow and the invoice flow, and the irreversible flow of the deterministic finite state machine is transformed into a ticket-payment matching state.
[0011] In an optional implementation, the step of driving the execution of each processing stage of the cost transaction instance based on the real-time state of the deterministic finite state machine further includes: Only when the deterministic finite state machine of the expense transaction instance is in the ticket matching state, accounting vouchers are automatically generated based on the consumption information and the matched invoices, mapping accounting subjects. Based on the accounting vouchers, compliance verification of the accounting is performed through debit and credit balance and voucher elements, and the deterministic finite state machine is irreversibly transformed into an accounted state.
[0012] In an optional implementation, the step of driving the execution of each processing stage of the cost transaction instance based on the real-time state of the deterministic finite state machine further includes: Business data across the entire cost transaction instance is collected only when the deterministic finite state machine of the cost transaction instance is in the accounted state; wherein, the business data includes business documents, state transition audit logs, and associated metadata; The business data is encapsulated into an immutable archived evidence package for single-set compliant archiving, and the deterministic finite state machine is irreversibly transitioned to the archived final state.
[0013] In an optional implementation, the step of continuously collecting full-process flow timeliness data of completed fee transaction instances and dynamically adjusting the configuration parameters of the deterministic finite state machine includes: Continuously collect timeliness data of the entire process of completed fee transactions; wherein, the timeliness data includes the average processing time, waiting time, process connection delay and total closed loop time of each business link; The timeliness data is statistically modeled by scenario and stage, respectively, to generate a full-process timeliness feature profile for identifying process bottlenecks and optimizable nodes. Based on the actual running time and time proportion of each link in the timeliness feature profile, the adjustment direction of the state machine basic template is determined; In accordance with the aforementioned adjustment direction, for the bottleneck links in the process, the connection triggering mechanism and execution scheduling logic of the state machine business links are optimized with compliance verification, and compliance and data consistency are verified synchronously after each optimization. The state machine configuration of subsequent newly added cost transaction instances is updated based on the optimized base template.
[0014] Secondly, the present invention provides an enterprise cost end-to-end processing technology device, comprising: The configuration module, in response to a user's consumption request, configures a deterministic finite state machine for the fee transaction instance corresponding to the consumption request and sets it to the initial state; The driving module, based on the real-time state of the deterministic finite state machine, drives the execution of each processing step of the cost transaction instance; The adjustment module continuously collects the timeliness data of the entire process of completed fee transaction instances and dynamically adjusts the configuration parameters of the deterministic finite state machine.
[0015] Thirdly, the present invention provides an electronic device including a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as described in any of the foregoing embodiments.
[0016] This invention provides a method and apparatus for end-to-end enterprise expense processing. First, by configuring and initializing a deterministic finite state machine for the expense transaction instance corresponding to a user's consumption application, a unique driving mechanism with mandatory flow rules is established for the full lifecycle management of a single enterprise consumption transaction. This replaces the existing manually driven approval flow model at the underlying architecture level, solving the problems of fragmented processes and lack of a unified management core in existing technologies. Second, based on the real-time state drive of the state machine, the entire process of expense transactions is processed. Through the unidirectional irreversible flow rules of the state machine, a unique pre-entry condition is set for each business link, eliminating the floating state of discrepancies between accounts and actual transactions and achieving automated and highly consistent management of the entire process. Finally, by collecting the timeliness data of completed transactions and dynamically adjusting the state machine configuration, adaptive optimization of the state machine configuration is achieved without violating core flow rules and compliance constraints. This solves the problem that fixed-rule state machines cannot adapt to changes in enterprise operations and fluctuations in the external environment, further improving the efficiency and adaptability of the entire process. The overall technical solution completely breaks through the shortcomings of existing expense control systems at the underlying architecture level, realizing automated and highly compliant closed-loop processing of enterprise expenses across the entire chain.
[0017] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 A flowchart of a full-chain enterprise cost processing technology method provided in this embodiment of the invention; Figure 2 This is a functional module diagram of an enterprise cost end-to-end processing technology device provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the hardware architecture of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] With the widespread adoption of e-invoices and the opening of direct bank-enterprise APIs, businesses are increasingly demanding a reimbursement-free model where expenses are immediately recorded. Existing expense control systems are mostly workflow-approval based, focusing on online configuration of approval processes. This approach has inherent technical flaws: application, payment, invoicing, and accounting processes operate in a fragmented manner across systems, making real-time synchronization of business status impossible; reliance on manual process triggering lacks strong system-level constraints, easily leading to discrepancies between accounts and actual expenses; reverse processes such as refunds require manual reversals, resulting in high error rates and broken audit trails; electronic records are simply stored without a complete chain of evidence, failing to meet single-system audit requirements, and finance still needs significant manual reconciliation and correction.
[0023] Based on this, the present invention provides a method and apparatus for full-chain processing of enterprise expenses, which drives the automated flow of enterprise expenses throughout the entire life cycle through a unidirectional irreversible deterministic finite state machine. This achieves strong consistency control of cash flow and invoice flow, ensures the idempotency of accounting in high-concurrency scenarios, and constructs a compliant single-set full-chain evidence chain, thereby significantly improving the efficiency of enterprise expense control, data accuracy and compliance management capabilities.
[0024] To facilitate understanding of this embodiment, a detailed description of the enterprise cost end-to-end processing technology method disclosed in this embodiment of the invention will be provided first. Figure 1 This is a flowchart of a technology method for handling enterprise costs across the entire supply chain, as provided in an embodiment of the present invention.
[0025] like Figure 1 As shown, this method can be implemented through the following steps: Step S102: In response to the consumption request submitted by the user, configure a deterministic finite state machine for the fee transaction instance corresponding to the consumption request and set it to the initial state.
[0026] Here, user consumption applications serve as the trigger entry point, and a dedicated business control unit and underlying driving core are built for each independent consumption. The traditionally fragmented multi-stage process is unified and converged into a single control carrier with a state machine as the core. A unified control anchor point is established at the beginning of the process, which completely breaks the architectural defects of the existing technology of multiple fragmented systems and lays the underlying foundation for the automated flow of the entire process.
[0027] Among them, the deterministic finite state machine refers to a standardized computing model that covers the entire lifecycle of expense transactions. Its core is to achieve strong rule-based, traceable, and automated control over the entire process of expense transactions through a finite number of fixed business states, preset one-way irreversible flow rules, and triggering events. In simple terms, it sets up a set of automatic progression rules for each consumption that cannot be arbitrarily changed. Only when the preconditions are met can it proceed to the next stage. The expense transaction instance refers to defining each independent enterprise consumption as an indivisible, traceable independent business unit with a full lifecycle. It is bound to a unique identifier from application initiation to archiving termination, avoiding data fragmentation across processes.
[0028] In some embodiments, step S102 may be implemented by the following steps: Step 1.1: In response to the consumption request submitted by the user, generate a corresponding fee transaction instance for the consumption request.
[0029] Here, user consumption applications are used as the sole trigger source, generating a unique and indivisible business unit for each independent consumption. This unifies the application, payment, and accounting data that were previously scattered across multiple systems into this instance. From the starting point of the process, a unique business anchor point is established for each consumption across the entire chain, completely solving the problem of data fragmentation and lack of traceability in existing technologies.
[0030] Step 1.2: Configure a deterministic finite state machine for the cost transaction instance and irreversibly initialize the deterministic finite state machine to the initial state; In this system, the deterministic finite state machine's state is triggered by a unidirectional, irreversible finite business process. Here, a dedicated state machine driver is matched to each independent cost transaction instance, clearly defining the core rule of state transition as unidirectional and irreversible. Simultaneously, the state machine is initialized to the process's starting state, establishing a rule foundation for the entire process flow. This locks in the flow rules of the entire process from the bottom up, eliminating the risk of arbitrary manual modification of states or reverse flow operations, and establishing a compliance foundation for fully automated process flow.
[0031] In practical applications, step S102 can also be implemented through the following examples: First, the system receives the consumption application submitted by the user, extracts core information such as consumption type, applying department, budget item, application amount, and applicant, and completes the compliance verification of basic information. Then, for the consumption application that passes the verification, a corresponding independent expense transaction instance is generated. This instance will serve as the sole unit carrying all business data, status information, and audit trails throughout the entire lifecycle of a single consumption transaction. In addition, a preset deterministic finite state machine is configured for this expense transaction instance. This state machine has a fixed set of business states covering the entire process and unidirectional irreversible flow rules. In normal business processes, the state can only flow forward, with no manual rollback entry. Finally, the configured deterministic finite state machine is irreversibly initialized to the initial state, completing the preparation work for the full-process control of a single expense transaction.
[0032] As an optional implementation, a real-time compliance risk profile can be generated based on the applicant, consumption scenario, amount, supplier, and project type dimensions corresponding to the consumption application. According to the risk level of the real-time compliance risk profile, differentiated flow branches and verification nodes are dynamically configured for the deterministic finite state machine: for low-risk expense transaction instances, unnecessary verification steps are simplified, and lightweight flow state branches are configured; for medium- and high-risk expense transaction instances, additional state nodes such as compliance due diligence, multi-level approval, and enhanced verification of three-document matching are automatically embedded, and strongly controlled flow state branches are configured; the dynamically configured state machine branch flow maintains a unidirectional and irreversible characteristic throughout. This breaks through the traditional fixed-process expense control model, achieving dynamic adaptation of the state machine based on risk level; while ensuring compliance control, it achieves efficient flow of low-risk business and strong control of high-risk business, solving the industry pain point of traditional expense control systems where efficiency and compliance cannot be balanced due to a one-size-fits-all approach; at the same time, through the unidirectional and irreversible characteristic of the state machine, it ensures full-link traceability and verifiable compliance of the dynamically adapted process, balancing the enterprise's efficiency needs and compliance bottom line.
[0033] Step S104: Based on the real-time state of the deterministic finite state machine, drive each processing stage of the execution cost transaction instance.
[0034] Here, the real-time state of the state machine serves as the sole basis for execution access throughout the entire process. Only when the state machine transitions to the corresponding preceding state can the corresponding business step be executed. The entire process follows a unidirectional and irreversible flow rule, with no manual modification entry point. The flow logic of the entire process is locked at the system's bottom layer, completely replacing the traditional manual process-driven approach and eliminating the root cause of discrepancies such as "money paid but invoice not received" or "invoice reported but not paid."
[0035] In some embodiments, step S102 may be implemented by the following steps: Step 2.1: Only when the deterministic finite state machine is in the initialization state, call the budget control engine to perform budget verification and limit freezing.
[0036] Here, the initialization state of the state machine is used as the only prerequisite for budget control actions. Only transactions in the initialization state can perform budget verification and limit freezing. At the same time, the pre-emptive control of budget limits is achieved through shadow accounts. This eliminates expenditures without a budget or exceeding the budget from the source, solves the problem of delayed control in existing technologies where over-budget expenditures are only discovered after reimbursement, and achieves strong pre-emptive control of the budget.
[0037] Shadow accounts are virtual control accounts that are mapped one-to-one with the enterprise's budget items and bank accounts. They do not touch the enterprise's actual bank funds at all and are only used for budget verification, freezing, occupation and release in the pre-consumption stage, similar to the pre-authorization freezing mechanism of credit cards, to avoid the same budget being used repeatedly.
[0038] As a calculable implementation, when a scenario arises during budget verification where the available quota for the current accounting period is insufficient, but there is an available balance in the cross-period associated budget pool, the budget control engine generates a cross-period pre-authorization application, temporarily transitioning the deterministic finite state machine to a pre-authorization pending confirmation state. Only upon receiving an approval confirmation instruction for cross-period budget management authority does the engine complete the pre-allocation and freezing of the quota in the cross-period budget pool, irreversibly transitioning the deterministic finite state machine to an authorized state. Simultaneously, a cross-period pre-authorization identifier is embedded in the state machine, automatically triggering cross-period verification of the pre-authorized quota in subsequent accounting stages. This addresses the core contradiction between flexible use and compliance control of cross-period budgets (such as annual budgets and project full-cycle budgets) in enterprise expense management; it avoids the problem of reasonable consumption applications being wrongly rejected due to traditional single-period budget verification. Furthermore, through the irreversible transition of the state machine and the full-link embedding of the pre-authorization identifier, it achieves full-process traceability and reversibility of cross-period budget use, satisfying both the flexible use needs of enterprise business and fully complying with budget control compliance requirements.
[0039] Step 2.2: If the verification passes, a globally unique transaction identifier is generated for the cost transaction instance, and the deterministic finite state machine is irreversibly transitioned to the authorized state.
[0040] Here, after the budget verification is passed, a unique identity identifier is generated for each transaction throughout the entire process. At the same time, the state machine is irreversibly transitioned to the authorized state. Only transactions in the authorized state can enter the subsequent payment process. A unique data association primary key is established for all stages of the entire process. At the same time, the irreversible state transition locks in the control results of the pre-authorization, eliminating the risk of unauthorized payment.
[0041] Among them, the globally unique transaction identifier refers to the unique identity primary key of a single expense transaction throughout its entire lifecycle. All business data, payment records, invoice information, and audit trails throughout the entire process are bound to this identifier, enabling full-link data traceability and correlation.
[0042] In practical applications, the transition of the state machine from the initial state to the authorized state corresponds to the steps in the process of driving the cost node, including: First, the system monitors the real-time state of the deterministic finite state machine corresponding to the expense transaction instance. Subsequent budget control actions are triggered only when the state machine is in the initialization state. Then, the system's built-in budget control engine is invoked to verify the available balance of the budget item corresponding to the consumption application, confirming whether the available balance is greater than or equal to the application amount, and verifying the applicant's consumption permissions and the compliance of the application content. In addition, if both budget verification and compliance verification pass, the system generates a globally unique transaction identifier for the expense transaction instance using a preset snowflake algorithm, and strongly binds the identifier to the expense transaction instance and the state machine. Finally, a budget amount equal to the application amount is frozen in the shadow account of the corresponding budget item. After the quota is frozen, the deterministic finite state machine is irreversibly transitioned to the authorized state, completing the entire process of pre-application and authorization.
[0043] Based on this, step S104 also includes a transition driver from the authorized state to the paid state, specifically: Step 3.1: Start listening for payment settlement events that match the transaction identifier of the fee transaction instance only when the deterministic finite state machine corresponding to the fee transaction instance is in the authorized state.
[0044] Here, the authorized state of the state machine is used as the sole prerequisite for payment listening actions. Payment event listening is only initiated for transactions that have completed prior authorization, and payment flow is matched based on a globally unique transaction identifier. This mechanism completely eliminates the risk of unauthorized payments, solves the problem of disconnect between the application and payment processes in existing technologies, and achieves a strong binding between prior authorization and in-process payment.
[0045] Step 3.2: When a matching payment settlement event is captured, funds are deducted after idempotency verification, and the deterministic finite state machine is irreversibly transitioned to the paid state.
[0046] Here, idempotency verification is performed by generating idempotent keys based on transaction fingerprints. After the verification passes, the pre-frozen budget amount is deducted. After the funds are deducted, the state machine is irreversibly transitioned to the paid state. At the same time, a distributed lock is used to ensure the atomicity of operations in concurrent scenarios. This completely solves the problem of duplicate payments and duplicate accounting caused by repeated message pushes by banks in high-concurrency scenarios. In addition, the payment result is locked through irreversible state transition, eliminating the risk of payment data being tampered with.
[0047] Idempotency means that no matter how many times the same payment event is received by the system, only one fund deduction and accounting operation will be performed, and there will be no problem of duplicate payment or duplicate accounting. It is the core data security guarantee mechanism in high-concurrency payment scenarios.
[0048] In practical applications, the flow of the state machine from the authorized state to the paid state, driving the expense control process, can be exemplified as follows: First, the system monitors the real-time state of the deterministic finite state machine corresponding to the expense transaction instance. Only when the state machine is in the authorized state does it initiate the listening action for the corresponding payment settlement event. Then, through the bank-enterprise direct connection interface or a third-party payment gateway, it continuously listens for payment settlement events matching the transaction identifier, authorized card number, and merchant information. After capturing the payment message, it performs message cleaning and standardization. Furthermore, a unique transaction fingerprint is generated based on the card number, transaction time, transaction amount, authorization code, and merchant ID in the payment message. An idempotent key is generated based on the transaction fingerprint, and the system's idempotency table is queried to complete idempotency verification, filtering duplicate payment messages. Simultaneously, a Redis distributed lock is used to lock the transaction identifier, ensuring the atomicity of operations in concurrent scenarios. Finally, after the idempotency verification passes, the pre-frozen budget amount in the shadow account is officially deducted, the actual expenditure data for this consumption is recorded, and after the fund deduction is completed, the deterministic finite state machine is irreversibly transitioned to the paid state, while an immutable state change audit log is generated.
[0049] Based on this, step S104 also includes a fee control process that transitions the payment status to the ticket matching status, specifically as follows: Step 4.1: Only when the deterministic finite state machine of the expense transaction instance is in the paid state, automatically retrieve the matching compliant electronic invoice based on the transaction information of the current payment.
[0050] Here, the state machine's paid status is used as the sole prerequisite for invoice retrieval. Based on the payment transaction fingerprint, the system automatically retrieves matching electronic invoices, eliminating the need for employees to manually upload invoices. This completely replaces the inefficient traditional method of manually uploading invoices, solves the problem of invoice-payment disconnect in existing technologies, and achieves fully automated processing that automatically triggers invoice matching after payment is completed.
[0051] Step 4.2: Perform bidirectional alignment verification of fund flow and invoice flow based on compliant electronic invoices, and transform the irreversible flow of the deterministic finite state machine into a fund-invoice matching state.
[0052] Here, the consistency between the total amount of the invoice price and tax and the actual payment amount is verified, and the two-way alignment of the cash flow and the invoice flow is completed. After the verification is passed, the state machine is irreversibly switched to the invoice-payment matching state. This mechanism eliminates the problem of discrepancies between the invoice and the actual payment, ensuring strong consistency between the cash flow and the invoice flow, and eliminating the need for manual reconciliation by the finance department.
[0053] As an optional implementation, for expense transaction instances involving installment payments and prepayments, segmented state nodes corresponding to the settlement cycle are configured in a deterministic finite state machine. Upon completion of each settlement cycle's payment action, the state machine irreversibly transitions to the corresponding cycle's segmented payment locking state, simultaneously capturing compliant electronic invoices for that cycle to complete the invoice-payment alignment verification. Only after all segmented invoice-payment matching verifications for all settlement cycles have passed can the deterministic finite state machine irreversibly transition to the full invoice-payment matching state. This addresses industry pain points such as multi-cycle invoice-payment mismatch and difficulty in compliance verification in long-cycle settlement scenarios like installment payments and prepayments. Through the segmented locking and irreversible transition of the state machine, closed-loop control of invoice-payment matching for each settlement cycle is achieved, avoiding the problems of chaotic invoice-payment verification and difficult audit traceability caused by traditional full verification. This significantly improves the accuracy of compliance control for long-cycle expense transactions while ensuring the immutability and traceability of each settlement action.
[0054] In practical applications, the steps by which the state machine transitions from the paid state to the ticket matching state to drive the expense control process can be exemplified as follows: First, the system monitors the real-time state of the deterministic finite state machine corresponding to the expense transaction instance. Invoice retrieval and matching are triggered only when the state machine is in the paid state. Then, based on the transaction fingerprint of the payment, including the transaction time window, transaction amount, and counterparty information, precise invoice matching rules are generated. The system then calls the open interface of the tax bureau system or the enterprise's electronic invoice platform to automatically retrieve compliant electronic invoices matching the payment. Furthermore, the system verifies the authenticity, header, and compliance of the retrieved electronic invoices, filtering out non-compliant invoices. It also verifies the consistency between the invoice price and tax total and the actual payment amount, completing a two-way alignment verification of the cash flow and invoice flow. Finally, after all verifications pass, the invoice is strongly bound to a globally unique transaction identifier, and the deterministic finite state machine is irreversibly transitioned to the invoice-payment matching state, generating a corresponding state change audit log.
[0055] Based on this, step S104 also includes the expense control process where the ticket matching status transitions to the calculated status, specifically as follows: Step 5.1: Only when the deterministic finite state machine of the expense transaction instance is in the invoice matching state, automatically map accounting subjects based on the consumption information and the matched invoices to generate accounting vouchers.
[0056] Here, the status of ticket price matching is used as the sole prerequisite for accounting actions. Only transactions with fully aligned ticket prices can enter the accounting process. Accounting vouchers are automatically generated based on consumption type, merchant MCC code, and invoice details, automatically mapping accounting subjects. This eliminates the generation of non-compliant vouchers at the source, completely replacing the cumbersome process of traditional manual voucher entry and review, and ensuring strong consistency between business data and financial data.
[0057] Step 5.2: Based on the accounting vouchers, the accounting is verified for compliance through debit and credit balance and voucher elements, and the deterministic finite state machine is irreversibly transformed into the accounted state.
[0058] Here, ACID strong consistency checks are performed on the generated accounting vouchers to ensure debit and credit balance and complete and compliant voucher elements. After the check passes, the state machine is irreversibly transitioned to the accounted state. This ensures the compliance and accuracy of the accounting vouchers, and at the same time, the irreversible state transition locks in the accounting results, eliminating the risk of accounting data being arbitrarily tampered with.
[0059] In the application process, the state machine transitions from the ticket matching state to the calculated state, driving the cost control process. A specific example is as follows: First, the system monitors the real-time state of the deterministic finite state machine corresponding to the expense transaction instance. Accounting actions are triggered only when the state machine is in the ticket-payment matching state. Then, based on the application type, merchant MCC code, and invoice details of the transaction, the system automatically matches preset accounting subject mapping rules to generate corresponding accounting entries and journal vouchers. Furthermore, the generated journal vouchers undergo ACID strong consistency verification to check whether the debit and credit entries are balanced, whether the voucher elements are complete, and whether the subject mapping is compliant, ensuring the accuracy and compliance of the accounting data. Finally, after all verifications pass, the journal voucher is strongly bound to a globally unique transaction identifier. After completing the accounting process, the deterministic finite state machine is irreversibly transitioned to the accounted-for state, and a corresponding state change audit log and accounting processing trajectory are generated.
[0060] As an optional implementation, metadata from all nodes in the entire process of the deterministic finite state machine corresponding to the expense transaction instance can also be collected. This metadata includes project and department information in the application stage, budget allocation information in the authorization stage, settlement entity information in the payment stage, and invoice commodity and supplier information in the invoice matching stage. Based on the full-link metadata, a multi-dimensional accounting feature vector is constructed, which automatically maps and matches the corresponding accounting subjects and auxiliary accounting dimensions to generate accounting vouchers with all auxiliary accounting items. Simultaneously, the auxiliary accounting matching results are embedded into the accounting compliance verification stage of the deterministic finite state machine. Only when the auxiliary accounting dimensions are completely matched can the process flow to the already accounted state. This breaks through the limitations of traditional accounting voucher generation based solely on invoice information. By reusing the metadata of the entire state machine process, intelligent and accurate matching of accounting subjects and auxiliary accounting dimensions is achieved. This avoids the problems of missing auxiliary accounting items and mismatched matching in traditional accounting, significantly improving the accuracy and efficiency of accounting. At the same time, the irreversible verification stage of the state machine ensures the compliance of accounting, truly realizing a deep closed loop between business flow and financial flow.
[0061] Based on this, step S104 also includes a step that drives the expense control process by transitioning from the calculated state to the archived final state, specifically as follows: Step 6.1: Collect full-link business data of the cost transaction instance only when the deterministic finite state machine of the cost transaction instance is in the calculated state; The business data includes business documents, status transition audit logs, and associated metadata. Here, the calculated state of the state machine is used as the sole prerequisite for archiving actions. All business documents, audit trails, and metadata throughout the entire lifecycle of a single transaction are collected to ensure the integrity of the archived data. This completely solves the problems of fragmented archived data and incomplete evidence chains in existing technologies, providing a complete compliance foundation for single-set archiving.
[0062] Step 6.2: Encapsulate the business data into an immutable archived evidence package for single-set compliance archiving, and irreversibly transition the deterministic finite state machine to the archived final state.
[0063] Here, following the standard of single-set electronic accounting archives, the entire data chain is encapsulated into an immutable evidence capsule, timestamped and electronically signed, and then stored in read-only archive storage. After archiving is completed, the state machine is irreversibly transitioned to the archived final state. This fully meets the audit compliance requirements of the single-set electronic accounting archives system. The irreversible state transition locks in the archiving results, eliminates the risk of tampering with business data after archiving, and forms a complete audit traceability chain.
[0064] Among them, the evidence capsule refers to an unalterable archived data package that follows the single-set standard for electronic accounting archives. It packages all materials, such as application forms, payment receipts, electronic invoices, accounting vouchers, and audit trails, for a single expense transaction. It is the core compliance carrier that meets the single-set audit requirements.
[0065] In practical applications, the transition of a state machine from a calculated state to an archived final state to drive the expense control process can be exemplified as follows: First, the system monitors the real-time state of the deterministic finite state machine corresponding to the expense transaction instance. Only when the state machine is in the accounted state is the single-set archiving action triggered. Then, based on a globally unique transaction identifier, all business data throughout the entire lifecycle of the expense transaction is collected, including consumption application forms, payment receipts, electronic invoices, accounting vouchers, full-process status flow audit logs, approval trajectories, and associated metadata, ensuring the integrity of the archived data. Furthermore, following the single-set management standard for electronic accounting archives, the collected end-to-end data is encapsulated into an immutable evidence capsule. The hash values of all files within the capsule are calculated, and a Merkle tree is constructed. After a trusted timestamp and compliant electronic signature are added to the evidence capsule, it is stored in a read-only archive storage system (WORM) that allows one-time write and multiple reads. Finally, after compliant archiving is completed, the deterministic finite state machine is irreversibly transitioned to the archived final state, completing the closed-loop processing of the entire lifecycle of the expense transaction and generating an audit record indicating archiving completion.
[0066] As an optional implementation, each time the deterministic finite state machine completes an irreversible state transition, it synchronously collects the business documents, verification vouchers, operation audit logs, and metadata corresponding to the current state stage, generating an incremental, tamper-proof evidence unit for the current state node. This incremental evidence unit is then permanently uploaded to the blockchain in real time, generating an on-chain evidence storage identifier uniquely bound to the current state node. This evidence storage identifier is embedded in the triggering condition of the next transition node of the deterministic finite state machine. The corresponding processing action can only be executed when the state node to be triggered verifies the validity of the evidence storage identifier of the previous node. This breaks through the traditional post-event archiving evidence solidification model. Through the strong binding of state transition and incremental on-chain data, it achieves real-time solidification and tamper-proof evidence at every stage of the entire cost chain. Simultaneously, by using the evidence storage identifier as a prerequisite triggering condition for state transition, it fundamentally avoids compliance risks of data tampering and forgery in the business process, significantly improving the judicial compliance effectiveness and audit credibility of the entire cost chain, and achieving a deep closed loop between business transition and evidence solidification.
[0067] Step S106: Continuously collect the full-process flow timeliness data of completed fee transaction instances and dynamically adjust the configuration parameters of the deterministic finite state machine.
[0068] Here, based on historical full-process operation data, without breaking the core flow rules and compliance constraints of the state machine, the adaptive operation parameters of the state machine are adaptively optimized to achieve dynamic adaptation of control rules with business scenarios and external environment; without destroying the core compliance control logic, the efficiency of the entire process is continuously optimized, solving the problem of poor adaptability of fixed rule state machines and further reducing process waiting time.
[0069] In some embodiments, step S106 may be implemented by the following steps: Step 7.1: Continuously collect timeliness data for the entire process of completed fee transactions; The timeliness data includes the average processing time, waiting time, delay in process connection, and total closed-loop time for each business process.
[0070] Here, based on the immutable state transition timestamps of the state machine, the timeliness data of the entire process of completed closed-loop transactions is collected and marked according to consumption scenarios and business links, providing an accurate data source for subsequent optimization; ensuring the authenticity and traceability of the timeliness data, and avoiding the interference of invalid data on the optimization results from the source.
[0071] Step 7.2: Perform statistical modeling on the timeliness data by scenario and by stage to generate a full-process timeliness feature profile for identifying bottleneck stages and optimizable nodes.
[0072] Here, outlier cleaning is performed on the collected timeliness data to remove invalid interference data. Statistical modeling is completed according to scenarios and processes to locate optimizable bottleneck nodes and generate timeliness feature profiles with compliance and security boundaries. This accurately identifies efficiency bottlenecks throughout the entire process while clearly distinguishing between optimizable flexible waiting time and untouchable rigid compliance time, preventing the breach of compliance bottom lines in the pursuit of efficiency improvement.
[0073] Step 7.3: Based on the actual running time and time ratio of each link in the timeliness feature profile, determine the adjustment direction of the state machine basic template.
[0074] Here, with the rigid constraints of not breaking the core unidirectional irreversible flow rules of the state machine and not changing the underlying logic of compliance verification, the bottleneck location based on the timeliness feature profile uniquely determines the targeted adjustment direction; ensuring that all adjustment actions are executed within the compliance framework, eliminating the risk of breaking compliance constraints from the source of decision-making, and achieving a unique match between the adjustment direction and the bottleneck node.
[0075] Step 7.4: In accordance with the adjustment direction, for the bottleneck links in the process, perform adaptive closed-loop optimization with compliance verification on the connection triggering mechanism and execution scheduling logic of the state machine business links, and verify compliance and data consistency simultaneously after each optimization.
[0076] Here, the connection triggering mechanism and execution scheduling logic of the state machine are optimized for bottleneck links. Each optimization is completed simultaneously with compliance verification and data consistency verification without modifying the core flow rules and compliance verification logic. Under the premise of not disrupting core compliance control, targeted optimization of the efficiency of the entire process is achieved, and the problem of poor adaptability of fixed rule state machines is solved.
[0077] Step 7.5: Update the state machine configuration of subsequent newly added cost transaction instances based on the optimized basic template.
[0078] Here, the optimized state machine basic template is applied to the newly added cost transaction instances, while recording the entire process adjustment operation log to form an unalterable audit trail; this achieves continuous adaptive optimization of the state machine configuration, while ensuring that all adjustment actions are traceable and auditable.
[0079] In the application process, step S106 can be implemented through the following example: First, based on the state transition audit logs of completed closed-loop expense transaction instances, the system continuously collects full-process flow timeliness data, extracting the average processing time, state waiting time, transition delay, and total closed-loop time for each business link. Simultaneously, it labels the data by consumption scenario, payment channel, and business link. Then, it cleans the collected timeliness data for outliers, removing invalid transaction data due to manual intervention or abnormal rollbacks. The cleaned valid data is then used for time-series statistical modeling according to the labeled consumption scenario and business link, identifying optimizable nodes and process bottlenecks that do not violate the core rules of the state machine, generating a full-process timeliness feature profile that includes compliance and security boundaries. Furthermore, it ensures that the core flow rules of the deterministic finite state machine—one-way irreversible—are not violated, and that business compliance is not altered. With the rigid constraint of verifying the underlying logic and not weakening the integrity of the entire audit trail, the targeted flow efficiency adjustment direction of the state machine basic template is uniquely determined based on the actual runtime and proportion of each link in the timeliness feature profile. Then, according to the determined targeted adjustment direction, the connection triggering mechanism and execution scheduling logic of the state machine business links are adaptively optimized for the identified process bottleneck links. After each optimization action is completed, the compliance of the optimized rules and the consistency of business data are verified simultaneously to ensure that the optimization action does not break the rigid constraints. Finally, based on the optimized state machine basic template, the dedicated deterministic finite state machine configuration of the subsequent newly added cost transaction instances is updated, and the timeliness comparison data before and after the optimization are recorded simultaneously to form an unalterable audit trail.
[0080] As an optional embodiment, step S106 further includes: synchronously collecting the full-process compliance verification results, abnormal rollback data, and risk event data of completed expense transaction instances to construct a compliance risk feature profile; combining the timeliness feature profile and the compliance risk feature profile, determining the adjustment direction of the state machine configuration from two dimensions: for links with delayed timeliness and low compliance risk, optimizing the connection triggering mechanism to improve flow efficiency; for links that meet timeliness standards but have high compliance risks, strengthening verification nodes and control logic to prioritize compliance; after each state machine configuration optimization, simultaneously conducting effect verification of both timeliness and compliance, updating the state machine basic template only when both dimensions meet preset requirements. This breaks through the limitations of traditional processes that only optimize the flow timeliness, constructing a dynamic optimization mechanism for the state machine from two dimensions of timeliness and compliance; avoiding the problem of increased compliance risk caused by solely optimizing timeliness, achieving a two-way balance optimization of efficiency and compliance; at the same time, through the closed loop of two-dimensional effect verification, ensuring that the optimized state machine template meets both the efficiency needs of enterprises and fully complies with financial and tax compliance control requirements, solving the industry common problem of traditional process optimization emphasizing efficiency while neglecting compliance.
[0081] In a preferred embodiment of practical application, when a user submits a consumption application for travel, procurement, or other types of expenses through the system front-end, the system receives the application information and completes basic information verification. Then, it generates a corresponding independent expense transaction instance for the consumption application, configures a preset one-way irreversible deterministic finite state machine for the instance, and sets the state machine to the initialization state, thus completing the construction of the full-process control carrier. In addition, the system monitors the real-time state of the state machine corresponding to the expense transaction instance in real time. Only when the state machine transitions to the pre-state of the corresponding link will the corresponding business processing link be automatically triggered, following the one-way irreversible flow rule throughout, with no manual rollback or modification entry. At the same time, the system continuously collects the full-process flow timeliness data of the completed closed-loop expense transaction instances, dynamically adjusts the basic template adaptability parameters of the deterministic finite state machine based on optimization rules under compliance constraints, and applies the optimized configuration to subsequent newly added expense transaction instances.
[0082] As an optional embodiment, this application can also configure a master-slave deterministic finite state machine group for multiple expense transaction instances generated for multiple consumption applications with business relationships. In the master-slave deterministic finite state machine group, the irreversible flow action of the master instance state machine synchronously triggers the corresponding state constraints of the slave instance state machine. Only when the master instance state machine flows to the authorized state can the slave instance state machine execute the budget verification and quota freezing steps. When the master instance state machine flows to the terminated or invalidated state, the slave instance state machine synchronously triggers the irreversible quota release and process termination operation. This method can solve the problem of budget sharing and process linkage compliance control for multiple related consumption transactions (such as travel and related entertainment, multiple procurements for projects). Through the irreversible linkage constraints of the master-slave state machine group, the compliance risks of budget overruns and process disconnection in related transactions are avoided. The consistency of related process processing can be guaranteed without manual intervention, while a traceable audit link is maintained throughout the process, breaking through the limitation that traditional single-instance independent processes cannot achieve strong related compliance control.
[0083] When a completed expense transaction instance triggers an abnormal rollback such as a compliant refund or invoice reversal, an independent shadow deterministic finite state machine is generated for the expense transaction instance. The completed state of the original main deterministic finite state machine remains fixed and immutable. The shadow deterministic finite state machine is initialized from the final state of the main state machine and executes the irreversible state transition of the entire abnormal rollback process, simultaneously completing the red-ink reversal accounting processing, credit limit replenishment, and supplementary updates to the archived evidence package. When the shadow deterministic finite state machine transitions to the final state, it completes an irreversible audit binding with the original main state machine, forming a complete full-link evidence chain for abnormal rollback. This perfectly accommodates the compliance processing requirements of abnormal rollback scenarios such as refunds and red-ink reversals in expense transactions, while fully retaining the core characteristic of the original main state machine's unidirectional irreversible flow. It completely solves the compliance risks of business data tampering and audit link breakage caused by traditional process rollbacks, achieving full-link traceability and immutability in abnormal scenarios, fully complying with the compliance requirements of financial and tax audits and judicial evidence preservation, and filling the industry gap where irreversible state machines cannot be compatible with abnormal rollback scenarios.
[0084] In some embodiments, such as Figure 2 As shown, this embodiment of the invention provides an enterprise cost end-to-end processing technology device, comprising: The configuration module, in response to a user's consumption request, configures a deterministic finite state machine for the fee transaction instance corresponding to the consumption request and sets it to the initial state; The driving module, based on the real-time state of the deterministic finite state machine, drives the execution of each processing step of the cost transaction instance; The adjustment module continuously collects the timeliness data of the entire process of completed fee transaction instances and dynamically adjusts the configuration parameters of the deterministic finite state machine.
[0085] The present invention provides an embodiment of an electronic device. In this embodiment, the electronic device may be, but is not limited to, a personal computer (PC), a laptop computer, a monitoring device, a server, or other computer device with analysis and processing capabilities.
[0086] As an exemplary embodiment, see [link to example]. Figure 3 The electronic device 110 includes a communication interface 111, a processor 112, a memory 113, and a bus 114. The processor 112, the communication interface 111, and the memory 113 are connected via the bus 114. The memory 113 is used to store a computer program that supports the processor 112 in executing the above-described method. The processor 112 is configured to execute the program stored in the memory 113.
[0087] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For example, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0088] Non-volatile media can be non-volatile memory, flash memory, storage drives (such as hard disk drives), any type of storage disk (such as optical discs, DVDs, etc.), or similar non-volatile storage media, or combinations thereof.
[0089] It is understood that the specific operation methods of each functional module in this embodiment can be referred to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.
[0090] The computer-readable storage medium provided in the embodiments of the present invention stores a computer program. When the computer program code is executed, it can implement the method described in any of the above embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0091] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0092] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms installation, connection, and linking should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0093] In the description of this invention, it should be noted that the terms center, up, down, left, right, vertical, horizontal, inner, and outer, indicating orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Furthermore, the terms first, second, and third are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0094] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the scope of the technology disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention.
Claims
1. A technical method for end-to-end enterprise cost processing, characterized in that, include: In response to a user's consumption request, a deterministic finite state machine is configured for the fee transaction instance corresponding to the consumption request and set to the initial state; Based on the real-time state of the deterministic finite state machine, the various processing stages of the cost transaction instance are driven to be executed. Continuously collect full-process flow timeliness data of completed fee transaction instances and dynamically adjust the configuration parameters of the deterministic finite state machine.
2. The method according to claim 1, characterized in that, The step of configuring a deterministic finite state machine and setting it to an initial state for the fee transaction instance corresponding to the consumption request in response to a user's consumption request includes: In response to a user's consumption request, a corresponding fee transaction instance is generated for the consumption request; Configure a deterministic finite state machine for the cost transaction instance and irreversibly initialize the deterministic finite state machine to an initial state; wherein the state of the deterministic finite state machine is triggered based on a unidirectional irreversible finite business process.
3. The method according to claim 1, characterized in that, Based on the real-time state of the deterministic finite state machine, the steps driving the execution of each processing stage of the cost transaction instance include: The budget control engine is invoked to perform budget verification and limit freezing only when the deterministic finite state machine is in the initialization state; If the verification passes, a globally unique transaction identifier is generated for the cost transaction instance, and the deterministic finite state machine is irreversibly transitioned to an authorized state.
4. The method according to claim 1, characterized in that, Based on the real-time state of the deterministic finite state machine, the steps for driving the execution of each processing stage of the cost transaction instance further include: Listening is initiated only when the deterministic finite state machine corresponding to the fee transaction instance is in the authorized state for the payment settlement event matching the transaction identifier of the fee transaction instance; When a matching payment settlement event is captured, funds are deducted after idempotency verification, and the deterministic finite state machine is irreversibly transitioned to the paid state.
5. The method according to claim 1, characterized in that, Based on the real-time state of the deterministic finite state machine, the steps for driving the execution of each processing stage of the cost transaction instance further include: Only when the deterministic finite state machine of the fee transaction instance is in the paid state, a matching compliant electronic invoice is automatically retrieved based on the transaction information of the current payment; Based on the compliant electronic invoice, a two-way alignment verification is performed on the fund flow and the invoice flow, and the deterministic finite state machine is irreversibly transformed into a ticket-payment matching state.
6. The method according to claim 1, characterized in that, Based on the real-time state of the deterministic finite state machine, the steps for driving the execution of each processing stage of the cost transaction instance further include: Only when the deterministic finite state machine of the expense transaction instance is in the ticket matching state, accounting vouchers are automatically generated based on the consumption information and the matched invoices, mapping accounting subjects. Based on the accounting vouchers, compliance verification of the accounting is performed through debit and credit balance and voucher elements, and the deterministic finite state machine is irreversibly transformed into an accounted state.
7. The method according to claim 1, characterized in that, Based on the real-time state of the deterministic finite state machine, the steps for driving the execution of each processing stage of the cost transaction instance further include: The business data of the entire cost transaction instance is collected only when the deterministic finite state machine of the cost transaction instance is in the accounted state; wherein, the business data includes business documents, state transition audit logs and associated metadata; The business data is encapsulated into an immutable archived evidence package for single-set compliant archiving, and the deterministic finite state machine is irreversibly transitioned to the archived final state.
8. The method according to claim 1, characterized in that, The steps of continuously collecting full-process flow timeliness data of completed fee transaction instances and dynamically adjusting the configuration parameters of the deterministic finite state machine include: Continuously collect timeliness data of the entire process of completed fee transactions; wherein, the timeliness data includes the average processing time, waiting time, process connection delay and total closed loop time of each business link; The timeliness data is statistically modeled by scenario and stage, respectively, to generate a full-process timeliness feature profile for identifying process bottlenecks and optimizable nodes. Based on the actual running time and time proportion of each link in the timeliness feature profile, the adjustment direction of the state machine basic template is determined; In accordance with the aforementioned adjustment direction, for the bottleneck links in the process, the connection triggering mechanism and execution scheduling logic of the state machine business links are optimized with compliance verification, and compliance and data consistency are verified synchronously after each optimization. The state machine configuration of subsequent newly added cost transaction instances is updated based on the optimized base template.
9. A technology device for end-to-end enterprise cost processing, characterized in that, include: The configuration module, in response to a user's consumption request, configures a deterministic finite state machine for the fee transaction instance corresponding to the consumption request and sets it to the initial state; The driving module, based on the real-time state of the deterministic finite state machine, drives the execution of each processing step of the cost transaction instance; The adjustment module continuously collects the timeliness data of the entire process of completed fee transaction instances and dynamically adjusts the configuration parameters of the deterministic finite state machine.
10. An electronic device, characterized in that, It includes a memory, a processor, and a program stored in the memory and capable of running on the processor, wherein the processor executes the program to implement the method as described in any one of claims 1 to 8.