A report loading and processing method, system, device and medium in industrial scenarios
By obtaining data source information in industrial scenarios, defining physical field mapping rules, configuring data verification logic and indicator calculation formulas, and generating standardized configuration files, the problems of report data mapping errors and indicator calculation logic conflicts are solved, and the accuracy of report data and the maintainability of the system are achieved.
Patent Information
- Application Number
- CN202510676963.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-05-26
AI Technical Summary
In industrial scenarios, existing technologies are unable to effectively solve the problems of report data mapping errors and indicator calculation logic conflicts, resulting in report data being unable to accurately reflect actual production conditions.
By obtaining data source information, defining physical field mapping rules, establishing a dynamic binding relationship between business entity attributes and data source fields, configuring data field mapping rules and data verification logic, establishing indicator calculation formulas and processing logic, generating standardized configuration files, and ensuring data consistency through a distributed transaction mechanism.
The accuracy of data mapping is achieved, the consistency of indicator calculation results is ensured, and the accuracy of report data and the maintainability of the system are improved.
Smart Images

Figure CN120196383B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of report loading, and in particular relates to a report loading processing method, system, device and medium in an industrial scenario. Background Art
[0002] In industrial scenarios, reporting is a core tool that connects production data with decision-making logic. Its technical background must closely revolve around the real-time, reliability, and data diversity of industrial environments. Industrial reporting enables a closed-loop process from data collection to decision execution.
[0003] In industrial scenarios, data sources are diverse and complex, including equipment data from different manufacturers and file data in various formats. Related technologies often rely on manual configuration to establish mappings between business entities and data sources, which can easily lead to mapping errors or omissions, resulting in subsequent report data not accurately reflecting actual production conditions. The indicator calculation logic involved in industrial reports is complex, and different indicators may require data from multiple data sources and undergo different calculations and processing. When business needs change and indicator calculation methods need to be adjusted, logical conflicts can easily arise, leading to incorrect calculation results. Furthermore, as industrial business grows, report-related configuration information continues to increase and change frequently. Related technologies typically manage configuration files through simple file storage, lacking version management and structured design. During configuration file updates, changes and change history cannot be accurately recorded, making it difficult to trace issues. Furthermore, unstructured configuration files hinder quick retrieval and modification of specific configuration items, reducing system maintainability. Summary of the Invention
[0004] This invention provides a report loading and processing method for industrial scenarios. This method configures data field mapping rules through a data registration component, doubly ensuring the accuracy of data mapping. It can ensure that configuration files are accurately updated and indicator calculation results are consistent.
[0005] Methods include:
[0006] S101: Acquire data source information associated with a business entity identifier; define physical field mapping rules corresponding to the business entity identifier based on the data source information, establish a dynamic binding relationship between business entity attributes and data source fields, and generate an indicator metadata template containing business entity semantic information;
[0007] S102: Obtaining data source information associated with the business entity identifier through the data registration component, and configuring data field mapping rules and data verification logic based on the data source information;
[0008] S103: Based on the business entity attributes and data source information, configure the indicator calculation formula and processing logic, and establish a calculation mapping relationship between the indicator field and the data source field;
[0009] S104: Structurally encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing business entity association relationships;
[0010] S105: persisting the generated standardized configuration file to the database, and simultaneously pushing a configuration update notification to the indicator engine module through the message queue;
[0011] S106: After receiving the configuration update completion information, a three-party association relationship index is established between the indicator instance identifier, the business entity identifier and the data source identifier, and the consistency of the configuration data, the association relationship and the indicator calculation results is ensured through a distributed transaction mechanism.
[0012] It should be further explained that step S101 specifically includes:
[0013] Based on the preset identifier key value, the original data item in the data source is analyzed for business semantics, and the target data item that is semantically consistent with the original data item is verified in the target platform.
[0014] If there is no semantically consistent target data item, an extended attribute set under the target platform is generated based on the attribute set of the data source; the extended attribute set inherits the structure of the source attribute set, and matches the identifier key value through a semantic similarity algorithm to locate the candidate data item that has an association relationship with the original data item;
[0015] The candidate data items are used as the final data items in the target platform, and the extended attribute set and mapping relationship are persisted to the metadata management module to establish a cross-platform consistency binding between the original data items and the target data items.
[0016] It should be further explained that step S102 specifically includes:
[0017] After obtaining the data source information, the meaning of the data field is parsed to extract the business concepts and semantic information represented by the data field;
[0018] Based on the predefined association rule library, analyze the association between data fields, including but not limited to the functional dependency between data fields and the association between data fields and other business entity identifiers;
[0019] Incorporate semantic information and relevance analysis results into data field mapping rules as supplementary information.
[0020] It should be further explained that step S103 specifically includes:
[0021] Identify the data source type and data source type identifier, and load the appropriate calculation logic template;
[0022] Generate field-level, table-level, and system-level calculation rules based on data source type, calculation logic template, and business entity attributes, and configure them as hierarchical rule configuration files.
[0023] Calculate the field-level statistical indicators of the hierarchical rule configuration file, verify the calculation results, and obtain the verification result information;
[0024] Adjust the rule parameters based on the verification results. When a conflict is detected, start the historical valid rule version and trigger an alarm.
[0025] It should be further explained that the structured packaging in step S104 specifically includes:
[0026] Adopting a tree-like data structure to hierarchically store indicator metadata as the root node, data mapping rules as child nodes, and calculation logic as leaf nodes;
[0027] Embed field-level data source traceability information in each node and record the field-level data processing link;
[0028] Generate JSON validation rules based on the configuration file structure.
[0029] It should be further explained that step S105 specifically includes:
[0030] Generate a random version number for the configuration file before persisting it, record the modification timestamp, operator ID, and summary of the changed content, and use blockchain evidence storage technology to store version history information;
[0031] Match the message channel according to the system status and configuration file type;
[0032] Field-level validation nodes are embedded in the database persistence phase and the message queue push phase to perform data type validation, business rule validation, and relationship integrity verification.
[0033] When persistence or push fails, a compensating transaction log is generated, an alarm is triggered to notify the operation and maintenance personnel, and the system rolls back to the most recent valid configuration state based on the historical version number.
[0034] It should be further explained that step S106 specifically includes: creating a multi-level index based on the association relationship between the indicator instance identifier and the business entity identifier;
[0035] When a distributed transaction fails, a transaction compensation log is generated to record the operation sequence and intermediate status, trigger recovery to the valid state before the transaction, and notify the operation and maintenance personnel through the message queue;
[0036] Step S106 also performs data consistency verification in stages after the three-party association relationship is established:
[0037] Indicator instance metadata integrity check;
[0038] Verification of the mapping relationship between business entities and data sources;
[0039] Sampling verification of indicator calculation results.
[0040] The present application also provides a report loading and processing system in an industrial scenario, the system comprising: an information acquisition and binding module for acquiring data source information associated with a business entity identifier; defining a physical field mapping rule corresponding to the business entity identifier based on the data source information, establishing a dynamic binding relationship between business entity attributes and data source fields, and generating an indicator metadata template containing business entity semantic information;
[0041] A mapping rule configuration module is used to obtain data source information associated with a business entity identifier through a data registration component, and configure data field mapping rules and data validation logic based on the data source information;
[0042] The mapping relationship establishment module is used to use business entity attributes and data source information to configure indicator calculation formulas and processing logic, and establish calculation mapping relationships between indicator fields and data source fields;
[0043] The standard file generation module is used to structure and encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing the relationship between business entities;
[0044] The storage push module is used to persist the generated standardized configuration files to the database and push configuration update notifications to the indicator engine module through the message queue;
[0045] The index and consistency processing module is used to establish a three-party association relationship index between the indicator instance identifier, business entity identifier and data source identifier after receiving the configuration update completion information, and ensure the consistency of configuration data, association relationship and indicator calculation results through a distributed transaction mechanism.
[0046] According to another embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the steps of the report loading and processing method in the industrial scenario are implemented.
[0047] According to another embodiment of the present application, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the report loading and processing method in the industrial scenario are implemented.
[0048] It can be seen from the above technical solutions that the present invention has the following advantages:
[0049] The report loading and processing method provided in this application for industrial scenarios establishes a dynamic binding relationship by obtaining data source information and defining physical field mapping rules; and configures data field mapping rules through the data registration component to doubly guarantee the accuracy of data mapping. At the same time, when verifying the mapping relationship between business entities and data sources, the mapping relationship is rechecked and corrected. In this way, various parameters of the equipment can be accurately mapped to corresponding production indicators, such as accurately associating parameters such as the equipment's speed and temperature with the equipment's operating stability indicators, ensuring that the report data truly reflects the production status.
[0050] Step S103 of the present application configures the indicator calculation formula and processing logic based on the business entity attributes and data source information, and establishes a calculation mapping relationship; at the same time, a hierarchical rule configuration file is used to divide the calculation logic into field level, table level, and system level for management. Make the calculation logic clear and understandable, and when business needs change, the calculation rules of the corresponding level can be quickly located and adjusted. Step S104 uses a tree data structure to perform structured encapsulation of indicator metadata, mapping rules and calculation logic to generate a standardized configuration file; step S105 generates a dynamic version number before persistence, and uses blockchain evidence technology to store version history information. Structured encapsulation makes the configuration file clearly layered and easy to find and modify. Step S105 embeds field-level verification nodes in the database persistence stage and the message queue push stage to perform data type verification, business rule verification and relationship integrity verification. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the present invention, the following is a brief introduction to the drawings required for the description. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A flow chart of the report loading processing method in industrial scenarios;
[0053] Figure 2 This is a flow chart of an embodiment of a report loading and processing method in an industrial scenario;
[0054] Figure 3 This is a flow chart of another embodiment of a report loading and processing method in an industrial scenario;
[0055] Figure 4 Schematic diagram of an electronic device. DETAILED DESCRIPTION
[0056] The report loading and processing method in industrial scenarios provided in this application solves the problem that in industrial scenarios, due to the diversity of data sources in the reports, the existing report system cannot be directly used to complete report design; at the same time, it also solves the problem that industrial software cannot directly use report data to directly guide production.
[0057] The following describes in detail the detailed steps of the report loading and processing method in the industrial scenario involved in this application. For the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are provided to facilitate a thorough understanding of the embodiments of this application. However, it should be clear to those skilled in the art that this application can also be implemented in other embodiments without these specific details.
[0058] It should be understood that when used in this specification, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or their collections. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0059] The phrases "one embodiment" or "some embodiments" described in this application mean that the specific features, structures, or characteristics described in the embodiment are included in one or more embodiments of the application. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. that appear in different places in this application do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized.
[0060] In embodiments of the present invention, computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (exemplarily, via the Internet using an Internet service provider).
[0061] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0062] See also Figure 1 The figure is a flowchart of a report loading and processing method in an industrial scenario in a specific embodiment, and the method includes:
[0063] S101: Obtain data source information associated with the business entity identifier, wherein the data source information includes a data source address, a data structure, and field attributes; define physical field mapping rules corresponding to the business entity identifier based on the data source information, establish a dynamic binding relationship between business entity attributes and data source fields, and generate an indicator metadata template containing business entity semantic information.
[0064] In some embodiments, a query is performed in the data source management module based on the business entity identifier to obtain the associated data source information. The data source information includes the data source address, which is the entry point for accessing the data. The data structure defines the organization of the data. The field attributes describe the specific characteristics of each field, such as data type and length.
[0065] Based on the acquired data source information, physical field mapping rules are developed. Specifically, these rules determine how business entity attributes correspond to data source fields. Through these mapping rules, a dynamic binding relationship between business entity attributes and data source fields is established. Finally, this information is integrated to generate an indicator metadata template containing the semantic information of the business entity.
[0066] As an embodiment of the present application, a business semantic analysis is performed on the original data item in the data source based on a preset identifier key value, and a target data item that is semantically consistent with the original data item is verified in the target platform. The target data item is used to represent the target platform's definition specification of the original data item.
[0067] If there is no semantically consistent target data item, an extended attribute set under the target platform is generated based on the attribute set of the data source; the extended attribute set inherits the structure of the source attribute set, and matches the identifier key value through a semantic similarity algorithm to locate the candidate data item that has an association relationship with the original data item.
[0068] The candidate data items are used as the final data items in the target platform, and the extended attribute set and mapping relationship are persisted to the metadata management module to establish a cross-platform consistency binding between the original data items and the target data items.
[0069] As can be seen, before generating the indicator metadata template, semantic consistency verification is performed to ensure that the source data aligns with the target platform's business definition, avoiding mapping errors caused by semantic ambiguity. Using the business entity identifier as an index, a matching search is performed within the pre-stored data source information repository to locate the corresponding data source information. Then, based on the data structure and field attributes, the logical relationship between the business entity attributes and the data source fields is analyzed to define appropriate mapping rules.
[0070] S102: Acquire data source information associated with the business entity identifier through the data registration component, and configure data field mapping rules and data verification logic based on the data source information.
[0071] In this embodiment, after obtaining data source information, a preset semantic analysis model is used to parse the meaning of data fields, extracting the business concepts and semantic information represented by the data fields. Simultaneously, based on a predefined association rule library, the associations between data fields are analyzed, including but not limited to functional dependencies between data fields and associations between data fields and other business entity identifiers. This semantic information and association analysis results are incorporated into the data field mapping rules as supplementary information, ensuring that the mappings reflect the associations between business logic and data, thereby improving the accuracy and reliability of indicator calculations.
[0072] In some embodiments, the data registration component retrieves data source information associated with a business entity identifier. After obtaining this information, mapping rules are configured for the data fields. These rules refine the correspondence between business entity attributes and data source fields to ensure accurate data acquisition. Furthermore, data validation logic is configured to check data integrity, accuracy, and legality, ensuring the quality of data entering the system and improving system stability.
[0073] S103: Based on the business entity attributes and data source information, configure the indicator calculation formula and processing logic, and establish a calculation mapping relationship between the indicator field and the data source field.
[0074] In some embodiments, the indicator calculation formula is determined by combining business entity attributes with previously acquired data source information. This formula specifies how to calculate the required indicator from the data source fields. Simultaneously, data processing logic is configured, such as data cleansing and conversion operations. This establishes a calculation mapping relationship between indicator fields and data source fields, clearly defining how the indicator is calculated from the data source, and improving the accuracy and maintainability of indicator calculations.
[0075] S104: Structurally encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing business entity association relationships.
[0076] In some embodiments, the generated indicator metadata, configured data field mapping rules, and calculation logic are structured and packaged to generate a standardized configuration file containing the business entity relationship. The standardized configuration file integrates all key information from the previous steps to form a complete configuration file.
[0077] S105: The generated standardized configuration file is persisted to the database, and the configuration update notification is pushed to the indicator engine module through the message queue.
[0078] In some embodiments, the generated standardized configuration file is saved in a database to achieve persistent storage and ensure that the configuration information is not lost. At the same time, a configuration update notification is sent to the indicator engine module through a message queue to inform the indicator engine module that the configuration information has changed and that a corresponding update operation is required.
[0079] The database provides persistent data storage, and the system writes configuration files to the database. The message queue, as an asynchronous communication mechanism, sends configuration update notifications to the indicator engine module, which triggers the corresponding update logic upon receiving the notifications.
[0080] S106: After receiving the configuration update completion information, a three-party association relationship index is established between the indicator instance identifier, the business entity identifier and the data source identifier, and the consistency of the configuration data, the association relationship and the indicator calculation results is ensured through a distributed transaction mechanism.
[0081] After receiving the configuration update completion message from the indicator engine module, this embodiment establishes a three-way relationship index between the indicator instance identifier, the business entity identifier, and the data source identifier. Through a distributed transaction mechanism, the consistency of configuration data, relationships, and indicator calculation results is ensured, preventing data inconsistencies during data processing.
[0082] After receiving the update completion message, the three identifiers are associated to form an index table. The distributed transaction mechanism monitors and coordinates the entire data processing process, ensuring that the configuration data, association relationships, and indicator calculation results remain consistent under all circumstances, improving system reliability and data quality.
[0083] In one embodiment of the present invention, based on step S103, a possible embodiment will be given below to illustrate its specific implementation scheme in a non-limiting manner. Figure 2 As shown, step S103 specifically includes:
[0084] Step S1031: Identify the data source type and data source type identifier, and load an adapted computing logic template.
[0085] This embodiment determines the type of data source, such as whether it is a relational database, a non-relational database, or a file system. It also identifies an identifier corresponding to the data source type, which uniquely identifies the data source type. Based on the identified data source type, a corresponding computing logic template is loaded from a pre-stored computing logic template library. For example, if the data source is a relational database, a computing logic template suitable for relational database data processing is loaded.
[0086] Step S1032: Based on the data source type, calculation logic template and business entity attributes, three levels of calculation rules are generated: field level, table level and system level, and configured as a hierarchical rule configuration file.
[0087] This embodiment can combine the determined data source type, the loaded calculation logic template and the business entity attributes to generate field-level, table-level and system-level calculation rules respectively. The field-level calculation rules are mainly calculated for a single field in the data source, such as data cleaning, format conversion and other operations on a certain field. The table-level calculation rules are calculated based on the entire data table, such as the summary value, average value, etc. of certain fields in the calculation table. The system-level calculation rules are calculated from the level of the entire data source system, involving the association calculation between multiple data tables. After these rules are generated, they are configured in a hierarchical manner into a file to form a hierarchical rule configuration file, which clearly records the calculation rules of different levels and their mutual relationships.
[0088] In this way, based on the data source type and calculation logic template, the data processing requirements of business entity attributes are analyzed to determine the calculation rules for each layer. These rules are organized according to the hierarchical structure and stored in the hierarchical rule configuration file for easy management and use.
[0089] Step S1033: Calculate the field-level statistical indicators of the hierarchical rule configuration file, verify the calculation results, and obtain verification result information.
[0090] This embodiment calculates field data in the data source based on the field-level calculation rules in the hierarchical rule configuration file to obtain field-level statistical indicators, such as the maximum, minimum, average, and quantity of the field. These calculation results are then verified, which can be done by comparing them with preset thresholds or checking data integrity and consistency. Based on the verification results, verification result information is generated, which records whether the calculation results meet expectations, and the specific circumstances in which they do not meet expectations.
[0091] Step S1034: Adjust the rule parameters according to the verification result. When a conflict is detected, start the historical valid rule version and trigger an alarm.
[0092] It should be noted that the rule parameters in the hierarchical rule configuration file are adjusted based on the verification results. If the verification results show that a calculation result does not meet expectations, it may be necessary to adjust the parameters of the relevant rules, such as the calculation weights and thresholds, to make the calculation results more accurate. If a conflict between rules is detected during rule adjustment or calculation, the system will activate the historically valid rule version, that is, the previously functioning rule version, to process the data. At the same time, the system triggers an alarm to notify relevant personnel that a rule conflict has occurred and requires resolution.
[0093] Based on the verification results, the system analyzes the rule parameters that need adjustment and modifies the hierarchical rule configuration file. During the rule adjustment and calculation process, it monitors the rules in real time for conflicts. When a conflict is detected, a valid rule version is selected from the historical rule version library for replacement, and an alert mechanism is used to notify relevant personnel.
[0094] Furthermore, as a refinement and expansion of the specific implementation of the above step S104, in order to fully illustrate the specific implementation process of step S104, as shown below: Figure 3 As shown, the structured packaging in step S104 specifically includes:
[0095] Step S1041: Use a tree data structure to hierarchically store indicator metadata as the root node, data mapping rules as child nodes, and calculation logic as leaf nodes.
[0096] This embodiment uses a tree-like data structure to store relevant information. The indicator metadata is used as the root node. The indicator metadata contains key information such as the basic definition of the indicator and business semantics. The data mapping rules are connected to the root node as child nodes. The data mapping rules define the correspondence between business entity attributes and data source fields, indicating where the data comes from and how it is associated with the indicator. In this way, the tree-like data structure itself has the characteristics of clear hierarchy and easy organization and management. Starting with the indicator metadata, the data mapping rules and calculation logic are organized in an orderly manner through the relationship between parent and child nodes.
[0097] Step S1042: embed field-level data source tracing information in each node and record the field-level data processing link.
[0098] Field-level data source traceability information is embedded in each node of the tree structure. This information records the specific data source from which each field's data was obtained, including the data source's address, table name, and field name. It also records the field-level data processing chain, specifically the operations that the field data underwent throughout the entire processing process.
[0099] Step S1043: Generate JSON validation rules based on the configuration file structure.
[0100] This embodiment generates JSON validation rules based on the structural characteristics of the previously constructed tree-structured data configuration file. These validation rules are used to verify whether subsequent JSON-formatted input or output data conforms to the configuration file's requirements. The system analyzes the information of each node in the tree-structured data configuration file, including indicator metadata, data mapping rules, and calculation logic, to extract key constraints and specifications. Based on this information, corresponding JSON validation rules are generated, which can be implemented using tools such as JSONSchema.
[0101] In one embodiment of the present invention, based on step S105, a possible embodiment is given below to illustrate its specific implementation scheme in a non-limiting manner. Step S105 specifically includes:
[0102] Step S1051: Generate a random version number for the configuration file before persistence, record the modification timestamp, operator identification and change content summary, and use blockchain evidence storage technology to store version history information.
[0103] This embodiment generates a random version number for the configuration file before persisting it to the database. This random version number is unique and changes with each modification, identifying different versions of the configuration file. It also records a timestamp for the modification, accurately indicating the exact moment the modification occurred. The identification of the person who performed the modification is recorded to clearly identify the person who made the modification, and a summary of the change details is also recorded, describing the main content of the modification. This version history information is stored using blockchain technology, which ensures that the information is tamper-proof and traceable.
[0104] Step S1052: Match the message channel according to the system status and the configuration file type.
[0105] This embodiment monitors its own status in real time. It also identifies the type of configuration file, such as an indicator configuration file or a data mapping rule configuration file. Based on this identification information, it matches the appropriate message channel from a predefined list of message channels. Different system states and configuration file types may correspond to different message channels.
[0106] Step S1053: embed field-level verification nodes in the database persistence phase and the message queue push phase respectively to perform data type verification, business rule verification, and relationship integrity verification.
[0107] In this embodiment, field-level verification nodes are embedded in the corresponding stages of the process of persisting the configuration file to the database and the process of pushing the configuration update notification to the message queue. At the verification node, the data type of each field in the configuration file is verified to ensure that the data type of the field meets the expectations. Verification nodes are set in the process of database persistence and message queue push. When the data of the configuration file flows through these nodes, the verification module checks each field according to the pre-defined data type rules, business rules, and association relationship rules. If a violation of the rules is found, an error message is recorded and corresponding processing measures are taken.
[0108] Step S1054: When persistence or push fails, a compensation transaction log is generated, an alarm is triggered to notify the operation and maintenance personnel, and the system rolls back to the most recent valid configuration state based on the historical version number.
[0109] In this embodiment, if a failure occurs during database persistence or message queue push, a compensating transaction log is immediately generated. The log records the specific circumstances of the failure, including the time, location, and possible cause. Simultaneously, an alert mechanism is triggered, notifying operations and maintenance personnel via email, SMS, or internal system alerts. Furthermore, based on the previously recorded historical version number, a rollback is performed to the most recently valid configuration state, ensuring that the system can be restored to normal operation.
[0110] In some specific embodiments, step S106 specifically includes: creating a multi-level index based on the association between the indicator instance identifier and the business entity identifier. When a distributed transaction fails, a transaction compensation log is generated to record the operation sequence and intermediate states, trigger recovery to the valid state before the transaction, and notify the operation and maintenance personnel through a message queue.
[0111] Specifically, the relationship between the indicator instance identifier and the business entity identifier is clarified based on the indicator metadata, data mapping rules, and other information established in the previous steps. Based on the relationship, a multi-level index is created.
[0112] As can be seen, based on the association between indicator instance identifiers and business entity identifiers, the data characteristics and query requirements are analyzed to determine the hierarchical structure and indexing rules for the multi-level index. This associated data is then stored and organized according to the indexing rules, forming a multi-level index structure. When performing data queries, relevant data can be quickly located based on the index.
[0113] If a failure occurs during the execution of a distributed transaction, a transaction compensation log is immediately generated. This log records the sequence of operations during the transaction execution, namely the order and specific content of each operation. It also records the intermediate states during the transaction execution, such as temporary modifications to certain data. The system then triggers a recovery mechanism to restore the system state to the valid state before the transaction execution, ensuring data consistency and integrity. A notification is sent to operations and maintenance personnel via the message queue to inform them of the transaction failure.
[0114] After the three-party association relationship is established, step S106 also performs data consistency verification in stages: indicator instance metadata integrity verification; business entity and data source mapping relationship verification; indicator calculation result sampling verification.
[0115] In some embodiments, after establishing a three-way association between the indicator instance identifier, the business entity identifier, and the data source identifier, the indicator instance metadata is subjected to an integrity check. This includes checking the completeness of all information in the indicator instance metadata, such as whether the indicator name, indicator definition, and calculation method are accurately recorded; and checking the correctness of the associated information in the metadata, such as whether the associations between the indicator instance and the business entity and data source match. The indicator instance metadata is checked item by item according to predefined metadata specifications and association rules. The metadata is verified for completeness and accuracy by comparing it with standard data in the database.
[0116] Then, based on the previously configured data mapping rules, check the mapping relationship between the business entity and the data source. Verify the correctness of the mapping relationship by comparing the definitions and association information of the business entity attributes and the data source fields.
[0117] The system also selects samples from the indicator calculation results based on sampling rules. The samples are then recalculated or verified using the same calculation method or other verification methods, and the results are compared with the original calculation results. Promptly identifying calculation errors can prevent misleading business decisions and improve the reliability and accuracy of indicator calculations.
[0118] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0119] The following is an embodiment of the report loading and processing system in an industrial scenario provided by the embodiments of the present disclosure. This system and the report loading and processing method in an industrial scenario in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the report loading and processing system in an industrial scenario, please refer to the embodiment of the report loading and processing method in the above-mentioned industrial scenario.
[0120] The system includes: an information acquisition and binding module, which is used to obtain data source information associated with a business entity identifier; based on the data source information, defines the physical field mapping rules corresponding to the business entity identifier, establishes a dynamic binding relationship between business entity attributes and data source fields, and generates an indicator metadata template containing business entity semantic information.
[0121] The mapping rule configuration module is used to obtain the data source information associated with the business entity identifier through the data registration component, and configure the data field mapping rules and data verification logic based on the data source information.
[0122] The mapping relationship establishment module is used to use business entity attributes and data source information to configure indicator calculation formulas and processing logic, and establish a calculation mapping relationship between indicator fields and data source fields.
[0123] The standard file generation module is used to structure and encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing the relationship between business entities.
[0124] The storage push module is used to persist the generated standardized configuration files to the database and push configuration update notifications to the indicator engine module through the message queue.
[0125] The index and consistency processing module is used to establish a three-party association relationship index between the indicator instance identifier, business entity identifier and data source identifier after receiving the configuration update completion information, and ensure the consistency of configuration data, association relationship and indicator calculation results through a distributed transaction mechanism.
[0126] In addition to the above modules, the system of the present application can also configure indicators by querying the data metadata information in the metadata management module for use by the indicator calculation engine. Indicator configuration information is obtained through the indicator configuration management module. The metadata management module can receive the data source and data information sent from the report integration module and can also manually maintain the data source and data information of the three parties for use by the indicator configuration module and the data engine module. The data engine module has three main functions: one is to provide basic data for the indicator calculation engine module to calculate indicators, one is for industrial software to query indicator data through the report integration module, and the last is to save the indicator data to the indicator library after the indicator calculation engine module completes the calculation. The report integration module is integrated into the industrial software that needs to use the reporting system. The report integration module contains three components: a data registration component, an indicator configuration component, and an indicator query component: the data registration component registers the data information (including data source information and metadata) in the industrial software with the metadata management module for use by the data engine module and can query the data information in the metadata management module; the indicator configuration component can establish a connection between the indicator configuration and the business entity in the industrial software; and the indicator query component can query the indicator data through the indicator configuration information. This solves the problem in industrial scenarios where the existing reporting system cannot be used directly to complete report design due to the diversity of data sources in the reports; it also solves the problem that industrial software cannot directly use report data to directly guide production.
[0127] like Figure 4 As shown, the present application also provides an electronic device, including a display module 103, a memory 102, a processor 101, and a computer program stored in the memory and executable on the processor 101. When the processor 101 executes the program, the steps of the report loading and processing method in an industrial scenario are implemented.
[0128] In embodiments of the present invention, electronic devices include, but are not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices may also represent various forms of mobile modules, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing modules. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described and / or claimed herein.
[0129] In the embodiment of the present application, the processor 101 can be implemented by using at least one of a special purpose integrated circuit, a programmable logic module, a field programmable gate array, a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein. In some cases, such an embodiment can be implemented in a controller. For software implementation, an embodiment such as a process or function can be implemented with a separate software module that allows the execution of at least one function or operation. The software code can be implemented by a software application (or program) written in any appropriate programming language, and the software code can be stored in a memory and executed by a controller.
[0130] The display module 103 is used to display information input by the user or information provided to the user. The display module 103 may include a display panel, which may be configured in the form of a liquid crystal display, an organic light emitting diode, etc.
[0131] The memory 102 can be used to store software programs and various data. The memory 102 can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0132] The present application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the report loading and processing method in the industrial scenario.
[0133] The storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, module or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0134] In the context of storage media, a readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. This transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, module, or device.
[0135] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A report loading and processing method in an industrial scenario, characterized in that: Methods include: S101: Acquire data source information associated with a business entity identifier; Based on the data source information, a physical field mapping rule corresponding to the business entity identifier is defined, a dynamic binding relationship between the business entity attribute and the data source field is established, and an indicator metadata template containing the business entity semantic information is generated; S102: Obtaining data source information associated with the business entity identifier through the data registration component, and configuring data field mapping rules and data verification logic based on the data source information; S103: Based on the business entity attributes and data source information, configure the indicator calculation formula and processing logic, and establish a calculation mapping relationship between the indicator field and the data source field; S104: Structurally encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing business entity association relationships; S105: persisting the generated standardized configuration file to the database, and simultaneously pushing a configuration update notification to the indicator engine module through the message queue; S106: After receiving the configuration update completion information, a three-party association relationship index is established between the indicator instance identifier, the business entity identifier and the data source identifier, and the consistency of the configuration data, the association relationship and the indicator calculation results is ensured through a distributed transaction mechanism.
2. The report loading and processing method in industrial scenarios according to claim 1 is characterized in that: Step S101 specifically includes: Based on the preset identifier key value, the original data item in the data source is analyzed for business semantics, and the target data item that is semantically consistent with the original data item is verified in the target platform. If there is no semantically consistent target data item, an extended attribute set under the target platform is generated based on the attribute set of the data source; the extended attribute set inherits the structure of the source attribute set, and matches the identifier key value through a semantic similarity algorithm to locate candidate data items that have an association relationship with the original data item; The candidate data item is used as the final data item in the target platform, and the extended attribute set and mapping relationship are persisted to the metadata management module to establish a cross-platform consistency binding between the original data item and the target data item.
3. The report loading and processing method in industrial scenarios according to claim 1 is characterized in that: Step S102 specifically includes: After obtaining the data source information, the meaning of the data field is parsed to extract the business concepts and semantic information represented by the data field; Based on the predefined association rule library, analyze the association between data fields, including but not limited to the functional dependency between data fields and the association between data fields and other business entity identifiers; Incorporate semantic information and relevance analysis results into data field mapping rules as supplementary information.
4. The report loading and processing method in an industrial scenario according to claim 1 is characterized in that: Step S103 specifically includes: Identify the data source type and data source type identifier, and load the appropriate calculation logic template; Generate field-level, table-level, and system-level calculation rules based on data source type, calculation logic template, and business entity attributes, and configure them as hierarchical rule configuration files. Calculate the field-level statistical indicators of the hierarchical rule configuration file, verify the calculation results, and obtain the verification result information; Adjust the rule parameters based on the verification results. When a conflict is detected, start the historical valid rule version and trigger an alarm.
5. The report loading and processing method in industrial scenarios according to claim 1 is characterized in that: The structured packaging in step S104 specifically includes: Adopting a tree-like data structure to hierarchically store indicator metadata as the root node, data mapping rules as child nodes, and calculation logic as leaf nodes; Embed field-level data source traceability information in each node and record the field-level data processing link; Generate JSON validation rules based on the configuration file structure.
6. The report loading and processing method in an industrial scenario according to claim 1 is characterized in that: Step S105 specifically includes: Generate a random version number for the configuration file before persisting it, record the modification timestamp, operator ID, and summary of the changed content, and use blockchain evidence storage technology to store version history information; Match the message channel according to the system status and configuration file type; Field-level validation nodes are embedded in the database persistence phase and the message queue push phase to perform data type validation, business rule validation, and relationship integrity verification. When persistence or push fails, a compensating transaction log is generated, an alarm is triggered to notify the operation and maintenance personnel, and the system rolls back to the most recent valid configuration state based on the historical version number.
7. The report loading and processing method in an industrial scenario according to claim 1 is characterized in that: Step S106 specifically includes: creating a multi-level index based on the association relationship between the indicator instance identifier and the business entity identifier; When a distributed transaction fails, a transaction compensation log is generated to record the operation sequence and intermediate status, trigger recovery to the valid state before the transaction, and notify the operation and maintenance personnel through the message queue; Step S106 also performs data consistency verification in stages after the three-party association relationship is established: Indicator instance metadata integrity check; Verification of the mapping relationship between business entities and data sources; Sampling verification of indicator calculation results.
8. A report loading and processing system in an industrial scenario, characterized in that: The system is used to implement the report loading and processing method in an industrial scenario as described in any one of claims 1 to 7; The system includes: An information acquisition and binding module is used to obtain data source information associated with a business entity identifier; based on the data source information, it defines a physical field mapping rule corresponding to the business entity identifier, establishes a dynamic binding relationship between business entity attributes and data source fields, and generates an indicator metadata template containing business entity semantic information; A mapping rule configuration module is used to obtain data source information associated with a business entity identifier through a data registration component, and configure data field mapping rules and data validation logic based on the data source information; The mapping relationship establishment module is used to use business entity attributes and data source information to configure indicator calculation formulas and processing logic, and establish calculation mapping relationships between indicator fields and data source fields; The standard file generation module is used to structure and encapsulate indicator metadata, data field mapping rules, and calculation logic to generate a standardized configuration file containing the relationship between business entities; The storage push module is used to persist the generated standardized configuration files to the database and push configuration update notifications to the indicator engine module through the message queue; The index and consistency processing module is used to establish a three-party association relationship index between the indicator instance identifier, business entity identifier and data source identifier after receiving the configuration update completion information, and ensure the consistency of configuration data, association relationship and indicator calculation results through a distributed transaction mechanism.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the report loading processing method in an industrial scenario as described in any one of claims 1 to 7 are implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the report loading processing method in an industrial scenario as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Integrated metadata management method and system based on data source expandability
CN119576863A
Report generation and optimization method and system based on offline data warehouse
CN119917595A