An engineering implementation credential auto-collection method and system
Patent Information
- Application Number
- CN202610921790.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-25
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2046-06-25
AI Technical Summary
[0004]本发明的目的是针对现有工程实施凭证归集方法在面对复杂工程审计场景时存在的凭证处理效率与数据可信度低下的问题,提出了一种工程实施凭证自动归集方法及系统,通过构建核算策略映射表与核算规则映射表的双层动态路由机制,依据工程实施凭证标识自适应匹配对应的凭证核算策略和凭证核算规则,进而依据行项目拆分规则、行项目合并规则的组合逻辑动态生成业务核算凭证,同时基于追溯配置规则对凭证进行血缘鉴定以生成覆盖正向与反向的完整溯源路径,最终调用记账服务完成归集并将溯源路径与业务核算日志关联配置,以此实现凭证归集规则的自适应解耦与灵活编排、凭证颗粒度的可控统一以及从原始凭证到核算日志的全链路血缘可溯,从而显著提升复杂审计场景下的凭证处理自适应能力与数据可信度
(1)本申请通过构建核算策略映射表与核算规则映射表的双层动态路由机制,将工程实施凭证标识与凭证核算策略、凭证核算事务与凭证核算规则进行关联,实现了凭证归集规则的自适应解耦与灵活编排,使得系统能够灵活适配不同工程类型等多变业务场景,提高了工程实施凭证处理的扩展性和维护效率。通过行项目拆分规则和行项目合并规则的组合逻辑配置业务核算凭证,能够满足复杂的凭证生成需求,提高了凭证处理的自动化程度和准确性;
Smart Images

