Business attribute-based workflow query method and equipment

By generating personalized query menus based on business attribute-based metadata configuration and role-based permission rules, and combining the MyBatis framework and hierarchical caching to optimize queries, the problems of inflexible queries and high database load in workflow management systems have been solved, improving query efficiency and system scalability.

CN121365409APending Publication Date: 2026-01-20SHANDONG INSPUR DIGITAL BUSINESS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511291198.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-10
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

The existing workflow management system cannot perform personalized queries based on different business modules. The query dimensions are fixed, lacking flexibility, and the database load is too high.

Method used

By using metadata configuration files based on business attributes and combining role-based permission rules, an abstract syntax tree is generated, query conditions are dynamically adjusted, personalized query menus are supported, and parameterized SQL fragments are generated using the MyBatis framework. Query efficiency is optimized by combining hierarchical caching and hybrid index routing.

Benefits of technology

It enables personalized queries based on business modules and role permissions, improving the efficiency and flexibility of workflow queries, reducing database load, and enhancing system scalability and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121365409A_ABST
    Figure CN121365409A_ABST
Patent Text Reader

Abstract

The invention discloses a workflow query method and device based on service attributes. The method comprises the steps that a metadata configuration file of each service module is determined; the metadata configuration file is used for defining a service attribute rule; the service attribute rule comprises a field type, a UI control type and a role type; comparing the role types with a permission rule base, and determining permission information of different roles; analyzing the metadata configuration file into an abstract syntax tree according to the authority information of different roles so as to generate a front-end component and a back-end query condition of the service attribute; and generating query menus of the different service modules according to the front-end components and the back-end query conditions of the service attributes of the different service modules. According to the method provided by the invention, the function of constructing the personalized query menu based on the service attributes is realized, and the workflow query efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of workflow management system technology, and in particular to a workflow query method and device based on business attributes. Background Technology

[0002] With the continuous development of computer technology, enterprises are constantly increasing their demands for work efficiency. A workflow management system is a software system that can advance the execution of workflow instances according to predefined workflow logic in the computer, realizing intelligent workflow management and improving work efficiency to a certain extent.

[0003] However, current workflow management systems have certain shortcomings in managing application and approval processes. The system places all applications and approvals in a single "To Do / Completed" menu, making it impossible to perform personalized queries based on different business modules. Furthermore, because current query criteria primarily rely on static configurations, they cannot be managed autonomously by the business side through a visual interface. This results in rigid query dimensions and a lack of flexibility in query operations. Summary of the Invention

[0004] This application provides a workflow query method and device based on business attributes, which solves the problems that current workflow management systems cannot perform personalized queries based on different business modules, cannot achieve self-management of the business side through a visual interface, and require real-time parsing of complex conditions for dynamic queries, which can easily cause excessive database load.

[0005] The embodiments of this application adopt the following technical solutions:

[0006] On the one hand, embodiments of this application provide a workflow query method based on business attributes, the method including:

[0007] Determine the metadata configuration file for each business module; the metadata configuration file is used to define business attribute rules; the business attribute rules include field types, UI control types, and role types;

[0008] The role types are compared with the permission rule base to determine the permission information for different roles;

[0009] Based on the permission information of the different roles, the metadata configuration file is parsed into an abstract syntax tree to generate front-end components and back-end query conditions for business attributes.

[0010] Based on the front-end components and back-end query conditions of the business attributes of different business modules, a query menu for each business module is generated.

[0011] In one example, parsing the metadata configuration file into an abstract syntax tree based on the permission information of the different roles specifically includes:

[0012] The permission information of the different roles is filtered by fields to determine the field filtering information for different roles. The field filtering information includes accessible fields and operable fields.

[0013] Based on the field filtering information, the metadata configuration file is parsed into an abstract syntax tree.

[0014] In one example, parsing the metadata configuration file into an abstract syntax tree specifically includes:

[0015] According to the structure of the metadata, each rule in the metadata configuration file is traversed layer by layer;

[0016] Based on the predefined abstract syntax tree node types, the business attribute rules are converted into nodes of the abstract syntax tree and the relationships between nodes.

[0017] In one example, the method further includes:

[0018] Build at least one business table structure for each business module;

