CN109144493A - Generation method, electronic device and the readable storage medium storing program for executing of business rule - Google Patents

Generation method, electronic device and the readable storage medium storing program for executing of business rule Download PDF

Info

Publication number
CN109144493A
CN109144493A CN201810792774.0A CN201810792774A CN109144493A CN 109144493 A CN109144493 A CN 109144493A CN 201810792774 A CN201810792774 A CN 201810792774A CN 109144493 A CN109144493 A CN 109144493A
Authority
CN
China
Prior art keywords
rule
java
business
template
generation
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
CN201810792774.0A
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810792774.0A priority Critical patent/CN109144493A/en
Priority to PCT/CN2018/108211 priority patent/WO2020015190A1/en
Publication of CN109144493A publication Critical patent/CN109144493A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/03Credit; Loans; Processing thereof

Abstract

The present invention relates to a kind of generation method of business rule, electronic device and readable storage medium storing program for executing, this method comprises: obtaining the natural language rule that user writes;The default mark vocabulary and predetermined keyword extracted in the natural language rule converges;The corresponding Java rule template of the default mark vocabulary in natural language rule is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template, and the predetermined keyword remittance in the natural language rule is converted into corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template;Filled Java rule template is compiled the executable Java rule of generation.The present invention is not necessarily to by developer's manual compiling code of profession, and human cost is lower, and improves the efficiency for generating business rule.

Description

