CN113885961A - Method for visually realizing formula rules of aPaaS platform - Google Patents

Method for visually realizing formula rules of aPaaS platform Download PDF

Info

Publication number
CN113885961A
CN113885961A CN202111176757.2A CN202111176757A CN113885961A CN 113885961 A CN113885961 A CN 113885961A CN 202111176757 A CN202111176757 A CN 202111176757A CN 113885961 A CN113885961 A CN 113885961A
Authority
CN
China
Prior art keywords
rule
formula
function
rules
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111176757.2A
Other languages
Chinese (zh)
Inventor
张彤
李志航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Defan Information Technology Co ltd
Original Assignee
Shanghai Defan Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Defan Information Technology Co ltd filed Critical Shanghai Defan Information Technology Co ltd
Priority to CN202111176757.2A priority Critical patent/CN113885961A/en
Publication of CN113885961A publication Critical patent/CN113885961A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Abstract

The invention discloses a method for visually realizing formula rules of an aPaaS platform, and relates to the technical field of data processing and display. The method of the invention comprises the following steps: the assembly visually configures a popup window configuration formula or rule through a formula rule; judging whether the rule is correct or not, if so, continuing, and if not, ending; storing the configured rule to a server; when executing, firstly, acquiring the configured rule from the server; analyzing the rule configuration, and converting into code character strings for splicing; converting the rule character string into an executable method; the rules engine starts the computation and returns the result to the component. The invention supports the calculation of various complex functions and simultaneously supports the self-development of the functions; calculation results in different formats can be returned to meet assignment of different data formats; and the error information is calculated by supporting a complete formula rule, so that the method is helpful for checking whether the configured formula is wrong or not.

Description