[0019] In the business table structure, a process instance ID field is created to associate the process instance ID with the business table; the process instance ID field data will be automatically generated when the process starts.

[0020] In one example, the method further includes:

[0021] Extend the conditional logic block in the BPMN designer;

[0022] Based on the extended BPMN designer, a drag-and-drop logical tree of workflow query rules is constructed.

[0023] Generate a standardized DSL description file from the drag-and-drop tree logic tree;

[0024] Based on the MyBatis framework, the standardized DSL description file is converted into parameterized SQL fragments.

[0025] In one example, the conversion of the standardized DSL description file into parameterized SQL fragments based on the MyBatis framework specifically includes:

[0026] The standardized DSL description file is converted into an abstract syntax tree using an abstract syntax tree parser;

[0027] Based on the MyBatis framework, the abstract syntax tree of the standardized DSL description file is traversed to generate parameterized SQL fragments; the parameters of the parameterized SQL fragments are passed through placeholders.

[0028] In one example, after traversing the abstract syntax tree of the standardized DSL description file based on the MyBatis framework to generate parameterized SQL fragments, the method further includes:

[0029] Determine the SQL generator class; the SQL generator class includes Java methods for dynamically concatenating SQL statements; embed the foreach tag syntax in the Java methods, which is parsed and processed by MyBatis at runtime;

[0030] Annotate the Mapper interface method with @SelectProvider, associate the type attribute of @SelectProvider with the SQL generator class, and associate the method attribute of @SelectProvider with the Java method name.

[0031] In one example, the method further includes:

[0032] By distributing hot data and caching cold data locally, a hierarchical caching layer is constructed. Data accessed more frequently than a preset access threshold is identified as hot data, and data accessed less frequently than or equal to the preset access threshold is identified as cold data.

[0033] The query data is cached by using the unique fingerprint of the query conditions as the cache key.

[0034] In one example, the method further includes:

[0035] Prioritize tasks for different business modules;

[0036] Assign independent query channels to business modules with different task priorities.

[0037] On the other hand, embodiments of this application provide a workflow construction device based on business attributes, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute a workflow query method based on business attributes as described above.

[0038] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects:

[0039] The workflow query solution based on business attributes provided in this application defines metadata configuration files based on business attribute rules of business modules. These files are then parsed in conjunction with permission rules for different roles to present customized query menus for different business modules. This method not only automatically adapts and presents personalized query options based on the characteristics of business modules and the permission rules of roles, but also supports flexible configuration and dynamic adjustment of query logic. This improves the efficiency of workflow queries and enhances the flexibility and scalability of the workflow management system. Attached Figure Description

[0040] To more clearly illustrate the technical solution of this application, some embodiments of this application will be described in detail below with reference to the accompanying drawings, in which:

[0041] Figure 1 A flowchart illustrating a workflow query method based on business attributes provided in this application embodiment;

[0042] Figure 2 A schematic diagram of a visual rules engine provided in an embodiment of this application;

[0043] Figure 3 A schematic diagram of the hybrid query routing provided in the embodiments of this application;

[0044] Figure 4 A schematic diagram of the intelligent traffic scheduling component provided in an embodiment of this application;

[0045] Figure 5 This is a schematic diagram of a workflow construction device based on business attributes, provided as an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0047] Some embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0048] Figure 1 This is a flowchart illustrating a workflow query method based on business attributes, provided in an embodiment of this application. This method can be applied to different business domains, such as instant messaging and government services. The process can be executed by computing devices within the corresponding domain, and certain input parameters or intermediate results can be manually adjusted to help improve accuracy.

[0049] The analysis method involved in the embodiments of this application can be implemented by a terminal device or a server, and this application does not impose any special limitations on it. For ease of understanding and description, the following embodiments are all described in detail using a server as an example.

[0050] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.

[0051] Figure 1 The process includes the following steps:

[0052] S101. Determine the metadata configuration file for each business module; the metadata configuration file is used to define business attribute rules; business attribute rules include field types, UI control types, and role types.

[0053] In this embodiment, a business module refers to the division of the overall business into different components based on the enterprise's business scope and operational needs. Each business module handles a specific type of workflow. For example, business modules may include a dealer onboarding approval module, a marketing activity approval module, an employee leave approval module, etc. This embodiment does not limit the number or type of business modules.