Generation method, electronic device and the readable storage medium storing program for executing of business rule
Technical field
The present invention relates to field of computer technology more particularly to a kind of generation methods of business rule, electronic device and can Read storage medium.
Background technique
Currently, a large amount of industry in rule engine system can be related in the scenes such as the adjustment of credit card amount, adjuster Business rule application, since business rule need to write code, existing business rule by profession developer's manual compiling and Management, human cost is higher, and inefficiency
Summary of the invention
The purpose of the present invention is to provide a kind of generation method of business rule, electronic device and readable storage medium storing program for executing, purports Simply and efficiently generating business rule.
To achieve the above object, the present invention provides a kind of electronic device, and the electronic device includes memory, processor, The generation system for the business rule that can be run on the processor, the generation of the business rule are stored on the memory System realizes following steps when being executed by the processor:
Obtain the natural language rule that user writes;
The default mark vocabulary and predetermined keyword extracted in the natural language rule converges;
The nature is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in language rule, and by the predetermined keyword in natural language rule Remittance is converted to corresponding code, and the code of conversion is filled the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation.
Preferably, if the default mark vocabulary includes, so, otherwise, corresponding Java rule template is if rule Template, then rule template, else rule template.
Preferably, described that filled Java rule template is compiled to the step packet for generating executable Java rule It includes:
It is executable that preset Deta bearer object BOM and filled Java rule template are compiled generation Java rule;
The processor is also used to execute the generation system of the business rule, to perform the steps of
When operation system carries out business rule operation using the executable Java rule generated, the operation system is received The business datum of transmission;
The business number of the operation system is carried by the Deta bearer object BOM in the executable Java rule According to, and run the executable Java rule and carry out business rule operation to be directed to the business datum of carrying.
Preferably, the processor is also used to execute the generation system of the business rule, to perform the steps of
The operation system of the executable Java rule of generation and application is associated, and the executable Java of generation is advised It is added after then carrying out label to preset application rule criterion library;The operation system includes credit card auditing system, insurance core Insurance system;
When the business rule for receiving operation system sending calls label, from the preset application rule criterion library Executable Java rule corresponding with business rule calling label is found, and the executable Java rule found out is utilized to carry out business Operation result is back to the operation system by regular operation.
In addition, to achieve the above object, the present invention also provides a kind of generation method of business rule, the business rule Generation method includes:
Obtain the natural language rule that user writes;
The default mark vocabulary and predetermined keyword extracted in the natural language rule converges;
The nature is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in language rule, and by the predetermined keyword in natural language rule Remittance is converted to corresponding code, and the code of conversion is filled the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation.
Preferably, if the default mark vocabulary includes, so, otherwise, corresponding Java rule template is if rule Template, then rule template, else rule template.
Preferably, described that filled Java rule template is compiled to the step packet for generating executable Java rule It includes:
It is executable that preset Deta bearer object BOM and filled Java rule template are compiled generation Java rule.
Preferably, this method further include:
When operation system carries out business rule operation using the executable Java rule generated, the operation system is received The business datum of transmission;
The business number of the operation system is carried by the Deta bearer object BOM in the executable Java rule According to, and run the executable Java rule and carry out business rule operation to be directed to the business datum of carrying.
Preferably, this method further include:
The operation system of the executable Java rule of generation and application is associated, and the executable Java of generation is advised It is added after then carrying out label to preset application rule criterion library;The operation system includes credit card auditing system, insurance core Insurance system;
When the business rule for receiving operation system sending calls label, from the preset application rule criterion library Executable Java rule corresponding with business rule calling label is found, and the executable Java rule found out is utilized to carry out business Operation result is back to the operation system by regular operation.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with the generation system of business rule, and the generation system of the business rule can be by least one processor It executes, so that the step of at least one described processor executes the generation method such as above-mentioned business rule.
Generation method, electronic device and the readable storage medium storing program for executing of business rule proposed by the present invention, by extracting user Default mark vocabulary and predetermined keyword during the natural language write is regular converge;According to predetermined default mark vocabulary with Mapping relations between Java rule template determine the corresponding Java rule of default mark vocabulary in the natural language rule Then template, and the predetermined keyword remittance in the natural language rule is converted into corresponding code, the code of conversion is filled Corresponding position into determining Java rule template;Filled Java rule template is compiled the executable Java of generation Rule.Due to can by natural language rule automatic conversion that user writes, be compiled into executable Java rule, write without user Code, i.e., without developer's manual compiling code by profession, human cost is lower, and improves the effect for generating business rule Rate.
Detailed description of the invention
Fig. 1 is the running environment schematic diagram of the generation system preferred embodiment of business rule of the present invention;
Fig. 2 is the application schematic diagram of one embodiment of generation system of business rule of the present invention;
Fig. 3 is the flow diagram of one embodiment of generation method of business rule of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
The present invention provides a kind of generation system of business rule.Referring to Fig. 1, being the generation system of business rule of the present invention The running environment schematic diagram of 10 preferred embodiments.
In the present embodiment, the generation system 10 of the business rule is installed and is run in electronic device 1.The electronics Device 1 may include, but be not limited only to, memory 11, processor 12 and display 13.Fig. 1 is illustrated only with component 11-13's Electronic device 1, it should be understood that be not required for implementing all components shown, the implementation that can be substituted is more or more Few component.
The memory 11 is the readable computer storage medium of at least one type, and the memory 11 is in some implementations It can be the internal storage unit of the electronic device 1, such as the hard disk or memory of the electronic device 1 in example.The memory 11 are also possible to the External memory equipment of the electronic device 1 in further embodiments, such as are equipped on the electronic device 1 Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, Flash card (Flash Card) etc..Further, the memory 11 can also both include the storage inside of the electronic device 1 Unit also includes External memory equipment.The memory 11 for store the application software for being installed on the electronic device 1 and respectively Class data, for example, the business rule generation system 10 program code etc..The memory 11 can be also used for temporarily Store the data that has exported or will export.
The processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), microprocessor or other data processing chips, for running the program code stored in the memory 11 or processing number According to, such as generation system 10 for executing the business rule etc..
The display 13 can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display in some embodiments And OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) touches device etc..The display 13 is used In being shown in the information handled in the electronic device 1 and for showing visual user interface, such as user writes Natural language rule, the executable Java rule ultimately generated etc..The component 11-13 of the electronic device 1 passes through system bus It is in communication with each other.
The generation system 10 of business rule includes that at least one is stored in the computer-readable instruction in the memory 11, At least one computer-readable instruction can be executed by the processor 12, to realize each embodiment of the application.
Wherein, following steps are realized when the generation system 10 of above-mentioned business rule is executed by the processor 12:
Step S1 obtains the natural language rule that user writes;
Step S2, the default mark vocabulary and predetermined keyword extracted in the natural language rule converge;
Step S3 determines institute according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in natural language rule is stated, and will be default in the natural language rule Key vocabularies are converted to corresponding code, and the code of conversion is filled the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation by step S4.
In the present embodiment, the generation system of business rule receives the business rule that user issues and generates request, for example, receiving User generates request by the business rule that the terminals such as mobile phone, tablet computer, self-help terminal equipment are sent, and such as receives user in hand The business rule sent in preassembled client in the terminals such as machine, tablet computer, self-help terminal equipment generates request, or It is raw to receive the business rule that user sends on the browser in the terminals such as mobile phone, tablet computer, self-help terminal equipment At request.
After the business rule for receiving user's sending generates request, the natural language rule that user writes can be obtained;It extracts Out the default mark vocabulary in natural language rule (such as " if ", " so ", " otherwise " etc.) and predetermined keyword converge (such as " age ", " amount of money " etc.);According to predetermined default mark vocabulary and Java rule template (such as if rule mould Plate, then rule template, else rule template etc.) between mapping relations determine the pre- bidding in natural language rule Know the corresponding Java rule template of vocabulary, and the predetermined keyword remittance in the natural language rule is converted into corresponding generation Code, for example, predetermined keyword remittance " age " is converted to corresponding code " age ".The code of conversion is filled to determining Corresponding position in Java rule template;Filled Java rule template is compiled the executable Java rule of generation.Such as Preset Deta bearer object BOM and filled Java rule template can be compiled to the executable Java rule of generation Then.When operation system carries out business rule operation using the executable Java rule generated, receives the operation system and send Business datum;The business of the operation system is carried by the Deta bearer object BOM in the executable Java rule Data, and run the executable Java rule and carry out business rule operation to be directed to the business datum of carrying.
In the present embodiment, user is supported to use natural language redaction rule, the natural language rule that user is write is automatic It converts, be compiled into java program language, which is executable business rule file, by the executable business Rule file is associated configuration with corresponding operation system (such as credit card auditing system, adjuster system), and should Executable business rule file is stored in memory.It is asked in operation system such as credit card auditing system, adjuster system etc. When asking using business rule, it is passed to business code name, can search whether to have in memory associated corresponding with the operation system Business rule file, if so, then the operation system can call corresponding business rule file in memory to carry out business rule fortune It calculates, otherwise returns to malloc failure malloc.Writing for business rule is separated with operation in the present embodiment, can support natural language rule certainly Turn changes, is compiled into java program language, writes code without user, i.e., without developer's manual compiling generation by profession Code, human cost are lower.
Firstly, the natural language rule that user writes is received, such as after the business rule for receiving user's sending generates request, It can provide an input interface and write natural language rule for user, user can upload the natural language rule write after the completion of writing Then, certainly, user can also directly upload the natural language rule that it has write.The natural language rule that user is uploaded turns It changes and is compiled into executable business rule file, specifically, being started according to natural language rule, that is, rule set Irl that user uploads Parsing carries out morphology configuration, grammer configuration, and the predetermined keyword remittance in the natural language rule of user's upload is packed into data Predetermined keyword remittance in natural language rule can be converted into corresponding code noun when morphology configures, such as natural language by structure Predetermined keyword remittance " age " in speech rule is convertible into corresponding code noun " age ", default in natural language rule Mark vocabulary " if " it is convertible into corresponding code noun " if ", the position that grammer can converge each predetermined keyword when configuring It is configured, to form the syntactic structure in program language.It can be according to the default mark in natural language rule in the present embodiment The natural language rule that user uploads is divided into if, then, else three classes by vocabulary, is carrying out morphology configuration, grammer with postponing, i.e., The natural language rule that user uploads can be converted into PRL file i.e. memory data structure, further, PRL file is added It is loaded into corresponding template and produces Java rule, wherein due to being divided into if, then, else three classes in advance, by PRL text Part loads the template into corresponding classification and produces Java rule, then by preset Deta bearer object BOM and generation Java rule, which is compiled, produces finally executable Java rule file.
Writing for business rule is separated with operation in the present embodiment, it, then will be regular using natural language redaction rule Collection compiling becomes program language.Operation system calls directly program language progress operation and obtains result.Utilize rule set, that is, PRL text Part and Deta bearer object BOM compiling generate finally executable Java rule file, after operation system initiates request, can lead to It crosses Deta bearer object BOM and carrys out the specific business datum of bearer service system, and execute Java rule file to be directed to business system The specific business datum applied business rule of system is handled.
Further, after finally executable Java rule file being generated in compiling, the executable Java of generation is advised It is then associated with the operation system of application, and is added after the executable Java rule of generation is carried out label to preset application Rule criterion library;The operation system includes credit card auditing system, adjuster system;When receive operation system sending When business rule calls label, is found from the preset application rule criterion library and call label is corresponding can with business rule Java rule is executed, and carries out business rule operation using the executable Java rule found out, operation result is back to described Operation system.Specifically, the Java rule file of generation can be added to preset application rule criterion library, if application rule mark Have the rule in quasi- library, be then updated, if not having, is added.And it is the Java rule file of generation is corresponding The operation system (such as label) of application is associated setting.Operation system need to use incoming business label and rule when rule to enter Ginseng searches in memory and otherwise returns to malloc failure malloc if it is present carrying out regular operation with the presence or absence of corresponding rule application. Specifically, operation system issues request, it include business label and business datum, application rule criterion library in memory is looked into It looks for, rule application corresponding with the business label of the operation system is Java rule file if it exists, then transfers the operation system Business datum to execute Java rule file, and regular application execution result is returned into the operation system;If no, returning Malloc failure malloc is returned, to realize the management of business rule.
Compared with prior art, the present embodiment is by extracting the default mark word in the natural language rule that user writes It converges and predetermined keyword is converged;It is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in the natural language rule, and will be pre- in the natural language rule If key vocabularies are converted to corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template; Filled Java rule template is compiled the executable Java rule of generation.Since the natural language that user writes can be advised Then automatic conversion, be compiled into executable Java rule, write code without user, i.e., without manually being compiled by the developer of profession Code is write, human cost is lower, and improves the efficiency for generating business rule.
As shown in Fig. 2, Fig. 2 is the application schematic diagram of one embodiment of generation system of business rule of the present invention.In a kind of tool In body application scenarios, in Fig. 2 left side be user write natural language rule " if: by the age of insurer be greater than 70, that , refusal;", the predetermined keyword extracted in the natural language rule that user writes is converged " age ", " refusal ", and mark is preset Vocabulary " if ", and it is converted into corresponding code noun " age ", " reject ", " if ", progress morphology configuration, grammer, which are matched, to be postponed, The natural language rule that user writes can be converted into the code " If (age > 70) { reject } " on right side in Fig. 2.
As shown in figure 3, Fig. 3 is the flow diagram of one embodiment of generation method of business rule of the present invention, business rule Generation method then the following steps are included:
Step S10 obtains the natural language rule that user writes;
Step S20, the default mark vocabulary and predetermined keyword extracted in the natural language rule converge;
Step S30 is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in the natural language rule, and will be pre- in the natural language rule If key vocabularies are converted to corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation by step S40.
In the present embodiment, the generation system of business rule receives the business rule that user issues and generates request, for example, receiving User generates request by the business rule that the terminals such as mobile phone, tablet computer, self-help terminal equipment are sent, and such as receives user in hand The business rule sent in preassembled client in the terminals such as machine, tablet computer, self-help terminal equipment generates request, or It is raw to receive the business rule that user sends on the browser in the terminals such as mobile phone, tablet computer, self-help terminal equipment At request.
After the business rule for receiving user's sending generates request, the natural language rule that user writes can be obtained;It extracts Out the default mark vocabulary in natural language rule (such as " if ", " so ", " otherwise " etc.) and predetermined keyword converge (such as " age ", " amount of money " etc.);According to predetermined default mark vocabulary and Java rule template (such as if rule mould Plate, then rule template, else rule template etc.) between mapping relations determine the pre- bidding in natural language rule Know the corresponding Java rule template of vocabulary, and the predetermined keyword remittance in the natural language rule is converted into corresponding generation Code, for example, predetermined keyword remittance " age " is converted to corresponding code " age ".The code of conversion is filled to determining Corresponding position in Java rule template;Filled Java rule template is compiled the executable Java rule of generation.Such as Preset Deta bearer object BOM and filled Java rule template can be compiled to the executable Java rule of generation Then.When operation system carries out business rule operation using the executable Java rule generated, receives the operation system and send Business datum;The business of the operation system is carried by the Deta bearer object BOM in the executable Java rule Data, and run the executable Java rule and carry out business rule operation to be directed to the business datum of carrying.
In the present embodiment, user is supported to use natural language redaction rule, the natural language rule that user is write is automatic It converts, be compiled into java program language, which is executable business rule file, by the executable business Rule file is associated configuration with corresponding operation system (such as credit card auditing system, adjuster system), and should Executable business rule file is stored in memory.It is asked in operation system such as credit card auditing system, adjuster system etc. When asking using business rule, it is passed to business code name, can search whether to have in memory associated corresponding with the operation system Business rule file, if so, then the operation system can call corresponding business rule file in memory to carry out business rule fortune It calculates, otherwise returns to malloc failure malloc.Writing for business rule is separated with operation in the present embodiment, can support natural language rule certainly Turn changes, is compiled into java program language, writes code without user, i.e., without developer's manual compiling generation by profession Code, human cost are lower.
Firstly, the natural language rule that user writes is received, such as after the business rule for receiving user's sending generates request, It can provide an input interface and write natural language rule for user, user can upload the natural language rule write after the completion of writing Then, certainly, user can also directly upload the natural language rule that it has write.The natural language rule that user is uploaded turns It changes and is compiled into executable business rule file, specifically, being started according to natural language rule, that is, rule set Irl that user uploads Parsing carries out morphology configuration, grammer configuration, and the predetermined keyword remittance in the natural language rule of user's upload is packed into data Predetermined keyword remittance in natural language rule can be converted into corresponding code noun when morphology configures, such as natural language by structure Predetermined keyword remittance " age " in speech rule is convertible into corresponding code noun " age ", default in natural language rule Mark vocabulary " if " it is convertible into corresponding code noun " if ", the position that grammer can converge each predetermined keyword when configuring It is configured, to form the syntactic structure in program language.It can be according to the default mark in natural language rule in the present embodiment The natural language rule that user uploads is divided into if, then, else three classes by vocabulary, is carrying out morphology configuration, grammer with postponing, i.e., The natural language rule that user uploads can be converted into PRL file i.e. memory data structure, further, PRL file is added It is loaded into corresponding template and produces Java rule, wherein due to being divided into if, then, else three classes in advance, by PRL text Part loads the template into corresponding classification and produces Java rule, then by preset Deta bearer object BOM and generation Java rule, which is compiled, produces finally executable Java rule file.
Writing for business rule is separated with operation in the present embodiment, it, then will be regular using natural language redaction rule Collection compiling becomes program language.Operation system calls directly program language progress operation and obtains result.Utilize rule set, that is, PRL text Part and Deta bearer object BOM compiling generate finally executable Java rule file, after operation system initiates request, can lead to It crosses Deta bearer object BOM and carrys out the specific business datum of bearer service system, and execute Java rule file to be directed to business system The specific business datum applied business rule of system is handled.
Further, after finally executable Java rule file being generated in compiling, the executable Java of generation is advised It is then associated with the operation system of application, and is added after the executable Java rule of generation is carried out label to preset application Rule criterion library;The operation system includes credit card auditing system, adjuster system;When receive operation system sending When business rule calls label, is found from the preset application rule criterion library and call label is corresponding can with business rule Java rule is executed, and carries out business rule operation using the executable Java rule found out, operation result is back to described Operation system.Specifically, the Java rule file of generation can be added to preset application rule criterion library, if application rule mark Have the rule in quasi- library, be then updated, if not having, is added.And it is the Java rule file of generation is corresponding The operation system (such as label) of application is associated setting.Operation system need to use incoming business label and rule when rule to enter Ginseng searches in memory and otherwise returns to malloc failure malloc if it is present carrying out regular operation with the presence or absence of corresponding rule application. Specifically, operation system issues request, it include business label and business datum, application rule criterion library in memory is looked into It looks for, rule application corresponding with the business label of the operation system is Java rule file if it exists, then transfers the operation system Business datum to execute Java rule file, and regular application execution result is returned into the operation system;If no, returning Malloc failure malloc is returned, to realize the management of business rule.
Compared with prior art, the present embodiment is by extracting the default mark word in the natural language rule that user writes It converges and predetermined keyword is converged;It is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in the natural language rule, and will be pre- in the natural language rule If key vocabularies are converted to corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template; Filled Java rule template is compiled the executable Java rule of generation.Since the natural language that user writes can be advised Then automatic conversion, be compiled into executable Java rule, write code without user, i.e., without manually being compiled by the developer of profession Code is write, human cost is lower, and improves the efficiency for generating business rule.
As shown in Fig. 2, in a kind of concrete application scene, left side is the natural language that user writes in Fig. 2 in the present embodiment Speech rule " if: it is greater than 70 by the age of insurer, refusal;", it extracts in the natural language rule that user writes Predetermined keyword converge " age ", " refusal ", preset identify vocabulary " if ", and be converted into corresponding code noun " age ", " reject ", " if " carries out morphology configuration, grammer with postponing, the natural language rule that user writes can be converted into Fig. 2 The code " If (age > 70) { reject } " on middle right side.
In addition, the computer-readable recording medium storage has the present invention also provides a kind of computer readable storage medium The generation system of the generation system of business rule, the business rule can be executed by least one processor so that it is described at least One processor executes the step of generation method such as the business rule in above-described embodiment, the generation method of the business rule Step S10, the specific implementation process such as S20, S30 are as described above, and details are not described herein.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to be realized by hardware, but very much In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing The part that technology contributes can be embodied in the form of software products, which is stored in a storage In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate Machine, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
Preferred embodiments of the present invention have been described above with reference to the accompanying drawings, not thereby limiting the scope of the invention.On It is for illustration only to state serial number of the embodiment of the present invention, does not represent the advantages or disadvantages of the embodiments.It is patrolled in addition, though showing in flow charts Sequence is collected, but in some cases, it can be with the steps shown or described are performed in an order that is different from the one herein.
Without departing from the scope and spirit of the invention, there are many variations to implement the present invention by those skilled in the art, It can be used for another embodiment for example as the feature of one embodiment and obtain another embodiment.It is all to use technology of the invention Made any modifications, equivalent replacements, and improvements within design, should all be within interest field of the invention.

