Dynamic configuration-based report data processing system, method and medium
By using a dynamically configured report data processing system, the generation and execution of query intent and SQL statements are decoupled, enabling flexible report generation, improving system response speed and maintenance efficiency, and solving the tight coupling problem caused by traditional hard coding.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI PEIQI INFORMATION TECH CO LTD
- Filing Date
- 2026-01-27
- Publication Date
- 2026-06-19
AI Technical Summary
Traditional query and report generation solutions rely on hard coding, resulting in tight coupling between system modules. When business rule requirements change, the source code must be modified and redeployed, leading to slow response times and high maintenance costs.
This paper provides a report data processing system based on dynamic configuration. It centrally manages structured query definition information through a query definition module and uses a parsing and generation engine to distinguish between manual SQL mode and automatic generation mode, generating executable SQL statements in real time, thus decoupling the query intent from the specific generation and execution process of the SQL statement.
It improved development efficiency, enhanced the system's responsiveness to business changes, reduced the complexity and cost of maintenance and updates, and resolved the tight coupling defects between system modules caused by hard coding.
Smart Images

Figure CN122240609A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer software technology, particularly to the field of database management technology, and especially to a report data processing system, method, device, medium, and product based on dynamic configuration. Background Technology
[0002] In enterprise-level application systems, query functionality is a core requirement, directly serving operational monitoring, decision analysis, and business management. Through efficient data querying and report generation, enterprises can grasp real-time business dynamics, such as sales performance, inventory status, financial indicators, and human resource allocation, thereby quickly responding to market changes, optimizing resource allocation, and improving management efficiency. A powerful query system can integrate data scattered across different business modules, breaking down information silos and achieving data interoperability. This provides management with accurate and comprehensive decision-making support; therefore, its performance and flexibility have become important standards for measuring the maturity of enterprise information systems.
[0003] However, current traditional query and report generation solutions rely on hard-coding, where the specific query logic is directly written into the business system code. This results in tight coupling between various modules of the system. When business rule requirements change, the source code must be modified and retested and deployed. The whole process is slow and has high maintenance costs. Summary of the Invention
[0004] In view of this, embodiments of this application provide a report data processing system, method, device, medium, and product based on dynamic configuration, which can improve development efficiency and system flexibility.
[0005] In a first aspect, embodiments of this application provide a dynamically configured report data processing system. This system includes a query definition module, a parsing and generation engine, and a query execution module. The query definition module stores structured query definition information, which includes data acquisition mode definition information indicating whether an automatic generation mode or a manual SQL mode is used, query condition definition information defining at least one query condition structure, and result set definition information defining at least one output result structure. The parsing and generation engine, upon receiving a report query request, retrieves the corresponding structured query definition information from the query definition module based on the report query request. The report query request at least includes user-inputted query parameters. Specifically, when the data acquisition mode is defined as manual SQL mode, the parsing and generation engine... The generation engine is used to: obtain predefined SQL statement templates containing dynamic variables; convert user-input query parameters into first SQL condition expression fragments; and replace corresponding variables in the SQL statement template based on the first SQL condition expression fragments and variable values parsed from the system context to generate executable SQL statements. When the data acquisition mode is defined as automatic generation mode, the parsing generation engine is used to: generate second SQL condition expression fragments based on predefined business object relationships, query parameters, and query condition definition information; and determine data selection logic and data source based on result set definition information; dynamically assemble executable SQL statements containing data selection logic, data source, and second SQL condition expression fragments. The query execution module is used to execute the executable SQL statements and obtain report query results.
[0006] Secondly, embodiments of this application provide a report data processing method based on dynamic configuration for a report data processing system. The system includes a query definition module, a parsing and generation engine, and a query execution module. The method includes: the query definition module storing structured query definition information, wherein the structured query definition information includes data acquisition mode definition information for indicating whether to use an automatic generation mode or a manual SQL mode, query condition definition information for defining at least one query condition structure, and result set definition information for defining at least one output result structure; the parsing and generation engine, upon receiving a report query request, obtains the corresponding structured query definition information from the query definition module according to the report query request, wherein the report query request at least includes user-inputted query parameters; wherein, when the data acquisition mode is defined as manual... In dynamic SQL mode, the parsing and generation engine obtains a predefined SQL statement template containing dynamic variables, converts the user-input query parameters into a first SQL condition expression fragment, and replaces the corresponding variables in the SQL statement template based on the first SQL condition expression fragment and the variable values parsed from the system context, generating an executable SQL statement. When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine generates a second SQL condition expression fragment based on predefined business object relationships, query parameters, and query condition definition information, and determines the data selection logic and data source based on the result set definition information; it dynamically assembles an executable SQL statement containing the data selection logic, data source, and second SQL condition expression fragment; the query execution module executes the executable SQL statement to obtain the report query results.
[0007] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the steps of the report data processing method based on dynamic configuration as described in the second aspect.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the steps of the report data processing method based on dynamic configuration as described in the second aspect.
[0009] Fifthly, embodiments of this application provide a computer program product stored in a non-volatile storage medium, which, when executed by a processor, implements the steps of the report data processing method based on dynamic configuration as described in the second aspect.
[0010] In a sixth aspect, embodiments of this application provide a chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the steps of the report data processing method based on dynamic configuration as described in the second aspect.
[0011] This application provides a dynamically configured report data processing system, method, device, medium, and product. It centrally manages query definition information stored in a structured form by setting up a query definition module, decoupling the declaration of query intent from the specific generation and execution of SQL statements. Specifically, the parsing and generation engine distinguishes between manual SQL mode and automatic generation mode based on the data acquisition pattern definition information, employing differentiated strategies based on template variable replacement and dynamic construction based on business object relationships, respectively, to generate executable SQL statements in real time. Based on this, by transforming business rules into configuration data and dynamically parsing and executing them by a general engine, when business query requirements change, only the corresponding structured definition information needs to be adjusted, without modifying and redeploying the core program code of the system. Thus, it improves development efficiency, mitigates the tight coupling defects between system modules caused by hard coding in traditional solutions, enhances the system's responsiveness to business changes, and reduces the complexity and cost of maintenance and updates. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings of the embodiments of this application will be briefly described below.
[0013] Figure 1 This is a schematic diagram of the structure of a report data processing system based on dynamic configuration provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a report data processing method based on dynamic configuration provided in an embodiment of this application; Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0014] The principles and spirit of this application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided to make the principles and spirit of this application clearer and more thorough, enabling those skilled in the art to better understand and implement the principles and spirit of this application. The exemplary embodiments provided herein are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments described herein without inventive effort are within the scope of protection of this application.
[0015] In this document, terms such as first, second, and third are used only to distinguish one entity (or operation) from another entity (or operation), and are not intended to require or imply any order or relationship between these entities (or operations).
[0016] The report data processing system and method based on dynamic configuration provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0017] Figure 1 This is a schematic diagram of the structure of a report data processing system based on dynamic configuration provided in an embodiment of this application. The report data processing system can be simply referred to as the "system".
[0018] like Figure 1 As shown, the system 100 may include a query definition module 101, a parsing and generation engine 102, and a query execution module 103. The three modules work together to transform the traditional, hard-coded query logic into a configurable and interpretable dynamic process.
[0019] The query definition module 101 is used to store structured query definition information, which includes data acquisition mode definition information for indicating whether to use automatic generation mode or manual SQL mode, query condition definition information for defining at least one query condition structure, and result set definition information for defining at least one output result structure.
[0020] The query definition module 101, acting as the system's configuration management center, is responsible for persistently storing structured query definition information. This information is not executable code, but rather metadata described in a specific format, such as JSON, XML, or stored in specific fields in the database. Each structured query definition fully defines the intent of a data query and includes at least the following three parts: Data retrieval mode definition information: This declares the method used to construct the SQL statement for this query, indicating whether the system uses "manual SQL mode" or "automatic generation mode". In manual SQL mode, the user needs to provide an SQL statement template; in automatic generation mode, no template is required, and the system will automatically construct the SQL based on other configuration information.
[0021] Query condition definition information: At least one query condition is defined in a structured manner. For example, for a "Recruitment Progress Report", a query condition can be defined, whose configuration specifies that the condition is associated with the "Resume Source" attribute under the "Recruitment Record" business object, and is displayed on the front end as a multi-select drop-down control that supports the "equal to" and "contains" logical operators.
[0022] Result set definition information: This also defines the expected output data columns in a structured manner. For example, for the same report, the result set definition can specify fields such as "Recruitment Record ID", "Requirement ID", and "Resume Source" to be output, and can configure their display names on the front end.
[0023] The configuration of the above information is usually completed through the visual configuration interface provided by the system. Administrators or developers can make settings by filling in forms and selecting options, without having to write backend code.
[0024] The parsing and generation engine 102 is used to obtain the corresponding structured query definition information from the query definition module 101 according to the report query request when a report query request is received. The report query request includes at least the query parameters input by the user.
[0025] When the data acquisition mode is defined as manual SQL mode, the parsing and generation engine 102 is used to: obtain a predefined SQL statement template containing dynamic variables, convert the user-input query parameters into a first SQL condition expression fragment, and replace the corresponding variables in the SQL statement template based on the first SQL condition expression fragment and the variable values parsed from the system context to generate an executable SQL statement; when the data acquisition mode is defined as automatic generation mode, the parsing and generation engine 102 is used to: generate a second SQL condition expression fragment based on predefined business object relationships, query parameters, and query condition definition information, and determine the data selection logic and data source based on the result set definition information; dynamically assemble an executable SQL statement containing the data selection logic, data source, and second SQL condition expression fragment.
[0026] The parsing and generation engine 102 dynamically converts static configuration information into executable database query commands upon receiving a report query request. Its workflow is as follows: The parsing and generation engine 102 receives a report query request from the front end. The request contains at least one identifier for identifying the target query, such as the report ID, and query parameters entered by the user in the front end interactive interface, such as the user selecting "headhunter" in the "resume source" drop-down box.
[0027] The parsing generation engine 102 obtains the corresponding structured query definition information from the query definition module 101 based on the identifier, and first checks its data acquisition pattern definition information.
[0028] If defined as manual SQL mode, the engine will retrieve a pre-stored SQL statement template.
[0029] For example, the template can be: SELECT recruit_id, resume_source FROM sm_recruit WHERE organization=${organization} AND resume_source= ${sourceCondition}.
[0030] Next, the engine performs two key replacements: First, it converts the user-input query parameters into conditional expression fragments that conform to SQL syntax, such as converting "headhunter" to "resume_source = 'headhunter'", and then uses this to replace the ${sourceCondition} variable in the template; second, it parses runtime variable values from the system context (such as the user session), for example, replacing ${organization} with the code 'Org01' of the current user's tenant organization. Through these replacements, the engine obtains a complete executable SQL statement that can be directly executed on the database.
[0031] If defined as automatic generation mode, the engine will not rely on pre-written templates but will dynamically assemble SQL based on other configuration information. First, the engine uses predefined business object relationships (defined during data modeling, for example, the "Recruitment Records Table" and "Department Table" are linked via `dept_id`) and combines this with the "belonging business object" and "attribute name" indicated in the query condition definition to locate the specific database table and fields. Next, the engine generates corresponding SQL condition expression fragments based on the user-input query parameters (values) and the logical operators declared in the query condition definition, such as `sm_recruit.resume_source = 'headhunter'`. Simultaneously, the engine determines the list of fields to be queried (the SELECT part of the data selection logic) and the tables involved and their join methods (the FROM and JOIN parts) based on the result set definition information. Finally, the engine dynamically combines the SELECT fields, FROM / JOIN tables, and WHERE conditions to generate a complete executable SQL statement.
[0032] The query execution module 103 is used to execute executable SQL statements and obtain report query results.
[0033] The query execution module 103 can be a database access component, used to receive a syntactically complete executable SQL statement generated by the parsing and generation engine 102, with all variables and dynamic conditions replaced. Subsequently, the query execution module 103 establishes a connection with the target database, submits and executes the SQL statement, and finally obtains the raw report query result set returned by the database, and passes it to the front end or subsequent processing flow for display.
[0034] For example, the workflow of the above system is illustrated by generating a "recruitment progress report": Configuration Phase (Query Definition Module): The administrator creates a report definition through the configuration interface. Select "Automatic Generation Mode," and then add a line to the query condition definition: associate with the "Recruitment Record" business object, select the "Resume Source" attribute, and use a dropdown control. Add the fields to be output in the result set definition: "Recruitment ID," "Resume Source," and "Creation Time."
[0035] Runtime phase (parsing and generation engine and query execution module): Business users open the report on the front end, select "headhunter" in the "resume source" drop-down box, and then click query.
[0036] The parsing and generation engine receives the request and obtains the above report definition. If the mode is "automatic generation", it finds the corresponding database table sm_recruit based on the "recruitment record" business object, and finds the field resume_source based on the "resume source" attribute.
[0037] The engine combines the user-input value "headhunter" with the default "equals" operator to generate the conditional fragment sm_recruit.resume_source = 'headhunter'.
[0038] Based on the result set definition information, the SELECT part is determined to be SELECT recruit_id, resume_source, create_time, and the FROM part is determined to be FROM sm_recruit.
[0039] The engine dynamically assembles the SQL: SELECT recruit_id, resume_source, create_time FROMsm_recruit WHERE resume_source ='headhunter'.
[0040] The query execution module executes this SQL, retrieves the results from the database reports, and returns them to the front end for display.
[0041] The above methods enable the configuration of query logic and the automation of the execution process. When it is necessary to modify query conditions, add output fields, or adjust business objects, only the corresponding structured query definition information needs to be modified in the query definition module. The parsing and generation engine can then automatically generate new SQL based on the new configuration, without modifying or redeploying any program code. This solves the technical problems of tight system coupling, high maintenance costs, and slow response speed caused by hard coding in the background technology.
[0042] The entity-based dynamic management system provided in this application centrally manages query definition information stored in a structured form by setting up a query definition module, decoupling the declaration of query intent from the specific generation and execution process of SQL statements. Specifically, the parsing and generation engine distinguishes between manual SQL mode and automatic generation mode based on the data acquisition pattern definition information, and adopts differentiated strategies based on template variable replacement and dynamic construction based on business object relationships, respectively, to generate executable SQL statements in real time. Based on this, by transforming business rules into configuration data and dynamically parsing and executing them by a general engine, when business query requirements change, only the corresponding structured definition information needs to be adjusted, without modifying and redeploying the core program code of the system. In this way, while improving development efficiency, it can improve the tight coupling defects between system modules caused by hard coding in traditional solutions, improve the system's response speed to business changes, and reduce the complexity and cost of maintenance and updates.
[0043] To facilitate understanding, the following provides a detailed introduction to each component of the entity-based dynamic management system.
[0044] According to an embodiment of this application, optionally, the query definition module is further configured to: generate structured query definition information in response to the user's selection of a data acquisition mode in the configuration interface; wherein, if the selected mode is manual SQL mode, the user-inputted SQL statement template is received, and the SQL statement template is associated with and stored with the data acquisition mode definition information so that the parsing and generation engine can acquire it in manual SQL mode; if the selected mode is automatic generation mode, data acquisition mode definition information indicating automatic generation mode is generated, and it is not necessary to receive and store the SQL statement template.
[0045] Among them, the data acquisition pattern definition information is a component of the structured query definition information, which is used to indicate whether subsequent query generation should follow the path of manually building SQL templates or automatically assembling SQL.
[0046] Specifically, the system provides a configuration interface for users. When a user needs to create a new query or report, they must first select a data retrieval mode on the interface. If the user selects "Manual SQL Mode," the system will guide the user to input or edit an SQL statement template containing dynamic variables and associate this template with a schema definition information identified as "Manual SQL Mode" and save it. If the user selects "Automatic Generation Mode," the system will only generate and save a schema definition information identified as "Automatic Generation Mode," without providing an SQL template input interface.
[0047] For example, when configuring the "Recruitment Progress Report", the administrator selects the manual SQL mode in the interface, and then enters the SQL statement template in the specified input box: SELECT The system uses the command `FROM sm_recruit WHERE organization = ${organization} ${dataPermission}` to associate and store this template with the manual SQL mode definition. When another report uses the "automatic generation mode," the administrator only needs to select this mode without entering any SQL; the system simply records this selection.
[0048] In this embodiment, the report query construction mode is divided into two types: manual SQL mode and "automatic generation mode." The mode selection itself is treated as configurable metadata. This is not a simple functional division, but rather a fundamental paradigm shift in report generation logic achieved through the configurability of mode definitions. When a user selects a mode during configuration, the system calls a completely different SQL generation engine based on that mode at runtime. This provides the same system with both highly flexible customization capabilities and low-code, rapid construction capabilities.
[0049] According to an embodiment of this application, optionally, the query definition module is further configured to: upon receiving first configuration content of one or more query conditions defined by the user in a structured data format, generate query condition definition information based on the first configuration content, so that when the parsing and generation engine generates an executable SQL statement, it converts the query parameters input by the user into SQL condition expression fragments based on the query condition definition information; wherein, for each query condition, the configuration content includes at least: the business object to which it belongs, the corresponding attribute name, the control type used when displaying it on the front end, and the logical operators supported by the control type.
[0050] The first configuration content can be a set of query conditions defined by the user through the configuration interface in a structured form, such as filling in a form or selecting drop-down options.
[0051] Specifically, in the configuration interface, users can define at least one query condition for this query. For each query condition, users need to specify its associated business object and its corresponding attribute name. The associated business object is linked to a defined data table, such as a recruitment record table, and the attribute name corresponds to a specific field in the data table, such as "resume source". Users also need to select the type of control to use when displaying the query on the front end and set the logical operators supported by the control, such as "equal to" and "contains in". Finally, the system stores the above configuration content as structured query condition definition information.
[0052] For example, in the configuration of the "Recruitment Progress Report," the administrator defines a query condition named "Resume Source Filter." Its configuration specifies that the relevant business object is "sm_recruit (Recruitment Record Table)," the corresponding attribute name is "resume_source," the control type is a "multi-select dropdown," and this control is configured to support the "contains" and "equals" operators. This configuration is stored so that end users can see a "Resume Source" multi-select dropdown when querying the report and can perform multiple selections.
[0053] In this embodiment, the front-end interactive controls, business data fields, and query logic operators are decoupled and standardized, enabling the parsing and generation engine to accurately convert the query parameters input by the user at runtime into valid SQL condition expression fragments corresponding to the database fields and operators, thereby achieving accurate and automatic mapping of query conditions from the interaction layer to the data layer.
[0054] According to an embodiment of this application, optionally, when the data acquisition mode is defined as an automatic generation mode, the parsing and generation engine is specifically used to: determine the database table connection relationship and target database field involved in the query condition based on the predefined business object association relationship, according to the business object to which each query condition belongs and the corresponding attribute name indicated in the query condition definition information; and generate a second SQL condition expression fragment based on the query parameters input by the user, the target database field, and the logical operators declared for the corresponding query condition in the query condition definition information.
[0055] Among them, the predefined business object associations are used to describe the connection relationships between different business objects (i.e., database tables), such as primary and foreign key associations.
[0056] Specifically, when query conditions need to be generated, the engine reads the business object to which each condition declaration belongs and the corresponding attribute name in the query condition definition information. Then, based on the predefined business object association network, it determines the table connection path required to access the attribute, i.e., the database table connection relationship, and locates the specific target database field. Then, combining the query parameters input by the user at runtime and the logical operators declared for the condition in the query condition definition, it constructs an SQL condition expression for the target field, i.e., the second SQL condition expression fragment.
[0057] For example, in the automatic generation mode of the "Recruitment Progress Report", the engine parses the "Resume Source Screening" condition, which belongs to the business object "sm_recruit" and has the attribute name "resume_source". Based on the metadata, the engine determines that "sm_recruit" is the physical table sm_recruit, and the target database field is resume_source. When the user selects "Headhunter" and "Official Website" on the front end, the engine, combined with the "contains" operator, can generate the following SQL conditional expression fragment: sm_recruit.resume_source LIKE '%headhunter%' OR sm_recruit.resume_source LIKE '%official website%'.
[0058] In this embodiment, predefined business object relationships are used to dynamically parse business-oriented attribute names in the configuration into specific target database fields and cross-table join relationships. Combined with user input and operators, valid SQL conditional expressions are generated. This process eliminates the need for manual SQL writing, resolving the shortcomings of automatic conversion from business semantics to database syntax, and ensuring correctness and usability in the automatic generation mode.
[0059] According to an embodiment of this application, optionally, when the data acquisition mode is defined as an automatic generation mode, the parsing generation engine is specifically used to: generate a FROM clause and an associated JOIN clause for defining the data source based on the database table connection relationship; and combine the data selection logic, the FROM clause, the JOIN clause, and the WHERE condition clause containing the second SQL condition expression fragment to generate an executable SQL statement.
[0060] The data selection logic originates from the result set definition information, which indicates which fields need to be queried, such as the SELECT clause.
[0061] Specifically, based on the aforementioned database table join relationships, the engine generates the FROM clause and necessary JOIN clauses in the SQL statement to specify the data source. Then, it combines the data selection logic extracted from the result set definition information, the generated FROM and JOIN clauses, and the WHERE clause containing the second SQL condition expression fragment, according to SQL syntax rules, ultimately forming a syntactically complete executable SQL statement that can be directly used for database execution.
[0062] Continuing with the example above, to generate a "Recruitment Progress Report," the engine determines the data selection logic based on the result set definition as SELECT recruit_id, resume_source, demand_id, with the data source being FROM sm_recruit. Combining the generated WHERE condition fragment, the engine dynamically assembles a complete executable SQL statement: SELECT recruit_id,resume_source, demand_id FROM sm_recruit WHERE (sm_recruit.resume_source LIKE '%headhunter%' OR sm_recruit.resume_source LIKE '%official website%').
[0063] In this embodiment of the application, by automatically generating the final assembly step of SQL, the determined query target fields, data source tables and connection relationships, filtering conditions and other elements are systematically and automatically integrated into a complete query command that conforms to the database specification, realizing one-click generation from configuration information to final executable code, and ensuring the reliability of automatically generating complex query statements from configuration information.
[0064] According to an embodiment of this application, optionally, the query definition module is further configured to: upon receiving second configuration content of one or more result fields defined by the user in a structured data format, generate result set definition information based on the second configuration content, so that the parsing generation engine can determine the data selection logic and data source according to the result set definition information when the data acquisition mode is defined as automatic generation mode; wherein, for each result field, the configuration content includes at least: the source business object, the corresponding attribute name, and the display name when displayed on the front end.
[0065] The second configuration content can be structured information that users define for the query output results through the configuration interface.
[0066] Specifically, in the configuration interface, users define each result field to be returned from the query. For each field, users need to specify its source business object and corresponding attribute name to clarify the origin of the data; they can also specify the display name on the front end for interface presentation. The system saves these configuration contents as result set definition information. In automatic generation mode, the parsing and generation engine reads this information to determine the columns that need to be included in the SELECT part of the SQL statement, i.e., the data selection logic, and which business objects these columns come from, in order to determine the table join relationships of the data source.
[0067] For example, when configuring the "Recruitment Progress Report," the administrator adds three result fields to the result set definition: the first specifies the source business object as "sm_recruit," with the attribute name "recruit_id" and the display name "Recruitment Record ID"; the second specifies the "resume_source" attribute of the same business object, with the display name "Resume Source"; and the third specifies the "demand_id" attribute, with the display name "Demand ID." This configuration directly determines the content of the SELECT clause in the final generated SQL and the header of the report table.
[0068] In this embodiment, by configuring the output structure of the report query results, users can flexibly define the data view returned by the query. The parsing and generation engine can automatically construct the data selection part of the query statement based on this configuration, ensuring that the report query results can accurately match the user's display needs. This allows the same data source to output report views with different structures according to different scenarios, which can be achieved by simply modifying the configuration without changing the core query logic or SQL statement. This greatly enhances the reusability and maintainability of the report and realizes the configurability of the output structure.
[0069] According to an embodiment of this application, optionally, when the data acquisition mode is defined as manual SQL mode, the parsing and generation engine is specifically used to: obtain a predefined SQL statement template, wherein the SQL statement template contains a first type of variable placeholder for embedding conditional expressions and a second type of variable placeholder for embedding system context variable values; convert the query parameters input by the user into a first SQL conditional expression fragment corresponding to the first type of variable placeholder; parse the variable values corresponding to the second type of variable placeholder from the system context; and replace the first SQL conditional expression fragment and the variable values with the corresponding placeholders in the SQL statement template to generate an executable SQL statement.
[0070] The first type of variable placeholder can be a variable that needs to be embedded in the SQL as a conditional expression converted from user input parameters, such as ${name}; the second type of variable placeholder can be a variable that needs to be embedded in the SQL as a value parsed from the system runtime context, such as the current user or organization information, such as ${currentUser}.
[0071] Specifically, the engine retrieves predefined SQL statement templates from the manual SQL mode. For the first type of variable placeholders in the template, the engine converts the user-input query parameters into corresponding SQL condition expression fragments, such as converting "name" into "name = 'Zhang Mou'". For the second type of variable placeholders in the template, the engine parses the corresponding values from the system context, for example, parsing "${currentUser}" into "user ID 'U001'". The engine then replaces these expression fragments and variable values with the corresponding placeholder positions in the SQL statement template, resulting in a complete executable SQL statement where all variables are replaced with specific values or expressions.
[0072] For example, the "Recruitment Progress Report" uses a manual SQL mode with the template: SELECT recruit_id, resume_source FROM sm_recruit WHERE organization = ${organization} AND resume_source = ${sourceCondition}. When a user queries, the engine parses ${organization} from the system context to find 'Org01'; it then converts the user-inputted "headhunter" to resume_source = 'headhunter' to replace ${sourceCondition}. The final executable SQL is then generated: SELECT recruit_id, resume_source FROM sm_recruit WHERE organization = 'Org01' AND resume_source = 'headhunter'.
[0073] In this embodiment, a refined classification and processing mechanism is implemented for variable handling in manual SQL mode. This involves identifying first-type variable placeholders representing user input conditions and second-type variable placeholders representing system context within the SQL template, and applying different parsing and replacement strategies to each. This classification mechanism allows static SQL templates to be dynamically and securely integrated with runtime variables. It enables the separation of dynamically changing user input and system context from the static SQL template through placeholders, allowing the same SQL template to adapt to different query conditions and user scenarios. Furthermore, separating the parsing logic improves code reusability and security.
[0074] According to an embodiment of this application, optionally, the query definition module is further used to store data model definition information, which includes database connection configuration information and at least one business object metadata; wherein, the database connection configuration information is used to define the connection with an external database; the business object metadata corresponds to a physical table in the external database, which includes field definitions and parent-child relationships between business objects defined based on the association relationships between physical tables; the business object metadata also includes a data permission mode definition, which is used to indicate whether the data permission mode of the physical table is the creator mode or the owner mode.
[0075] Among them, business object metadata can be an abstract definition of physical database tables and their relationships. Field definitions describe the column structure of the table, parent-child relationships between business objects describe the association between tables, such as foreign key relationships, and data permission mode definitions are used to indicate whether the data row permission control of the table is based on the record creator or the specified owner.
[0076] Specifically, the system administrator pre-configures the data model definition information in the query definition module, including the configuration for establishing a connection with the external database, and creating corresponding business object metadata for each relevant physical table in the database, entering its fields, establishing the relationship between objects, and specifying its data permission mode.
[0077] For example, when deploying the system, the administrator first configures the connection to the MySQL database of the recruitment system. Next, business object metadata is created: a business object named `sm_recruit` (recruitment record table) is defined in `sy_table_define`, and the fields of this table are defined in `sy_table_field`, such as `recruit_id` (primary key), `demand_id` (foreign key), and `resume_source` (resume source, configuring de-identification rules), etc.; a parent-child relationship is set between this table and the `sm_demand` business object; and the data permission mode of this table is specified as "owner mode," meaning that data visibility is determined by the record's owner field.
[0078] In this embodiment of the application, by establishing a unified, business-oriented data view and access control foundation for the entire dynamic query system, the upper-level query condition definition, result set definition, etc. can be configured based on business objects, rather than directly manipulating database table names and field names. Through predefined association relationships and permission modes, necessary metadata support is provided for SQL assembly and data permission filtering in the subsequent automatic generation mode, realizing centralized management and reuse of data layer information.
[0079] According to an embodiment of this application, optionally, the parsing and generation engine is further configured to: obtain the data permission scope definition associated with the current user, wherein the data permission scope definition includes at least one of the following: the user, the user and their subordinates, the user's department and its subordinate departments, and all of them; generate data permission filtering conditions based on the data permission scope definition and the current user's identity information; and add the data permission filtering conditions to the generation process of the executable SQL statement.
[0080] The data permission scope definition specifies the data scope level that a user role can access, such as "myself" or "my department". The data permission filtering conditions can be SQL condition fragments dynamically generated based on the current user's identity and permission scope, such as AND department_id = 'user department ID'.
[0081] Specifically, during the process of parsing and generating the executable SQL statement, regardless of whether it is in manual or automatic mode, the engine will additionally obtain the "data permission scope definition" associated with the current user and user identity information, such as user ID and department ID. The engine generates corresponding "data permission filtering conditions" based on this information. Subsequently, when assembling the final SQL statement, the engine adds these filtering conditions to the executable SQL statement being generated.
[0082] For example, user A's role is granted "This Department" data permissions. When user A queries the "Recruitment Progress Report," the parsing engine obtains the department ID 'Dept02' to which user A belongs. Assuming the current business object ID is 1, and the data permissions configured for this business object are in creator mode, regardless of whether the report is generated manually or automatically, the engine will automatically add the data permission filtering condition AND sys_created_by in ( select user_id from sy_user where department_id='Dept02') to the WHERE clause. If the data permissions configured for this business object are in owner mode, the engine will automatically add the data permission filtering condition AND recruit_id in(select object_id from sy_access_managant_1 where user_id in ( select user_id from sy_user where department_id='Dept02') and now between sys_start_date and sys_end_date) to the WHERE clause to ensure that user A can only see data from their own department.
[0083] In this embodiment, result filtering is not performed at the application layer, but rather during the SQL statement construction phase. Data permission filtering conditions are dynamically generated based on the current user's data permission scope and seamlessly embedded into the WHERE clause being generated. Based on this, the solution implements row-level security control at the database level, ensuring that any query automatically follows permission rules without requiring repeated writing of permission code in each query logic. This achieves global automation of security control and provides a dynamic data permission filtering solution deeply integrated with the SQL generation process.
[0084] According to an embodiment of this application, optionally, the structured query definition information also includes result calculation rule information, the system also includes a rule engine, and the query execution module is further configured to: after obtaining the report query result, call the rule engine, calculate the row data in the report query result according to the result calculation rule information, and merge the calculation result into the corresponding row data.
[0085] Among them, the result calculation rule information is used to define the additional calculation logic that needs to be executed after obtaining the query results of the original report, such as summing or averaging a column, or performing formula calculations based on multiple columns; the rule engine is an independent calculation execution module.
[0086] Specifically, after the query execution module obtains the original report query results (i.e., the result set) returned by the database, it does not return them directly. If the structured query definition information associated with this query contains result calculation rule information, the query execution module will call the rule engine, load these calculation rules through the rule engine, traverse each row of data in the report query results, perform calculations according to the rules, and finally merge the calculation results, such as adding a new column to the corresponding original row data, to form the final processed result.
[0087] For example, in the configuration of the "Recruitment Progress Report", the administrator added a result calculation rule defined as status transformation: convert the numeric codes (such as 1, 2, 3) of the status field in the database into Chinese descriptions ("In Progress", "Completed", "Cancelled"). After the report query is executed, the query execution module calls the rule engine to read the status value for each row in the result set, convert it into Chinese according to the rule, and add the converted "status description" as a new column to the row data and return it to the front end. Similarly, if the column is configured as a formula, such as configuring a recruitment success rate formula as: IF(${targetAmount}>0, ${factAmount} / ${targetAmount}, 2 - ${factAmount} / ${targetAmount}), after obtaining the query results, the query execution module will continue to call the rule engine to perform formula calculations on each row in the result set, obtain the calculated value, and assign it to a new column added to the row data and return it to the front end.
[0088] In this embodiment, complex calculation logic is defined through configuration, eliminating the need to write this logic into complex SQL statements or perform secondary processing on the front end. This expands the data processing capabilities of the report, enabling calculations that are difficult or impossible to complete with a single SQL statement, while maintaining the clarity and efficiency of the query logic itself. This allows the system to support richer report calculation needs, such as statistical summaries and derived indicators, while maintaining the separation of query definition and calculation logic, improving the system's maintainability and scalability, and enhancing its post-processing capabilities for report query results.
[0089] According to an embodiment of this application, optionally, the structured query definition information further includes desensitization rule configuration information associated with the query condition definition information; the parsing and generation engine is further configured to: when generating an executable SQL statement, identify the desensitization rule configuration information configured for the target attribute in the query condition definition information, and add data processing instructions corresponding to the desensitization rule configuration information to the executable SQL statement; wherein, the data processing instructions are used to instruct the data corresponding to the target attribute to be desensitized during the query execution process.
[0090] Among them, the data masking rule configuration information is used to define the data masking method for a specific field, i.e., the target attribute; the data processing instructions are specific commands or function calls added by the parsing and generation engine to the generated SQL statement according to the data masking rules.
[0091] Specifically, during the stage where the parsing and generation engine generates executable SQL statements, it checks the de-identification rule configuration information associated with the query condition definition information. If it finds that a de-identification rule has been configured for a target attribute in the result, the engine will not directly query the plaintext of that field in the original SQL. Instead, it adds corresponding data processing instructions around that field in the SQL statement, such as calling the database's built-in de-identification function or performing replacement through CASE WHEN logic. When the query execution module executes this SQL containing instructions, the data in the corresponding field in the database returned result is already de-identified data.
[0092] For example, in the query condition definition of the "Recruitment Progress Report," a data masking rule is configured for the "Resume Source" attribute, requiring the hiding of data from the "Headhunter" channel. When generating the SQL, the parsing engine recognizes this configuration and rewrites the `resume_source` field in the `SELECT` clause as `CASE WHEN resume_source = 'Headhunter' THEN'##' ELSE resume_source END AS resume_source`. Thus, when the report is executed, all data from the "Headhunter" source is displayed as "##" in the result set, achieving data masking at the data source level.
[0093] In this embodiment, the data anonymization mechanism is advanced to the SQL generation stage. By completing the anonymization directly during the database query process, it is ensured that sensitive data is processed before leaving the database. This automates and pre-processes the data anonymization, effectively reducing the risk of data leakage during transmission and display. Moreover, the entire process is transparent to the query logic and requires no modification to the business code.
[0094] Figure 2 This is a flowchart illustrating a report data processing method based on dynamic configuration provided in an embodiment of this application. The executing entity of this report data processing method based on dynamic configuration can be the aforementioned report data processing system based on dynamic configuration (hereinafter referred to as "the system").
[0095] The following example, using the system as the execution entity of the dynamically configured report data processing method, illustrates the dynamically configured report data processing method of this application. It should be noted that the aforementioned execution entity and application scenario do not constitute a limitation on this application.
[0096] Step 210: The query definition module stores structured query definition information, which includes data acquisition mode definition information for indicating whether to use automatic generation mode or manual SQL mode, query condition definition information for defining at least one query condition structure, and result set definition information for defining at least one output result structure. Step 220: When the parsing and generation engine receives a report query request, it obtains the corresponding structured query definition information from the query definition module according to the report query request. The report query request includes at least the query parameters input by the user. When the data acquisition mode is defined as manual SQL mode, the parsing and generation engine obtains a predefined SQL statement template containing dynamic variables, converts the query parameters input by the user into a first SQL condition expression fragment, and replaces the corresponding variables in the SQL statement template based on the first SQL condition expression fragment and the variable values parsed from the system context to generate an executable SQL statement. When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine generates a second SQL condition expression fragment based on the predefined business object relationship, query parameters and query condition definition information, and determines the data selection logic and data source based on the result set definition information; and dynamically assembles an executable SQL statement containing the data selection logic, data source and second SQL condition expression fragment; Step 230: The query execution module executes the executable SQL statement to obtain the report query results.
[0097] The entity class dynamic management method provided in this application centrally manages query definition information stored in a structured form by setting up a query definition module, and decouples the declaration of query intent from the specific generation and execution process of SQL statements. Specifically, the parsing and generation engine distinguishes between manual SQL mode and automatic generation mode based on the data acquisition pattern definition information, and adopts differentiated strategies based on template variable replacement and dynamic construction based on business object relationships, respectively, to generate executable SQL statements in real time. Based on this, by transforming business rules into configuration data and dynamically parsing and executing them by a general engine, when business query requirements change, only the corresponding structured definition information needs to be adjusted, without modifying and redeploying the core program code of the system. In this way, while improving development efficiency, it can improve the tight coupling defects between system modules caused by hard coding in traditional solutions, improve the system's response speed to business changes, and reduce the complexity and cost of maintenance and updates.
[0098] The report data processing method based on dynamic configuration provided in this application embodiment can realize the various processes implemented in the above embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0099] Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application.
[0100] like Figure 3As shown, the electronic device 300 includes a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302.
[0101] In one example, the processor 302 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0102] Memory 301 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the dynamically configured report data processing method according to the embodiments of the first aspect of this application.
[0103] The processor 302 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 301, in order to implement the dynamically configured report data processing method in the first aspect embodiment described above.
[0104] In some examples, the electronic device 300 may also include a communication interface 303 and a bus 310. For example, Figure 3 As shown, the memory 301, processor 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0105] The communication interface 303 is mainly used to realize communication between various modules, systems, units and / or devices in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 303.
[0106] Bus 310 includes hardware, software, or both, that couples components of electronic device 300 together. For example, and not limitingly, bus 310 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0107] The electronic device provided in this application embodiment can implement the various processes implemented in the above embodiments and achieve the same technical effects. To avoid repetition, it will not be described again here.
[0108] In conjunction with the dynamically configured report data processing method in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any step in the above method embodiments.
[0109] Based on the dynamically configured report data processing method in the above embodiments, this application embodiment can provide a computer program product to implement this method. This (computer) program product is stored in a non-volatile storage medium, and when executed by at least one processor, it implements any step in the above method embodiments.
[0110] This application also provides a chip, which includes a processor and a communication interface. The communication interface and the processor are coupled. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.
[0111] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0112] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0113] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0114] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or systems. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0115] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, systems (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing system to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing system, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0116] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.
Claims
1. A report data processing system based on dynamic configuration, characterized in that, It includes a query definition module, a parsing and generation engine, and a query execution module; The query definition module is used to store structured query definition information, wherein the structured query definition information includes data acquisition mode definition information for indicating whether to use automatic generation mode or manual SQL mode, query condition definition information for defining at least one query condition structure, and result set definition information for defining at least one output result structure. The parsing and generation engine is used to obtain the corresponding structured query definition information from the query definition module according to the report query request when a report query request is received, wherein the report query request includes at least the query parameters input by the user; When the data acquisition mode is defined as manual SQL mode, the parsing and generation engine is used to: acquire a predefined SQL statement template containing dynamic variables, convert the query parameters input by the user into a first SQL condition expression fragment, and replace the corresponding variables in the SQL statement template based on the first SQL condition expression fragment and the variable values parsed from the system context to generate an executable SQL statement; When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine is used to: generate a second SQL condition expression fragment based on the predefined business object association, the query parameters and the query condition definition information, and determine the data selection logic and data source based on the result set definition information; dynamically assemble the executable SQL statement containing the data selection logic, the data source and the second SQL condition expression fragment; The query execution module is used to execute the executable SQL statement and obtain the report query results.
2. The system according to claim 1, characterized in that, The query definition module is also used for: In response to the user's selection of the data acquisition mode in the configuration interface, structured query definition information is generated; If the selected mode is manual SQL mode, the SQL statement template input by the user is received, and the SQL statement template is associated with and stored with the data acquisition mode definition information so that the parsing and generation engine can acquire it in the manual SQL mode. If the selected mode is automatic generation mode, the data acquisition mode definition information of the automatic generation mode is generated, and there is no need to receive and store the SQL statement template.
3. The system according to claim 1, characterized in that, The query definition module is also used for: Upon receiving first configuration content of one or more query conditions defined by the user in a structured data format, the query condition definition information is generated based on the first configuration content, so that when the parsing and generation engine generates the executable SQL statement, it converts the query parameters input by the user into SQL condition expression fragments based on the query condition definition information. For each query condition, the configuration content includes at least: the business object to which it belongs, the corresponding attribute name, the control type used when displaying it on the front end, and the logical operators supported by that control type.
4. The system according to claim 1 or 3, characterized in that, When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine is specifically used for: Based on the predefined business object associations, the database table connection relationships and target database fields involved in the query condition are determined according to the business object to which each query condition belongs and the corresponding attribute name indicated in the query condition definition information. Based on the query parameters input by the user, the target database fields, and the logical operators declared for the corresponding query conditions in the query condition definition information, a second SQL condition expression fragment is generated.
5. The system according to claim 4, characterized in that, When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine is specifically used for: Based on the database table join relationships, generate the FROM clause and the associated JOIN clause to define the data source; The data selection logic, the FROM clause, the JOIN clause, and the WHERE clause containing the second SQL condition expression fragment are combined to generate the executable SQL statement.
6. The system according to claim 1, characterized in that, The query definition module is also used for: Upon receiving second configuration content from a user that defines one or more result fields in a structured data format, the result set definition information is generated based on the second configuration content, so that when the data acquisition mode is defined as automatic generation mode, the parsing and generation engine determines the data selection logic and data source according to the result set definition information. For each result field, the configuration content includes at least: the source business object, the corresponding attribute name, and the display name when displayed on the front end.
7. The system according to claim 1, characterized in that, When the data acquisition mode is defined as manual SQL mode, the parsing and generation engine is specifically used for: Obtain a predefined SQL statement template, wherein the SQL statement template contains a first type of variable placeholder for embedding conditional expressions and a second type of variable placeholder for embedding system context variable values; The query parameters input by the user are converted into a first SQL condition expression fragment corresponding to the first type of variable placeholder; Parse the variable values corresponding to the second type of variable placeholders from the system context; The first SQL conditional expression fragment and the variable value are replaced with the corresponding placeholders in the SQL statement template to generate an executable SQL statement.
8. The system according to claim 1, characterized in that, The query definition module is also used to store data model definition information, which includes database connection configuration information and at least one business object metadata. The database connection configuration information is used to define the connection with an external database; The business object metadata corresponds to the physical tables in the external database, including field definitions and parent-child relationships between business objects defined based on the association relationships between physical tables; The business object metadata also includes a data permission mode definition, which indicates whether the data permission mode of the physical table is the creator mode or the owner mode.
9. The system according to claim 1, characterized in that, The parsing generation engine is also used for: The user is granted access to a defined scope of data permissions associated with the current user. The defined scope of data permissions includes at least one of the following: the user, the user and their subordinates, the user's department and its subordinate departments, and all of them. Based on the defined data permission scope and the current user identity information, generate data permission filtering conditions; Add the data permission filtering conditions to the process of generating the executable SQL statement.
10. The system according to claim 1, characterized in that, The structured query definition information also includes result calculation rule information; the system also includes a rule engine; and the query execution module is further used for: After obtaining the report query results, the rule engine is invoked to calculate the row data in the report query results based on the result calculation rule information, and the calculation results are merged into the corresponding row data.
11. The system according to claim 1, characterized in that, The structured query definition information also includes de-identification rule configuration information associated with the query condition definition information; The parsing and generation engine is also used to: when generating the executable SQL statement, identify the desensitization rule configuration information configured for the target attribute in the query condition definition information, and add data processing instructions corresponding to the desensitization rule configuration information to the executable SQL statement; The data processing instruction is used to instruct the data corresponding to the target attribute to be de-identified during the query execution process.
12. A report data processing method based on dynamic configuration, characterized in that, Applied to a report data processing system, which includes a query definition module, a parsing and generation engine, and a query execution module, the method includes: The query definition module stores structured query definition information, which includes data acquisition mode definition information for indicating whether to use automatic generation mode or manual SQL mode, query condition definition information for defining at least one query condition structure, and result set definition information for defining at least one output result structure. Upon receiving a report query request, the parsing and generation engine obtains the corresponding structured query definition information from the query definition module based on the report query request, wherein the report query request includes at least the query parameters input by the user. When the data acquisition mode is defined as manual SQL mode, the parsing and generation engine acquires a predefined SQL statement template containing dynamic variables, converts the query parameters input by the user into a first SQL condition expression fragment, and replaces the corresponding variables in the SQL statement template based on the first SQL condition expression fragment and the variable values parsed from the system context to generate an executable SQL statement. When the data acquisition mode is defined as automatic generation mode, the parsing and generation engine generates a second SQL condition expression fragment based on the predefined business object association, the query parameters and the query condition definition information, and determines the data selection logic and data source based on the result set definition information; and dynamically assembles the executable SQL statement containing the data selection logic, the data source and the second SQL condition expression fragment; The query execution module executes the executable SQL statement to obtain the report query results.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the method as described in claim 12.