[0054] Metadata is data that describes data; it defines the meaning, format, source, and relationships of the data. A metadata configuration file is a configuration file that defines and manages metadata using a structured format. For example, a metadata configuration file may define and manage metadata in formats such as JSON, XML, or YAML, and this application embodiment does not impose any limitations on this.

[0055] In this implementation, the field type is used to define the types and formats of data that can be stored in the data field, to ensure that data storage and verification comply with rules and to avoid illegal data input. For example, the field type may include text, numeric, date, and / or enumeration types, etc., and this application embodiment does not limit this.

[0056] UI control types are used to define the representation of data fields and the types of interactive components in the front-end interface, so as to dynamically render the UI and adapt to different business scenarios. For example, UI control types may include input boxes, drop-down selections, geographic tree selectors, date pickers, checkboxes, etc., and this application embodiment does not limit them.

[0057] Role types are categorized based on different business needs and functional scopes. Role types may include, for example, human resources specialists, department managers, and employees; however, this application embodiment does not impose such limitations.

[0058] The method described above, which determines a corresponding metadata configuration file for each business module, ensures the independence between these modules, clarifies the division of business logic, and improves the efficiency of workflow queries. Furthermore, this method allows for dynamic adjustment of the data model without modifying the code, enhancing the flexibility and scalability of the workflow management system.

[0059] S102. Compare the role type with the permission rule base to determine the permission information for different roles.

[0060] The permission rule base is a structured permission metadata repository that stores all possible permission rules. For example, the permission rule base may include permission rules such as basic operation permissions, data access permissions, business function permissions, data scope permissions, and relationship permissions, but this application embodiment does not impose any limitations on this.

[0061] Specifically, basic operation permissions may include data read permissions, data write permissions, data export permissions, and data import permissions. Data access permissions can be used to specify the data fields that a role can access. Business function permissions can be used to specify the business function modules that a role can access. Data scope permissions can be used to specify the data scope that a role can access. Relationship permissions can be used to specify the related data that a role can access.

[0062] Based on this, roles within the role types are matched with available rules in the permission rule base. Appropriate permission rules are selected from the permission rule base and combined to form complete permission information for different roles.

[0063] In this embodiment, for example, the roles in the role type can be matched with available rules in the permission rule base based on the RBAC model, ABAC model, and PBAC model to form complete permission information for different roles. This embodiment does not limit this approach; specific implementation methods can refer to existing implementation methods, which will not be elaborated here.

[0064] In this implementation, for example, an HR specialist can perform basic operations on all fields, including reading, writing, exporting, and importing. A department manager can read all fields, but can only write, export, and import fields related to performance evaluations. Employees can read all fields, but can only write, export, and import fields related to leave records.

[0065] By matching and combining role types with a permission rule base to construct complete permission information, the granularity of permission management and operational efficiency can be improved. This method not only implements the principle of least privilege allocation but also effectively avoids security risks and ensures that permission configurations meet requirements.

[0066] S103. Based on the permission information of different roles, parse the metadata configuration file into an abstract syntax tree to generate front-end components and back-end query conditions for business attributes.

[0067] Abstract syntax tree (AST) is a tree-like data structure that precisely represents the syntax structure of metadata configuration files in a hierarchical node manner, with each node corresponding to a logical unit.

[0068] Front-end components are independent modules of the front-end interface, used to display data, receive user input, or trigger operations.

[0069] Backend query conditions are logical expressions used to filter, sort, or aggregate data, and are typically translated into database query language.

[0070] For example, permission information for different roles is filtered by fields to determine the field filtering information for each role. The field filtering information includes accessible fields and operable fields. Based on the field filtering information, the metadata configuration file is parsed into an abstract syntax tree to generate front-end components for business attributes and back-end query conditions.

[0071] Optionally, in some embodiments, the permission information for different roles is first filtered by fields to determine the field filtering information for each role. For example, this can be achieved through the following steps: For instance, the permission information for different roles can be filtered by using an RBAC model to determine the field filtering information for each role. Alternatively, the permission information for different roles can be filtered by using an ABAC model to determine the field filtering information for each role. This application does not impose any limitations on this approach.

