A method and device for intelligent review key point service

By using JDK and Spring's tool classes to parse rule values, and divide the rules into relational and non-relational expression processing, it solves the performance bottlenecks and security risks of QLEXpress when parsing complex expressions, and achieves fast, concise and safe rule resolution.

CN119849479BActive Publication Date: 2025-08-29INSPUR SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510323792.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-08-29
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

Existing QLEXpress dynamic scripting engines have high learning costs, performance bottlenecks and security risks when parsing complex expressions, and may face expression injection vulnerabilities when dealing with dynamic scripts.

Method used

Using the methods provided by JDK and Spring, the rule values ​​are parsed through the property placeholder assistant PropertyPlaceholderHelper, and the rules are divided into two categories: relational expressions and non-relational expressions, and the operands and execution functions are obtained using Comparable comparison classes and Properties tool classes.

Benefits of technology

It realizes fast, concise and easy-to-use rule parsing, improves performance and improves security, and avoids expression injection vulnerabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849479B_ABST
    Figure CN119849479B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of rule parsing technology, specifically providing a method and apparatus for intelligent review key point services. This method directly utilizes methods provided by JDK and Spring to write rule parsing methods, and uses the PropertyPlaceholderHelper to parse rule values. Intelligent review key point rules are divided into two categories based on whether they contain relational operators: relational expression parsing and non-relational expression parsing. Compared to existing technologies, this invention is faster, simpler, easier to use, and offers better performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of rule parsing, and specifically provides a method and device for intelligent review key point service. Background Art

[0002] The existing QLExpress (Quick Expression Engine) is a dynamic script engine parsing tool. Although it can parse some complex expressions, it requires additional dependencies, which increases the learning cost. It is also a weakly typed scripting language, which may lead to performance bottlenecks and may face security risks when processing dynamic scripts, such as expression injection vulnerabilities. Summary of the Invention

[0003] The present invention aims to address the above-mentioned deficiencies in the prior art and provides a highly practical method for intelligent review key point services.

[0004] A further technical task of the present invention is to provide a device that is rationally designed, safe and applicable for intelligent review point services.

[0005] The technical solution adopted by the present invention to solve its technical problem is:

[0006] A method for intelligent review key point service, which directly uses the methods provided by JDK and Spring to write rule parsing methods, and uses the PropertyPlaceholderHelper to parse the rule values;

[0007] The key points of intelligent review rules are divided into two categories according to whether there are relational operators or not: one is relational expression parsing, and the other is non-relational expression parsing.

[0008] Furthermore, the relational expression parsing first needs to define the set of supported relational operators, and then split the relational expression string accordingly to obtain the left and right operands. The actual values ​​of the operands need to be obtained from the context or a given configuration file, and finally the values ​​of the operands are compared according to the relational operators to obtain the parsing results.

[0009] Furthermore, when obtaining the value of the operand, the operand needs to be obtained through the context or configuration file. The tool class PropertyPlaceholderHelper provided by Spring is used to process strings containing placeholder values. The placeholder is in the form of ${name}, where name is the name of the placeholder.

[0010] Or you can construct a custom placeholder format by passing the placeholder prefix and suffix. The Properties tool class provides the value range of the operand, assigns the application runtime context or configuration file to the Properties tool class, and finally calls the method of the PropertyPlaceholderHelper tool class to parse the specific value of the operand.

[0011] Furthermore, for the custom relational operator set operation, the actual values ​​of the obtained operands are compared according to the Comparable comparison class provided by JDK, thereby obtaining the parsing result of the relational expression.

[0012] Furthermore, the non-relational expression parsing requires defining a set of supported single-parameter functions, then matching the specific execution function by the function name, then obtaining the actual value of the parameter from the context or a given configuration file, and finally executing the single-parameter function. The execution result is the parsing result of the regular expression.

[0013] Furthermore, use the tool class property placeholder assistant PropertyPlaceholderHelper to obtain the actual value of the parameter, use the Properties tool class to provide the operand value domain, assign the context or configuration file to the Properties tool class, and finally call the method of the PropertyPlaceholderHelper tool class to parse the specific value of the parameter expression.

