Method and device for intelligently examining key point service
By using JDK and Spring methods, combining the attribute placeholder assistant to parse rule values, and dividing the rules into relational and non-relational expressions for parsing, QLEXpress' performance bottlenecks and security risks when dealing with complex expressions, and achieving efficient and safe rule analysis.
Patent Information
- Application Number
- CN202510323792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-19
AI Technical Summary
Existing QLEXpress parsing tools require additional dependencies when dealing with complex expressions, which increases learning costs and poses performance bottlenecks and security risks, such as expression injection vulnerabilities.
The rule parsing method is written using the methods provided by JDK and Spring, and 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 parsed separately.
It realizes fast, simple and easy to use and better performance rule analysis, avoids additional dependencies and security risks, and reduces learning costs.
Smart Images

Figure CN119849479A_ABST
Abstract
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 the introduction of additional dependencies, which increases the learning cost. In addition, it is a weakly typed scripting language and may have performance bottlenecks. It may also face security risks when processing dynamic scripts, such as expression injection vulnerabilities. Summary of the invention
[0003] The present invention aims at addressing the deficiencies of the above-mentioned prior art and provides a method for intelligent review key point service with strong practicality.
[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: 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 PropertyPlaceholderHelper to parse rule values; 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.
[0006] 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 result.
[0007] 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. Or you can construct a custom placeholder form by passing the placeholder prefix and suffix. The Properties tool class provides the value domain 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.
[0008] 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, so as to obtain the parsing result of the relational expression.
[0009] Furthermore, the non-relational expression parsing needs to define a set of supported single-parameter functions, then match the specific execution function by the function name, then obtain the actual value of the parameter from the context or a given configuration file, and finally execute the single-parameter function. The execution result is the parsing result of the regular expression.
[0010] Furthermore, use the tool class property placeholder helper PropertyPlaceholderHelper to obtain the actual value of the parameter, use the Properties tool class to provide the operation 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.
[0011] Furthermore, when executing a single-parameter function, for a custom single-parameter function, the actual value of the parameter expression obtained is directly used as an input parameter to call the single-parameter function, thereby obtaining the parsing result of the non-relational expression.
[0012] A device for intelligent review key point service, comprising: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is used to call the machine-readable program to execute a method for intelligent review point service.
[0013] Compared with the prior art, the method and device for intelligent review key point service of the present invention have the following outstanding beneficial effects: The present invention uses the native tool classes provided by JDK and Spring to divide the review key point rules into two parts, relational expression and non-relational expression, 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
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.
[0015] Attached Figure 1 is a flowchart diagram of a method for intelligent review point service; Attached Figure 2 The present invention is a diagram of the rule verification result interface in a method for intelligent review key point service. DETAILED DESCRIPTION
[0016] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0017] A best embodiment is given below: like Figure 1 As shown, a method for intelligent review key point service in this embodiment directly uses the method provided by JDK and Spring to write the rule parsing method, and uses the property placeholder helper PropertyPlaceholderHelper to parse the rule value; 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.
[0018] For relational expression parsing, you first need to define the set of supported relational operators, including but not limited to greater than, less than, equal to, containment, and non-containment operators. Then, you can split the relational expression string to obtain the left and right operands. The actual value of the operand needs to be obtained from the context or a given configuration file. Finally, compare the operand values according to the relational operator to obtain the parsing result.
[0019] 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 domain of the operand. That is, the actual value of the operand can only be obtained from the value domain. Therefore, when obtaining the value of the operand, you need to use the tool class PropertyPlaceholderHelper (property placeholder assistant) provided by Spring to process strings containing placeholder values. Placeholders are 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.
[0020] The value range of the operand is provided by the Properties tool class, which assigns the application runtime context or configuration file to the Properties tool class. Finally, the method of the PropertyPlaceholderHelper tool class is called to parse the specific value of the operand.
[0021] 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 parsing result of the relational expression.
[0022] For non-relational expression parsing, non-relational expressions refer to functions with only one input parameter, which are called single-parameter functions. First, you need to define the supported single-parameter function set, then match the specific execution function by the function name, then get the actual value of the parameter from the context or the given configuration file, and finally execute the single-parameter function. The execution result is the parsing result of the regular expression.
[0023] Use the tool class PropertyPlaceholderHelper provided by Spring to obtain the actual value of the parameter, use the Properties tool class to provide the operand field, 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.
[0024] The execution of single-parameter functions is mainly based 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 an input parameter to call the single-parameter function, thereby obtaining the parsing result of the non-relational expression.
[0025] Take the intelligent review key points rule set for an enterprise as an example, and the rule string placeholder is in the form of ${}, as follows: 1. $(BASE.scope]%food||$[BASE.scope}%sales 2.isCreditCode($(OCR . Unified Social Credit Code)) 3.$(OCR. Unified Social Credit Code) =$(BASE. creditCode) Rule 1 means checking whether the business scope field in the basic information filled in by the enterprise contains "food" or "sales".
[0026] Rule 2 verifies whether the unified social credit code in the business license uploaded by the enterprise is legal and valid.
[0027] 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.
[0028] like Figure 2 The figure shows the final verification result of the key points of intelligent review.
[0029] Taking the string placeholder in the form of ${} as an example, the rules for setting the fields that need to be verified are as follows: 1. $(BASE.scope]%food||$[BASE.scope}%sales 2.isCreditCode($(OCR . Unified Social Credit Code)) 3.$(OCR. Unified Social Credit Code) =$(BASE. creditCode) 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.
[0030] Use the Properties class to set the value range of the operand; Properties properties = new Properties(); properties.setProperty("BASE", null); properties.setProperty("OCR", null); 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 rule parsing results.
[0031] Based on the above method, the present embodiment provides a device for intelligent review key point service, including: at least one memory and at least one processor; at least one memory for storing a machine-readable program; At least one processor is used to call the machine-readable program to execute a method for intelligent review point service.
[0032] The above-mentioned specific implementations 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 implementations. Any technical solutions that conform to the above-mentioned specific implementations of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.
[0033] Although 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 the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present 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 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.
2. A method for intelligent review point service according to claim 1, characterized in that: The relational expression parsing first needs to define the set of supported relational operators, and then split the relational expression string 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 result.
3. A method for intelligent review point service according to claim 2, characterized in that: When getting 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. Or you can construct a custom placeholder form by passing the placeholder prefix and suffix. The Properties tool class provides the value domain 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.
4. A method for intelligent review point service according to claim 3, characterized in that: 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 to obtain the parsing result of the relational expression.
5. A method for intelligent review point service according to claim 4, characterized in that: 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.
6. A method for intelligent review point service according to claim 5, characterized in that: Use the tool class PropertyPlaceholderHelper to obtain the actual value of the parameter, use the Properties tool class to provide the operation 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.
7. A method for intelligent review point service according to claim 6, characterized in that: 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.
8. 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 used 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 any one of claims 1 to 7.
Citation Information
Patent Citations
Business data processing method and device
CN106649212A
Intelligent auditing system oriented to business flow
CN107644323A
Implementation method and device of business expression generation and analysis tool
CN114115872A
Business processing method and device
CN115237389A
Universal expression analyzer
CN115576535A