[0072] Secondly, based on the field filtering information, the metadata configuration file is parsed into an abstract syntax tree. For example, this can be achieved through the following steps: For instance, based on the field filtering information, each rule in the metadata configuration file is traversed layer by layer according to the metadata structure. Based on the predefined abstract syntax tree node types, the business attribute rules are converted into nodes of the abstract syntax tree and the relationships between nodes. This application embodiment does not limit this process.

[0073] Subsequently, front-end components for business attributes are generated. For example, this can be achieved through the following steps: obtaining preset mapping rules between field types and UI control types through the nodes of the abstract syntax tree and the relationships between them; determining the UI control type corresponding to each field based on the preset mapping relationship. Then, the UI control factory is called to generate the corresponding interactive component, and the front-end component generator generates the front-end component based on the interactive component. This application embodiment does not impose limitations on this.

[0074] Finally, the backend query conditions for business attributes are generated. For example, this can be achieved through the following steps: determining the query unit conditions corresponding to each node by using the nodes of the abstract syntax tree and the relationships between them; converting the query condition units into standardized query fragments; and applying parameterization and security verification rules to combine them into a complete query statement to generate the backend query conditions. This application embodiment does not limit this process.

[0075] The above method, which deeply integrates role-based permissions with abstract syntax tree structure, implements a fine-grained field-level access control mechanism. This ensures that permission rules are strictly followed when generating front-end components and back-end query conditions, thus providing dual protection in terms of functionality and security.

[0076] S104. Generate query menus for different business modules based on the front-end components and back-end query conditions of the business attributes of different business modules.

[0077] The query menu is a visual data filtering interface that is dynamically generated based on business module metadata and role types.

[0078] The method described above for generating personalized query menus based on different business modules enables personalized queries to be performed based on different business modules when processing workflow query tasks.

[0079] The method provided in this application can automatically adapt and present personalized query options based on the characteristics of business modules and the permission rules of roles, thereby improving the efficiency of workflow queries. Simultaneously, it supports flexible configuration and dynamic adjustment of query logic, further enhancing the flexibility and scalability of the workflow management system.

[0080] Furthermore, this method constructs complete permission information by matching and combining role types with a permission rule base, thereby improving the efficiency of permission management and operation and maintenance. At the same time, it adheres to the principle of least privilege, effectively mitigating security risks.

[0081] This method also combines role-based permissions with an abstract syntax tree structure to implement field-level access control, ensuring that front-end components and back-end query condition generation strictly follow permission rules, providing dual protection for functionality and security.

[0082] It should be noted that, although the embodiments in this application are based on... Figure 1 Steps S101 to S104 will be described sequentially, but this does not mean that steps S101 to S104 must be performed in a strict order. The reason this embodiment follows this order is... Figure 1The order in which steps S101 to S104 are described is provided to facilitate understanding of the technical solutions of the embodiments of this application by those skilled in the art. In other words, in the embodiments of this application, the order of steps S101 to S104 can be appropriately adjusted according to actual needs.

[0083] based on Figure 1 In addition to the method described herein, this specification also provides some specific implementation schemes and extension schemes of this method, which will be further explained below.

[0084] Furthermore, in one or more embodiments of this specification, the workflow query method based on business attributes further includes: constructing at least one business table structure for each business module. In the business table structure, a process instance ID field is constructed to associate the process instance ID with the business table. The process instance ID field data is automatically generated when the process starts.

[0085] Among them, the business table refers to the database table set up for each business module, used to store the core data of that business. The business table structure defines the rules and constraints for the composition of the business table.

[0086] The process instance ID is a globally unique identifier generated by the workflow engine when a business process is started, used to track the process's running status. The process instance ID field is a dedicated field in the business table used to store process instance IDs.

[0087] A business table structure with a process instance ID field is designed for each business module, and this ID is automatically associated when the process starts, thereby decoupling business data from process logic. This method not only supports bidirectional data traceability and full lifecycle management, but also ensures the integrity and consistency of data at each stage of the process, reduces data redundancy, and improves data query efficiency.

[0088] Figure 2 This is a schematic diagram of a visual rules engine process provided in an embodiment of this application. Figure 2 As shown, further, in one or more embodiments of this specification, the workflow query method based on business attributes also includes:

[0089] Extend the BPMN designer with conditional logic blocks. Based on the extended BPMN designer, construct a drag-and-drop tree logic tree for workflow query rules. Generate a standardized DSL description file from the drag-and-drop tree logic tree, and convert the standardized DSL description file into parameterized SQL fragments using the MyBatis framework.

[0090] Figure 2The BPMN.js designer refers to the BPMN designer mentioned above; drag-and-drop logic blocks refer to the extended conditional logic blocks mentioned above; logic tree construction refers to the drag-and-drop tree logic tree mentioned above; DLS file refers to the standardized DSL description file mentioned above; AST to SQL engine refers to the implementation method of converting the standardized DSL description file into parameterized SQL fragments based on the MyBatis framework mentioned above; parameterized SQL refers to the parameterized SQL fragments mentioned above; and MyBatis executor refers to the MyBatis framework.

[0091] BPMN (Business Process Model and Notation) is a graphical language for modeling and representing business processes. A BPMN designer is a tool that allows for the design, editing, and management of BPMN models through a front-end graphical interface.

[0092] A conditional logic block is a logical unit used to define the selection of a process path. A drag-and-drop logic tree is a logic tree structure created by combining different conditional logic blocks through dragging and dropping.

[0093] A DSL (Domain Specific Language) is a programming language. A standardized DSL description file is a text file that describes workflow query rules using specific syntax and semantics. This file can express complex logical relationships in a standardized way, facilitating subsequent processing and transformation.

[0094] MyBatis is a persistence layer framework that provides a mapping mechanism for SQL statements, enabling the mapping of Java objects to database tables, and supports the construction of dynamic SQL, which can generate corresponding SQL statements based on different conditions.

[0095] Specifically, based on the MyBatis framework, the abstract syntax tree of the standardized DSL description file is traversed to generate parameterized SQL fragments. Parameters for the parameterized SQL fragments are passed through placeholders.

[0096] Optionally, in some embodiments, based on the MyBatis framework, after traversing the abstract syntax tree of the standardized DSL description file to generate parameterized SQL fragments, the process further includes: determining the SQL generator class. The SQL generator class includes Java methods for dynamically concatenating SQL statements. A foreach tag syntax is embedded in the Java methods, which is parsed and processed by MyBatis at runtime. The Mapper interface methods are annotated with @SelectProvider, with the type attribute of @SelectProvider associated with the SQL generator class and the method attribute of @SelectProvider associated with the Java method name.

[0097] The SQL generator class is a regular Java class used to dynamically generate SQL statements. It contains multiple methods, each responsible for generating a specific SQL statement. These methods can dynamically construct SQL statements based on acquired external parameters.

[0098] The `foreach` tag is a dynamic SQL builder provided by MyBatis for handling collection-type data. It allows iteration over each element in a collection within an SQL statement and generates corresponding SQL fragments. The `Mapper` interface is a Java interface used to define operations for interacting with the database of various business modules. `@SelectProvider` is an annotation provided by MyBatis used to specify the SQL statement generation logic. The `type` attribute in `@SelectProvider` specifies the type of the SQL generator class, and the `method` attribute specifies the name of the specific method within that SQL generator class.

[0099] By extending the BPMN designer to construct a drag-and-drop logical tree of workflow query rules and generating standardized DSL description files, and then combining this with the MyBatis framework to convert it into parameterized SQL fragments, this method not only decouples business process logic from data access, enhancing the flexibility of the workflow management system, but also improves the security of the workflow management system through parameterized SQL fragments. Furthermore, this method supports dynamic queries and the construction of complex business logic, optimizing the management of complex business processes and improving the efficiency of workflow queries.

[0100] Figure 3 This is a schematic diagram of the hybrid query routing provided in the embodiments of this application, such as... Figure 3 As shown, further, in one or more embodiments of this specification, the workflow query method based on business attributes also includes:

[0101] By distributing and caching hot data, i.e. Figure 3 Redis caching allows for local caching of cold data. Figure 3 In Caffeine caching, a tiered caching layer is constructed. Data accessed more frequently than a preset access threshold is identified as hot data. Figure 3 Hot data, defined as data accessed at a frequency lower than or equal to a preset access threshold, is classified as cold data. This is achieved by using the unique fingerprint of the query conditions... Figure 3 The fingerprint is used as a cache key to cache the query data.