[0014] Furthermore, when executing a single-parameter function, for a custom single-parameter function, the actual value of the obtained parameter expression is directly used as an input parameter to call the single-parameter function, thereby obtaining the parsing result of the non-relational expression.

[0015] A device for intelligent review key point service, comprising: at least one memory and at least one processor;

[0016] The at least one memory is configured to store a machine-readable program;

[0017] The at least one processor is configured to call the machine-readable program to execute a method for providing an intelligent review point service.

[0018] Compared with the prior art, the method and device for intelligent review point service of the present invention have the following outstanding beneficial effects:

[0019] The present invention uses the native tool classes provided by JDK and Spring to divide the review key point rules into two parts: relational expressions and non-relational expressions, and then process and parse them separately to obtain the results, thereby achieving fast, simple, easy to use and better performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Attachment Figure 1 It is a flowchart diagram of a method for intelligent review key point service;

[0022] Attachment Figure 2 This is a diagram of the rule verification result interface in a method for intelligent review key point service. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the solutions of the present invention, the present invention will be further described in detail below in conjunction with specific embodiments. Obviously, the embodiments described are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] A best embodiment is given below:

[0025] like Figure 1 As shown, a method for intelligent review key point service in this embodiment directly uses the methods provided by JDK and Spring to write rule parsing methods, and uses the property placeholder helper PropertyPlaceholderHelper to parse the rule values;

[0026] The key points of intelligent review rules are divided into two categories according to whether there are relational operators or not: one is relational expression parsing, and the other is non-relational expression parsing.

[0027] For relational expression parsing, you first need to define the set of supported relational operators, including but not limited to operators such as greater than, less than, equal to, contain, and not contain. Then, you can split the relational expression string based on this to obtain the left and right operands. The actual values ​​of the operands need to be obtained from the context or a given configuration file. Finally, you can compare the operand values ​​according to the relational operators to obtain the parsing result.

[0028] When obtaining the value of an operand, the operand often needs to be obtained through the context or configuration file, which is called the value range of the operand. That is, the actual value of the operand can only be obtained from the value range. Therefore, when obtaining the value of the operand, you need to use the tool class PropertyPlaceholderHelper (property placeholder assistant) provided by Spring to process the string containing the placeholder value. The placeholder is usually in the form of ${name}, where name is the name of the placeholder. Of course, you can also construct a custom placeholder form by passing the placeholder prefix and suffix.

[0029] The value range of the operand is provided by the Properties utility class, which assigns the application runtime context or configuration file to the Properties utility class. Finally, the specific value of the operand is parsed by calling the PropertyPlaceholderHelper utility class method.

[0030] When performing relational operations, the implementation of the custom relational operator set operation mainly compares the actual values ​​of the operands obtained in the previous step based on the Comparable comparison class provided by JDK, thereby obtaining the parsed result of the relational expression.

[0031] For non-relational expression parsing, a non-relational expression is a function with only one input parameter, known as a single-parameter function. First, you need to define the set of supported single-parameter functions, then match the specific execution function by function name, obtain the actual parameter value from the context or a given configuration file, and finally execute the single-parameter function. The execution result is the parsed result of the regular expression.

[0032] Use the tool class property placeholder assistant PropertyPlaceholderHelper provided by Spring to obtain the actual value of the parameter, use the Properties tool class to provide the operand value domain, assign the context or configuration file to the Properties tool class, and finally call the method of the PropertyPlaceholderHelper tool class to parse the specific value of the parameter expression.

[0033] The execution of single-parameter functions mainly relies on some static tool classes. For example, to determine whether an ID number is valid, whether a license plate number is legal, etc., the actual value of the parameter expression obtained in the previous step is directly used as the input parameter to call the single-parameter function, thereby obtaining the parsing result of the non-relational expression.

[0034] Take the intelligent review key point rules set for an enterprise as an example, and the rule string placeholder is in the form of ${}, as shown below:

[0035] 1. $(BASE.scope)% Food || $(BASE.scope)% Sales

[0036] 2.isCreditCode($(OCR. Unified Social Credit Code))

[0037] 3. $(OCR. Unified Social Credit Code) = $(BASE. CreditCode)