Claims (10)

1. a kind of electronic device, which is characterized in that the electronic device includes memory, processor, is stored on the memory There is the generation system for the business rule that can be run on the processor, the generation system of the business rule is by the processor Following steps are realized when execution:
Obtain the natural language rule that user writes;
The default mark vocabulary and predetermined keyword extracted in the natural language rule converges;
The natural language is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in rule, and the predetermined keyword in the natural language rule is converged and is turned It is changed to corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation.
2. electronic device as described in claim 1, which is characterized in that if the default mark vocabulary include, so, it is no Then, corresponding Java rule template is if rule template, then rule template, else rule template.
3. electronic device as claimed in claim 1 or 2, which is characterized in that described to carry out filled Java rule template The step that compiling generates executable Java rule includes:
Preset Deta bearer object BOM and filled Java rule template are compiled the executable Java rule of generation Then;
The processor is also used to execute the generation system of the business rule, to perform the steps of
When operation system carries out business rule operation using the executable Java rule generated, receives the operation system and send Business datum;
The business datum of the operation system is carried by the Deta bearer object BOM in the executable Java rule, and The executable Java rule is run to be directed to the business datum of carrying and carry out business rule operation.
4. electronic device as claimed in claim 3, which is characterized in that the processor is also used to execute the business rule Generation system, to perform the steps of
The operation system of the executable Java rule of generation and application is associated, and by the executable Java rule of generation into It is added after line label to preset application rule criterion library;The operation system includes credit card auditing system, adjuster system System;
When the business rule for receiving operation system sending calls label, found from the preset application rule criterion library Executable Java rule corresponding with business rule calling label, and the executable Java rule found out is utilized to carry out business rule Operation result is back to the operation system by operation.
5. a kind of generation method of business rule, which is characterized in that the generation method of the business rule includes:
Obtain the natural language rule that user writes;
The default mark vocabulary and predetermined keyword extracted in the natural language rule converges;
The natural language is determined according to the mapping relations between predetermined default mark vocabulary and Java rule template The corresponding Java rule template of default mark vocabulary in rule, and the predetermined keyword in the natural language rule is converged and is turned It is changed to corresponding code, the code of conversion is filled into the corresponding position into determining Java rule template;
Filled Java rule template is compiled the executable Java rule of generation.
6. the generation method of business rule as claimed in claim 5, which is characterized in that the default mark vocabulary includes such as Fruit, so, otherwise, corresponding Java rule template are if rule template, then rule template, else rule template.
7. such as the generation method of business rule described in claim 5 or 6, which is characterized in that described to advise filled Java Then template, which is compiled, generates the step of executable Java rule and includes:
Preset Deta bearer object BOM and filled Java rule template are compiled the executable Java rule of generation Then.
8. the generation method of business rule as claimed in claim 7, which is characterized in that further include:
When operation system carries out business rule operation using the executable Java rule generated, receives the operation system and send Business datum;
The business datum of the operation system is carried by the Deta bearer object BOM in the executable Java rule, and The executable Java rule is run to be directed to the business datum of carrying and carry out business rule operation.
9. the generation method of business rule as claimed in claim 7, which is characterized in that further include:
The operation system of the executable Java rule of generation and application is associated, and by the executable Java rule of generation into It is added after line label to preset application rule criterion library;The operation system includes credit card auditing system, adjuster system System;
When the business rule for receiving operation system sending calls label, found from the preset application rule criterion library Executable Java rule corresponding with business rule calling label, and the executable Java rule found out is utilized to carry out business rule Operation result is back to the operation system by operation.
10. a kind of computer readable storage medium, which is characterized in that be stored with business rule on the computer readable storage medium Generation system then is realized when the generation system of the business rule is executed by processor such as any one of claim 5 to 9 institute The step of generation method for the business rule stated.
CN201810792774.0A 2018-07-18 2018-07-18 Generation method, electronic device and the readable storage medium storing program for executing of business rule Pending CN109144493A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810792774.0A CN109144493A (en) 2018-07-18 2018-07-18 Generation method, electronic device and the readable storage medium storing program for executing of business rule
PCT/CN2018/108211 WO2020015190A1 (en) 2018-07-18 2018-09-28 Method for generating business rule, electronic device, and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810792774.0A CN109144493A (en) 2018-07-18 2018-07-18 Generation method, electronic device and the readable storage medium storing program for executing of business rule