[0102] Distributed caching is a caching method that stores and manages data across multiple server nodes. Local caching is a caching method that stores and manages data on a single server. Tiered caching is a caching strategy that optimizes performance and resource utilization by storing data in different tiers of cache.

[0103] The preset access threshold refers to a pre-set value used to distinguish whether the access frequency of data is high enough. The preset access threshold can be set according to specific circumstances, such as the number of times it is accessed is 100 or the number of times it is accessed is 200. This application embodiment does not limit this.

[0104] The unique fingerprint of the query conditions is used to ensure the accuracy of the cache, generating a unique cache key for each query. For example, a unique fingerprint can be generated by hashing the query conditions. The fingerprint can be, for example, MD5, SHA-256, etc. This application does not limit this approach.

[0105] The tiered caching strategy described above can efficiently utilize cache resources, quickly respond to frequently accessed hot data, optimize the storage of infrequently accessed cold data, reduce database pressure, enhance the overall stability and flexibility of the workflow management system, and improve the efficiency of workflow queries.

[0106] Using the unique fingerprint of the query conditions as the cache key to cache the query data can accurately identify and quickly locate the cached data, avoid repeated database queries, improve workflow query efficiency, reduce the resource consumption of the workflow management system, and improve the cache hit rate and utilization.

[0107] Based on this, in one or more embodiments of this specification, the workflow query method based on business attributes further includes: constructing a dynamic index selection algorithm to allocate corresponding index methods according to the type of query conditions, thereby constructing a hybrid index routing mechanism. For example, when the query conditions include a numeric range type, the query condition is determined to be suitable for a B+ tree index. When the query conditions include an enumerated value type, the query condition is determined to be suitable for an inverted index.

[0108] Dynamic index selection algorithms are a type of algorithm that dynamically selects the most suitable index structure based on the characteristics of query conditions. One possible implementation involves first defining the type of query conditions, then defining the corresponding indexing method based on the type of query conditions, and finally dynamically associating the type of query conditions with the corresponding indexing method through simple decision logic to complete the construction of the dynamic index selection algorithm.

[0109] The above methods can reduce query time, improve query efficiency, and avoid the limitations of a single index.

[0110] Based on this, in one or more embodiments of this specification, the workflow query method based on business attributes further includes: constructing a pagination query mechanism using a database cursor. One possible implementation involves selecting a unique and ordered field as the cursor, and constructing a query statement based on the cursor field to retrieve data from the next or previous page. The value of the cursor field is returned in the query results for use in the next pagination.

[0111] This method can reduce the consumption of memory and CPU resources when processing large amounts of data, and reduce query time and improve query efficiency when performing query operations.

[0112] Based on this, new query functions can be extended, for example, by configuring plug-in condition adapters. For instance, a standardized FilterPlugin interface can be added to expand the existing query functionality to include GIS queries, full-text search, and other query features.

[0113] The above methods can enhance the diversity of query functions and improve the scalability and flexibility of the workflow management system.

[0114] Figure 4 A schematic diagram of the intelligent traffic scheduling component provided in the embodiments of this application is shown below. Figure 4 As shown, further, in one or more embodiments of this specification, the workflow query method based on business attributes also includes:

[0115] Different business modules are prioritized according to their task priorities. Independent query channels are allocated to business modules with different task priorities.

[0116] In this context, prioritizing tasks refers to assigning different priorities to tasks within different business modules based on their importance and urgency. Independent channels could be, for example, allocating separate task database connection pools for tasks of different priorities, or allocating separate cache instances, etc. This application's embodiments do not impose such limitations.

[0117] A specific implementation method, combined with Figure 4 To illustrate, the traffic scheduling center divides the system into critical business channels and general task channels. Contract approvals are assigned to the critical business channel, while daily expense reports are assigned to the general task channel. The critical business channel is processed with priority 1 and allocated independent query resources, while the general task channel is processed with priority 2 and allocated shared query resources.