[0038] Rule 1 verifies whether the business scope field in the basic information filled in by the enterprise contains "food" or "sales".

[0039] Rule 2 verifies whether the unified social credit code in the business license uploaded by the enterprise is legal and valid.

[0040] Rule three verifies whether the unified social credit code in the business license uploaded by the enterprise is consistent with the unified social credit code field in the basic information filled in.

[0041] like Figure 2 The figure shows the final verification result of the intelligent review key points rules.

[0042] Taking the string placeholder in the form of ${} as an example, the rules for the fields that need to be verified are as follows:

[0043] 1. $(BASE.scope)% Food || $(BASE.scope)% Sales

[0044] 2.isCreditCode($(OCR. Unified Social Credit Code))

[0045] 3. $(OCR. Unified Social Credit Code) = $(BASE. CreditCode)

[0046] Among them, "%" and "=" represent relational operators, the BASE and OCR fields in the placeholder are the value range sets of the operand values, and "isCreditCode" represents a single-parameter function call of a non-relational expression.

[0047] Use the Properties class to set the value range of the operand;

[0048] Properties properties = new Properties();

[0049] properties.setProperty("BASE", null);

[0050] properties.setProperty("OCR", null);

[0051] After setting the above two points, you can combine the content of this application to perform relational operations on relational expressions or directly execute functions on non-relational expressions to obtain the rule parsing results.

[0052] Based on the above method, this embodiment provides a device for intelligent review key point service, including: at least one memory and at least one processor;

[0053] at least one memory for storing a machine-readable program;

[0054] At least one processor is configured to call the machine-readable program to execute a method for providing an intelligent review point service.

[0055] The above-mentioned specific implementation methods are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementation methods. Any technical solutions that conform to the above-mentioned specific implementation methods of the present invention and any appropriate changes or substitutions made thereto by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.

[0056] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A method for intelligent review point service, characterized in that: Directly use the methods provided by JDK and Spring to write rule parsing methods, and use the property placeholder helper PropertyPlaceholderHelper to parse the rule values; The key points of intelligent review are divided into two categories according to whether there are relational operators or not: one is relational expression parsing, and the other is non-relational expression parsing. The relational expression parsing first requires defining a set of supported relational operators. It then splits the relational expression string to obtain the left and right operands. The actual values ​​of the operands are obtained from the context or a given configuration file. Finally, the operand values ​​are compared based on the relational operators to obtain the parsing result. When getting the value of an operand, the operand needs to be obtained through the context or configuration file. The tool class PropertyPlaceholderHelper provided by Spring is used to process strings containing placeholder values. The placeholder is in the form of ${name}, where name is the name of the placeholder. Alternatively, you can construct a custom placeholder format by passing a placeholder prefix and suffix. The Properties tool class provides the operand value range, assigns the application runtime context or configuration file to the Properties tool class, and finally calls the PropertyPlaceholderHelper tool class method to parse the specific operand value. For custom relational operator set operations, the actual values ​​of the obtained operands are compared according to the Comparable comparison class provided by JDK to obtain the parsing result of the relational expression; The non-relational expression parsing requires defining a set of supported single-parameter functions, then matching the specific execution function by function name, then obtaining the actual value of the parameter from the context or a given configuration file, and finally executing the single-parameter function. The execution result is the parsing result of the regular expression; Use the PropertyPlaceholderHelper tool class to obtain the actual value of the parameter, use the Properties tool class to provide the operand value domain, assign the context or configuration file to the Properties tool class, and finally call the PropertyPlaceholderHelper tool class method to parse the specific value of the parameter expression; When executing a single-parameter function, for a custom single-parameter function, the actual value of the parameter expression obtained is directly used as the input parameter to call the single-parameter function, thereby obtaining the parsing result of the non-relational expression.

2. A device for intelligent review point service, characterized in that: include: at least one memory and at least one processor; The at least one memory is configured to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to claim 1.

Citation Information

Patent Citations

  • Expression analysis method and system of RPA system with namespace analyzable custom function

    CN115828886A

  • Data processing method and device based on data exchange format, equipment and medium

    CN116303725A