Method for visually realizing formula rules of aPaaS platform
Technical Field
The invention belongs to the technical field of data processing and display, and particularly relates to a method for visually realizing formula rules of an aPaaS platform.
Background
Nowadays, as a paas low-code and codeless platforms are more and more, service scenes which need a large amount of function calculation cannot be configured, taking a reimbursement system as an example, a reimbursement bill has a plurality of reimbursement details, and if the sums of the reimbursement bills are to be collected and counted, formula rule visualization is indispensable.
At present, the aaas platforms such as light stream and open cloud have some research on the visualization of formula rules, for example, the formula rules of light stream are realized by opening a popup window, and the popup window includes some simple mathematical functions, logic functions and the like; the formula of the open-road cloud is realized in a formula component mode, the component has digital calculation and date calculation, and the formula is configured in a drop-down box mode.
The method mainly has three aspects of the quality of formula rules, namely, rich operation functions are required to meet the configuration of various service scenes; secondly, the operation is rapid and accurate, and the page jam caused by slow calculation when a plurality of functions exist in the form is avoided; thirdly, data in various formats are compatible, and the data formats comprise text formats, number formats, date formats and the like, while formula rules also have corresponding functions, so that the calculated result cannot be displayed on the component due to the fact that the formats are not correct. The disadvantage of the light stream is that it does not support system related functions, such as they do not support functions of getting current user, getting role list, getting department list, etc. The problem of the open cloud is that the operation functions are few, they only support the calculation of date and number, and some character string operation functions (i.e. text functions) and logic functions (such as and, or, not, if and other functions) do not support. Therefore, the method for visually realizing the formula rules of the aPaaS platform is significant in view of the problems.
Disclosure of Invention
The invention provides a method for visually realizing formula rules of an aPaaS platform, which solves the problems.
In order to solve the technical problems, the invention is realized by the following technical scheme:
the invention discloses a method for visually realizing formula rules of an aPaaS platform, which comprises the following steps of:
s01, visually configuring a popup configuration formula or rule by the component through the formula rule; the formula rule visual configuration popup specifically adopts an el-dialog component in an element-ui as a bottom layer, and the whole rule popup comprises three parts: a left function area, an upper right rule editing area and a lower right consensus operator area;
s02, judging whether the rule is correct or not, if so, continuing, and if not, ending;
s03, storing the configured rule to a server;
s04, when executing, firstly obtaining the configured rule from the server;
s05, the rule engine calls a parsRuleToExpr method, analyzes the configuration of the rule, and converts the configuration into a code string for splicing;
s06, converting the rule character string into an executable method through the new Function () grammar in js;
s07, the rules engine begins the computation and returns the result to the component.
Further, the function area comprises a logic function, a mathematical function, a text format function, a time function, an event function and an information acquisition function.
Further, the rule engine is the core of the whole rule calculation, and comprises the registration of formula functions, a parser for rule configuration, and an executor of rules, and the execution logic in the rule engine comprises the following steps:
firstly, generating a rule engine (RuleEngine) instance, wherein two methods are exposed in the instance, namely a method register context execution method for registering a context execution function and supporting chain calling, and a method execute rule for executing a specific rule is exposed, a rule executor (RuleExecutor) is initialized in the method, a Uuid is generated in the executor, and the unique identification is carried out through the Uuid in the execution process of the executor, and the rule is added into a stack;
then, creating a rule running (Runtime) instance in the rule executor, simultaneously injecting a rule, executing the rule in the Runtime, and prompting specific error information if the execution fails;
finally, in the rule running example, the incoming rule configuration is analyzed into a character string through a rule analyzer (Ruleparser), the executable character string is converted into executable function of the code through newFunction, then the specifically configured formula rule is run, if the operation is successful, the operation result is returned to the component, and if the operation is failed, error information is printed.
Compared with the prior art, the invention has the following beneficial effects:
1. the invention supports the calculation of various complex functions and simultaneously supports the self-development of the functions;
2. the invention can return the calculation results with different formats to satisfy the assignment of different data formats;
3. the invention supports the complete formula rule to calculate the error information, and is beneficial to checking whether the configured formula is wrong or not.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart illustrating the overall steps of a method for visually implementing the formula rules of an aPaaS platform according to the present invention;
FIG. 2 is a schematic diagram of the present invention driving the execution of rules through the configuration of rules;
FIG. 3 is an interface diagram of formula rule visualization configuration popup of the present invention;
FIG. 4 is a flow chart of the execution logic in the rules engine of the present invention;
FIG. 5 is a diagram of steps for creating a rule run instance in a rule executor and performing rule execution according to the present invention;
FIG. 6 is a step diagram of parsing rules into strings by a rule parser and performing operations and determining whether the operations are successful according to the present invention;
fig. 7 is a diagram of a formula rule configuration panel of an existing light-stream aaas platform;
fig. 8 is a formula rule configuration panel diagram of an existing open-road cloud aaas platform;
FIG. 9 is an interface diagram illustrating an example of an aPaaS platform and a reimbursement form for implementing the method of the present invention;
FIG. 10 is an interface diagram derived from operation of an example of an aPaaS platform and reimbursement slip to which the method of the present invention is applied.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims at realizing the visual configuration function of the aPaaS platform on the formula rule, and meets the realization of the aPaaS platform in some complex operation scenes in the code-free field by developing a visual formula rule configuration panel.
An existing aaas low-code and no-code platform is, as shown in fig. 7, a panel diagram configured for formula rules of a light-stream aaas platform; as shown in fig. 8, a panel diagram is configured for formula rules of the open-road cloud aaas platform; the two existing aaas platform cases have the problems that functions such as current user acquisition, role list acquisition, department list acquisition and the like are not supported, so that the method for realizing the visualization of the formula rules of the aPaaS platform in the technical scheme is provided for the problems and the problems mentioned in the background technology;
the technical problem to be solved by the invention is to provide the integration of a formula rule configuration visualization popup window and some operation functions, and simultaneously construct a rule execution engine (RuleEngine) for optimizing the speed and accuracy of formula calculation; the popup can be configured on a text component, a number component and a date component to be compatible with data in various formats, and can also be configured on a logic function, such as logic of 'whether to hide', logic of 'read only', logic of 'whether to fill in' and the like. And meanwhile, a registration method of the function is exposed to realize the function of self-development of the function.
Referring to fig. 1-6 and fig. 9-10, a method for visually implementing formula rules of an aPaaS platform according to the present invention includes the following steps, specifically as shown in fig. 1:
s01, visually configuring a popup configuration formula or rule by the component through the formula rule; the formula rule visual configuration popup specifically adopts an el-dialog component in an element-ui as a bottom layer, and the whole rule popup comprises three parts: a left function area, an upper right rule editing area and a lower right consensus operator area;
s02, judging whether the rule is correct or not, if so, continuing, and if not, ending;
s03, storing the configured rule to a server;
s04, when executing, firstly obtaining the configured rule from the server;
s05, the rule engine calls a parsRuleToExpr method, analyzes the configuration of the rule, and converts the configuration into a code string for splicing;
s06, converting the rule character string into an executable method through the new Function () grammar in js;
s07, the rules engine begins the computation and returns the result to the component.
The technical scheme of the design of the invention relates to two parts: the formula rule visualization configuration popup window and the execution logic in the rule engine drive the execution of the rule through the configuration of the rule; as shown in fig. 2.
The function area comprises a logic function, a mathematical function, a text format function, a time function, an event function and an information acquisition function; wherein the logic function comprises if judgment, AND or NOR judgment, empty judgment, inclusion judgment, equivalence judgment and the like; the mathematical functions comprise functions of summation, averaging, maximum value calculation, minimum value calculation, statistics and the like; the text format function comprises character string interception, character string splicing, capital change, small change, character string length calculation and the like; the time function comprises calculating year difference, month difference, day difference, small time difference, obtaining current date, obtaining current time and the like; the event function comprises a field assignment function; the information acquiring function comprises functions of acquiring a role list, acquiring a department list, acquiring a current user and the like;
the formula operator comprises four operations of addition, subtraction, multiplication and division and judgment of greater than or less than and equal to.
The formula or rule editing area can edit the input value or the form component. As a specific example, application to the present formula rule visualization configuration popup
For example: for example, the reimbursement bill has a plurality of reimbursement details in the form, and the formula component may collect and count the amount of the plurality of reimbursement details through a built-in SUM function, as shown in fig. 9.
After the design is completed, when the reimbursement order is filled, the total amount can be calculated by the formula component as shown in fig. 10 only by filling the reimbursement amount.
The rule engine is the core of the whole rule calculation, and comprises the registration of formula functions, a resolver of rule configuration and a rule executor, wherein the execution logic in the rule engine comprises the following steps:
firstly, generating a rule engine RuleEngine instance, wherein two methods are exposed in the instance, namely a method register context execution method for registering a context execution function and supporting chain calling, and a method execute rule for executing a specific rule is exposed, a rule executor ruleexecuter is initialized in the method, a Uuid is generated in the executor, the executor carries out unique identification through the Uuid in the execution process, and the rule is added into a stack, as shown in fig. 4;
then, creating a rule running Runtime instance in the rule executor, and injecting the rule, wherein the rule is executed in the Runtime, and if the execution fails, prompting specific error information, as shown in fig. 5;
finally, in the rule running example, the incoming rule configuration is analyzed into a character string through a rule analyzer Ruleparser, the executable character string is converted into the executable function of the code through newFunction, then the specifically configured formula rule is run, if the operation is successful, the operation result is returned to the component, and if the operation is failed, error information is printed, as shown in fig. 6.
Has the advantages that:
1. the invention supports the calculation of various complex functions and simultaneously supports the self-development of the functions;
2. the invention can return the calculation results with different formats to satisfy the assignment of different data formats;
3. the invention supports the complete formula rule to calculate the error information, and is beneficial to checking whether the configured formula is wrong or not.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (3)

