Plann data summarization processing method and system, terminal and medium
By standardizing the planning data and managing it with a rule engine, the problem of business personnel having difficulty participating in rule definition was solved, realizing the full-link automated processing and accurate aggregation of planning data, and ensuring the stability and consistency of the data.
Patent Information
- Application Number
- CN202511500481.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2025-11-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In existing technologies, the planned data aggregation method relies on professional and technical personnel to define rules, which makes it difficult for business personnel to participate. This results in high rule maintenance costs, and the rule engine lacks version management and conflict detection, leading to inaccurate and unstable data aggregation.
By collecting detailed plan data entered by business personnel, standardizing the data, establishing mapping relationships between dimension fields and indicator fields, generating rule expressions, and introducing a rule engine for preliminary and hierarchical aggregation, and adding version management and conflict detection mechanisms, we can ensure data accuracy and consistency.
It achieves fully automated processing of planned data from decentralized entry to final centralized storage, lowers the threshold for rule definition, avoids conflicts between new and old rules, improves the accuracy and stability of summary results, supports flexible summary of multi-level and multi-type data, and enhances data transparency and auditability.
Smart Images

Figure CN120994734A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of data aggregation, and particularly relates to a plan data aggregation processing method and system, a terminal and a medium. BACKGROUND
[0002] With the continuous improvement of enterprise digital management level, the role of plan data in production scheduling, financial management and supply chain control is becoming increasingly important. Various information systems (such as ERP, financial system, project management platform) can record and store a large amount of business plan data. Business personnel of different departments and levels can realize quantitative expression of the overall resources and plan execution of the enterprise by entering detailed data.
[0003] In the prior art, the common plan data aggregation method mainly relies on preset rules or scripts. For example, some systems use manual SQL statement writing or pivot table configuration to complete data aggregation; some systems convert detailed data into aggregated results through preset mapping relationships and fixed operation logic.
[0004] However, the prior art still has the following problems in practical application: on the one hand, the mapping relationship and operation rule often need to be defined and maintained by professional technical personnel, and business personnel cannot directly participate, resulting in a disconnection between business requirements and technical implementation, and the maintenance cost of the rule is high; on the other hand, the rule engine usually lacks a perfect version management and conflict detection mechanism, and when the new and old rules are switched, rule coverage, execution exception and even data error problems are likely to occur, which seriously affects the accuracy and stability of plan data aggregation. SUMMARY
[0005] The application provides a plan data aggregation processing method, system, terminal and medium to solve the problems that business personnel cannot directly participate, resulting in a disconnection between business requirements and technical implementation, and the maintenance cost of the rule is high, and solves the problem that the rule engine lacks a perfect version management and conflict detection mechanism, and when the new and old rules are switched, rule coverage, execution exception and even data error problems are likely to occur.
[0006] The technical scheme adopted by the application is as follows: In a first aspect, the application provides a plan data aggregation processing method, which comprises the following steps: Step S1, collecting plan detailed data entered by business personnel, performing standardized processing on the detailed data, and obtaining a data set in a unified format; Step S2, establishing a mapping relationship between a detailed form and an aggregated form based on dimension fields and index fields, and converting the mapping relationship into a rule expression; Step S3, load the rule expression to the rule engine, perform preliminary aggregation processing on the unified format data set to generate preliminary aggregated data, and generate corresponding data columns in the aggregation form; Step S4, perform grouping operation and hierarchical aggregation on the preliminary aggregated data based on the field calculation rule, record the data processing path during the operation, and generate hierarchical aggregated data; Step S5, based on the hierarchical aggregated data, generate an adjustable data structure according to the dimension field and the index field; Step S6, compare the business bill data with the hierarchical aggregated data to generate a verification result, and update the hierarchical aggregated data when the verification result meets the preset condition; Step S7, in the multi-department or multi-level data scenario, aggregate the aggregated data of the lower-level department to the upper-level unit to obtain the final aggregated data.
[0007] Further, step S2 includes: Step S2-1, receive the dimension field and the index field, perform semantic analysis on the field name, and generate a field identifier set; Step S2-2, based on the field identifier set, analyze the hierarchical relationship of the dimension field and the operation mode of the index field, generate grouping nodes and aggregation nodes in turn, and combine the two to form a hierarchical rule syntax tree; Set the field hierarchy and operation order in the syntax tree; Step S2-3, convert the rule syntax tree into a rule expression to generate a rule set; Step S2-4, perform format checking and consistency detection on the rule set to detect whether the syntax is complete and whether there is a field mapping conflict; Step S2-5, after the verification and detection pass, output the rule set to the rule engine.
[0008] Further, step S3 includes: Step S3-1, generate a version identifier for the rule set and establish a version snapshot library; Step S3-2, before loading the rule, compare the new rule set with the current running rule set; When the trigger conditions are the same and the operation results are inconsistent, mark the conflicting rules and output a conflict list, refuse to load, generate a conflict report and write the conflict report to the version snapshot library; When the trigger conditions are the same and the operation results are consistent or the trigger conditions are different, skip to step S3-3 to enter the preloading verification; Step S3-3, load the rule set to the test environment to perform a trial calculation; When the trial calculation result is consistent with the expected result, determine that the verification is passed and skip to step S3-4; When the trial result is inconsistent with the expected result, output a verification failure report and abort the loading; Step S3-4, when the preloading verification passes, load the rule set to the rule engine in a hot update manner, replace the old version rule set, and write the version information, loading result and execution log to the rule log after the loading succeeds; Step S3-5, perform preliminary aggregation processing on the data set in a unified format to generate preliminary aggregation data, and generate corresponding data columns in the aggregation form.
[0009] Further, step S4 includes: Step S4-1, receive the preliminary aggregation data, and determine the grouping hierarchy according to the hierarchical order of the dimension field setting; Step S4-2, group the preliminary aggregation data based on the grouping hierarchy in sequence to generate a hierarchical grouping result; Step S4-3, set an operation mode for each index field, and the operation mode includes summation, average, weighted or maximum and minimum operation; Step S4-4, call the corresponding operation mode based on the hierarchical grouping result to obtain hierarchical aggregation data; Step S4-5, record the correspondence between the input data and the output result in the hierarchical aggregation process, and establish a mapping table.
[0010] Further, step S4 further includes: Assign a unique identifier to each piece of preliminary aggregation data entering the hierarchical aggregation processing; In the grouping stage, write the unique identifier into the grouping record and establish a correspondence with the corresponding dimension hierarchy; In the hierarchical aggregation stage, write the unique identifier into the operation chain table and record its corresponding operation mode and intermediate result; After generating the hierarchical aggregation data, establish an index table of the unique identifier and the final result; Based on the index table, realize the traceability from the hierarchical aggregation data to the source details, operation rules and calculation path of the preliminary aggregation data.
[0011] Further, step S6 includes: Step S6-1, receive the hierarchical aggregation data and the business document data, and compare them one by one according to the index field to generate a difference data set; Step S6-2, classify the difference data set to distinguish missing differences, numerical differences and logical differences; Step S6-3, generate a verification report based on the difference classification result, and record the position, type and reason of the difference data in the verification report; Step S6-4: Generate correction instructions based on the verification report. Correction instructions include update operations, replacement operations, or removal operations. Combine the difference type to call the corresponding correction rules. Select the optimal solution from multiple candidate correction methods based on historical correction records or adaptive correction models. Step S6-5: Submit the correction instruction to the rule engine, which will then perform correction processing on the hierarchical summary data to generate updated hierarchical summary data.
[0012] Furthermore, step S7 includes: Step S7-1: Receive hierarchical summary data uploaded by each subordinate department within the preset time window, and temporarily store the received data in the cache area; Step S7-2: Perform timestamp alignment on the data in the buffer to generate an aligned temporary dataset; Step S7-3: Perform a consistency check on the temporary dataset; When missing department data is detected, the time series window is marked as incomplete. When timestamp overlap or data conflict is detected, the time series window is marked as an abnormal state; Step S7-4: When the consistency check passes, write the temporary dataset into the upper-level summary form and jump to step S7-5; Step S7-5: In the superior summary form, perform a merging process on the hierarchical summary data from multiple subordinate departments to generate the final summary data; Step S7-6: Obtain the final summary data and write the source department and writing time information.
[0013] Secondly, this application provides a planning data aggregation and processing system for implementing the planning data aggregation and processing method as described in the first aspect. The system includes: The data acquisition unit is configured to collect detailed plan data entered by business personnel and perform standardized processing on the detailed data to obtain a dataset in a unified format. The rule generation unit is configured to establish a mapping relationship between detailed forms and summary forms based on dimension fields and indicator fields, and to convert the mapping relationship into rule expressions; The rule engine unit is configured to receive rule expressions, perform preliminary summary processing on a dataset in a uniform format, generate preliminary summary data, and generate corresponding data columns in the summary form; The hierarchical summary unit is configured to perform grouping operations and hierarchical summarization on the preliminary summary data based on field calculation rules, record the data processing path during the operation, and generate hierarchical summary data; The structure generation unit is configured to generate an adjustable data structure based on hierarchical summary data, according to dimension fields and indicator fields. The check correction unit is configured to compare the business document data with the hierarchical summary data, generate a check result, and perform an update on the hierarchical summary data when the check result meets a preset condition. The cross-department summary unit is configured to, in a multi-department or multi-level data scenario, summarize the hierarchical summary data of a lower-level department to a higher-level unit, generate final summary data, and obtain the final summary data.
[0014] In a third aspect, the application provides a terminal, comprising: A memory for storing a plan data summary processing simulation program; A processor for executing the plan data summary processing device to realize the steps of the plan data summary processing method according to the first aspect.
[0015] In a fourth aspect, the application provides a computer-readable storage medium, which stores computer instructions. When a computer reads the computer instructions in the storage medium, the computer executes the plan data summary processing method according to the first aspect.
[0016] The above technical solutions can be seen as having the following advantages: By setting a complete processing flow from detailed data collection, rule generation, preliminary summary, hierarchical summary, data structure generation, check correction to cross-department summary, the plan data is automatically processed from scattered input to final centralized storage, improving the accuracy and consistency of the summary results.
[0017] By introducing semantic analysis and hierarchical rule syntax tree, the relationship between dimension fields and indicator fields is structured, avoiding the dependence on manual writing of complex rules, reducing the rule definition threshold, and making the rule expression clearer and easier to maintain.
[0018] By adding version management, conflict detection and preloading verification mechanism to the rule set, the new and old rule conflicts and execution exceptions are effectively avoided during rule loading, ensuring the stable operation of the rule engine and making the preliminary summary result more reliable.
[0019] By hierarchical grouping of the preliminary summary data and selection of corresponding operation modes according to different indicator field types, flexible summary of multi-level and multi-type data is realized, ensuring the accuracy and applicability of the hierarchical summary results.
[0020] By assigning a unique identifier to each piece of data and continuously recording the operation link during grouping and hierarchical summarization, a data index table is established, so that the summary results can be traced back to the original data and calculation rules, improving the transparency and auditability of the data.
[0021] By comparing the hierarchical aggregated data with the business document data, and generating intelligent correction instructions based on the difference classification results, dynamic correction of the aggregated results is realized, the consistency of the results and the actual business data is improved, and the need for manual intervention is reduced.
[0022] By introducing a time window cache, timestamp alignment and consistency checking mechanism in the cross-department scenario, the incomplete or conflict problems caused by asynchronous data upload of the subordinate departments are effectively solved, and the integrity and consistency of the final aggregated data are ensured. BRIEF DESCRIPTION OF DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the present application, the drawings needed in the description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0024] Figure 1 A step diagram of the plan data aggregation processing method in the embodiment. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0026] Please refer to Figure 1 As shown in the drawings, the present application provides a plan data aggregation processing method, comprising the following steps: Step S1, collecting the plan detail data input by the business personnel, performing standardized processing on the detail data, and obtaining a data set in a unified format; In one embodiment, the system receives plan detail data entered by business staff in a plan management system or an ERP system, which includes information such as department, date, material number, plan quantity, and budget amount. After collecting the data, the system performs field normalization processing on the data, unifies fields with the same meaning but different names, for example, unifying "department", "department", and the like into "department ID", and unifies the format of date fields into the standard form of "year-month-day", and converts the data type of numerical value fields into a unified integer or floating point type. In another embodiment, the business staff enters "sales department 2025 / 9 / 1 enters plan quantity 200, budget amount 50000" and "production department 2025-9 / 1 enters plan quantity 350, budget amount 70000", which are converted into standard department ID, unified date format, and unified numerical value unit after standardization, thereby obtaining a data set in a unified format, ensuring consistency in subsequent processing.
[0027] Step S2, based on the dimension field and the index field, establishing a mapping relationship between the detail form and the summary form, and converting the mapping relationship into a rule expression; In one embodiment, after receiving the dimension field and the index field, the system parses the corresponding relationship between the two into an executable rule form. For example, taking "department" and "date" as dimension fields, and taking "plan quantity" and "budget amount" as index fields, the system generates a rule expression by establishing a mapping relationship between the dimensions and the indexes, which is used for subsequent summary calculation. In one embodiment, the business staff selects "summary plan quantity and budget amount by department and date" in the summary form, and the system converts this mapping relationship into a rule expression, which can generate corresponding summary columns in the subsequent summary form.
[0028] Step S2-1, receiving the dimension field and the index field, performing semantic analysis on the field name, and generating a field identifier set; In one embodiment, after receiving the dimension field and the index field, the system identifies the field name through a built-in semantic analyzer and converts it into a standardized field identifier set. For example, "sales department" and "production department" are parsed into the department field, and "plan quantity" and "quantity" are uniformly parsed into the same index field. In this way, the field differences of different data sources can be avoided to affect the summary. In one embodiment, when the business staff enters "department", "department", or "organization unit" as the field, the system will parse it into a unified "department ID", and the generated field identifier set is used for subsequent construction of the rule syntax tree.
[0029] Step S2-2, based on the field identifier set, the hierarchical relationship of the dimension field and the operation mode of the indicator field are parsed to generate grouping nodes and aggregation nodes in sequence, and the two are combined to form a hierarchical rule syntax tree; the field hierarchy and operation order are set in the syntax tree; In one embodiment, the system generates grouping nodes according to the hierarchical relationship of the dimension field, such as the hierarchical relationship of province, city, and district to form parent-child nodes in sequence, and generates aggregation nodes according to the operation mode of the indicator field, such as selecting the sum mode for the quantity field and the weighted average mode for the amount field. The system combines the grouping nodes and the aggregation nodes to form a rule syntax tree containing hierarchical structure and operation logic, and sets the grouping hierarchy and execution order of the fields in the syntax tree. In one embodiment, if the dimension field is "province, city, and district" and the indicator field is "quantity and amount", the system will generate hierarchical nodes of "province>city>district", and at the same time generate aggregation nodes of quantity sum and amount weighted average in the indicator part, to finally form a rule syntax tree that can be used for summarization.
[0030] Step S2-3, the rule syntax tree is converted into a rule expression to generate a rule set; In one embodiment, the system serializes the constructed rule syntax tree into an executable rule expression, such as converting it into a standard rule set in a tree structure, and stores it in a rule library for calling by a rule engine. In one embodiment, the system converts the grouping nodes of department and date and the aggregation nodes of quantity and amount into a rule set, which is expressed as "group by department and date, sum quantity, average amount", and this rule set can be directly loaded into the rule engine in the subsequent steps.
[0031] Step S2-4, format checking and consistency detection are performed on the rule set to detect whether the syntax is complete and whether there is a field mapping conflict; In one embodiment, after generating the rule set, the system calls a verification module to check whether the syntax conforms to the predefined rules, and at the same time detects whether there is repetition or conflict between the dimension field and the indicator field. For example, if the same indicator field is bound to two different aggregation modes, the system will determine that there is a conflict and prompt an error. In one embodiment, when the same field "plan quantity" is set to "sum" and "average" as two operation modes, the system will find this conflict during consistency detection and prevent the rule set from entering the execution phase.
[0032] Step S2-5, after the verification and detection pass, the rule set is output to the rule engine; In one embodiment, the system outputs the rule set to the rule engine for registration as executable rules after passing the checksum and consistency check. In one embodiment, the system enables the rule engine to perform automated summarization on subsequent input data sets according to predefined dimension field and metric field relationships after loading the rule set.
[0033] Step S3, load the rule expression to the rule engine to perform preliminary summarization on the uniformly formatted data set to generate preliminary summary data and generate corresponding data columns in the summary form; In one embodiment, the system invokes the rule engine to load the rule set and perform preliminary summarization based on the uniformly formatted data set to generate preliminary summary data containing grouping fields and aggregation fields. The summary data is written to the summary form and corresponding data columns are generated for direct viewing or further processing by the user. In one embodiment, the system aggregates the quantity and amount according to the department and date dimensions to finally generate preliminary summary data with department and date as row labels and generate quantity summary columns and amount summary columns in the summary form.
[0034] Step S3-1, generate a version identifier for the rule set and establish a version snapshot library; In one embodiment, the system automatically assigns a unique version identifier to the new rule set after generation and stores the complete content of the versioned rule in the snapshot library for subsequent retrieval and rollback. In one embodiment, when the business staff modifies the mapping rule of the department dimension, the system generates a new version number such as "V2.0" and saves the updated rule set together with the original version "V1.0" to ensure that the historical rules can still be traced.
[0035] Step S3-2, compare the new rule set with the currently running rule set before rule loading; when the trigger conditions are the same but the operation results are inconsistent, mark the conflicting rules and output a conflict list, refuse to load, generate a conflict report and write the conflict report to the version snapshot library; when the trigger conditions are the same but the operation results are consistent or the trigger conditions are different, jump to step S3-3 for preloading verification; In one embodiment, the system invokes the conflict detection module to compare the new and old rule sets item by item before loading the new rule to check whether there is a situation of repeated trigger conditions but inconsistent calculation logic. In one embodiment, if the old rule defines "group by department to count sales", and the new rule defines "group by department to count quantity", the system will identify the conflict and refuse to load the new rule, while generating a conflict report and storing it in the snapshot library for review.
[0036] Step S3-3, load the rule set to the test environment to perform a trial calculation; when the trial calculation result is consistent with the expected result, determine that the verification is passed and jump to step S3-4; when the trial calculation result is inconsistent with the expected result, output a verification failure report and abort the loading; In one embodiment, the system first loads the new rule set to the test environment and performs a trial calculation based on historical sample data or preset test data to determine whether the output result meets the expectation. In one example, when the sales data of a certain month is used to perform a new rule calculation, if the output result is consistent with the manual verification result, the system confirms that the rule passes the verification; if the result deviates, the system outputs a verification failure report and rejects the online of the rule set.
[0037] Step S3-4, when the preloading verification is passed, load the rule set to the rule engine in a hot update manner to replace the old version of the rule set, and write the version information, loading result and execution log to the rule log after the loading is successful; In one embodiment, the system loads the new rule set to the running rule engine in a hot update manner after the verification is passed, ensuring that the business does not interrupt. The system writes the version number, execution time and result in the log during the loading to form a complete rule update record. In one example, when the rule "summarize the quantity and amount by department and date" is replaced by a new rule, the system writes "version V2.0 loading is successful, replacing V1.0, execution time is 0.3 seconds" in the log.
[0038] Step S3-5, perform a preliminary summary processing on the data set in a unified format to generate preliminary summary data and generate corresponding data columns in the summary form; In one embodiment, the rule engine calls the latest rule set to perform a preliminary summary on the standardized business data to generate preliminary summary data containing grouping dimensions and basic aggregation results. The system writes the result to the summary form to form corresponding data columns for users to view or call. In one example, the business data contains the planned quantity and budget amount entered by multiple departments, and after the preliminary summary, the data columns of "summarize the planned quantity by department" and "summarize the budget amount by department" are generated.
[0039] Step S4-1, receive the preliminary summary data, determine the grouping level according to the level order set by the dimension field; and assign a unique identifier to each piece of preliminary summary data entering the hierarchical summary processing; In one embodiment, when the system receives the preliminary summary data, it determines the grouping level according to the level order set by the dimension field, and generates a unique identifier for each data record for tracing. In one example, if the dimension level is province, city and district, the system will mark a record as ID1001 and determine its grouping path as "Huadong Province-Nanjing City-Gulou District".
[0040] Step S4-2, grouping the preliminary summary data based on the grouping hierarchy in sequence to generate a hierarchical grouping result; in the grouping stage, the unique identifier is written into the grouping record and a corresponding relationship is established with the corresponding dimension hierarchy; In one embodiment, the system groups the preliminary summary data in sequence according to the hierarchical order to form a hierarchical grouping result, and writes the unique identifier of the data and its hierarchical information in the grouping record. In one embodiment, when the system processes a certain sales data, it records that the data ID 1001 belongs to the path of "XX province / YY city / ZZ district", so as to realize subsequent hierarchical calculation and traceability.
[0041] Step S4-3, setting the operation mode for each index field, including summation, average, weighted or maximum and minimum operation; In one embodiment, the system pre-sets different operation modes for each index field, for example, summation for quantity, weighted average for amount, and maximum value for date. Different index fields call different calculation logic to ensure the accuracy of the result. In one embodiment, the system weights the budget amount according to the weight, and directly sums up the quantity when summarizing the quantity.
[0042] Step S4-4, calling the corresponding operation mode based on the hierarchical grouping result to obtain hierarchical summary data; in the hierarchical summary stage, the unique identifier is written into the operation chain table, and the corresponding operation mode and intermediate result are recorded; In one embodiment, the system generates hierarchical summary data based on the hierarchical grouping result by calling the specified operation mode, and records the corresponding relationship between the unique identifier and the intermediate result in the operation chain table. In one embodiment, when the system performs summation calculation on the quantity field, it records the value change of data ID 1001 in each level of calculation, and finally outputs to the hierarchical summary result.
[0043] Step S4-5, recording the corresponding relationship between the input data and the output result in the hierarchical summary process to establish a mapping table; after generating the hierarchical summary data, an index table of the unique identifier and the final result is established; based on the index table, the source details, operation rules and calculation path from the hierarchical summary data to the preliminary summary data are realized; In one embodiment, the system establishes a mapping table for the input data and the output result in the hierarchical summary process, and after finally generating the hierarchical summary data, an index table between the unique identifier and the final result is created, which is used for data traceability. In one embodiment, the system can trace back to the original details, the rules used for calculation and the hierarchical operation path of data ID 1001 by searching the index of data ID 1001, so as to realize complete tracking of the result.
[0044] Step S5, based on the hierarchical summary data, generating an adjustable data structure according to the dimension field and the index field; In one embodiment, the system dynamically generates an adjustable data structure according to the dimension and index relationship of the hierarchical summary data to support flexible display and further analysis. In one embodiment, the system can generate a data structure similar to a multi-dimensional pivot table from the hierarchical summary data, in which the user can freely select different combinations such as "by department", "by date", etc. for display.
[0045] Step S6, comparing the business document data with the hierarchical summary data to generate a verification result, and updating the hierarchical summary data when the verification result meets the preset condition; In one embodiment, the system compares the hierarchical summary data with the business document data item by item, outputs a verification result, and automatically updates the hierarchical summary data when the verification is passed. In one embodiment, when the plan quantity entered by a certain department is inconsistent with the summary result, the system generates a verification report and triggers a correction operation.
[0046] Step S6-1, receiving the hierarchical summary data and the business document data, and comparing them one by one according to the index field to generate a difference data set; In one embodiment, the system receives the two types of data and compares them field by field to form a difference data set. In one embodiment, the system finds that the number of the sales department in the hierarchical summary data is 200, while the number in the document is 210, and then generates a difference data set to record this difference.
[0047] Step S6-2, classifying the difference data set to distinguish missing differences, numerical differences, and logical differences; In one embodiment, the system classifies the data according to the nature of the difference. In one embodiment, if the record is missing, it is determined as a missing difference, if the numerical values are inconsistent, it is a numerical difference, and if the hierarchical relationship is wrong, it is a logical difference.
[0048] Step S6-3, generating a verification report based on the difference classification result, and recording the location, type, and reason of the difference data in the verification report; In one embodiment, the system arranges the difference classification result into a report, which includes the difference location, type, and reason explanation. In one embodiment, the system marks in the report that the number of the sales department in September 2025 has a numerical difference, and the reason is an input error.
[0049] Step S6-4, generating a correction instruction according to the verification report, the correction instruction including an update operation, a replacement operation, or a rejection operation, invoking corresponding correction rules combined with the difference type, and selecting the optimal solution from multiple candidate correction methods based on historical correction records or an adaptive correction model; In one embodiment, the system automatically generates correction instructions according to the report content, the correction logic selects the appropriate method according to the difference type, and the historical correction record can be used to optimize the strategy. In one embodiment, when a numerical difference is found, the system selects an update operation according to the historical rule, changes 200 to 210, and records the correction path in the report.
[0050] Step S6-5, submit the correction instruction to the rule engine, and execute the correction processing on the hierarchical summary data by the rule engine to generate updated hierarchical summary data; In one embodiment, the correction instruction is passed to the rule engine, which re-executes the summary logic and outputs the update result. In one embodiment, the rule engine corrects the sales department quantity to 210 according to the update instruction to generate the corrected hierarchical summary data.
[0051] Step S7, in the multi-department or multi-level data scenario, the summary data of the subordinate department is summarized to the superior unit to obtain the final summary data; In one embodiment, the system supports cross-department and cross-level summary, and gradually reports and combines the data of the subordinate department to the superior result, and finally stores it in the cloud platform. In one embodiment, the subsidiary reports the plan summary to the group headquarters, and the system completes the step-by-step combination and writes it to the cloud storage.
[0052] Step S7-1, receive the hierarchical summary data uploaded by each subordinate department within a preset time window, and temporarily store the received data in a cache area; In one embodiment, the system receives data within a predetermined time window and stores it in the cache area to ensure data synchronization. In one embodiment, the headquarters system receives the summary data of each department for the last month at the beginning of each month and temporarily stores it in the cache.
[0053] Step S7-2, timestamp alignment processing is performed on the data in the cache area to generate an aligned temporary data set; In one embodiment, the system performs timestamp comparison on the received data to unify the time range. In one embodiment, if some departments upload data on September 1 and some on September 2, the system will align them to the data window of September 1.
[0054] Step S7-3, perform consistency check on the temporary data set; when missing department data is detected, mark the time sequence window as incomplete; when timestamp overlap or data conflict is detected, mark the time sequence window as abnormal; In one embodiment, the system performs verification on the temporary data set to detect missing or conflicting data and mark the status. In one embodiment, if the finance department does not upload data, the window is marked as incomplete; if two departments upload data at the same time but with different values, it is marked as an abnormal state.
[0055] Step S7-4, when the consistency check passes, write the temporary data set to the upper summary table and jump to step S7-5; In one embodiment, the system writes data to the upper table when the check passes, as input for subsequent merging. In one embodiment, when all department data is complete and conflict-free, the system writes data to the summary table at headquarters.
[0056] Step S7-5, perform merging processing on the hierarchical summary data from multiple subordinate departments in the upper summary table to generate final summary data; In one embodiment, the system merges data from multiple subordinate departments to generate final summary data. In one embodiment, the system merges data from the sales department, the production department, and the finance department to obtain the overall plan summary result of the company.
[0057] Step S7-6, obtain the final summary data and write the source department and write time information.
[0058] In one embodiment, after generating the final summary result, the system stores the result to the cloud platform, while writing the source department and write time meta information for traceability. In one embodiment, the system stores the summary result marked as "Source: various departments, reporting time: September 2, 2025", ensuring the auditability of the result.
[0059] In some embodiments, the present application provides a plan data summary processing system, which comprises: A data acquisition unit configured to acquire plan detail data entered by business personnel and perform standardized processing on the detail data to obtain a data set in a unified format; In one embodiment, the data acquisition unit obtains plan detail data entered by business personnel through an enterprise ERP system or a business entry interface, including department, date, material number, quantity, and amount, etc. The unit has the function of data format conversion and field normalization, and can unify data of different sources into a standard format. In one embodiment, when the sales department enters quantity 200 and amount 50000 with date "2025 / 9 / 1", and the production department enters quantity 350 and amount 70000 with date "2025-9-1", the data acquisition unit will unify the date to "2025-09-01" and the amount to yuan, obtaining a data set in a unified format for subsequent processing and calling.
[0060] A rule generation unit configured to establish a mapping relationship between the detail table and the summary table based on the dimension field and the indicator field, and convert the mapping relationship into a rule expression; In one embodiment, the rule generation unit automatically generates mapping relationships by parsing the dimension fields and the indicator fields selected by the business personnel, and converts them into rule expressions. The mapping relationships determine the field corresponding rules between the detail form and the summary form. In one example, the business personnel specifies "count the number of plans and the budget amount by department and date" in the summary form, and the rule generation unit generates a rule expression that can group by department and date and aggregate the number and amount fields during subsequent execution.
[0061] The rule engine unit is configured to receive the rule expressions, perform preliminary summary processing on the uniformly formatted data set, generate preliminary summary data, and generate corresponding data columns in the summary form; In one embodiment, the rule engine unit receives the rule expressions output by the rule generation unit, and performs preliminary summary based on the uniformly formatted data set to obtain preliminary summary data containing grouping dimensions and basic aggregation indicators. The unit can write the results to the summary form to generate corresponding summary columns. In one example, when the business personnel needs to view the number and amount summarized by department and date, the rule engine unit outputs the preliminary summary data with department and date as keys, and generates "number summary columns" and "amount summary columns" in the form.
[0062] The hierarchical summary unit is configured to perform grouping operations and hierarchical summary based on field calculation rules on the preliminary summary data, and record data processing paths during the operation to generate hierarchical summary data; In one embodiment, the hierarchical summary unit performs hierarchical grouping and summary calculation on the preliminary summary data according to the field calculation rules to generate hierarchical summary data. During the calculation process, the unit records the correspondence between the input and the output to establish a traceable path. In one example, the hierarchical summary unit first totals by district, then by city and province, and records the unique identifiers of the original data at each step to make the results traceable.
[0063] The structure generation unit is configured to generate an adjustable data structure according to the dimension fields and the indicator fields based on the hierarchical summary data; In one embodiment, the structure generation unit dynamically generates an adjustable data structure according to the dimension and indicator relationships of the hierarchical summary data, allowing users to flexibly switch between display modes. In one example, users can select "by department and month" or "by region and material" as the display mode through the unit, and the system will generate corresponding structured results based on the hierarchical summary data to support different analysis needs.
[0064] The check correction unit is configured to compare the business document data with the hierarchical summary data, generate a check result, and perform an update on the hierarchical summary data when the check result meets a preset condition; In one embodiment, the check correction unit receives the hierarchical summary data and the business document data, compares the values of the same fields, generates a check report, and generates a correction instruction when a difference is found, and re-executes the correction calculation by the rule engine. In one embodiment, when the hierarchical summary result shows that the number of sales departments is 200, and the business document shows 210, the unit will generate an "update" instruction to correct the summary result to 210, and record the correction operation path.
[0065] The cross-department summary unit is configured to aggregate the hierarchical summary data of subordinate departments to the superior unit to generate final summary data in a multi-department or multi-level data scenario.
[0066] In one embodiment, the cross-department summary unit receives data uploaded by multiple subordinate departments within a preset time window, performs consistency check after aligning the timestamps, ensures data integrity, and merges the data that passes the check to generate a final summary result. The final result is stored in the cloud platform and marked with the source and upload time. In one embodiment, the headquarters system receives the data of the sales department, the production department and the financial department at the beginning of each month, the cross-department summary unit merges them after consistency check to generate the monthly plan summary data of the entire enterprise, and stores it in the cloud for subsequent sharing and tracing.
[0067] In some embodiments, the present application provides a terminal, comprising: a memory for storing a plan data summary processing program; a processor for executing the plan data summary processing system to implement the steps of the plan data summary processing method.
[0068] In some embodiments, the present application provides a computer readable storage medium, which stores computer instructions, and when a computer reads the computer instructions in the storage medium, the computer executes the plan data summary processing method.
[0069] It can be understood that the systems, devices, modules or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a personal digital assistant, a tablet computer, a wearable device, or a combination of any of these devices.
[0070] In one typical configuration, the computer includes one or more processors (CPU), input / output interface, network interface, and memory.
[0071] Memory can include non-persistent memory and / or volatile memory, representing an example of computer readable media. Non-persistent memory and / or volatile memory can include, for example, random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), fast page mode dynamic random access memory (FPM DRAM), extended data-out dynamic random access memory (EDO DRAM), extended data-out dynamic
[0072] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital versatile discs (DVDs) or other optical storage, magnetic cassettes, magnetic disks storage, quantum memory, graphene-based storage media, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.
[0073] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0074] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used only as labels to distinguish different sets of information from one another. For example, a first information can be termed a second information, and similarly, a second information can be termed a first information, without departing from the scope of one or more embodiments described herein. As used herein, the word "if' can be construed to mean "when" or "upon" or "in response to determining" depending on the context.
[0075] The above description is only the preferred embodiment of one or more embodiments of the specification, and is not used to limit one or more embodiments of the specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the specification should be included in the protection range of one or more embodiments of the specification.
Claims
1. A method for summarizing and processing planned data, characterized in that, Includes the following steps: Step S1: Collect the detailed plan data entered by business personnel, perform standardization processing on the detailed data, and obtain a dataset in a unified format; Step S2: Based on the dimension fields and indicator fields, establish the mapping relationship between the detail form and the summary form, and convert the mapping relationship into a regular expression; Step S3: Load the rule expression into the rule engine, perform preliminary summary processing on the dataset in the uniform format, generate preliminary summary data, and generate the corresponding data columns in the summary form; Step S4: Based on the field calculation rules, perform grouping operations and hierarchical summarization on the preliminary summary data, record the data processing path during the operation, and generate hierarchical summary data; Step S5: Based on the hierarchical summary data, generate an adjustable data structure according to the dimension fields and indicator fields; Step S6: Compare the business document data with the hierarchical summary data, generate a verification result, and update the hierarchical summary data when the verification result meets the preset conditions. Step S7: In multi-department or multi-level data scenarios, aggregate the summary data of lower-level departments to the higher-level unit to obtain the final summary data.
2. The method for summarizing and processing planned data according to claim 1, characterized in that, Step S2 includes: Step S2-1: Receive dimension fields and indicator fields, perform semantic parsing on the field names, and generate a set of field identifiers; Step S2-2: Based on the set of field identifiers, by parsing the hierarchical relationship of the dimension fields and the operation method of the indicator fields, grouping nodes and aggregation nodes are generated in sequence, and the two are combined to form a hierarchical rule syntax tree; Set the field hierarchy and operation order in the syntax tree; Step S2-3: Convert the rule syntax tree into rule expressions to generate a rule set; Step S2-4: Perform format validation and consistency checks on the rule set to check whether the syntax is complete and to determine whether there are field mapping conflicts. Step S2-5: After both the verification and detection are passed, the rule set is output to the rule engine.
3. The method for summarizing and processing planned data according to claim 1, characterized in that, Step S3 includes: Step S3-1: Generate version identifiers for the rule set and establish a version snapshot library; Step S3-2: Before loading the rules, compare the new rule set with the currently running rule set; When the triggering conditions are the same but the operation results are inconsistent, the conflict rule is marked and the conflict list is output. Loading is refused, a conflict report is generated and written to the version snapshot library. When the triggering conditions are the same and the operation results are consistent, or when the triggering conditions are different, jump to step S3-3 to enter the preloading verification. Step S3-3: Load the rule set into the test environment and perform trial calculations; When the trial calculation result is consistent with the expected result, the verification is deemed successful and the process proceeds to step S3-4. If the trial result is inconsistent with the expected result, output a verification failure report and stop loading; Step S3-4: When the pre-loading verification passes, the rule set is loaded into the rule engine using hot update, replacing the old version of the rule set. After successful loading, the version information, loading results and execution logs are written to the rule log. Step S3-5: Perform preliminary summary processing on the dataset in the unified format to generate preliminary summary data and generate the corresponding data columns in the summary form.
4. The method for summarizing and processing planned data according to claim 3, characterized in that, Step S4 includes: Step S4-1: Receive the preliminary summary data and determine the grouping level according to the hierarchical order set in the dimension fields; Step S4-2: Group the preliminary summary data according to the grouping hierarchy to generate hierarchical grouping results; Step S4-3: Set the calculation method for each indicator field. The calculation method includes summation, average, weighted or maximum / minimum calculation. Step S4-4: Based on the results of hierarchical grouping, call the corresponding operation method to obtain hierarchical summary data; Steps S4-5: During the step-by-step summarization process, record the correspondence between input data and output results, and establish a mapping table.
5. The method for summarizing and processing planned data according to claim 4, characterized in that, Step S4 also includes: Assign a unique identifier to each piece of preliminary summary data that enters the hierarchical summary processing; During the grouping phase, a unique identifier is written into the grouping record and a corresponding relationship is established with the corresponding dimension level; During the hierarchical aggregation stage, a unique identifier is written into the operation linked list, and its corresponding operation method and intermediate results are recorded. After generating hierarchical summary data, create an index table of unique identifiers and final results; Based on the index table, it is possible to trace back from the hierarchical summary data to the source details, operation rules and calculation path of the preliminary summary data.
6. The method for summarizing and processing planned data according to claim 1, characterized in that, Step S6 includes: Step S6-1: Receive the hierarchical summary data and business document data, compare them one by one according to the indicator fields, and generate a difference dataset; Step S6-2: Classify the differential dataset into missing differences, numerical differences, and logistic differences; Step S6-3: Generate a verification report based on the difference classification results, and record the location, type and reason of the difference data in the verification report; Step S6-4: Generate correction instructions based on the verification report. Correction instructions include update operations, replacement operations, or removal operations. Combine the difference type to call the corresponding correction rules. Select the optimal solution from multiple candidate correction methods based on historical correction records or adaptive correction models. Step S6-5: Submit the correction instruction to the rule engine, which will then perform correction processing on the hierarchical summary data to generate updated hierarchical summary data.
7. The method for summarizing and processing planned data according to claim 1, characterized in that, Step S7 includes: Step S7-1: Receive hierarchical summary data uploaded by each subordinate department within the preset time window, and temporarily store the received data in the cache area; Step S7-2: Perform timestamp alignment on the data in the buffer to generate an aligned temporary dataset; Step S7-3: Perform a consistency check on the temporary dataset; When missing department data is detected, the time series window is marked as incomplete. When timestamp overlap or data conflict is detected, the time series window is marked as an abnormal state; Step S7-4: When the consistency check passes, write the temporary dataset into the upper-level summary form and jump to step S7-5; Step S7-5: In the superior summary form, perform a merging process on the hierarchical summary data from multiple subordinate departments to generate the final summary data; Step S7-6: Obtain the final summary data and write the source department and writing time information.
8. A planning data aggregation and processing system, used to implement the planning data aggregation and processing method as described in claim 1, characterized in that, The system includes: The data acquisition unit is configured to collect detailed plan data entered by business personnel and perform standardized processing on the detailed data to obtain a dataset in a unified format. The rule generation unit is configured to establish a mapping relationship between detailed forms and summary forms based on dimension fields and indicator fields, and to convert the mapping relationship into rule expressions; The rule engine unit is configured to receive rule expressions, perform preliminary summary processing on a dataset in a uniform format, generate preliminary summary data, and generate corresponding data columns in the summary form; The hierarchical summary unit is configured to perform grouping operations and hierarchical summarization on the preliminary summary data based on field calculation rules, record the data processing path during the operation, and generate hierarchical summary data; The structure generation unit is configured to generate an adjustable data structure based on hierarchical summary data, according to dimension fields and indicator fields. The verification and correction unit is configured to compare business document data with hierarchical summary data, generate verification results, and update the hierarchical summary data when the verification results meet preset conditions. The cross-departmental aggregation unit is configured to aggregate hierarchical aggregation data from lower-level departments to higher-level units in multi-department or multi-level data scenarios, generate final aggregated data, and obtain the final aggregated data.
9. A terminal, characterized in that, include: The memory is used to store the simulation program for summarizing and processing planned data; A processor is configured to implement the steps of the planned data aggregation processing method as described in claim 1 when executing the planned data aggregation processing apparatus.
10. A computer-readable storage medium, characterized in that, The storage medium stores computer instructions. When the computer reads the computer instructions from the storage medium, the computer executes the planned data aggregation processing method as described in claim 1.
Citation Information
Patent Citations
Voucher generation method and device, electronic equipment and storage medium
CN112000658A
Report generation method and device, equipment and medium
CN120633617A
Cross-transaction system accounting function separation method based on rule engine
CN120707313A