[0118] The above methods can achieve refined management of business modules, ensure the rapid execution of high-priority tasks, improve the response efficiency of the workflow management system, and enhance the efficiency of workflow queries.

[0119] Based on the same idea, some embodiments of this application also provide devices and non-volatile computer storage media corresponding to the above methods.

[0120] Figure 5 A schematic diagram of a workflow construction device based on business attributes provided in this application embodiment includes:

[0121] At least one processor; and a memory communicatively connected to said at least one processor; wherein,

[0122] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform a workflow query method based on business attributes as described above.

[0123] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device is described simply because it is basically similar to the method embodiments; relevant parts can be referred to the descriptions of the method embodiments.

[0124] The devices and methods provided in this application are one-to-one correspondences. Therefore, the devices also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0125] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of 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, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0127] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0128] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0130] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0131] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0132] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0133] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the technical principles of this application should fall within the protection scope of this application.

Claims

1. A workflow query method based on business attributes, characterized in that, The method includes: Determine the metadata configuration file for each business module; the metadata configuration file is used to define business attribute rules; the business attribute rules include field types, UI control types, and role types; The role types are compared with the permission rule base to determine the permission information for different roles; Based on the permission information of the different roles, the metadata configuration file is parsed into an abstract syntax tree to generate front-end components and back-end query conditions for business attributes. Based on the front-end components and back-end query conditions of the business attributes of different business modules, a query menu for each business module is generated.

2. The method according to claim 1, characterized in that, The step of parsing the metadata configuration file into an abstract syntax tree based on the permission information of the different roles specifically includes: The permission information of the different roles is filtered by fields to determine the field filtering information for different roles. The field filtering information includes accessible fields and operable fields. Based on the field filtering information, the metadata configuration file is parsed into an abstract syntax tree.

3. The method according to claim 1, characterized in that, The step of parsing the metadata configuration file into an abstract syntax tree specifically includes: According to the structure of the metadata, each rule in the metadata configuration file is traversed layer by layer; Based on the predefined abstract syntax tree node types, the business attribute rules are converted into nodes of the abstract syntax tree and the relationships between nodes.

4. The method according to claim 1, characterized in that, The method further includes: Build at least one business table structure for each business module; In the business table structure, a process instance ID field is created to associate the process instance ID with the business table; the process instance ID field data will be automatically generated when the process starts.

5. The method according to claim 1, characterized in that, The method further includes: Extend the conditional logic block in the BPMN designer; Based on the extended BPMN designer, a drag-and-drop logical tree of workflow query rules is constructed. Generate a standardized DSL description file from the drag-and-drop tree logic tree; Based on the MyBatis framework, the standardized DSL description file is converted into parameterized SQL fragments.

6. The method according to claim 5, characterized in that, The process of converting the standardized DSL description file into parameterized SQL fragments based on the MyBatis framework specifically includes: The standardized DSL description file is converted into an abstract syntax tree using an abstract syntax tree parser; Based on the MyBatis framework, the abstract syntax tree of the standardized DSL description file is traversed to generate parameterized SQL fragments; the parameters of the parameterized SQL fragments are passed through placeholders.

7. The method according to claim 5, characterized in that, The method, based on the MyBatis framework, after traversing the abstract syntax tree of the standardized DSL description file to generate parameterized SQL fragments, further includes: Determine the SQL generator class; the SQL generator class includes Java methods for dynamically concatenating SQL statements; embed the foreach tag syntax in the Java methods, which is parsed and processed by MyBatis at runtime; Annotate the Mapper interface method with @SelectProvider, associate the type attribute of @SelectProvider with the SQL generator class, and associate the method attribute of @SelectProvider with the Java method name.

8. The method according to claim 1, characterized in that, The method further includes: By distributing hot data and caching cold data locally, a hierarchical caching layer is constructed. Data accessed more frequently than a preset access threshold is identified as hot data, and data accessed less frequently than or equal to the preset access threshold is identified as cold data. The query data is cached by using the unique fingerprint of the query conditions as the cache key.

9. The method according to claim 1, characterized in that, The method further includes: Prioritize tasks for different business modules; Assign independent query channels to business modules with different task priorities.

10. A workflow construction device based on business attributes, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a workflow construction method based on business attributes as described in any one of claims 1-9.