1. A method for visually realizing formula rules of an aPaaS platform is characterized by comprising the following steps:
s01, visually configuring a popup configuration formula or rule by the component through the formula rule; the formula rule visual configuration popup specifically adopts an el-dialog component in an element-ui as a bottom layer, and the whole rule popup comprises three parts: a left function area, an upper right rule editing area and a lower right consensus operator area;
s02, judging whether the rule is correct or not, if so, continuing, and if not, ending;
s03, storing the configured rule to a server;
s04, when executing, firstly obtaining the configured rule from the server;
s05, the rule engine calls a parsRuleToExpr method, analyzes the configuration of the rule, and converts the configuration into a code string for splicing;
s06, converting the rule character string into an executable method through the new Function () grammar in js;
s07, the rules engine begins the computation and returns the result to the component.
2. The method for visually implementing the formula rules of the aaas platform according to claim 1, wherein the function area comprises a logic function, a mathematical function, a text format function, a time function, an event function, and an acquisition information function.
3. The method for visualizing implementation of formula rules of an aaas platform according to claim 1, wherein the rule engine is a core of whole rule calculation, and includes registration of formula functions, parser of rule configuration, and executor of rules, and the execution logic in the rule engine includes the following steps:
firstly, generating a rule engine instance, wherein two methods are exposed in the instance, namely a method register context execution method for registering a context execution function and supporting chain calling, and a method execute rule for executing a specific rule is exposed, a rule actuator is initialized in the method, a Uuid is generated in the actuator, the actuator carries out unique identification through the Uuid in the execution process, and the rule is added into a stack;
then, creating a rule running instance in a rule executor, simultaneously injecting a rule, executing the rule in runtime, and prompting specific error information if the execution fails;
finally, in the rule running example, the incoming rule configuration is analyzed into a character string through a rule analyzer, the executable character string is converted into the executable function through the newFunction, the specifically configured formula rule is run, if the operation is successful, the operation result is returned to the component, and if the operation is failed, error information is printed.
CN202111176757.2A 2021-10-09 2021-10-09 Method for visually realizing formula rules of aPaaS platform Pending CN113885961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111176757.2A CN113885961A (en) 2021-10-09 2021-10-09 Method for visually realizing formula rules of aPaaS platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111176757.2A CN113885961A (en) 2021-10-09 2021-10-09 Method for visually realizing formula rules of aPaaS platform