Figure CN122472922B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data processing technology, specifically to a method and system for automatically collecting engineering implementation vouchers. Background Technology
[0002] For engineering audits of large-scale power grid projects, existing methods for collecting engineering implementation vouchers mostly employ fixed-process automated or semi-automated procedures, which are ill-suited to the dynamic changes in complex business scenarios involving multiple funding sources, cost centers, and accounting units. In practical engineering applications, this manifests in several ways: First, the voucher splitting and merging logic differs significantly for different project types (e.g., transmission and transformation, distribution network upgrades), and existing systems lack the ability to flexibly configure processing rules at different granularities, resulting in low voucher collection efficiency. Second, the complete processing chain from original engineering implementation vouchers to final accounting vouchers lacks a traceability mechanism, making it difficult to quickly pinpoint the source of problems when data deviations occur, leading to a severe lack of traceability in the audit process. Third, business accounting logs and voucher processing paths are stored independently, failing to form an effective closed-loop audit chain and severely restricting the systematic verification of audit compliance.
[0003] The aforementioned technical deficiencies result in significant shortcomings in the adaptability of existing methods for voucher processing, the traceability of problematic data, and the reliability assurance of the entire audit process, making it difficult to improve the processing efficiency and data verifiability level of auditing large-scale power grid engineering projects. Summary of the Invention
[0004] The purpose of this invention is to address the problems of low voucher processing efficiency and low data reliability in existing engineering implementation voucher collection methods when facing complex engineering audit scenarios. It proposes an automatic engineering implementation voucher collection method and system. This system constructs a two-layer dynamic routing mechanism consisting of an accounting strategy mapping table and an accounting rule mapping table. Based on the engineering implementation voucher identifier, it adaptively matches the corresponding voucher accounting strategy and voucher accounting rules. Then, based on the combined logic of line item splitting rules and line item merging rules, it dynamically generates business accounting vouchers. Simultaneously, it performs lineage identification on vouchers based on traceability configuration rules to generate a complete traceability path covering both forward and reverse directions. Finally, it calls the accounting service to complete the collection and associates the traceability path with the business accounting log. This achieves adaptive decoupling and flexible arrangement of voucher collection rules, controllable and unified voucher granularity, and end-to-end traceability from original vouchers to accounting logs, thereby significantly improving the adaptive capability of voucher processing and data reliability in complex audit scenarios.
[0005] In a first aspect, one technical solution provided in this embodiment of the invention is: a method for automatically collecting engineering implementation vouchers, comprising the following steps: The corresponding voucher accounting strategy is determined based on the project implementation voucher identifier and the preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transaction corresponding to the business scenario. The corresponding voucher accounting rules are determined based on the voucher accounting transaction and the preset accounting rule mapping table. The voucher accounting rules include line item splitting rules, line item merging rules, and traceability configuration rules. Based on the combined logic of the voucher accounting strategy and the line item splitting and merging rules in the voucher accounting rules, configure business accounting vouchers that are suitable for the business scenario; and perform lineage identification on the business accounting vouchers to obtain the traceability path according to the traceability configuration rules. Call the accounting service to collect business accounting vouchers and generate business accounting logs, and configure the traceability path for the business accounting logs.
[0006] As a preferred embodiment, before determining the corresponding voucher accounting strategy based on the project implementation voucher identifier and a preset accounting strategy mapping table, the following steps are also included: A mapping table for accounting strategies is constructed using the identity code corresponding to the project implementation voucher as the index key and the strategy code corresponding to the voucher accounting strategy as the association value. Based on the business scenario, configure the input parameter interface for the accounting strategy mapping table to determine the required input parameter fields and input parameter format validation rules; Based on the business scenario, configure a condition judgment interface for the accounting strategy mapping table to determine the business combination logic and business operation logic; Configure output parameter interfaces for the accounting strategy mapping table based on the business scenario, and determine the voucher accounting transactions of the output parameter interfaces according to the condition judgment logic of the output parameter interfaces.
[0007] As a preferred embodiment, before determining the corresponding voucher accounting rule based on the voucher accounting transaction and a preset accounting rule mapping table, the following steps are also included: An accounting rule mapping table is constructed using the identity code corresponding to the voucher accounting transaction as the index key and the rule code corresponding to the voucher accounting rule as the association value. The determination event of the voucher accounting transaction and the corresponding association adaptation event are used as the joint call triggering condition of the accounting rule mapping table to retrieve the corresponding voucher accounting rule. Extract the core configuration information corresponding to the voucher accounting rule from the accounting rule configuration library. The core configuration information includes line item splitting rules, line item merging rules, and traceability configuration rules.
[0008] As a preferred embodiment, the step of using the deterministic event of the voucher accounting transaction and the corresponding associated adaptation event as the joint invocation trigger condition for the accounting rule mapping table to retrieve the corresponding voucher accounting rule includes the following steps: When the time interval required for the execution of the voucher accounting rule corresponding to the voucher accounting transaction overlaps with the preset time interval [effective timestamp, expiration timestamp] in some time zones; and... The effective version number of the voucher accounting rule corresponding to the voucher accounting transaction exists; and, If the rule dependency chain of the voucher accounting rule corresponding to the voucher accounting transaction is successfully verified, the joint call triggering condition is determined to be met, and the accounting rule mapping table calls the voucher accounting rule corresponding to the voucher accounting transaction. Specifically, a rule dependency chain is constructed based on the rule code, the preceding rule code, and the following rule code corresponding to the current voucher accounting rule; successful verification of the rule dependency chain indicates that the preceding rule corresponding to the current voucher accounting rule has been executed and the following rule can be connected.
[0009] As a preferred embodiment, the step of configuring business accounting vouchers adapted to the business scenario based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules includes the following steps: Extract the pre-configuration parameters and business constraints of the voucher accounting strategy, and perform consistency verification on the pre-configuration parameters and business constraints to determine the compliance of the configuration process; the pre-configuration parameters of the voucher include the accounting unit to which the voucher belongs, the voucher accounting sub-number, and the voucher generation quantity estimation rules. Extract the splitting dimensions and splitting logic of vouchers that meet the compliance requirements of the configuration process from the line item splitting rules of the voucher accounting rules; generate voucher headers and preliminary voucher line items according to the splitting dimensions and splitting logic; Extract the merging dimensions and merging logic from the line item merging rules of the voucher accounting rules. Based on the merging dimensions and merging logic, modify the initial line items of the voucher to determine the target voucher line items. Sort the target voucher line items according to the business logic order and assign a unique voucher line number to construct a voucher line item set. Based on the condition judgment logic in the voucher accounting strategy and the joint call triggering conditions in the voucher accounting rules, the target voucher line items in the voucher line item set are sequentially verified for consistency. The target voucher line items that pass the verification and their corresponding voucher headers are then assembled into business accounting vouchers according to the preset engineering implementation voucher format.
[0010] As a preferred embodiment, the process of generating the voucher header and preliminary voucher line items according to the splitting dimension and splitting logic includes the following steps: A voucher header is generated for each split voucher unit, and the fields of the voucher header are automatically filled based on the split dimension and accounting strategy; Based on the mapping relationship between document fields and voucher line item fields in the voucher accounting rules, the split voucher units are converted into preliminary voucher line items, and a temporary association is established between the preliminary voucher line items and the original voucher line number.
[0011] As a preferred embodiment, the step of revising the initial voucher line items according to the merging dimension and merging logic to determine the target voucher line items includes the following steps: Extract the merge fields from the initial voucher line items that have completely identical values in the merge dimension fields; summarize and calculate the merge fields to generate the merged target voucher line items; or / and, Extract the ignored fields from the initial row items of the voucher. If the value of the ignored field is inconsistent with the row items to be merged, set the value of the ignored field in the target voucher row item after merging to empty, and mark the association between the original value of the ignored field and the merged row item.
[0012] As a preferred embodiment, the step of obtaining the traceability path by performing lineage identification on business accounting vouchers according to traceability configuration rules includes the following steps: Extract core traceability factors and logical association factors that characterize the lineage relationship between voucher business and business accounting voucher from the traceability configuration rules. The core traceability factors include voucher business side fields and business accounting voucher side fields. The logical association factors include single mapping factors that characterize the line item merging rule when it is not enabled and combined mapping factors that characterize the line item merging rule when it is enabled. Based on core traceability factors and logical correlation factors, construct a forward traceability path representing voucher business to business accounting voucher and a reverse traceability path representing business accounting voucher to voucher business.
[0013] As a preferred embodiment, the step of generating the logical association factor includes: When the line item merging rule is not enabled in the voucher accounting rule, after generating the initial line items of the voucher, a single lineage association is established between each line of data in the project implementation voucher and the corresponding voucher line item to generate a single mapping factor. When the voucher accounting rules enable the line item merging rule, after the initial line item merging of the voucher is performed, a merge traceability information table is configured for the merged target voucher line item; and a combination lineage association is established between each line of data in the engineering implementation voucher and the corresponding merge traceability information table to generate a combination mapping factor.
[0014] As a preferred embodiment, the step of calling the accounting service to collect business accounting vouchers and generate business accounting logs, and configuring the traceability path for the business accounting logs, includes the following steps: The core associated parameters for determining the accounting service address are based on the voucher header. These core associated parameters include the accounting unit code to which the business accounting voucher belongs and the accounting system identifier. The accounting unit code and accounting system identifier are used as the composite index key value to associate and store the corresponding accounting service URL from the preset accounting service routing configuration rule base; The complete data and traceability path of the business accounting voucher are transmitted to the determined accounting service URL through a standardized interface. The complete data of the business accounting voucher is verified for data consistency, and the traceability path is verified for path consistency to determine the accounting log. The accounting logs and tracing paths are stored in a structured manner; the tracing elements of the tracing paths are extracted, and the structured data composed of the tracing elements and accounting logs is encrypted using a hash algorithm to obtain the log tracing verification code; and the log tracing verification code is stored in a structured storage location; wherein, the tracing elements include the number of path nodes and the path link length.
[0015] Secondly, an embodiment of the present invention also provides a technical solution: an automatic collection system for engineering implementation vouchers, applicable to the automatic collection method for engineering implementation vouchers as described in the first aspect, comprising: Accounting strategy determination module: Determines the corresponding voucher accounting strategy based on the project implementation voucher identifier and a preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transactions corresponding to the business scenario. Accounting rule determination module: Determines the corresponding voucher accounting rules based on the voucher accounting transaction and a preset accounting rule mapping table. The voucher accounting rules include line item splitting rules, line item merging rules, and traceability configuration rules. Voucher generation module: Based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules, configure business accounting vouchers that are adapted to the business scenario; Traceability path generation module: Based on the traceability configuration rules, the module performs lineage identification on business accounting vouchers to obtain the traceability path; Accounting log generation module: calls the accounting service to complete the accounting of business accounting vouchers and generate accounting logs, and configures the traceability path for the accounting logs.
[0016] Thirdly, one technical solution provided in this embodiment of the invention is: an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the automatic collection method for engineering implementation vouchers as described in the first aspect.
[0017] Fourthly, one technical solution provided in this embodiment of the invention is: a storage medium storing computer-executable instructions, wherein when the computer-executable instructions are loaded and executed by a processor, the steps of the automatic collection method for engineering implementation vouchers as described in the first aspect are implemented.
[0018] The beneficial effects of this invention are: (1) This application constructs a two-layer dynamic routing mechanism of accounting strategy mapping table and accounting rule mapping table to associate project implementation voucher identifier with voucher accounting strategy, voucher accounting transaction with voucher accounting rule, and realizes adaptive decoupling and flexible arrangement of voucher collection rules. This enables the system to flexibly adapt to different project types and other changing business scenarios, and improves the scalability and maintenance efficiency of project implementation voucher processing. By configuring business accounting vouchers through the combination logic of line item splitting rules and line item merging rules, it can meet complex voucher generation requirements and improve the automation and accuracy of voucher processing. (2) This application uses the traceability configuration rules to identify the lineage of business accounting vouchers to obtain a complete traceability path covering both forward and reverse directions, and associates the traceability path with the business accounting logs to achieve forward traceability from the original engineering implementation voucher to the accounting voucher and reverse traceability from the accounting voucher to the original engineering implementation voucher, forming an effective closed-loop audit link and ensuring that the lineage of the voucher data is traceable throughout the entire chain. (3) This application uses a hash algorithm to encrypt the traceability elements and accounting logs to generate log traceability verification codes, which ensures the integrity and immutability of the accounting logs, so that the accounting logs are no longer stored in isolation, but become a self-verifiable audit closed loop, which significantly improves the data credibility in complex audit scenarios.
[0019] The above description of the invention is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0020] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings. The 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.
[0021] Figure 1 This is a flowchart of an automatic collection method for engineering implementation vouchers according to the present invention; Figure 2 This is a flowchart of the business accounting voucher generation process of the present invention; Figure 3 This is a flowchart of the traceability path generation process for the present invention; Figure 4 This is a flowchart of the logical association factor generation process of the present invention; Figure 5 This is a flowchart illustrating the process of generating business accounting logs for this invention. Figure 6 This is a structural block diagram of an automated financial system according to the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only one preferred embodiment of this invention and are only used to explain this invention. They do not limit the scope of protection of this invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0023] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations (or steps) can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but it may also have additional steps not included in the figures; the process may correspond to a method, function, procedure, subroutine, subroutine, etc.
[0024] Example 1: As Figure 1 As shown, an automatic collection method for engineering implementation vouchers is illustrated in steps S1 to S4.
[0025] S1. Determine the corresponding voucher accounting strategy based on the project implementation voucher identifier and the preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transaction corresponding to the business scenario.
[0026] It is understandable that the engineering implementation voucher identifier is a unique identification code for the original documents generated by the business system, such as the main network project audit document number or distribution network implementation management document number in the engineering audit and control system. The accounting strategy mapping table is a pre-configured mapping relationship table in the system database, storing the correspondence between engineering implementation voucher identifiers and voucher accounting strategies. The voucher accounting strategy defines the accounting processing logic under specific business scenarios, such as the engineering completion settlement audit strategy or the distribution network project cost settlement strategy. By retrieving the engineering implementation voucher identifier from the accounting strategy mapping table, this embodiment can quickly locate the voucher accounting strategy required for the current business scenario, thereby parsing out the corresponding voucher accounting transaction, such as generating audit working papers or generating a valuation report. This embodiment constitutes the first layer of a two-layer dynamic routing mechanism between the accounting strategy mapping table and the accounting rule mapping table. It adaptively matches the corresponding voucher accounting strategy based on the engineering implementation voucher identifier, realizing adaptive decoupling and flexible arrangement of voucher collection rules. This ensures that changes to the business front-end do not directly affect the back-end accounting logic, improving the system's adaptability.
[0027] As an optional embodiment, before determining the corresponding voucher accounting strategy based on the engineering implementation voucher identifier and the preset accounting strategy mapping table, steps S101 to S104 are also included.
[0028] S101. Construct an accounting strategy mapping table using the identity code corresponding to the project implementation voucher identifier as the index key value and the strategy code corresponding to the voucher accounting strategy as the association value.
[0029] Specifically, the project implementation certificate identifier is a unique identifier for the original business data, while the identity code is a feature code extracted from the project implementation certificate identifier to identify the business type. For example, in project audit and control applications, the identity code could be the project type code for main network project audit or distribution network implementation management. The strategy code is a unique identifier for the system's predefined accounting strategy, such as "Project Completion Settlement Audit Strategy_01". The accounting strategy mapping table is essentially a set of key-value pairs, which quickly indexes the corresponding strategy code through the identity code, thereby achieving rapid matching of business scenarios to accounting strategies. This construction method allows the system to add a mapping record to the mapping table when adding a new business type, without modifying the program logic, greatly improving the system's scalability.
[0030] S102. Configure the input parameter interface for the accounting strategy mapping table based on the business scenario to determine the required input parameter fields and input parameter format verification rules.
[0031] Specifically, the input parameter interface defines the data standards for entering the accounting process. This embodiment configures different input parameter interfaces according to different business scenarios. For example, in the scenario of project completion settlement audit, required input parameter fields may include project number, contract amount, settlement amount, etc. The input parameter format validation rules define the data type (such as numeric, character), length limit (such as a maximum of 12 characters for the amount field), and mandatory field validation for these fields. Through the configuration of the input parameter interface, this embodiment can perform validity verification before the data enters the accounting process, preventing accounting failures due to missing data or incorrect format, and ensuring data quality.
[0032] S103. Configure a condition judgment interface for the accounting strategy mapping table based on the business scenario to determine the business combination logic and business operation logic.
[0033] Specifically, the condition judgment interface is the core logic processing unit of the voucher accounting strategy. The business combination logic defines the AND, OR, and NOT relationships between multiple business conditions. For example, when the project type is distribution network and the settlement amount is greater than 500,000, the business calculation logic defines specific calculation rules, such as the settlement amount minus the audit reduction amount equals the audited amount. This embodiment defines these logics through a visual configuration interface or a script engine (such as Groovy scripts), enabling business personnel to flexibly adjust the voucher accounting strategy according to changes in business rules without the need for developer intervention.
[0034] S104. Configure an output parameter interface for the accounting strategy mapping table based on the business scenario, and determine the voucher accounting transaction of the output parameter interface according to the condition judgment logic of the output parameter interface.
[0035] Specifically, the output parameter interface defines the output result of the voucher accounting strategy, i.e., the voucher accounting transaction. This transaction serves as the input for subsequent rule processing, such as generating audit working papers or generating valuation reports. The conditional judgment logic determines which voucher accounting transaction is output under what business combination logic and operational logic. For example, when the conditional judgment interface determines that the difference between the settlement amount and the submitted amount exceeds 10%, the output parameter interface outputs a high-risk audit transaction; otherwise, it outputs a regular audit transaction. Through this configuration, this embodiment can achieve refined diversion of business scenarios, ensuring that different business data enters the most appropriate accounting process.
[0036] S2. Determine the corresponding voucher accounting rules based on the voucher accounting transaction and the preset accounting rule mapping table. The voucher accounting rules include line item splitting rules, line item merging rules, and traceability configuration rules.
[0037] Specifically, after determining the voucher accounting transaction, this embodiment further invokes the accounting rule mapping table, forming the second layer of the two-layer dynamic routing mechanism. The accounting rule mapping table stores the association between the voucher accounting transaction and the specific execution rules. The voucher accounting rules are fine-grained guidance documents for performing accounting operations. Among them, the line item splitting rule defines how to split an original engineering implementation voucher into multiple accounting voucher line items, such as splitting according to cost type or project stage; the line item merging rule defines how to merge multiple split line items according to a certain dimension; and the traceability configuration rule defines the traceability information fields that need to be recorded during the voucher generation process, ensuring that the generated voucher can be traced back to the original business data. Through the two-layer dynamic routing mechanism of the accounting strategy mapping table and the accounting rule mapping table, this embodiment achieves adaptive decoupling and flexible orchestration of voucher collection rules. When the business scenario changes, only the accounting strategy mapping table needs to be adjusted; when the accounting details change, only the accounting rule mapping table needs to be adjusted, thereby greatly reducing system maintenance costs and improving the flexibility of engineering implementation voucher collection.
[0038] As an optional embodiment, before determining the corresponding voucher accounting rule based on the voucher accounting transaction and a preset accounting rule mapping table, steps S201 to S202 are also included.
[0039] S201. Construct an accounting rule mapping table using the identity code corresponding to the voucher accounting transaction as the index key and the rule code corresponding to the voucher accounting rule as the association value; use the determination event of the voucher accounting transaction and the corresponding association adaptation event as the joint call trigger condition of the accounting rule mapping table to retrieve the corresponding voucher accounting rule.
[0040] Specifically, after the accounting strategy determines the voucher accounting transaction, this embodiment enters the rule matching stage. The structure of the accounting rule mapping table is similar to that of the accounting strategy mapping table, but its index key value is the identity code of the voucher accounting transaction, and the associated value is the specific rule code. It should be noted that traditional rule invocation is often based on a single event trigger, while in this embodiment, rule retrieval requires both the determination event of the voucher accounting transaction (i.e., the transaction type output by the strategy) and the associated adaptation event (i.e., the context environment event related to the transaction, such as time, version, etc.). This dual verification mechanism can effectively prevent rules from being invoked incorrectly and ensure that the accounting rules are executed in the correct business context.
[0041] S203. Extract the core configuration information corresponding to the voucher accounting rule from the accounting rule configuration library. The core configuration information includes line item splitting rules, line item merging rules, and traceability configuration rules.
[0042] Specifically, the accounting rule configuration library is a data warehouse storing specific accounting logic. Once the accounting rule mapping table determines the rule code, this embodiment loads the core configuration information of that rule from the configuration library. The line item splitting rule defines how to split the original voucher into multiple accounting line items, such as splitting by expense account or supplier; the line item merging rule defines how to summarize the split line items, such as merging amounts under the same expense account; and the traceability configuration rule defines the traceability fields that need to be recorded, such as the original document ID and line number. By storing the core configuration information in a structured manner, different splitting, merging, and traceability rules can be flexibly combined to adapt to complex and ever-changing accounting needs. For example, in an engineering audit scenario, the same engineering settlement document may require different splitting and merging rules depending on the different audit stages (preliminary audit, secondary audit). This embodiment only needs to adjust the rule configuration in the configuration library without modifying the code logic.
[0043] As an optional embodiment, in S201, the determination event of the voucher accounting transaction and the corresponding associated adaptation event are used as the joint call triggering condition of the accounting rule mapping table to retrieve the corresponding voucher accounting rule, including the determination of the following three parallel necessary conditions.
[0044] First, determine whether the time interval required for the execution of the voucher accounting rule corresponding to the voucher accounting transaction overlaps with the preset time interval [effective timestamp, expiration timestamp].
[0045] Specifically, each accounting rule is configured with a valid time window. For example, the effective timestamp of a certain project audit fee accounting rule is January 1, 2023, 00:00:00, and the expiration timestamp is December 31, 2023, 23:59:59. When the system receives a trigger request for a voucher accounting transaction, it obtains the current system time or the time of the business transaction as the base time. The system calculates the intersection of the base time and a preset time interval. If the base time falls within the preset time interval, or if the execution time range of the rule overlaps with the preset time interval, the time interval condition is deemed met. This condition setting effectively prevents the invocation of expired historical rules or test rules that have not yet taken effect, ensuring that business processing is based on the currently valid accounting standard.
[0046] Secondly, determine whether the effective version number of the voucher accounting rule corresponding to the voucher accounting transaction exists.
[0047] Specifically, during system operation, the same accounting rule may undergo multiple iterations and updates, generating multiple versions. The effective version number is a unique identifier used by the system to mark the currently used rule version. When the system invokes a rule, it searches the rule configuration repository to see if a version number marked as effective exists. If it exists, it means that the rule has been approved and published, and can be invoked by business systems; if it does not exist, the rule may still be in the editing or testing stage and should not be invoked in the production environment. This condition ensures the correctness of the rule version invocation and avoids data accounting errors caused by version inconsistencies.
[0048] Finally, it is determined whether the rule dependency chain of the voucher accounting rule corresponding to the voucher accounting transaction has been successfully verified. If the verification is successful, the joint call trigger condition is determined to be met, and the accounting rule mapping table calls the voucher accounting rule corresponding to the voucher accounting transaction. Specifically, a rule dependency chain is constructed based on the rule code, the preceding rule code, and the following rule code corresponding to the current voucher accounting rule. Successful verification of the rule dependency chain indicates that the preceding rule corresponding to the current voucher accounting rule has been executed and the following rule can be connected.
[0049] Specifically, in complex accounting processes, rules often have execution order dependencies. For example, a rule for calculating engineering material costs might be a prerequisite for calculating the total engineering cost; only after the material cost calculation is completed can the total cost be calculated. In this embodiment, when constructing the rule dependency chain, the configuration information of the current rule is parsed, and its prerequisite and successor rule codes are extracted to form a directed acyclic graph structure. Before executing the current rule, this embodiment checks whether the execution status of the prerequisite rule is "completed" and whether the successor rule is in a "pending execution" or "connectable" state. If the prerequisite rule has not been executed or the successor rule is locked, the check fails. This condition ensures the sequential execution of rules and prevents business logic errors caused by skipping necessary steps or repeated execution.
[0050] In this embodiment, the joint call triggering condition is determined to be met only when the above three conditions are met simultaneously. Only then will the accounting rule mapping table call the voucher accounting rule corresponding to the voucher accounting transaction. This multi-condition joint verification mechanism constitutes a key defense point for rule calls, which greatly improves the accuracy and reliability of the automatic collection process of vouchers in engineering implementation.
[0051] S3. Based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules, configure business accounting vouchers that are suitable for the business scenario; and perform lineage identification on the business accounting vouchers to obtain the traceability path according to the traceability configuration rules.
[0052] Specifically, this embodiment processes the original business data based on the configuration parameters in the voucher accounting strategy, combined with line item splitting and merging rules. First, the original voucher data is split into preliminary voucher line items according to the splitting rules; then, the split line items are merged according to the merging rules to generate the final business accounting voucher. For example, in an engineering audit scenario, an engineering settlement document containing multiple cost types can be split into multiple line items such as material costs, labor costs, and machinery usage fees, and then material cost line items from the same supplier are merged. By dynamically configuring the business accounting voucher through the combined logic of splitting and merging rules, controllable and unified voucher granularity is achieved, ensuring that the voucher processing results corresponding to different engineering types remain consistent in granularity, thus improving the automation and accuracy of voucher processing. Simultaneously with generating the business accounting voucher, this embodiment performs lineage identification according to the traceability configuration rules. Lineage identification refers to establishing the association between the business accounting voucher and the original engineering implementation voucher. This embodiment extracts key fields (such as document ID, line number, amount, etc.) from the original engineering implementation vouchers as core traceability factors and records their flow path during the voucher generation process, forming a complete traceability path covering both forward and reverse directions. The forward traceability path records the data flow from the original engineering implementation voucher to the business accounting voucher, while the reverse traceability path records the data source from the business accounting voucher to the original engineering implementation voucher. By covering the complete traceability path in both directions, the entire chain of voucher data is traceable, solving the problem of difficulty in tracing business data and accounting vouchers in existing technologies.
[0053] As an optional embodiment, based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules, business accounting vouchers adapted to the business scenario are configured; such as... Figure 2 As shown, it includes steps S301 to S304.
[0054] S301. Extract the pre-configuration parameters and business constraints of the voucher accounting strategy, and perform consistency verification on the pre-configuration parameters and business constraints to determine the compliance of the configuration process; the pre-configuration parameters of the voucher include the accounting unit to which the voucher belongs, the voucher accounting sub-number, and the voucher generation quantity estimation rules.
[0055] Specifically, the prerequisite parameters for voucher configuration are the basic configuration information required to generate vouchers, including the accounting unit to which the voucher belongs, the voucher's sub-account number, and the rules for estimating the number of vouchers to be generated. Business constraints are the restrictive rules imposed on voucher generation by the business scenario; for example, engineering audit vouchers must be associated with a valid project number, or the amount of expense reimbursement vouchers must not exceed the budget limit. Before formally processing the voucher data, this embodiment first extracts these parameters and conditions for consistency verification. For example, it verifies whether the accounting unit to which the voucher belongs exists in the system and is in a normal state, and whether the rules for estimating the number of vouchers to be generated match the current system load. If the verification passes, the configuration process is deemed compliant, and subsequent steps continue; if the verification fails, the process terminates and an error message is returned, thereby preventing invalid voucher generation due to basic configuration errors and ensuring the rigor of data processing.
[0056] S302. Extract the splitting dimensions and splitting logic of vouchers that meet the compliance requirements of the configuration process from the line item splitting rules of the voucher accounting rules; generate voucher headers and preliminary voucher line items according to the splitting dimensions and splitting logic.
[0057] Specifically, the splitting dimension defines the basis for splitting the original project implementation voucher into multiple line items, such as expense category, supplier, project stage, etc. The splitting logic defines the specific splitting algorithm, such as splitting by amount ratio or by quantity allocation. In an engineering audit scenario, an engineering settlement statement may contain various expenses such as material costs, labor costs, and machinery usage fees. According to the splitting rules, this settlement statement can be split into multiple voucher units, each corresponding to a specific expense type.
[0058] S303. Extract the merging dimension and merging logic from the line item merging rules of the voucher accounting rules. Based on the merging dimension and merging logic, modify the initial line items of the voucher to determine the target voucher line items. Sort the target voucher line items according to the business logic order and assign a unique voucher line number to construct a voucher line item set.
[0059] Specifically, the consolidation dimension defines the basis for merging multiple initial line items of a voucher into a single target line item, such as the accounting subject or the counterparty. The consolidation logic defines the calculation rules during consolidation, such as calculating the amount or accumulating the quantity.
[0060] S304. Based on the condition judgment logic in the voucher accounting strategy and the joint call triggering conditions in the voucher accounting rules, the target voucher line items in the voucher line item set are sequentially checked for consistency. The target voucher line items that pass the check and their corresponding voucher headers are assembled into business accounting vouchers according to the preset engineering implementation voucher format.
[0061] Specifically, before generating the final business accounting voucher, this embodiment performs a final consistency check on the set of voucher line items. The checks include: debit / credit balance verification (whether the total debit amount equals the total credit amount), mandatory field integrity verification (such as whether the accounting subject and amount are empty), and business logic verification (such as whether the voucher date is within the validity period). Only target voucher line items that pass all checks are retained and assembled with the voucher header into a standard business accounting voucher. This step ensures that the generated voucher complies with financial accounting standards, avoiding subsequent posting failures due to data errors.
[0062] Through the above-described splitting, merging, and correction logic, this embodiment can transform complex and diverse original business data (such as project settlement sheets and expense reimbursement sheets) into standardized accounting vouchers with unified structure and clear logic. By dynamically configuring business accounting vouchers through the combination logic of splitting and merging rules, controllable and unified voucher granularity is achieved, ensuring that the voucher processing results corresponding to different project types remain consistent in granularity. This not only improves the automation level of voucher generation but also effectively solves the conflict problem in the data merging process through a special processing mechanism that ignores fields, ensuring the accuracy and traceability of voucher data.
[0063] As an optional embodiment, the specific steps for generating the voucher header and initial voucher line items according to the splitting dimension and splitting logic are shown in S3021~S3022.
[0064] S3021. Generate a voucher header for each split voucher unit, wherein the fields of the voucher header are automatically filled based on the split dimension and accounting strategy.
[0065] Specifically, for each separated material cost voucher unit, the system automatically generates a voucher header. The summary field in the header is filled with "Project Settlement - Material Costs," and the accounting unit field is filled with the unit to which the current project belongs. This automatic filling mechanism ensures the accuracy and consistency of voucher information and reduces manual intervention.
[0066] S3022. Based on the mapping relationship between document fields and voucher line item fields in the voucher accounting rules, the split voucher units are converted into preliminary voucher line items, and a temporary association is established between the preliminary voucher line items and the original voucher line number.
[0067] Specifically, this embodiment pre-defines a mapping table between document fields and voucher line item fields. For example, the settlement amount field in the original document is mapped to the debit amount field in the voucher line item, and the supplier name field is mapped to the counterparty field in the voucher line item. During the conversion process, a temporary original line number identifier is first assigned to each initial voucher line item to record which line of data in the original document the line item originates from. This temporary association mechanism provides a data foundation for subsequent traceability path construction, ensuring that voucher line items can be accurately traced back to the original business data.
[0068] As an optional embodiment, the step of revising the initial voucher line items according to the merging dimension and merging logic to determine the target voucher line items includes the following steps: Extract the merge fields from the initial voucher line items that have completely identical values in the merge dimension fields; summarize and calculate the merge fields to generate the merged target voucher line items; or / and, Extract the ignored fields from the initial row items of the voucher. If the value of the ignored field is inconsistent with the row items to be merged, set the value of the ignored field in the target voucher row item after merging to empty, and mark the association between the original value of the ignored field and the merged row item.
[0069] Specifically, if multiple initial line items exist in a voucher, all with the same accounting category (raw materials) and the same supplier (Company A), then the condition of completely identical values in the consolidation dimension fields is met. This embodiment summarizes and calculates the amount fields of these line items to generate a new target voucher line item, whose amount is the sum of the amounts of the multiple line items. This process reduces the number of voucher line items, simplifies the voucher structure, and improves accounting efficiency.
[0070] Furthermore, ignored fields refer to fields that are unnecessary or have no significance in the merging process, such as remarks or invoice numbers. When the values of ignored fields are inconsistent in the initial line items of multiple documents to be merged (for example, the remarks of two line items are for materials and equipment, respectively), the system cannot directly merge these fields. In this case, the system sets the value of the ignored field in the target document line item to empty to avoid misleading information. At the same time, the system generates a correlation record to mark which merged line items the original values of these ignored fields originated from. This correction logic ensures the standardization of the merged document data while preserving the integrity of the original information through the correlation record, achieving a balance between data cleaning and information preservation.
[0071] As an alternative embodiment, such as Figure 3 As shown in Figures S311-S312, the steps for obtaining the traceability path by performing lineage identification on business accounting vouchers according to the traceability configuration rules are as follows.
[0072] S311. Extract core traceability factors and logical association factors representing the lineage relationship between voucher business and business accounting voucher from the traceability configuration rules. The core traceability factors include voucher business side fields and business accounting voucher side fields. The logical association factors include single mapping factors representing the non-enabled line item merging rules and combined mapping factors representing the enabled line item merging rules.
[0073] Specifically, core traceability factors are the fundamental data elements for constructing traceability paths, including voucher business-side fields and business accounting voucher-side fields. Voucher business-side fields refer to key fields in the original project implementation vouchers, such as project settlement document ID, line item number, expense type, and amount. Business accounting voucher-side fields refer to corresponding fields in the generated business accounting vouchers, such as voucher number, voucher line number, accounting subject, and debit amount. Logical association factors are logical objects describing the relationships between core traceability factors, including single mapping factors representing those without line item merging rules and combined mapping factors representing those with line item merging rules enabled. This embodiment determines the type of logical association factors to be generated in the current voucher processing flow by parsing the traceability configuration rules, thus laying the foundation for subsequently constructing accurate traceability paths.
[0074] S312. Construct a forward tracing path from voucher business to business accounting voucher and a reverse tracing path from business accounting voucher to voucher business based on core traceability factors and logical correlation factors.
[0075] Specifically, the forward tracing path records which line of data from the original project implementation voucher flowed to which line item of which accounting voucher, and its path nodes include "Original Document ID - Line Number - Voucher ID - Voucher Line Number". The reverse tracing path records which data lines from the original project implementation voucher each line item of the accounting voucher originates from, and its path nodes include "Voucher ID - Voucher Line Number - Original Document ID - Line Number". This embodiment, by constructing a complete tracing path covering both forward and reverse paths, allows auditors to query which vouchers were ultimately generated from a particular original business transaction, as well as the specific data source of a particular voucher, achieving full-chain traceability of voucher data.
[0076] As an alternative embodiment, such as Figure 4 As shown, the steps for generating logical association factors are as shown in S321~S322.
[0077] S321. When the voucher accounting rules do not enable the line item merging rule, after generating the initial line items of the voucher, a single lineage association is established between each line of data of the project implementation voucher and the corresponding voucher line item to generate a single mapping factor.
[0078] Specifically, in scenarios where merging rules are not enabled, the line items of the original project implementation voucher and the line items of the accounting voucher typically have a one-to-one or one-to-many splitting relationship. For example, a project settlement statement containing 10 lines of details, after being processed by splitting rules, generates 10 preliminary voucher line items. In this case, a single mapping factor is established for each line of data, such as settlement statement line 1 → voucher line 1, settlement statement line 2 → voucher line 2, etc. This one-to-one or one-to-many mapping relationship structure is simple, easy to maintain, and can clearly reflect the data flow path.
[0079] S322. When the voucher accounting rule enables the line item merging rule, after the initial line item merging of the voucher is performed, a merge traceability information table is configured for the merged target voucher line item; a combination lineage association is established between each line of data of the engineering implementation voucher and the corresponding merge traceability information table to generate a combination mapping factor.
[0080] Specifically, in scenarios where merging rules are enabled, multiple rows of original data may be merged into a single voucher row, creating a complex many-to-one mapping relationship. For example, suppose rows 1 (material cost 100 yuan), 3 (material cost 200 yuan), and 5 (material cost 150 yuan) in the original project settlement statement are merged into a single raw materials-material cost voucher row (amount 450 yuan). In this case, if only a simple mapping relationship is recorded, it will be impossible to distinguish which original transactions each 450 yuan in the voucher row originates from. To solve this problem, this embodiment introduces a merged traceability information table. This table records in detail the correspondence between the merged target voucher row item and all merged original row items, including the original row number, original amount, and merging ratio. This embodiment establishes a link between each row of data in the project implementation voucher (such as rows 1, 3, and 5) and this merged traceability information table, forming a combined mapping factor. When an auditor clicks on a voucher row item, the system locates the merged traceability information table through the combined mapping factor, and then expands to display the detailed data of all original row items. This design cleverly solves the problem of traceability after data merging, ensuring the simplicity of accounting vouchers while preserving the granularity of the original data.
[0081] S4. Call the accounting service to complete the collection of business accounting vouchers and generate business accounting logs, and configure the traceability path for the business accounting logs.
[0082] Specifically, this embodiment calls the accounting service through a preset interface to transmit the configured business accounting voucher data to the accounting service for collection and storage. After the accounting service completes the voucher posting, it generates a business accounting log. This log records key information such as the voucher collection time, operator, and voucher number. In particular, the system associates the traceability path generated in step S3 with this business accounting log, and stores the traceability path and business accounting log in a structured manner. This ensures that each accounting log not only records the operation information of voucher collection but also carries the complete lineage from the original business data to the final voucher. When auditors need to verify the source of a voucher, they can quickly locate the original project implementation voucher through the traceability path in the business accounting log, and even trace back to the specific business operation link, thus forming an effective closed-loop audit link. This achieves full-link traceability from the original voucher to the accounting log, significantly improving data credibility in complex audit scenarios.
[0083] As an alternative embodiment, such as Figure 5 As shown, the steps of calling the accounting service to complete the collection of business accounting vouchers and generate business accounting logs, and configuring the traceability path for the business accounting logs are as shown in S401~S404.
[0084] S401. Determine the core associated parameters of the accounting service address based on the voucher header. The core associated parameters include the accounting unit code and accounting system identifier to which the business accounting voucher belongs.
[0085] Specifically, in the IT architecture of large enterprises or group companies, multiple accounting systems often operate in parallel. For example, an engineering audit and control system may need to interface with multiple heterogeneous systems such as a financial control system and an ERP accounting system. The accounting unit code carried in the voucher header is used to identify the organization to which the voucher belongs (such as a provincial company or a municipal company), and the accounting system identifier is used to identify the type of the target accounting system (such as an NC system or an SAP system). The system parses the voucher header and extracts these two fields as core association parameters, providing a basis for subsequent routing and addressing. This avoids hardcoding the target system address in the code, enabling the system to flexibly adapt to organizational restructuring or system upgrades and migrations.
[0086] S402. Using the accounting unit code and accounting system identifier as the combined index key value, the corresponding accounting service URL is associated and stored from the preset accounting service routing configuration rule base.
[0087] Specifically, this embodiment pre-defines an accounting service routing configuration rule base, which stores the mapping relationship between accounting unit codes, accounting system identifiers, and accounting service URLs. For example, when the core associated parameters are unit code: ZJ_SGS and system identifier: NC, the system searches the rule base using the composite index key value to locate the corresponding accounting service URL, http: / / xxx (example). This composite index mechanism can accurately distinguish the service addresses of different accounting systems under the same unit, or the service instances of different units under the same accounting system, achieving precise routing of service calls and effectively solving the service addressing problem in a multi-system coexistence environment.
[0088] S403. Transmit the complete data and traceability path of the business accounting voucher to the determined accounting service URL through a standardized interface, perform data consistency verification on the complete data of the business accounting voucher and path consistency verification on the traceability path, and determine the accounting log.
[0089] Specifically, the system encapsulates standardized RESTful or WebService interfaces to package and transmit the complete data of business accounting vouchers (including voucher headers and voucher line items) and the traceability path generated in the aforementioned embodiments to the accounting service. Before and after data transmission, the system performs dual consistency checks. Data consistency check verifies whether the hash values of the voucher data are consistent before and after transmission to prevent data loss or tampering during network transmission; path consistency check verifies whether the number of nodes and link length in the traceability path are consistent with preset rules to ensure the integrity of the traceability path. Only when both checks pass will the accounting service generate an accounting log, recording the metadata of this aggregation operation, ensuring the reliability of cross-system data interaction.
[0090] S404. The accounting log and the tracing path are stored in a structured manner; the tracing elements of the tracing path are extracted, and the structured data composed of the tracing elements and the accounting log is encrypted using a hash algorithm to obtain the log tracing verification code; and the log tracing verification code is stored in the structured storage location; wherein, the tracing elements include the number of path nodes and the path link length.
[0091] Specifically, to prevent malicious modification or deletion of accounting logs, this embodiment introduces an encryption verification mechanism based on hash algorithms. The system extracts key elements from the tracing path, such as the number of path nodes (e.g., 5 nodes) and the path link length (e.g., 3-level link), which reflect the topology of the voucher flow. Subsequently, the system combines the tracing elements with key fields of the accounting log (e.g., log ID, generation time, operator) to form a structured data string. This string is then processed using national cryptographic hash algorithms such as SHA-256 or SM3 to generate a unique log tracing verification code (Hash value). This verification code is stored along with the accounting log. Due to the one-way and collision-resistant nature of hash algorithms, any minor alteration to the log content or tracing path will cause the verification code to fail. Auditors can verify the authenticity and integrity of the logs simply by recalculating the verification code and comparing it with the stored value during subsequent audits. By associating the traceability path with the business accounting log and using a hash algorithm to generate a log traceability verification code, this embodiment forms an effective closed-loop audit link, ensuring that the entire lineage of voucher data is traceable and significantly improving data credibility in complex audit scenarios.
[0092] Example 2, an optional embodiment also provided in this embodiment of the invention is: an automatic collection system for engineering implementation documents, applicable to the automatic collection method for engineering implementation documents described in the above embodiments, such as... Figure 6 As shown, it includes: Accounting strategy determination module 001: Determines the corresponding voucher accounting strategy based on the project implementation voucher identifier and a preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transaction corresponding to the business scenario. Accounting rule determination module 002: Determines the corresponding voucher accounting rule based on the voucher accounting transaction and a preset accounting rule mapping table. The voucher accounting rule includes line item splitting rule, line item merging rule, and traceability configuration rule. Voucher generation module 003: Based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules, configure business accounting vouchers that are adapted to the business scenario; Traceability path generation module 004: Performs lineage identification on business accounting vouchers according to traceability configuration rules to obtain traceability paths; Accounting Log Generation Module 005: Calls the accounting service to complete the accounting of business accounting vouchers and generate accounting logs, and configures the traceability path for the accounting logs.
[0093] Specifically, the accounting strategy determination module is the system's entry point. It receives project implementation voucher identifiers from business systems (such as the project audit and control system). Through this module, the system forms the first layer of a two-tiered dynamic routing mechanism consisting of an accounting strategy mapping table and an accounting rule mapping table. Based on the project implementation voucher identifiers, it adaptively matches the corresponding voucher accounting strategy, achieving adaptive decoupling and flexible arrangement of voucher collection rules. This ensures that changes to the business front-end do not require modifications to the back-end processing logic; only adjustments to the mapping table configuration are needed. The accounting rule determination module is connected to the accounting strategy determination module and receives the voucher accounting transactions output by it.
[0094] The accounting rule determination module not only performs simple key-value matching but also handles complex joint call trigger condition determination, ensuring the accuracy of rule calls and the rigor of execution order, effectively preventing erroneous calls or logical confusion. The business accounting voucher generation module connects to the accounting strategy determination module and the accounting rule determination module at its input end. It performs consistency verification by extracting pre-parameters and business constraints from the voucher accounting strategy. Through this module, the system can transform complex unstructured or semi-structured business data into standardized accounting vouchers, achieving automated and intelligent voucher generation. The traceability path generation module is connected to the business accounting voucher generation module and works in parallel with or simultaneously with voucher generation. It reads the traceability configuration rules output by the accounting rule determination module, extracts core traceability factors and logical association factors, configures and merges the traceability information table, establishes a many-to-one combined lineage association, and finally outputs forward and reverse traceability paths. This ensures that every generated business accounting voucher can be accurately traced back to its original business source, meeting the stringent requirements for data traceability in auditing and verification. The accounting log generation module connects the business accounting voucher generation module and the traceability path generation module. This module is responsible for interacting with external accounting services, storing the accounting logs and traceability paths returned by the accounting services in a structured manner, and generating log traceability verification codes using hash algorithms to ensure the immutability of the logs. This achieves the final implementation of voucher collection and provides a secure and reliable data foundation for subsequent audit analysis.
[0095] Example 3: An optional embodiment also provided in this embodiment of the invention is: an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the automatic collection method for engineering implementation documents as described above.
[0096] Example 4, an optional embodiment provided in this embodiment of the invention is: a storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the automatic collection method for engineering implementation vouchers as described in the above embodiments.
[0097] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the specific device can be divided into different functional modules to complete all or part of the functions described above.
[0098] In the embodiments provided in this application, it should be understood that the disclosed structures and methods can be implemented in other ways. For example, the structural embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another structure, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between structures or units, and may be electrical, mechanical, or other forms.
[0099] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0100] Furthermore, in the embodiments of this application, the functional units can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0102] The specific embodiments described above are preferred embodiments of the automatic collection method and system for engineering implementation vouchers of the present invention, and are not intended to limit the specific scope of the present invention. The scope of the present invention includes but is not limited to the specific embodiments described above. All equivalent changes made in accordance with the shape and structure of the present invention are within the protection scope of the present invention.
Claims
1. A method for automatically collecting engineering implementation vouchers, characterized in that, Includes the following steps: The corresponding voucher accounting strategy is determined based on the project implementation voucher identifier and the preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transaction corresponding to the business scenario. The corresponding voucher accounting rules are determined based on the voucher accounting transaction and the preset accounting rule mapping table. The voucher accounting rules include line item splitting rules, line item merging rules, and traceability configuration rules. Based on the combined logic of the voucher accounting strategy and the line item splitting and merging rules in the voucher accounting rules, configure business accounting vouchers that are suitable for the business scenario; and perform lineage identification on the business accounting vouchers to obtain the traceability path according to the traceability configuration rules. Call the accounting service to complete the collection of business accounting vouchers and generate business accounting logs, and configure the traceability path for the business accounting logs; Before determining the corresponding voucher accounting rule based on the voucher accounting transaction and the preset accounting rule mapping table, the following steps are also included: An accounting rule mapping table is constructed using the identity code corresponding to the voucher accounting transaction as the index key and the rule code corresponding to the voucher accounting rule as the association value. The determination event of the voucher accounting transaction and the corresponding association adaptation event are used as the joint call triggering condition of the accounting rule mapping table to retrieve the corresponding voucher accounting rule. Extract the core configuration information corresponding to the voucher accounting rule from the accounting rule configuration library. The core configuration information includes line item splitting rules, line item merging rules, and traceability configuration rules. The step of using the deterministic event of the voucher accounting transaction and the corresponding associated adaptation event as the joint invocation trigger condition for the accounting rule mapping table to retrieve the corresponding voucher accounting rule includes the following steps: When the time interval required for the execution of the voucher accounting rule corresponding to the voucher accounting transaction overlaps with the preset time interval [effective timestamp, expiration timestamp] in some time zones; and... The effective version number of the voucher accounting rule corresponding to the voucher accounting transaction exists; and, If the rule dependency chain of the voucher accounting rule corresponding to the voucher accounting transaction is successfully verified, the joint call triggering condition is determined to be met, and the accounting rule mapping table calls the voucher accounting rule corresponding to the voucher accounting transaction. In this process, a rule dependency chain is constructed based on the rule code, the preceding rule code, and the following rule code corresponding to the current voucher accounting rule.
2. The method for automatically collecting engineering implementation vouchers according to claim 1, characterized in that, Before determining the corresponding voucher accounting strategy based on the project implementation voucher identifier and the preset accounting strategy mapping table, the following steps are also included: A mapping table for accounting strategies is constructed using the identity code corresponding to the project implementation voucher as the index key and the strategy code corresponding to the voucher accounting strategy as the association value. Based on the business scenario, configure the input parameter interface for the accounting strategy mapping table to determine the required input parameter fields and input parameter format validation rules; Based on the business scenario, configure a condition judgment interface for the accounting strategy mapping table to determine the business combination logic and business operation logic; Configure output parameter interfaces for the accounting strategy mapping table based on the business scenario, and determine the voucher accounting transactions of the output parameter interfaces according to the condition judgment logic of the output parameter interfaces.
3. The method for automatically collecting engineering implementation vouchers according to claim 1, characterized in that, The step of configuring business accounting vouchers adapted to the business scenario based on the combination logic of the voucher accounting strategy and the line item splitting and merging rules in the voucher accounting rules includes the following steps: Extract the pre-configuration parameters and business constraints of the voucher accounting strategy, and perform consistency verification on the pre-configuration parameters and business constraints to determine the compliance of the configuration process; the pre-configuration parameters of the voucher include the accounting unit to which the voucher belongs, the voucher accounting sub-number, and the voucher generation quantity estimation rules. Extract the splitting dimensions and splitting logic of vouchers that meet the compliance requirements of the configuration process from the line item splitting rules of the voucher accounting rules; generate voucher headers and preliminary voucher line items according to the splitting dimensions and splitting logic; Extract the merging dimensions and merging logic from the line item merging rules of the voucher accounting rules. Based on the merging dimensions and merging logic, modify the initial line items of the voucher to determine the target voucher line items. Sort the target voucher line items according to the business logic order and assign a unique voucher line number to construct a voucher line item set. Based on the conditional judgment logic in the voucher accounting strategy, the target voucher line items in the voucher line item set are sequentially checked for consistency. The target voucher line items that pass the check and their corresponding voucher headers are then assembled into business accounting vouchers according to the preset engineering implementation voucher format.
4. The method for automatically collecting engineering implementation vouchers according to claim 3, characterized in that, The process of generating voucher headers and preliminary voucher line items according to splitting dimensions and splitting logic includes the following steps: A voucher header is generated for each split voucher unit, and the fields of the voucher header are automatically filled based on the split dimension and accounting strategy; Based on the mapping relationship between document fields and voucher line item fields in the voucher accounting rules, the split voucher units are converted into preliminary voucher line items, and a temporary association is established between the preliminary voucher line items and the original voucher line number.
5. The method for automatically collecting engineering implementation vouchers according to claim 3, characterized in that, The process of revising the initial voucher line items based on the merging dimension and merging logic to determine the target voucher line items includes the following steps: Extract the merge fields from the initial voucher line items that have completely identical values in the merge dimension fields; summarize and calculate the merge fields to generate the merged target voucher line items; or / and, Extract the ignored fields from the initial row items of the voucher. If the value of the ignored field is inconsistent with the row items to be merged, set the value of the ignored field in the target voucher row item after merging to empty, and mark the association between the original value of the ignored field and the merged row item.
6. The method for automatically collecting engineering implementation vouchers according to claim 1, characterized in that, The process of obtaining the traceability path by performing lineage identification on business accounting vouchers according to traceability configuration rules includes the following steps: Extract core traceability factors and logical association factors that characterize the lineage relationship between voucher business and business accounting voucher from the traceability configuration rules. The core traceability factors include voucher business side fields and business accounting voucher side fields. The logical association factors include single mapping factors that characterize the line item merging rule when it is not enabled and combined mapping factors that characterize the line item merging rule when it is enabled. Based on core traceability factors and logical correlation factors, construct a forward traceability path representing voucher business to business accounting voucher and a reverse traceability path representing business accounting voucher to voucher business.
7. The method for automatically collecting engineering implementation vouchers according to claim 6, characterized in that, The steps for generating the logical association factor include: When the line item merging rule is not enabled in the voucher accounting rule, after generating the initial line items of the voucher, a single lineage association is established between each line of data in the project implementation voucher and the corresponding voucher line item to generate a single mapping factor. When the voucher accounting rules enable the line item merging rule, after the initial line item merging of the voucher is performed, a merge traceability information table is configured for the merged target voucher line item; and a combination lineage association is established between each line of data in the engineering implementation voucher and the corresponding merge traceability information table to generate a combination mapping factor.
8. The method for automatically collecting engineering implementation vouchers according to claim 3, characterized in that, The process of calling the accounting service to collect business accounting vouchers and generate business accounting logs, and configuring the traceability path for the business accounting logs, includes the following steps: The core associated parameters for determining the accounting service address are based on the voucher header. These core associated parameters include the accounting unit code to which the business accounting voucher belongs and the accounting system identifier. The accounting unit code and accounting system identifier are used as the composite index key value to associate and store the corresponding accounting service URL from the preset accounting service routing configuration rule base; The complete data and traceability path of the business accounting voucher are transmitted to the determined accounting service URL through a standardized interface. The complete data of the business accounting voucher is verified for data consistency, and the traceability path is verified for path consistency to determine the accounting log. The accounting logs and tracing paths are stored in a structured manner; the tracing elements of the tracing paths are extracted, and the structured data composed of the tracing elements and accounting logs is encrypted using a hash algorithm to obtain the log tracing verification code; and the log tracing verification code is stored in a structured storage location; wherein, the tracing elements include the number of path nodes and the path link length.
9. An automatic collection system for engineering implementation vouchers, applicable to the automatic collection method for engineering implementation vouchers as described in any one of claims 1 to 8, characterized in that, include: Accounting strategy determination module: Determines the corresponding voucher accounting strategy based on the project implementation voucher identifier and a preset accounting strategy mapping table. The voucher accounting strategy is used to parse the voucher accounting transactions corresponding to the business scenario. Accounting rule determination module: Determines the corresponding voucher accounting rules based on the voucher accounting transaction and a preset accounting rule mapping table. The voucher accounting rules include line item splitting rules, line item merging rules, and traceability configuration rules. Voucher generation module: Based on the combination logic of the voucher accounting strategy and the line item splitting rules and line item merging rules in the voucher accounting rules, configure business accounting vouchers that are adapted to the business scenario; Traceability path generation module: Based on the traceability configuration rules, the module performs lineage identification on business accounting vouchers to obtain the traceability path; Accounting log generation module: calls the accounting service to complete the accounting of business accounting vouchers and generate accounting logs, and configures the traceability path for the accounting logs.
10. An electronic device, characterized in that: It includes a memory and a processor, wherein the memory stores a computer program, and the processor, when calling the computer program in the memory, implements the steps of the automatic collection method for engineering implementation documents as described in any one of claims 1 to 8.
11. A storage medium, characterized in that: The storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the steps of the automatic collection method for engineering implementation documents as described in any one of claims 1 to 8.
Citation Information
Patent Citations
Accounting data accounting processing method, system and device and storage medium
CN113032147A
Voucher information generation method and device for receipt scene, equipment and medium
CN116204528A
Financial regularization conversion system based on rule chain engine
CN121639380A