Visual logic expression management system and method and program product
Through the visual logical expression management system, the graphical interface is used to intuitively edit and manage logical expressions, which solves the maintenance difficulties and complexity problems caused by hard coding, realizes efficient configuration and rapid update of logical expressions, and improves the user experience and system performance.
Patent Information
- Application Number
- CN202410644003.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-22
- Publication Date
- 2024-08-30
AI Technical Summary
The existing way of writing logical expressions relies on hard coding, which makes the code difficult to maintain, complex logic and difficult to understand, making it difficult for non-technical personnel to participate in rule configuration and management, and lacks flexibility to meet complex logic configuration requirements.
Provides a visual logical expression management system, including a visual editor, a rule tree generation module, a parsing and execution module, a management module, etc. It can intuitively create and edit logical expressions through a graphical interface, monitor change events in real time, and provide version management and permissions. control and performance monitoring functions.
It improves the editing efficiency and accuracy of logical expressions, reduces the difficulty of operation, enhances the flexibility and response speed of management, optimizes execution performance, and provides centralized management and permission control.
Smart Images

Figure CN118567635A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-implemented logic expression management, and in particular to a visual logic expression management system, method and program product. Background Art
[0002] With the development of information technology, logical expressions play a vital role in software development, automated decision-making systems, data analysis and other fields. In actual business system development, it is often necessary to write judgment conditions and rules based on complex business logic. The traditional approach is to hard-code if-else statements directly in the code or use rule engines such as Drools to write rule files.
[0003] However, most existing logical expression writing methods rely on direct code writing, which leads to a series of problems: first, hard-coded judgment logic makes the code difficult to maintain. The hard-coded method makes logic modification extremely inconvenient. Any changes require the intervention of programmers, which is time-consuming and error-prone. Second, the hard-coded logic description is not intuitive, and it is difficult to quickly understand its judgment conditions and results. Complex logical expressions are difficult to read and understand. Third, there is a certain threshold for understanding and writing rules of the rule engine. Business personnel cannot directly participate in the configuration and management of the rules. Especially for non-technical personnel, understanding these logics often requires additional training and time. Then, for logic that requires deep nesting and combination, the traditional writing method is difficult to intuitively display the logical hierarchy, which increases the configuration difficulty and error rate. After that, the data used in the rule conditions and results are coupled with the rules themselves, and the rules need to be modified when the data changes.
[0004] Although there are some logic construction tools on the market, they often have single functions and lack flexibility, and cannot meet the growing needs for complex logic configuration.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] In view of the problems in the prior art, the present invention aims to provide a visual logic expression management system, comprising:
[0007] Visual logic expression editor, used to visually create and edit logic expressions. The visual logic expression editor includes:
[0008] Input property component, used to edit the left value of the logical expression, including text, numeric value, single-select value, multiple-select value, date type, Boolean type and function;
[0009] The expected value component is used to edit the right value that the logical expression is expected to match;
[0010] Operator component, used to connect the logical operation symbol of the left value and the right value;
[0011] At least one rule node, each rule node includes a left value, a logical operation symbol and a right value, and returns a Boolean value;
[0012] A rule group is a combination of at least two rule nodes, and returns a Boolean value;
[0013] Connective component, which is a logical word used to connect rule nodes or rule groups or rule nodes and rule groups, including "not", "or" and "and";
[0014] A rule tree generation module is used to combine the rule nodes and rule groups created in the logical expression editor into a rule tree structure;
[0015] The parsing and execution module is used to convert the rule tree structure into an executable script, and execute the executable script to return the execution result;
[0016] A rule change monitoring module is used to monitor the change events of rule nodes and rule groups, and notify the parsing and execution modules of the change event messages to update the executable scripts;
[0017] Management module, used to uniformly manage logical expressions, including:
[0018] The association of rule groups with business modules restricts the visibility of input and output attributes;
[0019] The access ID of the rule group. Each rule group has a unique access ID.
[0020] Version management of rule groups, which is used to provide version control so that users can view and restore historical versions of rule group configurations;
[0021] User role and permission management, used to provide role-based access control.
[0022] Furthermore, the visual logic expression editor also includes a rule group template module, which is used to quickly create a rule group through a predefined template; users customize and save the template for reuse.
[0023] Furthermore, the rule tree generation module is used to automatically generate a rule tree structure and convert the rule tree structure into an executable script through a dynamic conversion algorithm.
[0024] Furthermore, the rule change monitoring module notifies the parsing and execution module of the change event message through a message queue or an event broadcast mechanism.
[0025] Furthermore, the parsing and execution modules include:
[0026] Concurrent compilation and execution strategy unit, used to improve the execution performance of executable scripts;
[0027] The pre-compilation unit is used to pre-compile the rule group to reduce the compilation time during query.
[0028] Furthermore, the management module also includes:
[0029] The visual report module of the rule group is used to automatically generate a visual execution report of the rule group, including hit rate indicators and execution time indicators;
[0030] The log viewing module is used to view the execution log of the rule group.
[0031] Furthermore, the management module also includes:
[0032] The visual debugging module of the rule group provides debugging tools for users to input test data and visually view the execution results of the rule group;
[0033] The step-by-step execution and breakpoint debugging module is used to help users locate the operation problems of the logical expression management system.
[0034] Furthermore, the visual logic expression editor also includes:
[0035] Rule group nesting and reuse module, used to allow rule nodes and rule groups to reference each other;
[0036] The reference relationship diagram module is used to help users clearly understand the dependencies between rule nodes and rule groups.
[0037] Furthermore, the management module also includes:
[0038] The rule group performance monitoring module is used to provide performance monitoring of rule group execution, including indicators such as execution time and memory usage;
[0039] The optimization suggestion module is used to help users adjust the structure of the rule group to improve execution efficiency.
[0040] The present application also provides a visual logic expression management method, which uses the above system and includes the following steps:
[0041] Create and edit logical expressions in the visual logical expression editor;
[0042] The rule tree generation module combines the rule nodes and rule groups created in the visual logic expression editor into a rule tree structure;
[0043] By parsing and executing the module, the rule tree structure is converted into an executable script, and the executable script is executed to return the execution result;
[0044] The rule change monitoring module monitors the change events of the rule nodes and rule groups, and notifies the parsing and execution module of the change event messages to update the executable script;
[0045] Logical expressions are managed uniformly through management modules.
[0046] An embodiment of the present application also provides a visual logic expression management program product, including computer instructions, which implement the steps of the above-mentioned visual logic expression management method when executed by a processor.
[0047] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
[0048] The visual logic expression management system, method and program product of the present invention have the following beneficial effects:
[0049] The present invention adopts a visual editing method, and users can intuitively create and edit logical expressions in a visual way without writing complex text codes. This visual operation greatly improves the editing efficiency of logical expressions, while also reducing the user's operating difficulty, reducing the occurrence of editing errors, and improving the accuracy of logical expressions. The visual logical expression editor of the present invention displays complex logical expressions in an intuitive graphical interface, so that even relatively complex logical expressions can be seen at a glance. This visual expression method greatly improves the readability of logical expressions, which is conducive to developers to quickly understand and maintain logical expressions. The rule change monitoring module of the present invention can monitor the change events of logical expressions in real time, and notify the parsing and execution modules to dynamically update the executable scripts. This real-time update mechanism enables the changes of logical expressions to be quickly reflected in the system, improving the flexibility and response speed of logical expression management. The management module of the present invention provides a unified management function of logical expressions, including the association of rule groups with business modules, access identification, version management, user roles and authority management, etc. These management functions are conducive to the centralized management and authority control of logical expressions, and improve the standardization and security of logical expression management.
[0050] In some embodiments, the parsing and execution module of the present invention adopts concurrent compilation and execution strategies and pre-compilation technology to improve the execution performance of logical expressions. At the same time, the management module also provides functions such as visual debugging, step-by-step execution and breakpoint debugging, which helps developers locate and solve problems in the operation of the logical expression management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Other features, objectives and advantages of the present invention will become more apparent from a reading of the detailed description of non-limiting embodiments made with reference to the following accompanying drawings.
[0052] Figure 1 This is a schematic diagram of the architecture of a visual logic expression management system according to an embodiment of the present invention;
[0053] Figure 2 is a flowchart of a visual logic expression management method according to an embodiment of the present invention;
[0054] Figure 3a This is a schematic diagram of a rule branch page of a visual logic expression editor according to an embodiment of the present invention;
[0055] Figure 3b A schematic diagram of a complete logic expression page is formed by multiple rule branches of a visual logic expression editor according to an embodiment of the present invention;
[0056] Figure 3c This is a schematic diagram of a rule node editing page of a visual logic expression editor according to an embodiment of the present invention;
[0057] Figure 3d It is a schematic diagram of a version management page of a visual logic expression management system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0059] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0060] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.
[0061] The visual logic expression management system, method and program product provided by the present invention realizes the rapid configuration, real-time update and efficient execution of logic expressions by converting complex hard-coded logic expression configurations into visual configuration operations and using dynamic script generation technology to instantly convert these visual configurations into executable scripts. The technical solution of the present invention can significantly improve the user-friendliness and accuracy of logic expression configuration, improve user experience, speed up the deployment and update speed of logic rules, optimize the performance of logic processing, and improve the overall operating efficiency of the system.
[0062] like Figure 1 As shown, a schematic diagram of the architecture of a visual logic expression management system provided by an embodiment of the present invention includes:
[0063] Visual logic expression editor M100 is used to visually create and edit logic expressions. Visual logic expression editor M100 includes:
[0064] Input property component, used to edit the left value of the logical expression, including text, numeric value, single-select value, multiple-select value, date type, Boolean type and function;
[0065] The expected value component is used to edit the right value that the logical expression is expected to match, which is the value that is expected to be hit in the logical judgment;
[0066] Operator component, used to connect the logical operation symbol of the left value and the right value;
[0067] At least one rule node. Each rule node includes a left value, a logical operation symbol, and a right value. It is a judgment statement and returns a Boolean value. If the left value of the input value component matches the right value of the expected value component, then this rule node returns true, otherwise this rule node returns false.
[0068] A rule group is a combination of at least two rule nodes, and returns a Boolean value;
[0069] Connective component, which is a logical word used to connect rule nodes or rule groups or rule nodes and rule groups, including "not", "or" and "and";
[0070] In this embodiment, the visual logic expression editor M100 can be implemented using a visual UI interface, and can be implemented using existing Web application technologies, such as using front-end technologies such as HTML, CSS, and JavaScript to build a user interface, and achieve the creation and editing of logical expressions through user interaction. The left value of the logical expression edited by the input attribute component can be provided for user selection or input in the form of a drop-down menu, text box, etc., and the right value of the logical expression edited by the expected value component can also provide corresponding input interfaces according to different attribute types, such as a date selector, a numeric input box, etc. The selection of operators can be achieved through buttons, drop-down lists, etc., and users can select appropriate operators according to specific needs.
[0071] Optionally, the visual logic expression editor M100 adopts QueryBuilder and is developed based on the existing QueryBuilder library or components to realize intuitive and visual editing of logical expressions. QueryBuilder provides a rich API and customizable configuration options, which can be easily integrated into Web applications and customized according to needs. By adopting QueryBuilder, users can construct logical expression elements including input attributes, expected values and operators, rule nodes and rule groups through operations such as dragging and clicking, and preview and edit the generated logical expressions in real time, so that complex logical expressions can be configured and displayed in a visual way, but the present invention is not limited to this. In addition to QueryBuilder, other visual editors or custom interface components can also be combined to implement the visual logic expression editor M100 to meet the needs and habits of different user groups. For example, a drag-and-drop interface designer, a graphical editor, etc. can be used to allow users to complete the configuration and management of logical expressions through simple and intuitive operations.
[0072] The rule tree generation module M200 is used to combine the rule nodes and rule groups created in the logic expression editor into a rule tree structure;
[0073] In this embodiment, the implementation of the rule tree generation module M200 can be developed based on an existing tree data structure or graph algorithm. The main function of this module is to combine the rule nodes and rule groups created in the logic expression editor into a rule tree structure according to the logical relationship, so as to facilitate subsequent parsing and execution. During implementation, the rule tree generation module M200 can receive user input from the visual logic expression editor M100, including input attributes, expected values, operators, etc., and then build a corresponding rule tree structure according to the user's input logical relationship. When building a rule tree, it is necessary to consider the logical connection relationship between different rule nodes and rule groups, such as "and", "or", "not", etc., to ensure that the generated rule tree structure can accurately express the user-defined logical conditions. In order to improve the efficiency and accuracy of rule tree generation, optimized algorithms and data structures, such as depth-first search (DFS), breadth-first search (BFS), etc., can be used to ensure that the construction process of the rule tree can be completed in a shorter time and generate a rule tree structure that meets expectations.
[0074] The parsing and execution module M300 is used to convert the rule tree structure into an executable script, and execute the executable script to return the execution result;
[0075] Optionally, the parsing and execution module M300 adopts the Groovy programming language to convert the rule tree structure into a Groovy script, but the present invention is not limited thereto. Groovy is a dynamic programming language based on the Java platform, which has the characteristics of seamless integration with Java, dynamic types, closures, simplified syntax, etc., and is very suitable for dynamically generating scripts. By converting the rule tree structure into a Groovy script, flexible definition and dynamic execution of logical conditions can be achieved. Afterwards, the parsing and execution module M300 adopts GroovyClassLoader to dynamically compile Groovy scripts into Java Class objects. GroovyClassLoader is a tool class provided by Groovy for dynamically loading and compiling Groovy classes, which can compile Groovy code into Java bytecode at runtime and load it into JVM for execution. By using GroovyClassLoader, it is possible to achieve real-time compilation and loading of dynamically generated Groovy scripts, ensuring the execution efficiency and security of the scripts.
[0076] The rule change monitoring module M400 is used to monitor the change events of the rule nodes and rule groups, and notify the parsing and execution module M300 of the change event messages to update the executable script;
[0077] Optionally, the rule change monitoring module M400 implements real-time monitoring of change events of rule nodes and rule groups through an event monitoring mechanism, and notifies the parsing and execution module M300 of the change event message so as to update the executable script in time. The implementation process is as follows:
[0078] The rule change monitoring module M400 uses event listeners to monitor rule nodes and rule groups, and immediately captures corresponding change events when changes occur;
[0079] After monitoring the change event, the rule change monitoring module M400 encapsulates and processes the message of the change event, and then sends it to the parsing and execution module M300;
[0080] After receiving the message sent by the rule change monitoring module M400, the parsing and execution module M300 performs corresponding update operations according to the message content, reparses the rule tree structure and generates a new executable script;
[0081] The updated executable script takes effect immediately, ensuring that the system always performs logical judgment and execution according to the latest rules.
[0082] Management module M500, used for unified management of logical expressions, including:
[0083] The access ID of the rule group. Each rule group has a unique access ID.
[0084] Version management of rule groups, which is used to provide version control so that users can view and restore historical versions of rule group configurations;
[0085] User role and permission management, used to provide role-based access control;
[0086] The association of rule groups with business modules restricts the visibility of input and output attributes.
[0087] In this embodiment, the management module M500 realizes the access identification, version management, user role and permission management of the rule group and the association between the rule group and the docked external business module by uniformly managing the logical expression. The management module M500 assigns a unique access identification to each rule group, ensures the uniqueness and identification of the rule group, and enables the system to accurately identify and locate each rule group. The management module M500 realizes the version management function of the rule group and provides the user with the version control function. The user can view and restore the historical version of the rule group configuration. In this way, the user can easily trace back to the previous rule configuration state, reduce the risk of erroneous operation, and improve the reliability and stability of the system. The management module M500 also realizes the user role and permission management function. By defining different user roles and permissions, the user's operation is controlled by permission, ensuring the security of the system and the confidentiality of the data. Users can only have corresponding permissions according to their roles, avoiding the impact of unauthorized operations on the system. The management module M500 realizes the association between the rule group and the business module, and ensures the accuracy and integrity of the rule group configuration by limiting the visibility of input and output attributes. Users can only configure and modify rule groups under relevant business modules, avoiding confusion and errors in rule configuration.
[0088] Optionally, the visual logic expression editor M100 also includes a rule group template module, which is used to quickly create a rule group through a predefined template; users customize and save the template for reuse.
[0089] In this embodiment, the rule group template module provides predefined templates, and users can select corresponding templates according to specific needs to quickly create rule groups. These predefined templates can cover common business scenarios and logical requirements, helping users to quickly build a rule group structure suitable for their own business, improving the efficiency and accuracy of rule configuration. Users can customize according to actual conditions and save them as templates for reuse. Users can flexibly define the structure and content of the rule group according to their own business needs and logical rules, and save them as templates. In this way, in similar business scenarios, users can directly load saved templates, saving time and energy for repeated configuration.
[0090] Optionally, the rule tree generation module M200 is used to automatically generate a rule tree structure, and convert the rule tree structure into an executable script through a dynamic conversion algorithm.
[0091] In this embodiment, the rule tree generation module M200 realizes automatic generation of the rule tree structure and the dynamic conversion algorithm in the following manner: the rule tree generation module M200 uses a depth-first search algorithm to automatically generate the rule tree structure. The depth-first search algorithm is a tree traversal algorithm, which is a method of traversing a branch of the tree structure down until a leaf node is encountered and then backing off to the previous layer to continue traversing the next branch. First, the rule tree generation module M200 gradually builds the rule tree structure according to the logical expression created by the user in the visual logic expression editor M100. The process starts from the root node, and the rule nodes and rule groups are gradually connected according to the connecting words to form a complete rule tree. Dynamic conversion algorithm, in order to convert the rule tree structure into an executable script, the rule tree generation module M200 adopts a dynamic conversion algorithm. The dynamic conversion algorithm is a flexible conversion method, which dynamically generates corresponding script codes at runtime according to the structure and logical relationship of the rule tree. In the dynamic conversion algorithm, the module traverses the nodes and groups of the rule tree, and generates corresponding script code fragments according to their types and connection relationships. For example, for rule nodes, the conversion algorithm will generate corresponding judgment logic according to the input attributes, operators and expected values of the nodes; for rule groups, the conversion algorithm will connect the rule nodes in the group one by one according to the connectives, and generate corresponding logical judgments according to the connection relationship. Through the dynamic conversion algorithm, the rule tree generation module M200 can dynamically generate executable script code according to the actual rule tree structure at runtime, thereby realizing the rapid parsing and execution of logical expressions.
[0092] Optionally, the rule change monitoring module M400 notifies the parsing and execution module M300 of the message of the change event through a message queue or an event broadcast mechanism.
[0093] In this embodiment, the rule change monitoring module M400 monitors the change events of logical nodes and logical groups through a message queue or an event broadcast mechanism. The message queue is an asynchronous communication mechanism that allows different applications to communicate through messages. The event broadcast mechanism is a publish-subscribe mode that allows publishers to publish events and subscribers to subscribe to events. When an event occurs, the publisher will notify all subscribers of the event. Specifically, the rule change monitoring module M400 can be implemented in one of the following two ways: message queue mode, the rule change monitoring module M400 subscribes to a message queue, and when a logical node or logical group changes, the message of the change event will be published to the message queue. The parsing and execution module M300 consumes messages from the message queue and processes the change event. Event broadcast mechanism, the rule change monitoring module M400 subscribes to an event, and when a logical node or logical group changes, the event will be published. The parsing and execution module M300 will monitor the event and process the change event.
[0094] Optionally, the parsing and execution module M300 includes:
[0095] Concurrent compilation and execution strategy unit, used to improve the execution performance of executable scripts;
[0096] The pre-compilation unit is used to pre-compile the rule group to reduce the compilation time during query.
[0097] In this embodiment, the concurrent compilation and execution strategy unit is used to improve the execution performance of the executable script. The concurrent compilation and execution strategy unit uses multi-threading or multi-processing technology to compile and execute the executable script in a concurrent manner. Through concurrent execution, the advantages of multi-core processors can be fully utilized to improve the execution speed, thereby accelerating the execution efficiency of the rule tree. For example, when the rule tree structure is relatively large, the use of the concurrent compilation and execution strategy unit can effectively shorten the execution time and improve the response speed of the system. The pre-compilation unit is used to pre-compile the rule group to reduce the compilation time during query. The main function of the pre-compilation unit is to pre-compile the rule group into bytecode or other forms of intermediate representation so that it can be directly used during query, avoiding the overhead of real-time compilation. Through pre-compilation, it can be performed when the system is started or the rule group is updated, and the rule group is compiled into an executable intermediate representation and cached. In this way, during actual query, the pre-compiled rule group can be directly loaded and executed without the need for compilation operations, thereby significantly reducing the compilation time during query and improving the overall performance and response speed of the system.
[0098] Optionally, the management module M500 further includes:
[0099] The visual report module of the rule group is used to automatically generate a visual execution report of the rule group, including hit rate indicators and execution time indicators;
[0100] The log viewing module is used to view the execution log of the rule group.
[0101] In this embodiment, the visual report module of the rule group is used to automatically generate a visual execution report of the rule group, including hit rate indicators, execution time indicators, etc. The visual report module collects relevant data of the rule group execution and converts it into intuitive visualization forms such as charts and tables, so that users can intuitively understand the execution of the rule group. For example, the visual report module can generate a hit rate bar chart to show the hit situation of each rule group; at the same time, it can also generate an execution time line chart to show the execution time trend of the rule group. These visual reports help users quickly discover the execution efficiency and performance bottlenecks of the rule group, so as to carry out targeted optimization and adjustment. The log viewing module is used to view the execution log of the rule group and record the execution information of the rule group, such as execution time, execution results, error information, etc. The log viewing module provides users with a way to trace and troubleshoot execution problems by recording key information of each rule group execution. For example, when an exception or error occurs in the execution of the rule group, the user can view the specific execution log through the log viewing module to understand what problems occurred during the execution process and take corresponding measures to repair them in time. In addition, the log viewing module can also be used to count the execution of the rule group, analyze execution trends and abnormal situations, and provide data support for system monitoring and management.
[0102] Optionally, the management module M500 further includes:
[0103] The visual debugging module of the rule group provides debugging tools for users to input test data and visually view the execution results of the rule group;
[0104] The step-by-step execution and breakpoint debugging module is used to help users locate the operation problems of the logical expression management system.
[0105] In this embodiment, the visual debugging module provides a debugging tool that allows users to input test data and visually view the execution results of the rule group. The visual debugging module enables users to understand the execution process and results of the rule group more intuitively. By inputting test data, users can simulate the execution of the rule group under different circumstances, and the visual execution results can clearly show the execution of each rule node and the final result. For example, users can input different attribute values and expected values through the visual debugging module, and then observe the execution path and final matching results of the rule group. Such functions help users to quickly verify the correctness and logic of the rule group and improve the efficiency of development and debugging. The step-by-step execution and breakpoint debugging module is used to help users locate the operation problems of the logical expression management system, and provides the functions of step-by-step execution and breakpoint debugging. The step-by-step execution function allows users to execute the rule group line by line or step by step, so that the execution process and intermediate results can be observed at each step; and the breakpoint debugging function allows users to set breakpoints so that the system suspends execution under specific conditions, so that users can view the status and data at the breakpoint. Through step-by-step execution and breakpoint debugging, users can analyze the execution process of the rule group more deeply, locate the specific cause of the problem, and make corresponding repairs and adjustments. Such functionality helps improve system stability and reliability and reduce the impact of runtime errors.
[0106] Optionally, the visual logic expression editor M100 also includes:
[0107] Rule group nesting and reuse module, used to allow rule nodes and rule groups to reference each other;
[0108] The reference relationship diagram module is used to help users clearly understand the dependencies between rule nodes and rule groups.
[0109] In this embodiment, the rule group nesting and reuse module realizes mutual reference between rule groups, and realizes nesting and reuse of rule groups. Through the nesting and reuse of rule groups, users can subdivide a set of rule groups into multiple smaller rule groups, each of which focuses on processing specific logical tasks or business needs. Doing so helps to improve the maintainability and reusability of rule groups, reduce the workload of repeatedly writing similar logic, and better organize and manage the structure of rule groups. For example, a user can create a general rule group and then reference the general rule group in other rule groups, thereby realizing logical reuse and unified management. The reference relationship graph module is used to help users clearly understand the dependencies between rule nodes and rule groups. Through the reference relationship graph module, users can intuitively view the reference relationship between rule groups, understand which rule groups are referenced by other rule groups, and the specific structure and level of the reference relationship. Doing so helps users to more clearly understand the relevance between rule groups when designing and managing rule groups, avoid confusion in reference relationships or circular references, and better analyze and optimize rule groups. For example, users can view the reference path of rule groups through the reference relationship graph module, discover potential problems in time and make adjustments.
[0110] Optionally, the management module M500 further includes:
[0111] Multi-language support module, used to support multiple scripting languages, and expand support for other languages through plug-in mechanism.
[0112] In this embodiment, the multi-language support module is used to support multiple scripting languages, and to extend support for other languages through a plug-in mechanism. Existing logical expression systems may need to support different scripting languages to write and execute logical expressions to meet the different needs and preferences of users. The multi-language support module can easily integrate parsers and executors of multiple scripting languages by designing a flexible architecture, and supports dynamic addition and extension of support for other languages through a plug-in mechanism. Doing so helps to improve the flexibility and scalability of the system, so that the system can adapt to the needs of different users and application scenarios.
[0113] Optionally, the management module M500 further includes:
[0114] The rule group performance monitoring module is used to provide performance monitoring of rule group execution, including indicators such as execution time and memory usage;
[0115] The optimization suggestion module is used to help users adjust the structure of the rule group to improve execution efficiency.
[0116] In this embodiment, the rule group performance monitoring module is used to provide performance monitoring of the rule group execution, including indicators such as execution time and memory usage. By integrating the performance monitoring module in the system, the user can understand the execution of the rule group in real time, including important indicators such as execution time and memory usage. The performance monitoring module can collect key performance data during the execution of the rule group and display it to the user to help them evaluate the performance of the rule group and make necessary optimizations and adjustments. The optimization suggestion module is used to help users adjust the structure of the rule group to improve execution efficiency. The optimization suggestion module analyzes the structure and logic of the rule group, identifies possible performance bottlenecks and optimization space, and provides corresponding optimization suggestions to the user. These suggestions may include suggestions on adjusting the organizational structure of the rule group, redesigning logical expressions, optimizing query algorithms, etc., to help users improve the execution efficiency and performance of the rule group.
[0117] The technical solution of this visual logical expression management system has multiple technical effects:
[0118] Improve user operation efficiency and ease of use. Through the visual logic expression editor M100, users can intuitively create and edit logic expressions without in-depth understanding of complex programming syntax. This intuitive operation method improves user operation efficiency, reduces learning costs, makes the management of logic expressions easier and more efficient, and improves user experience.
[0119] Provides rule group templates and custom template functions. The rule group template module allows users to quickly create rule groups through predefined templates, thereby accelerating the configuration process of rule groups. At the same time, users can also customize and save templates for future reuse, further improving user work efficiency and operational convenience, and improving user experience.
[0120] The application of dynamic conversion algorithm, the rule tree generation module M200 converts the logical expression into an executable script through the dynamic conversion algorithm, realizing the seamless connection from high-level logic to low-level execution. The application of this dynamic conversion algorithm effectively reduces the development and maintenance costs of the system and improves the flexibility and scalability of the system.
[0121] Performance monitoring and optimization functions, the rule group performance monitoring module and optimization suggestion module in the management module M500 provide users with comprehensive performance management and optimization support. Users can monitor the execution performance of the rule group in real time and make corresponding optimization adjustments based on the monitoring results to improve the overall performance and execution efficiency of the system, thereby further improving the stability and reliability of the system.
[0122] like Figure 2As shown, a flowchart of a visual logic expression management method provided by an embodiment of the present invention, the visual logic expression management method adopts the above-mentioned system, and includes the following steps:
[0123] S100, creating and editing a logical expression in a visual logical expression editor;
[0124] S200, a rule tree generation module combines the rule nodes and rule groups created in the visual logic expression editor into a rule tree structure;
[0125] S300, converting the rule tree structure into an executable script through a parsing and execution module, and executing the executable script to return an execution result;
[0126] S400, the rule change monitoring module monitors the change events of the rule nodes and rule groups, and notifies the parsing and execution module of the change event messages to update the executable script;
[0127] S500. Centrally manage logical expressions through a management module.
[0128] like Figure 3a As shown, a schematic diagram of a rule branch surface of a visual logic expression editor page provided by an embodiment of the present invention is shown. The UI component of the visual logic expression editor M100 adopts a rule tree configured by QueryBuilder, in which "if...then..." constitutes a judgment of a logical expression, and adding a rule is to add a rule node, such as Figure 3a The left value "weather" of a certain day of the week is connected to the right value "sunny" through the operator "equals", or the weather is bad today. Its result is a Boolean judgment, that is, yes or no. A rule group is a combination of multiple rule nodes, such as Figure 3a The current time range is greater than 8 o'clock and the current time is less than 17 o'clock. The conjunction component "and" connects whether the day is a weekend and whether the weather is sunny, as well as the judgment of the reserved mobile phone number and whether the amusement park is open. It is composed of multiple Boolean judgments, and the result is also a Boolean value.
[0129] Among them, the input attributes (widgets), or called left values (leftValue), support the following types: text, numeric, single-select value, multiple-select value, date type, Boolean type, function. Operators
[0130] Operators are logical symbols used to connect input attributes and expected values. Different input attributes have different operators:
[0131] For text type, the corresponding operators are ["equal to", "not equal to", "contains", "contains array item", "begins with", "ends with", "regular match", "is empty", "is not empty"];
[0132] For numeric types, the corresponding operators are ["equal to", "not equal to", "less than", "less than or equal to", "greater than", "greater than or equal to", "in the range", "not in the range", "is empty", "is not empty"];
[0133] For array types, the corresponding operators are ["equal to", "not equal to", "equal to one of", "not equal to one of", "contains one of"];
[0134] For Boolean types, the corresponding operators are ["equal to", "not equal to"].
[0135] like Figure 3b As shown, multiple rule branches of the visual logic expression editor provided by the embodiment of the present invention constitute a complete logic expression page schematic diagram, such as Figure 3b As shown in , two rule groups form a complete logical expression. The input attributes are combined with expected values through operators to form a rule node, and the rule nodes are connected by conjunctions to form a rule group. The rule nodes and rule groups are nested to form a rule tree.
[0136] In passing Figure 3a After visually configuring the logical expression in the visual logical expression editor shown in 3b, a set of rules defined by different operators is obtained, each of which corresponds to a specific logical operation, such as "equal to", "contains" and "range is". Each operator has a groovy function that converts the input value into the corresponding Groovy script code segment.
[0137] For example, operator equal: This operator compares whether two values are equal. For example, if you compare weather and "sunny", the generated Groovy code will be weather == 'sunny'.
[0138] For example, like(contains): is used to check whether the string on the left contains the string on the right. For example, message.contains('hello').
[0139] For example, between(range): Checks whether the value on the left is within the range specified by the value on the right. For example, age>=18&&age<=30.
[0140] The rule tree is a nested data structure that contains rule nodes (rule) and rule groups (group). A rule node is a specific judgment logic, while a rule group is a set of rule nodes, and logical connectives such as logical AND (AND) or logical OR (OR) can be used to combine them.
[0141] Rule Node (Rule): Each rule node contains a field (i.e., the left value), an operator, and an expected value (i.e., the right value). Depending on the operator, the input value can be a single value or an array of values. For example, for the equal operator, if the field is weather and the value is ["sunny"], it is converted to the Groovy script weather =='sunny'.
[0142] Rule Group (Group): A rule group contains multiple rule nodes or sub-rule groups, and a conjunction that indicates how to combine these rules (e.g., using AND or OR). For each sub-rule node or sub-rule group, the same parsing process is recursively applied, and then the resulting Groovy code segments are combined according to the conjunction.
[0143] As Figure 3a Taking the configuration logic expression visualized in the visual logic expression editor shown in Figure 3b as an example, the rule tree generation module M200 combines the rule nodes and rule groups created in the logic expression editor into a rule tree structure.
[0144] The first rule node checks whether the weather field is equal to "sunny". The operator "equal to one of" in the second rule node can be customized, i.e., select_any_in, which implements checking whether the weekday field is included in the given values.
[0145] Next is a rule group that contains two rules, both of which apply the equal operator. This group uses the AND conjunction, meaning that both conditions need to be met.
[0146] Another rule group checks whether the value of the time field is greater than 8 and less than 17.
[0147] For each rule, find the corresponding groovy function from the above definition according to its operator, and pass the field and value of the rule as parameters to obtain a Groovy code segment. For a rule group, recursively parse the sub-rules or sub-groups, and then combine all the results into a conditional expression according to the conjunction of the group.
[0148] Ultimately, this rule tree will be converted into a Groovy script that can be used to dynamically evaluate whether a given condition is met. For example, the rule tree above might be converted into a compound conditional expression that determines whether certain actions should be performed under specific weather conditions, days of the week, phone number formats, and time ranges.
[0149] Based on the translation of the above logical expressions and the description of the rule tree structure, the rule tree structure is then converted into a Groovy script through the parsing and execution module M300, which involves recursively traversing the rule tree and generating a corresponding Groovy code segment according to the type of each node (rule or rule group).
[0150] For example, a function ruleGroupToGroovy may be implemented, which receives a rule group object ruleGroup and a context object contract.
[0151] Determine the connector. Depending on whether the conjunction attribute of the rule group is "OR" or "AND", determine whether to use Groovy's || (logical OR) or && (logical AND) as the connector.
[0152] To process negated rules, if the rule group has a not attribute and it is true, the generated Groovy script snippet is preceded by a ! symbol to indicate logical negation.
[0153] Traverse the subitems of the rule group and traverse each subitem in the rule group (which can be a rule or a deeper rule group). If the subitem is a rule group (type is "group"), recursively call the ruleGroupToGroovy function to process the sub-rule group; if the subitem is a rule node (type is "rule"), call the ruleToGroovy function.
[0154] Combine sub-item scripts: Combine all Groovy script fragments generated by sub-items according to the provided connection property. If there is a negation rule, enclose the combined script fragment in parentheses and add ! in front.
[0155] Handling of some special cases: if there is no sub-item script fragment, return an empty string; if there is only one sub-item script fragment, return the fragment directly (if there is a negation rule, add !); if there are multiple sub-item script fragments, concatenate them in sequence with connectors and brackets to form the final Groovy script;
[0156] like Figure 3a As shown in the figure, after the above parsing process according to the given rule tree, the generated Groovy script is:
[0157] (weather=="clear"&&weekday in["6","7"]&&(!!(phone=~ / ^1[3456789]\d{9}$ / )&&isOpen==true)&&(time>8&&time<17))
[0158] This script reflects the logic defined in the rule tree:
[0159] weather equals "sunny";
[0160] weekday is contained in the list ["6","7"];
[0161] phone matches the regular expression ^1[3456789]\d{9}$, and isOpen is true (Groovy's regular expression matching operator =~ and logical NOT!! are used here to perform the matching operation);
[0162] time is greater than 8 and less than 17;
[0163] This Groovy script can be used directly to evaluate whether the above conditions are met.
[0164] In addition, since not all logical branches are necessarily hit, the visual logic expression editor M100 provided in this embodiment can also preset a fallback logic, which is equivalent to the default in the judgment statement.
[0165] The server then takes over and executes the groovy script. The following is an example of the process of parsing and executing the groovy script on the JAVA server:
[0166] Monitor logical expressions to determine whether there are new creations or changes;
[0167] Load the rule tree of the logical expression;
[0168] Data preheating, converting the groovy script of the rule tree into a class object;
[0169] Place it in the container and wait for subsequent calls and execution.
[0170] For each rule flow there is a unique accesskey, for example:
[0171] trip.ibu.TTS.outbound
[0172] trip.flight.Offline.outbound.call
[0173] When initializing a project, there will be several rule flows in the project. The accessKeys corresponding to these rule flows are put into List, and then they are traversed and initialized one by one to load the rule branches in the rule flow one by one.
[0174] A rule flow has multiple rule branches, which convert groovy scripts into files that can be executed by JAVA programs. For example, GroovyClassLoader can be used. GroovyClassLoader is responsible for compiling groovy scripts into Classes at runtime, so that java programs can dynamically load groovy scripts into Classes. Dynamically compiling Groovy code strings into Java Class objects is mainly completed through GroovyClassLoader, which can dynamically create and execute Groovy scripts at runtime.
[0175] First, you need to create a GroovyClassLoader instance. GroovyClassLoader is a special class loader for Groovy, which is used to dynamically compile and load Groovy code at runtime.
[0176] GroovyClassLoader classLoader=new GroovyClassLoader();
[0177] After that, the Groovy script is parsed and the parseClass method is used to compile the Groovy script string into a Java Class object. This method receives a String object (groovyStr) representing the Groovy script as a parameter and returns a Class object that represents the compiled Groovy script. <script>scriptClazz=(Class<Script>)classLoader.parseClass(groovyStr);
[0178] 其中,groovyStr是一个包含Groovy代码的字符串。parseClass方法编译这个字符串并生成一个新的Java类。为了确保类型安全,这个新生成的类被强制转换为Class<Script>类型,Script是Groovy脚本的基类,提供了执行Groovy脚本所需的基础方法,如run、evaluate等。
[0179] 使用编译后的脚本,在得到Class<Script>对象之后,就可以创建这个类的实例,并执行它。例如:
[0180] Script scriptInstance=scriptClazz.newInstance();
[0181] Object result=scriptInstance.run();
[0182] 这将创建一个新的脚本实例,并执行它。run方法执行脚本并返回脚本的最后一个表达式的值。
[0183] 通过上述步骤,可以将Groovy脚本动态编译并执行,使得在Java应用中可以灵活地执行Groovy代码,为应用提供强大的脚本执行能力。
[0184] 之后将编译后的Groovy脚本类(Class),连同一组输入参数(通过Binding传递)以计算是否命中某规则,动态地执行脚本并获取执行结果,可以通过Groovy的Binding和InvokerHelper类来实现,包括如下步骤:
[0185] 首先,创建一个Binding的实例。在Groovy中,Binding是用来传递变量给脚本的一种机制。它允许你在脚本执行之前定义一些变量,并且在脚本中可以直接访问这些变量。
[0186] Binding binding=new Binding(parameters);
[0187] 其中,parameters是一个包含了所有需要传递给Groovy脚本的参数的Map对象。Map的键是在Groovy脚本中引用这些参数时所使用的变量名,值则是这些变量的值。
[0188] 接下来,使用InvokerHelper的createScript方法来创建脚本的实例。这个方法接收两个参数:第一个参数是你想要实例化的脚本的Class对象(这个Class对象是之前通过GroovyClassLoader编译Groovy脚本得到的),第二个参数是前面创建的Binding实例。
[0189] Script script=InvokerHelper.createScript(scriptClass,binding);
[0190] 其中,scriptClass是之前通过Groovy脚本编译得到的Class对象。InvokerHelper.createScript方法将利用这个类和传入的Binding实例来创建一个脚本实例。这个脚本实例将能够访问Binding中定义的所有变量。
[0191] 最后,调用脚本实例的run方法来执行脚本。
[0192] return(boolean)script.run();
[0193] run方法执行脚本并返回脚本执行的结果。在这个例子中,我们期望脚本返回一个布尔值,表示规则是否被命中。因此,我们将run方法的返回值强制类型转换为boolean。如果脚本正确执行,并且按照预期返回了一个布尔值,这个值将被返回给调用者,表明规则是否命中。
[0194] 通过上述步骤,我们可以将编译后的Groovy脚本类(Class),连同一组输入参数(通过Binding传递),动态地执行脚本并获取执行结果。可以灵活在运行时实现根据不同的输入参数评估Groovy脚本定义的规则。
[0195] 但发明不以此为限,其他能够实现解析执行groovy脚本的技术方案也属于本发明要求保护的范围。
[0196] 此外,因为规则流程会不定时的编辑修改,我们还提供了一个规则变更监听模块M400。当逻辑表达式有变更的时候,发送广播消息,java服务端监听到广播消息,就会重新加载groovy脚本,之后将groovy脚本转化为jvm可以执行的class对象。由此服务端的保存规则脚本是实时的,以解决有规则不同步的问题。当有规则流程修改被监听到了,会重新加载这个规则流程的规则分支,然后重复数据预热的过程,将规则分支对应的groovy脚本转化为java程序可执行的Class对象,等待后续的调用执行。
[0197] 如图3c所示是本发明提供的可视化逻辑表达式编辑器规则节点编辑页面示意图,逻辑表达式编辑器M100可通过图3c所示编辑页面提供的上下箭头动态的调整规则节点的优先级以实现某一逻辑分支的优先级的动态调整。如果一个逻辑分支位置比较靠前,那么这条规则节点被命中的概率就靠前。因为这个逻辑分支一旦满足"如果”的判断条件,就是输出"那么”的判断结果,这个逻辑判断就命中结束了。该规则节点优先级动态调整功能通过提供上下箭头动态调整规则节点优先级的功能,用户可以根据实际需求灵活地调整逻辑分支的优先级,从而实现对逻辑判断过程的定制化和个性化设置。这种灵活性的增强使得用户能够更好地适应不同的业务场景和逻辑需求,提高了系统的适用性和定制性。通过调整规则节点的优先级,用户可以合理地安排逻辑分支的执行顺序,使得重要逻辑分支或高优先级规则节点被优先执行,从而提高了这些逻辑分支被命中的概率。这种优化能够有效地提升系统的执行效率和逻辑判断的准确性,提高了系统的整体性能和用户体验。优先级动态调整功能使得用户可以直观地调整逻辑分支的顺序,而无需深入了解复杂的编程逻辑。这种便捷性使得逻辑分支管理变得更加简单和直观,降低了用户的操作难度,提高了用户的工作效率和操作体验。该规则节点优先级动态调整功能有效地增强了系统的灵活性和定制性,优化了逻辑判断的执行顺序,提高了系统的执行效率和逻辑判断的准确性,同时简化了用户的操作流程,提升了用户的使用体验。
[0198] 管理模块M500为每个规则组分配了唯一的访问标识,确保了规则组的唯一性和标识性。逻辑表达式规则组唯一的访问标识,java项目初始化的时可以根据这个访问标识加载对应的逻辑表达式规则组。例如访问标识可由业务模块作用域及名称拼接而成,如trip.corp.platform_sales.PT表示的是一个业务模块作用域,表示的是这个逻辑表达式被公司的哪个部门在使用。模块作用域可以清晰的表示出这个逻辑表达式规则组的使用范围,也可以减少访问标识重复的概率。feipeiyouxian则是名称,trip.corp.platform_sales.PT.feipeiyouxian就是一个完整的访问标识。
[0199] 如图3d所示是本发明提供的可视化逻辑表达式管理系统版本管理页面示意图,管理模块M500实现了规则组的版本管理功能,为用户提供了版本控制的功能,用户可以查看和恢复历史版本的规则组配置。版本控制分为草稿版本以及正式版本。草稿版本为一个逻辑表达式规则组里面规则很多,一次难以编辑完,那么可以保存为草稿本。正式版本有版本列表,每个版本都可以看到这个版本的逻辑表达式具体细节。因此在线上逻辑表达式出现问题时,则可以方便的回退,增加了程序运行的健壮性。
[0200] 本发明实施例还提供一种可视化逻辑表达式管理程序产品,包括计算机指令,该计算机指令被处理器执行时实现上述可视化逻辑表达式管理方法的步骤。
[0201] 本发明的可视化逻辑表达式管理程序产品,其实现方式可以采用如上的可视化逻辑表达式管理方法的具体实施方式来实现,此处不予赘述。
[0202] 程序产品包括程序代码,可以在终端设备,例如个人电脑、服务器、移动设备上执行。然而,本发明的程序产品不限于此,在本文件中,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。此外,可以以一种或多种程序设计语言的任意组合来编写用于执行本发明操作的程序代码,程序设计语言包括面向对象的程序设计语言—诸如Java、C++等,还包括常规的过程式程序设计语言—诸如"C”语言或类似的程序设计语言。程序代码可以完全地在用户计算设备上执行、部分地在用户设备上执行、作为一个独立的软件包执行、部分在用户计算设备上部分在远程计算设备上执行、或者完全在远程计算设备或服务器上执行。在涉及远程计算设备的情形中,远程计算设备可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算设备,或者,可以连接到外部计算设备(例如利用因特网服务提供商来通过因特网连接)。程序被处理器执行时实现的可视化逻辑表达式管理方法的步骤,因此,程序产品也可以获得上述可视化逻辑表达式管理方法的技术效果。
[0203] 以上内容是结合具体的优选实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。< / script>
Claims
1. A visual logical expression management system, characterized in that: include: A visual logic expression editor is used to visually create and edit logic expressions. The visual logic expression editor includes: Input property component, used to edit the left value of the logical expression, including text, numeric value, single-select value, multiple-select value, date type, Boolean type and function; The expected value component is used to edit the right value that the logical expression is expected to match; An operator component, used for connecting the logical operation symbol of the left value and the right value; At least one rule node, each of the rule nodes includes the left value, the logical operation symbol and the right value, and returns a Boolean value; A rule group is a combination of at least two of the rule nodes, and returns a Boolean value; Connectives, which are logical words used to connect the rule nodes or the rule groups or the rule nodes and the rule groups; A rule tree generation module, used for combining the rule nodes and the rule groups created in the logic expression editor into a rule tree structure; A parsing and execution module, used for converting the rule tree structure into an executable script, and executing the executable script to return an execution result; A rule change monitoring module, used for monitoring the change events of the rule nodes and the rule groups, and notifying the parsing and execution module of the change event messages to update the executable script; Management module, used to uniformly manage logical expressions, including: An access identifier of the rule group, each of the rule groups having a unique access identifier; Version management of rule groups, which is used to provide version control so that users can view and restore historical versions of the configuration of the rule groups; User role and permission management, used to provide role-based access control.
2. The visual logic expression management system according to claim 1, characterized in that: The visual logic expression editor also includes a rule group template module, which includes quickly creating a rule group through a predefined template and allowing users to customize and save templates for reuse.
3. The visual logic expression management system according to claim 1 or 2, characterized in that: The rule tree generation module is used to automatically generate a rule tree structure, and convert the rule tree structure into the executable script through a dynamic conversion algorithm.
4. The visual logic expression management system according to claim 1, characterized in that: The rule change monitoring module notifies the parsing and execution module of the message of the change event through a message queue or an event broadcast mechanism.
5. The visual logic expression management system according to claim 1, characterized in that: The parsing and execution module includes: A concurrent compilation and execution strategy unit, for improving the execution performance of the executable script; The pre-compilation unit is used to pre-compile the rule group to reduce the compilation time during query.
6. The visual logic expression management system according to claim 1, characterized in that: The management module also includes: A visual report module for rule groups, used to automatically generate a visual execution report of the rule groups, including a hit rate indicator and an execution time indicator; The log viewing module is used to view the execution log of the rule group.
7. The visual logic expression management system according to claim 1, characterized in that: The management module also includes: A visual debugging module for rule groups, which provides debugging tools for users to input test data and visually view the execution results of the rule groups; The step-by-step execution and breakpoint debugging module is used to help users locate the operation problems of the visual logic expression management system.
8. The visual logic expression management system according to claim 1, characterized in that: The visual logic expression editor also includes: A rule group nesting and reuse module, used to allow the rule nodes and the rule groups to reference each other; The reference relationship diagram module is used to help users clearly understand the dependency relationship between the rule nodes and the rule groups.
9. The visual logic expression management system according to claim 1, characterized in that: The management module also includes: A rule group performance monitoring module, used to provide performance monitoring of the rule group execution, including execution time indicators and memory usage indicators; The optimization suggestion module is used to help the user adjust the structure of the rule group to improve execution efficiency.
10. A visual logical expression management method, characterized in that: The visual logic expression management system according to any one of claims 1 to 9 comprises the following steps: Create and edit logical expressions in the visual logical expression editor; The rule tree generation module combines the rule nodes and rule groups created in the visual logic expression editor into a rule tree structure; By parsing and executing modules, the rule tree structure is converted into an executable script, and the executable script is executed to return the execution result. The rule change monitoring module monitors the change events of the rule nodes and rule groups, and notifies the parsing and execution module of the change event messages to update the executable script; Logical expressions are managed uniformly through management modules.
11. A visual logic expression management program product, comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the visual logic expression management method described in claim 10 are implemented.
Citation Information
Cited By
Product quality judgment rule management method and system based on digital twinning
CN119338331A
Dynamic expression analysis and execution method and system based on visual interaction
CN120994185A
Data dynamic analysis method, device and equipment and storage medium
CN122963538A
