Measurement and calculation management system based on modular architecture
Through a modular architecture-based calculation and management system, policy texts are automatically parsed and multi-level structures are constructed. The system identifies the dependencies between calculation nodes, performs streaming incremental calculations and linear programming solutions, and solves the linkage problem between policy documents and calculation models, thus achieving efficient and accurate fiscal budget and engineering cost calculations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING TAIJI HUAQING INFORMATION SYST CO LTD
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-01
AI Technical Summary
In existing information systems, policy documents and calculation models lack direct linkage in fiscal budgeting and engineering cost estimation, resulting in a large amount of manual interpretation and configuration, which is labor-intensive, prone to misunderstandings, and lagging behind in updating quota parameters when policies are frequently adjusted, making it difficult to meet the needs of refined management and rapid response to policy changes.
The measurement and management system adopts a modular architecture, including an intelligent semantic parsing module, a modular layer management module, a topology dependency analysis module, a bidirectional computing engine module, and an adaptive correction module. It automatically parses policy text through natural language processing, constructs a multi-level structure, identifies the dependencies between computing nodes, and performs streaming incremental computing and linear programming solutions to achieve automation and adaptive optimization of the measurement model.
Significantly reduces manual data entry workload, improves the efficiency and accuracy of policy change implementation, ensures clear and controllable calculation paths, achieves closed-loop optimization of budget preparation and execution, and meets the needs of refined management and rapid response to policy changes.
Smart Images