Publications (1)

Publication Number Publication Date
CN109144493A true CN109144493A (en) 2019-01-04

Family

ID=64800759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810792774.0A Pending CN109144493A (en) 2018-07-18 2018-07-18 Generation method, electronic device and the readable storage medium storing program for executing of business rule

Country Status (2)

Country Link
CN (1) CN109144493A (en)
WO (1) WO2020015190A1 (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231955A (en) * 2019-05-13 2019-09-13 平安科技(深圳)有限公司 Code process method, apparatus, computer equipment and storage medium
CN110825488A (en) * 2019-09-29 2020-02-21 山东中创软件工程股份有限公司 Business processing method and device, electronic equipment and storage medium
CN110851519A (en) * 2019-11-18 2020-02-28 上海新炬网络信息技术股份有限公司 Method for processing data through ETL tool based on NLP natural language
CN111078216A (en) * 2019-11-08 2020-04-28 泰康保险集团股份有限公司 Information display method and device, electronic equipment and computer readable medium
CN111722863A (en) * 2020-06-23 2020-09-29 上海冰鉴信息科技有限公司 Method and device for updating wind control model
CN112306497A (en) * 2020-11-03 2021-02-02 高炼 Method and system for converting natural language into program code
CN112394926A (en) * 2020-12-03 2021-02-23 钟月珠 Code bed system based on natural language model
CN112987653A (en) * 2019-12-17 2021-06-18 深圳市恒控科技有限公司 Method and device for converting Chinese program into G code
CN113934416A (en) * 2021-10-26 2022-01-14 山东同圆数字科技有限公司 Operation and maintenance management method and system based on graphical semantic policy programming
CN112306497B (en) * 2020-11-03 2024-04-26 高炼 Method and system for converting natural language into program code

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112348317B (en) * 2020-10-15 2023-06-20 中国城市规划设计研究院 Method and system for generating project planning conditions of smart city
CN116015955B (en) * 2023-01-04 2023-12-01 三峡高科信息技术有限责任公司 Configurable method for verifying validity security of uploading file in application system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377768A (en) * 2008-09-09 2009-03-04 金蝶软件(中国)有限公司 Method and system for calculating salary
CN101951604A (en) * 2010-08-16 2011-01-19 中兴通讯股份有限公司 Value added service processing method and device
CN103019726A (en) * 2012-12-19 2013-04-03 中国电子科技集团公司第十五研究所 Management method and device of software system service rules
CN103473696A (en) * 2013-09-03 2013-12-25 周吉 Method and system for collecting, analyzing and distributing internet business information
US20160292003A1 (en) * 2015-04-03 2016-10-06 Oracle International Corporation System and method for supporting object notation variables in a process defined by a process execution language for execution in a soa middleware environment
CN106126215A (en) * 2016-06-17 2016-11-16 深圳市麦斯杰网络有限公司 Business rule scenario generation method and device
EP3133489A1 (en) * 2015-08-18 2017-02-22 BMC Software, Inc. Extensibility of business logic shared across a business process orchestration engine, a rule engine, and a user interface
CN106649212A (en) * 2016-09-12 2017-05-10 济南浪潮高新科技投资发展有限公司 Business data processing method and device
CN107220058A (en) * 2017-06-05 2017-09-29 厦门美柚信息科技有限公司 The realization method and system of Business Rule Engine

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761858B2 (en) * 2004-04-23 2010-07-20 Microsoft Corporation Semantic programming language
WO2014086101A1 (en) * 2012-12-07 2014-06-12 Wan Jihua Method for translating natural language into computer language, semantic analyzer and human-computer dialogue system
CN108170661B (en) * 2016-12-07 2022-04-12 北京京东尚科信息技术有限公司 Method and system for managing rule text
CN108073392A (en) * 2017-12-29 2018-05-25 上海宽全智能科技有限公司 Intelligence programming method, equipment and storage medium based on natural language

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377768A (en) * 2008-09-09 2009-03-04 金蝶软件(中国)有限公司 Method and system for calculating salary
CN101951604A (en) * 2010-08-16 2011-01-19 中兴通讯股份有限公司 Value added service processing method and device
CN103019726A (en) * 2012-12-19 2013-04-03 中国电子科技集团公司第十五研究所 Management method and device of software system service rules
CN103473696A (en) * 2013-09-03 2013-12-25 周吉 Method and system for collecting, analyzing and distributing internet business information
US20160292003A1 (en) * 2015-04-03 2016-10-06 Oracle International Corporation System and method for supporting object notation variables in a process defined by a process execution language for execution in a soa middleware environment
EP3133489A1 (en) * 2015-08-18 2017-02-22 BMC Software, Inc. Extensibility of business logic shared across a business process orchestration engine, a rule engine, and a user interface
CN106126215A (en) * 2016-06-17 2016-11-16 深圳市麦斯杰网络有限公司 Business rule scenario generation method and device
CN106649212A (en) * 2016-09-12 2017-05-10 济南浪潮高新科技投资发展有限公司 Business data processing method and device
CN107220058A (en) * 2017-06-05 2017-09-29 厦门美柚信息科技有限公司 The realization method and system of Business Rule Engine

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李伟超等: "基于映射机制的业务规则生成系统", 《计算机工程与科学》 *
王新才等: "《基于业务规则的档案信息资源管理》", 30 December 2014 *
陈伟等: "面向SaaS应用的业务逻辑定制框架的研究与实现", 《计算机应用与研究》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110231955A (en) * 2019-05-13 2019-09-13 平安科技(深圳)有限公司 Code process method, apparatus, computer equipment and storage medium
CN110825488A (en) * 2019-09-29 2020-02-21 山东中创软件工程股份有限公司 Business processing method and device, electronic equipment and storage medium
CN111078216A (en) * 2019-11-08 2020-04-28 泰康保险集团股份有限公司 Information display method and device, electronic equipment and computer readable medium
CN111078216B (en) * 2019-11-08 2023-06-02 泰康保险集团股份有限公司 Information display method, information display device, electronic equipment and computer readable medium
CN110851519A (en) * 2019-11-18 2020-02-28 上海新炬网络信息技术股份有限公司 Method for processing data through ETL tool based on NLP natural language
CN112987653A (en) * 2019-12-17 2021-06-18 深圳市恒控科技有限公司 Method and device for converting Chinese program into G code
CN112987653B (en) * 2019-12-17 2022-04-15 深圳市恒控科技有限公司 Method and device for converting Chinese program into G code
CN111722863A (en) * 2020-06-23 2020-09-29 上海冰鉴信息科技有限公司 Method and device for updating wind control model
CN112306497A (en) * 2020-11-03 2021-02-02 高炼 Method and system for converting natural language into program code
CN112306497B (en) * 2020-11-03 2024-04-26 高炼 Method and system for converting natural language into program code
CN112394926A (en) * 2020-12-03 2021-02-23 钟月珠 Code bed system based on natural language model
CN113934416A (en) * 2021-10-26 2022-01-14 山东同圆数字科技有限公司 Operation and maintenance management method and system based on graphical semantic policy programming

Also Published As

Publication number Publication date
WO2020015190A1 (en) 2020-01-23

Similar Documents

Publication Publication Date Title
CN109144493A (en) Generation method, electronic device and the readable storage medium storing program for executing of business rule
WO2018000998A1 (en) Interface generation method, apparatus and system
CN102541638B (en) Resource management system and method
CN109617646B (en) Message conversion method and device, computer equipment and computer readable storage medium
CN109558525B (en) Test data set generation method, device, equipment and storage medium
CN109617647B (en) Message conversion method and device, computer equipment and computer readable storage medium
CN110728455B (en) Service processing method, service processing device, storage medium and electronic equipment
CN102087615A (en) Automated merger of logically associated messages in a message queue
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
CN107967135A (en) Computing engines implementation method, electronic device and storage medium
CN109471857A (en) Data modification method, device and storage medium based on SQL statement
CN110673839B (en) Distributed tool configuration construction generation method and system
CN102567455A (en) Method and system of managing documents using weighted prevalence data for statements
US20150278231A1 (en) System and method for customizing archive of a device driver generator tool for a user
CN109814896A (en) Server updating method, apparatus, computer system and readable storage system
CN113626223A (en) Interface calling method and device
CN107203372A (en) Control shows method and device
CN116992081A (en) Page form data processing method and device and user terminal
CN112667415A (en) Data calling method and device, readable storage medium and electronic equipment
US20140289742A1 (en) Method of sharing contents
CN107122491A (en) Method for data interaction
US10204165B2 (en) Network-based gathering of background information
CN115048187A (en) Operator-based pvc file importing method, device and storage medium
CN108509478B (en) Splitting and calling method of rule engine file, electronic device and storage medium
CN103248557A (en) Method and equipment for receiving and sending information

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190104