Publications (1)

Publication Number Publication Date
CN113885961A true CN113885961A (en) 2022-01-04

Family

ID=79005857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111176757.2A Pending CN113885961A (en) 2021-10-09 2021-10-09 Method for visually realizing formula rules of aPaaS platform

Country Status (1)

Country Link
CN (1) CN113885961A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115268924A (en) * 2022-06-10 2022-11-01 知学云(北京)科技股份有限公司 Formula calculation engine service method and system based on aPaaS platform
CN116263802A (en) * 2022-03-14 2023-06-16 横琴人寿保险有限公司 Computing engine system based on financial field

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8131663B1 (en) * 2007-10-12 2012-03-06 Bonamy Taylor Apparatus for generating software logic rules by flowchart design
CN103810152A (en) * 2013-11-11 2014-05-21 远光软件股份有限公司 Visualized formula editor
CN104715408A (en) * 2015-03-19 2015-06-17 烟台海颐软件股份有限公司 Power trade visualization implementation method based on settlement unit
WO2015131955A1 (en) * 2014-03-07 2015-09-11 Nokia Solutions And Networks Oy Rule engine for application servers
CN109144374A (en) * 2018-09-27 2019-01-04 范若愚 Method for processing business, system and relevant device based on visualization regulation engine
CN109783107A (en) * 2019-01-10 2019-05-21 深圳市小赢信息技术有限责任公司 A kind of visual rule generating method, device and electronic equipment
WO2019179056A1 (en) * 2018-03-18 2019-09-26 平安科技(深圳)有限公司 Configurable system and method based on rule engine, device, and storage medium
CN112882800A (en) * 2021-03-15 2021-06-01 政采云有限公司 Method, device, system, equipment and medium for acquiring service execution result
CN113190283A (en) * 2021-04-15 2021-07-30 北京致远互联软件股份有限公司 Groovy language based visual calculation formula realization method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8131663B1 (en) * 2007-10-12 2012-03-06 Bonamy Taylor Apparatus for generating software logic rules by flowchart design
CN103810152A (en) * 2013-11-11 2014-05-21 远光软件股份有限公司 Visualized formula editor
WO2015131955A1 (en) * 2014-03-07 2015-09-11 Nokia Solutions And Networks Oy Rule engine for application servers
CN104715408A (en) * 2015-03-19 2015-06-17 烟台海颐软件股份有限公司 Power trade visualization implementation method based on settlement unit
WO2019179056A1 (en) * 2018-03-18 2019-09-26 平安科技(深圳)有限公司 Configurable system and method based on rule engine, device, and storage medium
CN109144374A (en) * 2018-09-27 2019-01-04 范若愚 Method for processing business, system and relevant device based on visualization regulation engine
CN109783107A (en) * 2019-01-10 2019-05-21 深圳市小赢信息技术有限责任公司 A kind of visual rule generating method, device and electronic equipment
CN112882800A (en) * 2021-03-15 2021-06-01 政采云有限公司 Method, device, system, equipment and medium for acquiring service execution result
CN113190283A (en) * 2021-04-15 2021-07-30 北京致远互联软件股份有限公司 Groovy language based visual calculation formula realization method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116263802A (en) * 2022-03-14 2023-06-16 横琴人寿保险有限公司 Computing engine system based on financial field
CN116263802B (en) * 2022-03-14 2023-08-29 横琴人寿保险有限公司 Computing engine system based on financial field
CN115268924A (en) * 2022-06-10 2022-11-01 知学云(北京)科技股份有限公司 Formula calculation engine service method and system based on aPaaS platform