Figure CN121960486A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of budget calculation and management system technology, and in particular to a calculation and management system based on a modular architecture. Background Technology
[0002] In calculation operations such as fiscal budgets and engineering costs that rely on policy quotas, existing information systems generally treat policy documents as external reference materials. These documents are then manually interpreted by business personnel, who then input the quota standards and applicable conditions through spreadsheet tools, rule scripts, and configuration interfaces. The structural information in the policy clauses, such as the type of fee, the applicable objects, and the unit of measurement, is difficult for the system to automatically extract and match one-to-one with the parameter fields in the calculation model. This results in a lack of direct linkage between the policy text and the calculation engine.
[0003] Existing technologies rely heavily on manual interpretation and configuration, which is labor-intensive, prone to misunderstandings, and results in lagging updates to quota parameters when policies are frequently adjusted, making it difficult to meet the needs of refined management and rapid response to policy changes. Summary of the Invention
[0004] To overcome the above shortcomings, this invention provides a calculation and management system based on a modular architecture, which aims to improve the existing technology's reliance on a large amount of manual interpretation and configuration, resulting in a large workload, susceptibility to misunderstandings, and lagging updates of quota parameters when policies are frequently adjusted, making it difficult to meet the needs of refined management and rapid response to policy changes.
[0005] This invention provides the following technical solution: a measurement and management system based on a modular architecture, comprising:
[0006] The intelligent semantic parsing module is used to receive policy text data, extract quota entities, basic quota values and logical constraint relationships through a natural language processing model, and output dynamic attribute configuration instructions and layer reference formulas.
[0007] The modular layer management module is used to receive the dynamic attribute configuration instructions and layer reference formulas, construct a multi-level structure including parameter layers, resource layers and reference layers, and set constraint attribute tags for the calculation parameters in the parameter layers. The constraint attribute tags are used to distinguish the rigid constraint state and elastic variable state of the calculation parameters.
[0008] The topology dependency analysis module is used to receive the multi-level structure, construct the directed graph dependency relationship between computing nodes in each layer, identify circular reference paths, generate a directed acyclic graph dependency relationship based on the processing of the circular reference paths, select effective parameter definitions for overlapping parameter definitions based on the priority order determined by the preset layer priority matrix, and output the computing execution path after conflict resolution.
[0009] The bidirectional computing engine module is used to receive the computing execution path and perform calculations. It is configured to perform a forward calculation operation to generate initial calculation results based on streaming incremental calculation, and to perform a reverse solution operation to construct a linear programming model based on the state of the elastic variable and output a calculation parameter adjustment scheme when it receives the total budget control index used to limit the upper limit of the total calculation result value.
[0010] The adaptive correction module is used to receive the actual execution data associated with the measurement object, calculate the deviation between the measured value and the actual execution value, generate a basic quota value correction amount based on the deviation, and update the basic quota value of the resource layer in the modular layer management module.
[0011] Preferably, the extraction of quota entities, basic quota values, and logical constraint relationships through a natural language processing model specifically includes the following steps:
[0012] The policy text data is cleaned and segmented to generate a sequence of text to be parsed.
[0013] The text sequence to be parsed is input into a pre-trained sequence labeling model to identify the fee type, applicable object and unit of measurement, and generate the quota entity;
[0014] Numerical text that has a dependency relationship with the quota entity is extracted from the text sequence to be parsed and converted into floating-point numbers in standard format to generate the basic quota value;
[0015] Syntactic analysis is performed on the text sequence to be parsed to extract the conditional phrases that restrict the effective range of the basic quota value, and the conditional phrases are mapped into logical expressions containing conditional judges and operational connectors to generate the logical constraint relationship.
[0016] Preferably, the construction of the multi-level structure including parameter layers, resource layers, and reference layers specifically includes the following steps:
[0017] The dynamic attribute configuration instruction is parsed to generate a parameter object, the code fields and data source type of the parameter object are defined, and the parameter object is instantiated into the parameter layer;
[0018] Extract the value retrieval logic of the basic quota value, construct a data acquisition interface that includes at least one form of static value and dynamic query statement, and encapsulate the data acquisition interface into the resource layer;
[0019] The layer reference formula is parsed, and a field mapping relationship is established between the reference layer, the parameter layer, and the resource layer. A reference object containing the calculation formula and associated logic is generated and stored in the reference layer.
[0020] Preferably, setting constraint attribute markers for the calculation parameters in the parameter layer specifically includes the following steps:
[0021] Read the business category identifier of the calculation parameters and match the business category identifier with a preset list of rigid parameters;
[0022] When a match is successful, the constraint attribute is marked as the rigid constraint state, and a numerical locking command is generated for the calculation parameter.
[0023] When a match fails, the constraint attribute is marked as the state of the elastic variable, and a preset adjustment threshold is obtained to generate a numerical constraint range that limits the adjustable range of the calculation parameter.
[0024] Preferably, the construction of directed graph dependencies between computation nodes in each layer and the identification of circular reference paths specifically include the following steps:
[0025] Traverse the parameter layer, the resource layer, and the reference layer, and map the calculation parameters, the basic quota data, and the reference calculation formulas into independent calculation nodes;
[0026] The reference logic of each computing node is parsed, the identifier of the referenced predecessor node is extracted, a one-way dependency edge from the predecessor node to the current computing node is established, and a layer dependency directed graph is generated.
[0027] A depth-first traversal algorithm is used to traverse and detect the directed graph that the layer depends on, and a node stack of the current traversal path is maintained.
[0028] Determine whether there are duplicate nodes in the node stack. If so, determine that the layer-dependent directed graph contains a closed loop. Extract the node sequence that forms the closed loop in the node stack as the circular reference path. After removing the dependency edges corresponding to the circular reference path, obtain the layer-dependent directed acyclic graph.
[0029] Preferably, the step of selecting effective parameter definitions based on the priority order determined by a preset layer priority matrix for overlapping parameter definitions and outputting the calculation execution path after conflict resolution specifically includes the following steps:
[0030] The scanning layer relies on a directed acyclic graph to identify multiple candidate parameter definition nodes with the same attribute identifier and generate a set of conflicting nodes.
[0031] Based on the layer priority matrix, query the priority weight value of the layer to which each candidate parameter definition node belongs;
[0032] Sort the nodes according to their priority weight values from largest to smallest, select the first candidate parameter definition node in the sorting result and mark it as an effective node, and mark the other nodes in the conflict node set as ineffective nodes.
[0033] The failed nodes are filtered out, and the remaining valid nodes in the layer-dependent directed acyclic graph are topologically sorted to generate a linearized node computation sequence as the computation execution path after conflict resolution.
[0034] Preferably, the reverse solution operation of constructing a linear programming model based on the state of the elastic variables and outputting the calculation parameter adjustment scheme when the total budget control indicator is received specifically includes the following steps:
[0035] Determine the objective function of the linear programming model, which is set to minimize the sum of the adjustment ranges of all computational parameters in the state of elastic variables;
[0036] Determine the set of constraints for the linear programming model, the set of constraints including:
[0037] A, based on the upper limit constraint of the total calculation result set according to the total budget control indicator;
[0038] B, lock the constraint according to the calculation parameter value set according to the rigid constraint state;
[0039] C, the range of values of the calculation parameters in the state of the elastic variable is constrained according to the numerical constraint interval;
[0040] The linear programming solver is invoked to iteratively solve the linear programming model, thereby obtaining the set of target values for the computational parameters that minimize the objective function in the state of the elastic variable.
[0041] The calculation parameter adjustment scheme is generated based on the difference between the target value set and the initial value of the calculation parameter in the state of the elastic variable.
[0042] Preferably, the step of generating a basic quota value correction based on the deviation and updating the basic quota value of the resource layer in the modular layer management module specifically includes the following steps:
[0043] Extract historical deviation data between the calculated value and the actual execution value over a time series, and perform noise reduction and smoothing on the historical deviation data;
[0044] Based on the denoised and smoothed historical deviation data, a time-series regression model is applied for fitting to predict the theoretical predicted value of the basic quota value for the next period.
[0045] The theoretical prediction value is compared with the basic quota value for the current period to generate the correction amount of the basic quota value.
[0046] The correction amount of the basic quota value is updated through the dynamic attribute configuration instruction to update the data acquisition interface corresponding to the resource layer in the modular layer management module.
[0047] The present invention has the following beneficial effects:
[0048] 1. In this invention, structured quotas and constraint data that can directly drive the calculation model are generated by automatically parsing policy texts, which significantly reduces the workload of manual data entry and improves the efficiency and accuracy of policy changes in the system.
[0049] 2. In this invention, the unified management of parameter layers, resource layers and reference layers, as well as dependency analysis based on directed acyclic graphs, ensures that the calculation path is clear and controllable and the conflict resolution rules are transparent, which facilitates the expansion and maintenance of complex calculation models.
[0050] 3. In this invention, a bidirectional calculation engine is used to combine total budget control with linear programming solution and an adaptive correction mechanism, so that the calculation results gradually conform to the historical execution level while meeting budget constraints, thereby achieving closed-loop optimization of budget preparation and execution feedback. Attached Figure Description
[0051] Figure 1 This is an architecture diagram of a measurement and management system based on a modular architecture proposed in this invention. Detailed Implementation
[0052] The technical solutions in the embodiments 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, and 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.
[0053] This invention provides a measurement and management system based on a modular architecture, such as... Figure 1 As shown, it includes:
[0054] The intelligent semantic parsing module is used to receive policy text data, extract quota entities, basic quota values and logical constraint relationships through a natural language processing model, and output dynamic attribute configuration instructions and layer reference formulas.
[0055] Furthermore, the extraction of quota entities, basic quota values, and logical constraint relationships through a natural language processing model specifically includes the following steps:
[0056] The policy text data is cleaned and segmented to generate a sequence of text to be parsed.
[0057] Input the text sequence to be parsed into a pre-trained sequence labeling model to identify the cost type, applicable object and unit of measurement, and generate a quota entity;
[0058] Extract numerical text that is dependent on the quota entity from the text sequence to be parsed, convert it into floating-point numbers in standard format, and generate basic quota values.
[0059] Syntactic analysis is performed on the text sequence to be parsed to extract the conditional phrases that restrict the effective range of the basic quota values, and the conditional phrases are mapped into logical expressions containing conditional judges and operational connectors to generate logical constraint relationships.
[0060] Specifically, the intelligent semantic parsing module runs on a server equipped with a processor and memory. The processor loads the program code stored in the memory and processes the input policy text data. After receiving the original policy text from the database, file system, or interface, the system first unifies the character encoding, converts full-width characters to half-width characters, compresses consecutive whitespace characters into single spaces, and removes irrelevant content such as headers, footers, and page numbers. Then, based on Chinese punctuation and line breaks, the text is segmented into sentences and paragraphs, breaking the entire policy into multiple semantically complete sequences of text to be parsed. Each sequence serves as the input unit for the subsequent natural language processing model.
[0061] For each sequence of text to be parsed, the system performs word segmentation and sub-word encoding, converting the text into a format of length [length missing]. The marked sequence ,in, Indicates the first Each word segment or sub-word unit This represents the number of tags in the current text sequence. The model obtains the corresponding context vector sequence based on a pre-trained language model. ,in, Indicates the first A mark in Vector representation in 3D semantic space; the sequence labeling layer adopts a conditional random field structure for the label sequence. Calculate the conditional probability:
[0062] ;
[0063] in, Indicates the first A sequence of labels for each marker, the label set including labels for indicating the type of fee, labels for indicating the applicable object, and labels for indicating the unit of measurement. Representation and Label The corresponding weight vector, Indicates label With tags The transfer weights between them Indicates that in a given input sequence The allocation function, obtained by normalizing all possible label sequences under the given conditions, decodes the above conditional probabilities to obtain label sequences with higher probability values. These sequences are then merged with consecutively labeled segments representing cost type, applicable object, and unit of measurement to form a quota entity structure containing cost type, applicable object, and unit of measurement fields.
[0064] After obtaining the quota entity, the system constructs a dependency tree for the same text sequence to be parsed based on the dependency parsing model. It assigns a dependency relation type and parent node to each word node. For each quota entity, the system retrieves numerical text nodes in the dependency tree that have quantity modification, subject-verb, or verb-object relationships with it, and records these numerical text nodes as a set in literal form. ,in, Represents a raw numeric string; the system processes each... After using regular expressions to remove unit text such as "yuan", "tian", "ren", and "xiaoshi", the numerical part is retained, and decimal point standardization is performed to convert it into a set of floating-point numbers. ,in, This represents a standardized floating-point number. When the set contains only one floating-point number, that number is directly used as the base quota value for the current quota entity. When the set contains multiple floating-point numbers, the system selects the floating-point number that has a quantity modification relationship with the quota entity as the base quota value according to the priority order of dependency relationship types. For example, for the text "The standard travel allowance for field personnel is 160 yuan per person per day", the system identifies the numerical node associated with "travel allowance standard" from the dependency tree, parses the numerical string "160", and maps it to a floating-point number. This value is then linked to the corresponding quota entity.
[0065] After extracting the quota entities and basic quota values, the system continues to use dependency analysis results to identify conditional phrases that limit the scope of application of the basic quota values. The system focuses on detecting phrase fragments containing time range words, object range words, geographical range words, and restrictive trigger words, and maps these fragments into logical expressions for structured fields. Taking "This standard applies to field personnel in Category I areas" as an example, the system maps it as:
[0066] ;
[0067] in, This represents the expression for the effective conditions of the current quota entity. This refers to the region field defined in the system parameter layer. This indicates the job type field defined in the system parameter layer. "Category I Region" and "Field Personnel" are field values extracted from text. The logical AND operator indicates that two conditions must be met simultaneously for the overall result of the conditional expression to be true. The system binds the basic quota value corresponding to each quota entity to this logical expression to form a structured quota rule item.
[0068] After obtaining the structured quota rule items, the system encodes the quota entity identifier, basic quota value, and logical expression into a dynamic attribute configuration instruction data structure according to the internally agreed dynamic attribute configuration instruction template. The instruction contains fields such as parameter code, data source type, and value retrieval logic. Subsequently, the system constructs layer reference formulas based on parameter identifiers and value retrieval logic, and sends these configuration instructions and reference formulas to the modular layer management module for instantiating the corresponding parameter objects in the parameter layer and resource layer and establishing reference relationships between layers.
[0069] This intelligent semantic parsing module can automatically convert the natural language clauses in the original policy text into structured data containing quota entities, basic quota values and applicable conditions, and generate dynamic configuration instructions and layer reference formulas that can be directly used in subsequent calculation links, thereby realizing the automatic construction and updating of the calculation model.
[0070] The modular layer management module is used to receive dynamic attribute configuration instructions and layer reference formulas, build a multi-level structure including parameter layers, resource layers and reference layers, and set constraint attribute tags for the calculation parameters in the parameter layers. The constraint attribute tags are used to distinguish the rigid constraint state and elastic variable state of the calculation parameters.
[0071] Furthermore, constructing a multi-level structure that includes parameter layers, resource layers, and reference layers specifically includes the following steps:
[0072] Parse dynamic property configuration instructions, generate parameter objects, define the code fields and data source types of the parameter objects, and instantiate the parameter objects to the parameter layer;
[0073] Extract the value retrieval logic of the basic quota value, construct a data acquisition interface that includes at least one form of static value and dynamic query statement, and encapsulate the data acquisition interface into the resource layer;
[0074] Parse the layer reference formula, establish the field mapping relationship between the reference layer, parameter layer, and resource layer, generate a reference object containing the calculation formula and related logic, and store it in the reference layer.
[0075] Furthermore, setting constraint attribute markers for the calculated parameters in the parameter layer specifically includes the following steps:
[0076] Read the business category identifier of the calculation parameters and match the business category identifier with the preset list of rigid parameters;
[0077] When a match is successful, the constraint attribute is marked as a rigid constraint and a numerical locking command is generated for that calculation parameter.
[0078] When a match fails, the constraint attribute is marked as an elastic variable and a preset adjustment threshold is obtained to generate a numerical constraint range that limits the adjustable range of the calculation parameter.
[0079] Specifically, the modular layer management module runs on a server equipped with a processor and memory. The processor executes program instructions stored in memory, parses the dynamic attribute configuration instructions and layer reference formulas output by the intelligent semantic parsing module, and constructs parameter layers, resource layers, and reference layers internally. The system first receives dynamic attribute configuration instructions from a message queue, configuration database, or interface. Each instruction contains at least a parameter code field, a data source type field, a basic quota value field, and an applicable condition expression field. After reading the instruction content, the processor creates a parameter object instance in memory. The parameter code field of this parameter object corresponds to the parameter identifier used in the business. For example, "TRAVEL_SUBSIDY_OUTFIELD" corresponds to the travel allowance standard for field personnel. The data source type field indicates that the parameter value comes from a fixed quota value or an external data query result, etc. After creation, the parameter object is written to the data table or memory structure corresponding to the parameter layer, and an index of the parameter layer is established using the parameter code as the primary key, supporting subsequent reference layers to quickly locate parameter objects by code.
[0080] When constructing the resource layer, the system generates a data acquisition interface definition for each basic quota value and its value retrieval logic. For basic quota values directly provided by the intelligent semantic parsing module, the system generates a data acquisition interface that returns a fixed value. The interface definition records the floating-point value corresponding to the current period and the applicable condition expression. For quota parameters that need to be queried from the basic data table, the system fills the query statement with filter conditions such as parameter code, region field, and job position field according to the preset SQL template or interface call template, forming a data acquisition interface in the form of a dynamic query statement. Then, the above interface definition is encapsulated into a resource object. The resource object contains fields such as interface identifier, interface type, connection configuration, and value retrieval logic. The resource object is stored in the resource layer and correspondingly stored in the resource configuration table. In this way, each parameter code in the parameter layer can obtain the basic quota value or related data through the data acquisition interface in the resource layer.
[0081] When constructing the reference layer, the system reads the layer's reference formula, performs lexical and syntactic analysis on the formula string, and establishes a mapping between the parameter identifiers in the formula and the parameter objects in the parameter layer, and between the quota data identifiers in the formula and the resource objects in the resource layer. For example, for the formula "TOTAL_TRAVEL=TRAVEL_SUBSIDY_OUTFIELD×STAFF_COUNT×DAYS" for calculating total travel expenses, the system identifies "TRAVEL_SUBSIDY_OUTFIELD" as the quota parameter in the parameter layer, and "STAFF_COUNT" and "DAYS" as the quantity parameters in the parameter layer. It associates these identifiers with the object structure in the parameter layer and generates a reference object. The reference object contains information such as the formula expression, the list of input parameters, the output parameter identifier, and the identifier of the referenced resource object. The processor writes the reference object into the data structure corresponding to the reference layer, forming a field mapping relationship from the reference layer to the parameter layer and the resource layer, so that the calculation engine can call the parameter values and resource data according to the definition order of the reference layer.
[0082] During the setting of constraint attribute tags, the system reads the business category identifier field from the parameter object for each calculated parameter in the parameter layer, such as tags like "rigid cost," "adjustable cost," and "special subsidy." The system maintains a list of rigid parameters in the configuration library, and records the set of business category identifiers therein as follows: For the first parameter layer The system reads the business category identifier from the calculated parameters. And calculate the constraint attribute markers:
[0083] ;
[0084] in, Indicates the first The constraint attribute flag for each calculation parameter: a value of 1 indicates that the parameter is in a rigid constraint state, and a value of 0 indicates that the parameter is in an elastic variable state. This parameter represents the business category identifier. This represents the set of business categories in the rigid parameter list, for those that satisfy... The system generates a value locking instruction for the parameters, recording the current parameter value in the instruction. And an unadjustable flag bit, which allows the subsequent bidirectional computing engine to fix the parameter value as a constant when constructing constraints. The locking instruction can be stored in a separate constraint configuration table, indexed by the parameter code.
[0085] For satisfying The system reads the adjustment threshold ratio corresponding to this business category from the configuration library. ,in A non-negative real number represents the allowable relative adjustment range for this parameter. For example, it can be configured for flexible expenses such as "travel and transportation allowance". This indicates that a fluctuation of 10% is allowed, and the system will determine the value based on the current parameter. Calculate the numerical constraint interval for this parameter:
[0086] ;
[0087] in, This indicates the lower limit of the allowable adjustment value for this calculation parameter within the current period. This indicates the upper limit of the calculated parameter that can be adjusted within the current period. This represents the initial base value of the calculation parameter. For example, when the current value of the "Field Personnel Travel Allowance Standard" parameter is 160 yuan, and the adjustment threshold ratio is 0.1, we can obtain... , The system will divide the interval The numerical constraint range used as this parameter is written into the constraint configuration data so that the linear programming model can directly reference it when constructing constraints.
[0088] This modular layer management module can combine the configuration instructions output by the semantic parsing module with the actual business parameter structure to form a multi-level structure of parameter layer, resource layer and reference layer in the system. It also adds rigid constraint state or elastic variable state and corresponding locking instructions or numerical constraint range to each calculation parameter, thereby providing a clear and structured model foundation for subsequent dependency topology analysis and bidirectional calculation engine.
[0089] The topology dependency analysis module is used to receive multi-level structures, construct directed graph dependencies between computation nodes in each layer, identify circular reference paths, generate directed acyclic graph dependencies based on the processing of circular reference paths, select effective parameter definitions for overlapping parameter definitions based on the priority order determined by the preset layer priority matrix, and output the computation execution path after conflict resolution.
[0090] Furthermore, constructing directed graph dependencies between computation nodes across layers and identifying circular reference paths specifically includes the following steps:
[0091] Traverse the parameter layer, resource layer, and reference layer, and map the calculation parameters, basic quota values, and reference calculation formulas into independent calculation nodes;
[0092] The reference logic of each computing node is analyzed, the identifier of the referenced predecessor node is extracted, a one-way dependency edge from the predecessor node to the current computing node is established, and a layer dependency directed graph is generated.
[0093] A depth-first traversal algorithm is used to traverse and detect the layer-dependent directed graph, and a node stack of the current traversal path is maintained.
[0094] Determine if there are duplicate nodes in the node stack. If so, determine if the layer-dependent directed graph contains a closed cycle. Extract the node sequence that forms the closed cycle from the node stack as a circular reference path. After removing the dependency edges corresponding to the circular reference path, obtain the layer-dependent directed acyclic graph.
[0095] Furthermore, the selection of effective parameter definitions based on the priority order determined by the preset layer priority matrix for overlapping parameter definitions, and the output of the calculation execution path after conflict resolution specifically include the following steps:
[0096] The scanning layer relies on a directed acyclic graph to identify multiple candidate parameter definition nodes with the same attribute identifier and generate a set of conflicting nodes.
[0097] Based on the layer priority matrix, query the priority weight value of the layer to which each candidate parameter definition node belongs;
[0098] Sort the nodes according to their priority weight values from largest to smallest, select the first candidate parameter definition node in the sorting result and mark it as the effective node, and mark the other nodes in the conflict node set as ineffective nodes;
[0099] Filter out invalid nodes, perform topological sorting on the remaining valid nodes in the layer-dependent directed acyclic graph, and generate a linearized node computation sequence as the computation execution path after conflict resolution.
[0100] Specifically, the topology dependency analysis module takes the multi-level structure output by the modular layer management module as input. This multi-level structure includes parameter layers, resource layers, and reference layers. The system assigns a unique node identifier to each calculation parameter, basic quota value data, and reference calculation formula in memory, and abstracts them into a unified set of calculation nodes.
[0101] ;
[0102] in To calculate the total number of nodes in the current model, for each referenced object in the reference layer, the system parses the parameter code and resource identifier in its formula, identifies the referenced object appearing on the right side of the formula as the predecessor node, and identifies the result parameter on the left side of the formula as the current node, and determines the node index through the node identifier mapping table. Build an adjacency matrix in memory and in accordance with:
[0103] ;
[0104] Assign values, where Indicates from node To the node Does a unidirectional dependency relationship exist? When a reference formula represents "output parameter = function of several input parameters", the system sets a directed edge between each input parameter node and the output parameter node, and incorporates the calculated parameter nodes in the parameter layer, the basic quota value nodes in the resource layer, and the calculated nodes in the reference layer into a unified layer dependency directed graph:
[0105] ;
[0106] The set of edges:
[0107] ;
[0108] After generating the directed graph structure, the system detects circular reference paths using a depth-first traversal algorithm. To do this, a node access state array is maintained in memory. ,in Represents a node Not visited yet. Represents a node Currently in the recursive traversal stack, Represents a node All successor nodes have been processed, and the system starts from each node that satisfies... nodes The recursive function begins execution; when accessing a node, the corresponding node is first... Set it to 1, push the node onto the current node stack, and then for each node that satisfies... successor node During the inspection, when Continue recursively when This indicates that a node in the stack has been encountered again on the current traversal path, and a substring is extracted from the node stack. ordered sequence up to the top node of the stack This is recorded as a circular reference path. For a node that has completed access to all subsequent nodes, the system records it as a circular reference path. Set the value to 2 and pop it from the node stack. For each circular reference path, the system deletes the edge that breaks the loop in the corresponding edge set according to the preset processing strategy, such as deleting the edge corresponding to the last edge in the path. and the corresponding adjacency matrix By setting the value to 0 and performing the above traversal and edge removal operations on all nodes, the system obtains a graph structure that no longer contains closed cycles. This graph is denoted as a layer-dependent directed acyclic graph.
[0109] ;
[0110] After obtaining the directed acyclic graph, the system needs to address the issue of overlapping parameter definitions for the same business attribute across different layers. To resolve this, each parameter definition node is bound to an attribute identifier during graph construction. and the label of the layer The system groups nodes according to their attribute identifiers. For each attribute identifier... Form a set of candidate nodes:
[0111] ;
[0112] The system maintains a layer priority matrix in the configuration library. , where matrix elements Indicates that the attribute identifier is In the parameter definition, the layer identifier is... The definition of priority weight values assigned in business contexts, for a given set of candidates. The system is based on:
[0113] ;
[0114] The effective node under this attribute identifier is calculated. ,in Indicates the attribute identifier is The parameter is the selected effective definition node from all candidate definitions. The operation returns the node whose corresponding matrix element values reach the upper bound of the set. Represents a node The layer identifier, for example, when a budget parameter is defined in both the resource layer and the reference layer, if the priority weight value of the parameter in the priority matrix configuration is higher for the resource layer than for the reference layer, then the node in the resource layer is used as the reference layer. For sets Except For nodes other than those specified, the system marks their status as invalid nodes and removes these nodes and directed edges originating from them from the graph structure, thereby ensuring that each attribute identifier retains only one valid parameter definition path in the graph.
[0115] After completing loop processing and overlap definition adjudication, the system performs a topological sort on the valid nodes in the layer-dependent directed acyclic graph. The system first calculates the in-degree value of each node. ,in:
[0116] ;
[0117] Indicates pointing to a node Count the number of edges, add all nodes with an in-degree of zero to a queue, and then remove nodes from the queue one by one. Put into the output sequence The tail, and then for each satisfied successor node Decrement its in-degree value by one. When the in-degree value of a successor node becomes zero, add that node to the queue. Through the process of queue exhaustion, the system obtains a linearized node computation sequence.
[0118] ;
[0119] in Represents the number of valid nodes, and any edge in the sequence. All meet This sequence, as the computation execution path after conflict resolution, can be directly provided to the bidirectional computation engine module for sequential forward computation and reverse solution.
[0120] This topology dependency analysis module can map discrete computational definitions in parameter layers, resource layers, and reference layers into a unified graph structure, automatically identify and eliminate circular references, adjudicate overlapping parameter definitions by combining the layer priority matrix, and output a linear computational sequence that conforms to business priority relationships, thereby ensuring that the execution process of the entire measurement model is stable, acyclic, and uniquely defined.
[0121] The bidirectional computing engine module is used to receive computing execution paths and perform calculations. It is configured to perform forward computing operations to generate initial calculation results based on streaming incremental computing, and to perform reverse computing operations to build a linear programming model based on the state of elastic variables and output the calculation parameter adjustment scheme when it receives the total budget control index used to limit the upper limit of the total calculation result value.
[0122] Furthermore, the reverse solution operation of constructing a linear programming model based on the state of elastic variables and outputting the calculation parameter adjustment scheme upon receiving the total budget control target specifically includes the following steps:
[0123] Determine the objective function of the linear programming model, which is set to minimize the sum of the adjustment ranges of all computational parameters in the state of elastic variables;
[0124] Determine the set of constraints for the linear programming model. The set of constraints includes:
[0125] A, based on the upper limit constraint of the total calculation result set according to the total budget control indicators;
[0126] B, lock the constraint value according to the calculation parameters set by the rigid constraint state;
[0127] C, the range of values for calculation parameters in the state of elastic variables is constrained according to the numerical constraint interval;
[0128] Call the linear programming solver to iteratively solve the linear programming model and obtain the set of target values for the computational parameters in the state of elastic variables that make the objective function achieve a smaller value;
[0129] Based on the difference between the target value set and the initial values of the calculation parameters in the state of elastic variables, a calculation parameter adjustment scheme is generated.
[0130] Specifically, the bidirectional computing engine module runs on a server equipped with a processor and memory. The processor executes each computing node sequentially according to the linearized node calculation sequence output by the topology dependency analysis module. For forward computing, the system maintains a parameter value mapping table in memory. After writing the initial parameter values from the parameter layer and resource layer into the mapping table, it retrieves each reference node according to the order of the calculation execution path, parses its calculation formula, reads the parameter values involved in the calculation from the mapping table, calculates the output result of the current node, and writes the result back to the mapping table. When all nodes have been calculated, the system can read the total calculation result from the mapping table, such as business indicators like "total project cost" and "annual budget calculation value," and saves this result as the initial calculation result of this round of forward computing. At the same time, when any basic parameter changes, the system only re-executes the affected subsequent nodes according to the dependency relationship, realizing streaming incremental computing and avoiding duplicate calculation of irrelevant nodes.
[0131] Upon receiving the total budget control target, the bidirectional calculation engine module constructs a linear programming model based on the calculation parameters in the flexible variable state, and performs reverse adjustment on the parameter values. The system first reads the set of all calculation parameters in the flexible variable state from the parameter layer, and denotes their index set as... For sets Each parameter The system obtains its current value. And the lower limit of the numerical constraint range generated by the modular layer management module. and upper limit The total budget control indicator provides an upper limit for the overall calculation result, denoted as... Based on the analysis of the calculation path during the previous forward calculation process, the system abstracts the impact of the total calculation result on the elasticity parameter into a linear combination form:
[0132] ;
[0133] in, This represents the total calculated result. This represents the constant term contributed by the rigidity parameter and the fixed part, under fixed rigidity parameter values. It can be obtained through a single forward calculation by setting the increments of all elastic parameters to zero. Indicates the first The influence coefficient of each elasticity parameter on the overall calculation result can be understood in the context of travel expenses as the amount of cost change caused by a unit change in the parameter, such as the increase in total cost corresponding to a one-yuan adjustment in the unit price of the field subsidy. For the first The target value after adjusting the elasticity parameter.
[0134] To measure the magnitude of parameter adjustment, the system performs a check on each elastic parameter. Define deviation variables This is used to approximate the absolute deviation of parameter values. The objective function is in the form of a weighted sum of deviation variables:
[0135] ;
[0136] in, Indicates the first The weighting coefficients for each elasticity parameter can be chosen when the adjustment importance of each parameter is equal. This means that the adjustment range of each parameter is included in the objective function with equal weight, so that the above formula can be made smaller during the solution, thereby making the overall adjustment range of all elastic parameters tend to be smaller.
[0137] The constraint set consists of three parts: budget constraints, rigid parameter constraints, and flexible parameter value constraints. Budget constraints directly affect the overall calculation results.
[0138] ;
[0139] This inequality states that the total calculated result after adjusting the value of the elasticity parameter must not exceed the total budget control target. The rigidity parameter is considered a constant in this optimization, and its value is already included in the constant term. and influence coefficient Therefore, it does not need to be used as a decision variable in the calculation process; it is only necessary to ensure that it is used in the construction process. and The locking value under rigid constraint can be used for each elastic parameter. The system constructs interval constraints based on the numerical constraint range provided by the modular layer management module:
[0140] ;
[0141] in, and Representing parameters respectively The allowed lower and upper limits are defined, for example, when the current standard for travel allowance for field personnel is 160 yuan and is allowed to fluctuate by 10% upwards and downwards. It can be set to 144.0. It can be set to 176.0 to ensure that the solution results fall within the range allowed by business requirements.
[0142] To model the parameter adjustment range as a linear form, the system performs a linear adjustment on each elastic parameter. Define deviation variable constraints:
[0143] ;
[0144] in, For parameters Initial values before performing the reverse solution For the corresponding deviation variables, the above inequality constraints guarantee At least not less than The value of is determined in the objective function by adjusting . Optimization is performed to reduce the deviation of each parameter in the solution, thereby achieving an adjustment scheme with a small overall adjustment range.
[0145] After constructing the objective function and all linear constraints, the system passes the linear programming model to the linear programming solver in standard matrix form. The solver can use mature algorithms such as the simplex method and interior point method to iteratively solve the model and output the target value set of the elasticity parameters. ,in, This represents the solution obtained after solving the problem. The target values of each elastic parameter satisfy budget constraints, interval constraints, and deviation variable constraints, and have small deviations in the sense of the objective function. After obtaining the set of target values, the bidirectional calculation engine module calculates the adjustment amount of each elastic parameter.
[0146] ;
[0147] in, Indicates parameters The system will adjust the numerical range by specifying the parameter code and initial value. Target value Adjustment range The adjustment plan record, along with corresponding explanatory information, is returned to the modular layer management module or business front-end interface to guide the automatic adjustment of various fee standards, subsidy standards, matching coefficients, and other parameters.
[0148] This bidirectional computing engine module can perform efficient incremental calculations by combining topological execution paths in the forward direction, and can build a linear programming model based on the total budget control indicators in the reverse direction to obtain a set of elastic parameter target values that meet budget constraints and have a small overall adjustment range, and generate a clear calculation parameter adjustment scheme, providing directly applicable numerical basis for actual budget execution and parameter management.
[0149] The adaptive correction module is used to receive the actual execution data associated with the measurement object, calculate the deviation between the measured value and the actual execution value, generate the basic quota value correction amount based on the deviation, and update the basic quota value of the resource layer in the modular layer management module.
[0150] Furthermore, generating a basic quota value correction based on the deviation and updating the basic quota value of the resource layer in the modular layer management module specifically includes the following steps:
[0151] Extract historical deviation data between the calculated values and the actual executed values over time, and perform noise reduction and smoothing on the historical deviation data;
[0152] Based on the denoised and smoothed historical deviation data, a time series regression model is applied for fitting to predict the theoretical predicted value of the basic quota value for the next period.
[0153] The theoretical forecast value is compared with the current period's basic quota value to generate a correction amount for the basic quota value.
[0154] The basic quota value correction amount is updated through dynamic attribute configuration instructions to update the data acquisition interface corresponding to the resource layer in the modular layer management module.
[0155] Specifically, in its implementation, the adaptive correction module takes the calculation results provided by the modular layer management module and the actual execution data recorded by the business system as inputs, and establishes a deviation time series arranged by period for each basic quota parameter. The system records the time period as... ,in The number of periods for which historical data has been generated can be divided by month, quarter, or year. For each period, the system reads the calculated unit price of the basic quota parameter from the calculation results and records it as follows. The actual settlement unit price for the corresponding period is read from the execution system and recorded as follows. Calculate the deviation value in memory:
[0156] ;
[0157] in, Indicates the first Price deviation over a period of time This indicates the actual unit price executed during this period. This indicates the basic unit price used for budget calculation within the same period.
[0158] To mitigate the impact of occasional outliers on the biased sequence, the adaptive correction module adjusts the sequence... The system performs a moving average smoothing process, setting a length for the smoothing window. In the periodic index, Calculate the smoothing deviation:
[0159] ;
[0160] in, Indicates that for the first The smoothing deviation value for each period, The number of cycles contained within the sliding window. This indicates tracing back from the current period. The cumulative sum of deviation values within each period, for the previous In each cycle, the system can calculate the smoothing deviation using the same formula with a shortened window length, based on the actual amount of available data.
[0161] After obtaining the smoothed deviation sequence Subsequently, the adaptive correction module fits the deviation trend based on an autoregressive time-series regression model, assuming a linear relationship between the current smoothed deviation and the smoothed deviation of the previous period:
[0162] ;
[0163] Where is the autoregressive coefficient, representing the proportion of the smoothing deviation from the previous period to the smoothing deviation of the current period. For the random disturbance term, whose expected value is close to zero, in order to estimate the autoregressive coefficients, the system uses existing smoothed deviation samples and estimates the parameters according to the following formula:
[0164] ;
[0165] Among them, molecules The denominator represents the cumulative sum of the smoothing deviations between two adjacent periods. This represents the sum of the squared smoothing deviations from the previous period. The ratio of these two values provides a set of autoregressive coefficients that show a good fit in the sense of squared error. Using these coefficients, the system predicts the smoothing deviation for the next period.
[0166] ;
[0167] in, This represents the predicted deviation value for the next period, calculated based on historical deviation trends. This represents the smoothing deviation value for the current period.
[0168] Based on the deviation prediction results, the adaptive correction module generates a correction amount by combining the current basic quota unit price. Let the basic quota value recorded in the current period in the resource layer be... Then, based on the deviation prediction, the theoretical basis quota value for the next period is constructed:
[0169] ;
[0170] in, This represents the theoretical base unit price adjusted to reflect historical deviations. Given the predicted deviation value given in the previous paragraph, we can define the correction amount for this adjustment:
[0171] ;
[0172] in, This indicates the adjustment range that needs to be applied to the current base quota value. When the value is positive, it indicates that the actual unit price has historically been consistently higher than the calculated unit price, and the system suggests increasing the basic quota. When the value is negative, it indicates that the actual expenditure level is too low, and the system suggests appropriately lowering the basic quota.
[0173] After obtaining the correction amount, the adaptive correction module sends an update request to the modular layer management module via a dynamic attribute configuration command. This command includes the target parameter code and the original quota value before correction. Revised quota value Correction amount In addition to the applicable period information, after receiving the instruction, the modular layer management module locates the corresponding data acquisition interface record in the resource layer. When the interface type is static quota, the basic quota field is directly updated to... Meanwhile, the update time and correction source are recorded. When the interface reads quota data from the basic configuration table, it can write quota records with new cycle markers to the configuration table and associate the data acquisition interface with the new record key value, thereby ensuring that the corrected basic quota value is automatically used in the calculation during the forward calculation in subsequent cycles.
[0174] This adaptive correction module utilizes historical deviation data between the calculated value and the actual execution value to construct a time-series regression model with a smoothing and autoregressive structure. It can predict the deviation in the next cycle and convert the prediction result into a basic quota value correction amount. Then, through dynamic attribute configuration instructions, it drives the update of the basic quota configuration in the resource layer, so that the subsequent calculation results gradually approach the actual execution level of the business system.
[0175] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A measurement and management system based on a modular architecture, characterized in that, include: The intelligent semantic parsing module is used to receive policy text data, extract quota entities, basic quota values and logical constraint relationships through a natural language processing model, and output dynamic attribute configuration instructions and layer reference formulas. The modular layer management module is used to receive the dynamic attribute configuration instructions and layer reference formulas, construct a multi-level structure including parameter layers, resource layers and reference layers, and set constraint attribute tags for the calculation parameters in the parameter layers. The constraint attribute tags are used to distinguish the rigid constraint state and elastic variable state of the calculation parameters. The topology dependency analysis module is used to receive the multi-level structure, construct the directed graph dependency relationship between computing nodes in each layer, identify circular reference paths, generate a directed acyclic graph dependency relationship based on the processing of the circular reference paths, select effective parameter definitions for overlapping parameter definitions based on the priority order determined by the preset layer priority matrix, and output the computing execution path after conflict resolution. The bidirectional computing engine module is used to receive the computing execution path and perform calculations. It is configured to perform a forward calculation operation to generate initial calculation results based on streaming incremental calculation, and to perform a reverse solution operation to construct a linear programming model based on the state of the elastic variable and output a calculation parameter adjustment scheme when it receives the total budget control index used to limit the upper limit of the total calculation result value. The adaptive correction module is used to receive the actual execution data associated with the measurement object, calculate the deviation between the measured value and the actual execution value, generate a basic quota value correction amount based on the deviation, and update the basic quota value of the resource layer in the modular layer management module.
2. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The extraction of quota entities, basic quota values, and logical constraint relationships through a natural language processing model specifically includes the following steps: The policy text data is cleaned and segmented to generate a sequence of text to be parsed. The text sequence to be parsed is input into a pre-trained sequence labeling model to identify the fee type, applicable object and unit of measurement, and generate the quota entity; Numerical text that has a dependency relationship with the quota entity is extracted from the text sequence to be parsed and converted into floating-point numbers in standard format to generate the basic quota value; Syntactic analysis is performed on the text sequence to be parsed to extract the conditional phrases that restrict the effective range of the basic quota value, and the conditional phrases are mapped into logical expressions containing conditional judges and operational connectors to generate the logical constraint relationship.
3. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The construction of the multi-level structure, which includes parameter layers, resource layers, and reference layers, specifically includes the following steps: The dynamic attribute configuration instruction is parsed to generate a parameter object, the code fields and data source type of the parameter object are defined, and the parameter object is instantiated into the parameter layer; Extract the value retrieval logic of the basic quota value, construct a data acquisition interface that includes at least one form of static value and dynamic query statement, and encapsulate the data acquisition interface into the resource layer; The layer reference formula is parsed, and a field mapping relationship is established between the reference layer, the parameter layer, and the resource layer. A reference object containing the calculation formula and associated logic is generated and stored in the reference layer.
4. The measurement and management system based on a modular architecture according to claim 1, characterized in that, Setting constraint attribute markers for the calculated parameters in the parameter layer specifically includes the following steps: Read the business category identifier of the calculation parameters and match the business category identifier with a preset list of rigid parameters; When a match is successful, the constraint attribute is marked as the rigid constraint state, and a numerical locking command is generated for the calculation parameter. When a match fails, the constraint attribute is marked as the state of the elastic variable, and a preset adjustment threshold is obtained to generate a numerical constraint range that limits the adjustable range of the calculation parameter.
5. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The construction of directed graph dependencies between computation nodes in each layer and the identification of circular reference paths specifically include the following steps: Traverse the parameter layer, the resource layer, and the reference layer, and map the calculation parameters, the basic quota data, and the reference calculation formulas into independent calculation nodes; The reference logic of each computing node is parsed, the identifier of the referenced predecessor node is extracted, a one-way dependency edge from the predecessor node to the current computing node is established, and a layer dependency directed graph is generated. A depth-first traversal algorithm is used to traverse and detect the directed graph that the layer depends on, and a node stack of the current traversal path is maintained. Determine whether there are duplicate nodes in the node stack. If so, determine that the layer-dependent directed graph contains a closed loop. Extract the node sequence that forms the closed loop in the node stack as the circular reference path. After removing the dependency edges corresponding to the circular reference path, obtain the layer-dependent directed acyclic graph.
6. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The process of selecting effective parameter definitions based on the priority order determined by a preset layer priority matrix for overlapping parameters and outputting the calculation execution path after conflict resolution specifically includes the following steps: The scanning layer relies on a directed acyclic graph to identify multiple candidate parameter definition nodes with the same attribute identifier and generate a set of conflicting nodes. Based on the layer priority matrix, query the priority weight value of the layer to which each candidate parameter definition node belongs; Sort the nodes according to their priority weight values from largest to smallest, select the first candidate parameter definition node in the sorting result and mark it as an effective node, and mark the other nodes in the conflict node set as ineffective nodes. The failed nodes are filtered out, and the remaining valid nodes in the layer-dependent directed acyclic graph are topologically sorted to generate a linearized node computation sequence as the computation execution path after conflict resolution.
7. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The reverse solution operation, which involves constructing a linear programming model based on the state of the elastic variables and outputting a calculation parameter adjustment scheme upon receiving the total budget control target, specifically includes the following steps: Determine the objective function of the linear programming model, which is set to minimize the sum of the adjustment ranges of all computational parameters in the state of elastic variables; Determine the set of constraints for the linear programming model, the set of constraints including: A, based on the upper limit constraint of the total calculation result set according to the total budget control indicator; B, lock the constraint according to the calculation parameter value set according to the rigid constraint state; C, the range of values of the calculation parameters in the state of the elastic variable is constrained according to the numerical constraint interval; The linear programming solver is invoked to iteratively solve the linear programming model, thereby obtaining the set of target values for the computational parameters that minimize the objective function in the state of the elastic variable. The calculation parameter adjustment scheme is generated based on the difference between the target value set and the initial value of the calculation parameter in the state of the elastic variable.
8. The measurement and management system based on a modular architecture according to claim 1, characterized in that, The step of generating a basic quota value correction based on the deviation and updating the basic quota value of the resource layer in the modular layer management module specifically includes the following steps: Extract historical deviation data between the calculated value and the actual execution value over a time series, and perform noise reduction and smoothing on the historical deviation data; Based on the denoised and smoothed historical deviation data, a time-series regression model is applied for fitting to predict the theoretical predicted value of the basic quota value for the next period. The theoretical prediction value is compared with the basic quota value for the current period to generate the correction amount of the basic quota value. The correction amount of the basic quota value is updated through the dynamic attribute configuration instruction to update the data acquisition interface corresponding to the resource layer in the modular layer management module.