Similar Documents

Publication Publication Date Title
CN113885961A (en) Method for visually realizing formula rules of aPaaS platform
US10185925B2 (en) Generating business rule model
US11113477B2 (en) Visualizing comment sentiment
CN101398812B (en) Apparatus and method for generating electric table with service logic
CN111090641B (en) Data processing method and device, electronic equipment and storage medium
US10366058B2 (en) Performing logical validation on loaded data in a database
US9286526B1 (en) Cohort-based learning from user edits
EP3159798B1 (en) Method and system for determining user interface usage
CN112420145A (en) Electronic medical record document data processing method and device and computer readable storage medium
US10255046B2 (en) Source code analysis and adjustment system
US10878232B2 (en) Automated processing of receipts and invoices
CN112749151A (en) Data migration method and device among different types of databases and storage medium
CN109189395A (en) A kind of data analysis method and device
CN112199261A (en) Application program performance analysis method and device and electronic equipment
CN112370773B (en) User integral value reconciliation test method and system
US20130179365A1 (en) Systems and methods of rapid business discovery and transformation of business processes
CN112463819A (en) Computing method, device and equipment based on Chinese expression and storage medium
CN113158988B (en) Financial statement processing method, device and computer readable storage medium
US20100305986A1 (en) Using Service Exposure Criteria
Tourwé et al. Inductively generated pointcuts to support refactoring to aspects
CN114757299A (en) Text similarity judgment method and device and storage medium
JP6948470B1 (en) Repair support system and repair support method
CN113051262A (en) Data quality inspection method, device, equipment and storage medium
Tarassow et al. FEP-the forecast evaluation package for gretl: Based on FEP version 2.1
CN110515653A (en) Document structure tree method, apparatus, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination