CN107797826B - Rule configuration method based on rule engine, terminal and equipment - Google Patents

Rule configuration method based on rule engine, terminal and equipment Download PDF

Info

Publication number
CN107797826B
CN107797826B CN201710357844.5A CN201710357844A CN107797826B CN 107797826 B CN107797826 B CN 107797826B CN 201710357844 A CN201710357844 A CN 201710357844A CN 107797826 B CN107797826 B CN 107797826B
Authority
CN
China
Prior art keywords
function
executable script
unit
configuration information
user
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.)
Active
Application number
CN201710357844.5A
Other languages
Chinese (zh)
Other versions
CN107797826A (en
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 CN201710357844.5A priority Critical patent/CN107797826B/en
Publication of CN107797826A publication Critical patent/CN107797826A/en
Priority to PCT/CN2018/083630 priority patent/WO2018210096A1/en
Application granted granted Critical
Publication of CN107797826B publication Critical patent/CN107797826B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a rule configuration method, a terminal and equipment based on a rule engine, wherein the method comprises the following steps: acquiring label configuration information input by a user; splicing the label configuration information into a corresponding JS function; generating an executable script by the JS function; loading the executable script into a local database; and if an execution instruction is received, acquiring and executing the executable script from the local database. The invention can flexibly configure the rules, has simple execution process of the rules, can realize the close combination of the rules in the rule engine and the data source, and meets the business requirements on the market.

Description

Rule configuration method based on rule engine, terminal and equipment
Technical Field
The invention relates to the technical field of computers, in particular to a rule configuration method based on a rule engine, a terminal and equipment.
Background
The rules engine, at the earliest, originated from an expert system in the field of artificial intelligence, which used a knowledge base to process business data and infer relevant conclusions. A rules engine is a software system that executes a set of business rules in a production runtime environment, which allows policy rules to be defined, tested, executed, and maintained apart from application code. The rule engine uses a rule language conforming to a specific grammar to define rules, usually the rules are separated from application codes, and a declarative mode is used for telling what needs to be done but not what to do, and the rule engine accepts data input, explains business rules and makes corresponding decisions according to the business rules.
Currently, rule engines are widely used in various markets, such as finance, communications, etc., to accommodate rapid changes in business in the markets. However, the rules in the rule engine in the current market are not tightly combined with the business logic of each market, nor tightly combined with the business data source of each market, and the execution implementation process of the rules is also complicated and cannot be flexibly configured, so that the business requirements of each market cannot be met by using the rules formulated in the current rule engine.
Disclosure of Invention
The embodiment of the invention provides a rule configuration method, a terminal and equipment based on a rule engine, which can flexibly configure rules, have simple rule execution process, can realize the close combination of the rules in the rule engine and a data source, and meet the business requirements on the market.
In one aspect, an embodiment of the present invention provides a rule configuration method based on a rule engine, where the method includes:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
and if an execution instruction is received, acquiring and executing the executable script from the local database.
Further, the acquiring tag configuration information input by the user includes:
providing a page icon for selection by a user, the page icon comprising one or more tabs;
providing a corresponding tag configuration page based on the tag selected by the user;
generating a corresponding tag configuration page based on the input of a user on the tag configuration page;
and acquiring the tag configuration information through the tag configuration page.
Further, the splicing the tag configuration information into a corresponding JS function includes:
acquiring field information in the label configuration information;
acquiring a label value and condition configuration information corresponding to the field information;
and splicing the label value and the condition configuration information into a corresponding JS function.
Further, the executable script includes a plurality of JS functions, and if an execution instruction is received, the executable script is obtained from the local database and executed, including:
if an execution instruction is received, the executable script is obtained from the local database;
executing each JS function in the executable script;
and acquiring and storing the execution result of each JS function.
Further, the method further comprises:
creating a JSON data file for a plurality of JS functions, wherein different JS functions correspond to the same JSON data file;
and generating an executable script from the JSON data file.
In another aspect, an embodiment of the present invention provides a rule configuration terminal based on a rule engine, where the terminal includes:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring tag configuration information input by a user;
the first splicing unit is used for splicing the label configuration information into a corresponding JS function;
the first generation unit is used for generating the JS function into an executable script;
a loading unit, configured to load the executable script into a local database;
and the first execution unit is used for acquiring and executing the executable script from the local database if an execution instruction is received.
Further, the first obtaining unit includes:
the device comprises a first providing unit, a second providing unit and a display unit, wherein the first providing unit is used for providing a page icon for a user to select, and the page icon comprises one or more tags;
the second providing unit is used for providing a corresponding tag configuration page based on the tag selected by the user;
the second generation unit is used for generating a corresponding tag configuration page based on the input of the user on the tag configuration page;
and the second acquisition unit is used for acquiring the tag configuration information through the tag configuration page.
Further, the first splicing unit comprises:
a third obtaining unit, configured to obtain field information in the tag configuration information;
a fourth obtaining unit, configured to obtain a tag value and conditional configuration information corresponding to the field information;
and the second splicing unit is used for splicing the label value and the condition configuration information into a corresponding JS function.
Further, the executable script includes a plurality of JS functions, and the first execution unit includes:
a fifth obtaining unit, configured to obtain the executable script from the local database if an execution instruction is received;
the second execution unit is used for executing each JS function in the executable script;
a sixth obtaining unit, configured to obtain and store an execution result of each JS function;
the method further comprises the following steps:
the creating unit is used for creating a JSON data file for the JS functions, and different JS functions correspond to the same JSON data file;
and the third generation unit is used for generating the JSON data file into an executable script.
On the other hand, the embodiment of the invention also provides rule configuration equipment based on the rule engine, wherein the memory is used for storing a program for realizing the rule configuration of the engine; and
a processor for executing a program stored in the memory that implements engine rule configuration to perform the following operations:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
and if an execution instruction is received, acquiring and executing the executable script from the local database.
In conclusion, the invention has the following beneficial effects: according to the embodiment of the invention, the label configuration information input by a user is obtained, the label configuration information is spliced into the corresponding JS function, the JS function is generated into the executable script, the executable script is loaded into the local database, and if an execution instruction is received, the executable script is obtained and executed from the local database, so that the rule configuration can be flexibly carried out, the execution process of the rule is simple, the tight combination of the rule in the rule engine and the data source can be realized, and the business requirement on the market is met.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flowchart of a rule configuration method based on a rule engine according to an embodiment of the present invention.
Fig. 2 is another schematic flowchart of a rule configuration method based on a rule engine according to an embodiment of the present invention.
Fig. 3 is a schematic display diagram of a page icon according to an embodiment of the present invention.
Fig. 4 is a schematic display diagram of a tag configuration page according to an embodiment of the present invention.
Fig. 5 is another schematic flowchart of a rule configuration method based on a rule engine according to an embodiment of the present invention.
Fig. 6 is another schematic flowchart of a rule configuration method based on a rule engine according to an embodiment of the present invention.
Fig. 7 is a schematic flowchart of a rule configuration method based on a rule engine according to another embodiment of the present invention.
Fig. 8 is a schematic block diagram of a rule configuration terminal based on a rule engine according to an embodiment of the present invention.
Fig. 9 is another schematic block diagram of a rule configuration terminal based on a rule engine according to an embodiment of the present invention.
Fig. 10 is another schematic block diagram of a rule configuration terminal based on a rule engine according to an embodiment of the present invention.
Fig. 11 is another schematic block diagram of a rule configuration terminal based on a rule engine according to an embodiment of the present invention.
Fig. 12 is another schematic block diagram of a rule configuration terminal based on a rule engine according to an embodiment of the present invention.
Fig. 13 is a schematic structural diagram of a rule configuration device based on a rule engine according to an embodiment of the present invention.
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 some, not all, embodiments of the present invention. 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.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a rule configuration method based on a rule engine according to an embodiment of the present invention. The method can be operated in terminals such as smart phones (such as Android phones, IOS phones and the like), tablet computers, notebook computers, smart devices and the like. The method mainly configures the rules in the rule engine, can realize flexible rule configuration, has simple execution process of the configured rules, and can realize the close combination of the rule engine and a data source so as to meet the business requirements on the market. As shown in fig. 1, the steps of the method include S101 to S105.
S101, obtaining label configuration information input by a user.
In the embodiment of the present invention, the tag configuration information is defined by a user, the user can edit the tag configuration information according to the service requirement, and the tag configuration information may include the following contents: a) label value, risk FLAG, weight, and color, etc.; b) and the condition configuration information is established for the content in the a), wherein the condition configuration information is composed of logical operators.
It should be noted that, in the rules in the existing rule engine, the user cannot flexibly configure the rules in combination with the own service types, so that the existing rule has a single means for processing the services; the rule in the embodiment of the invention can be used for editing the label configuration information by a user according to the service requirement so as to make the rule meeting the service content of the user.
Further, as shown in fig. 2, step S101 includes steps S201 to S204.
S201, providing a page icon for a user to select, wherein the page icon comprises one or more tags.
In the embodiment of the present invention, for example, as shown in fig. 3, a page icon G is provided for a user to select, a data field G1 corresponds to the page icon G, the data field G1 corresponds to one or more tags G2 associated with the data field G1, each tag G2 corresponds to a related operation G3, and the operation G3 may provide an editing operation of the corresponding tag G2 for the user to input corresponding tag configuration information.
S202, providing a corresponding tag configuration page based on the tags selected by the user.
In the embodiment of the present invention, each tab on a page icon corresponds to a related operation, and a user may select any tab on the page icon for operation, where the operation is an editing operation, for example, as shown in fig. 3, the user selects a tab for an account opening duration, and clicks the editing operation to enter a tab configuration page corresponding to the editing operation.
S203, generating a corresponding label configuration page based on the input of the user on the label configuration page.
In the embodiment of the present invention, a corresponding tag configuration page is generated according to a tag selected by a user, one tag corresponds to one tag configuration page, for example, as shown in fig. 4, the user selects an account opening time tag and clicks an editing operation to enter the tag configuration page H of the tag, and in the tag configuration page H of the account opening time, the user may edit configuration information of the tag, such as a tag value, a risk FLAG, a weight, a color, and the like, where the configuration information of the tag, such as the tag value, the risk FLAG, the weight, the color, and the like, may be selected or defined by the user, and in addition, the user may also edit condition configuration information of the tag, such as a judgment condition in fig. 4, where the judgment condition may be selected or defined by the user.
And S204, acquiring the tag configuration information through the tag configuration page.
In the embodiment of the present invention, the edited content for the tag, which is input by the user on the tag configuration page, is used as the configuration information of the tag, and the tag configuration information input on different tag configuration pages is different.
And S102, splicing the label configuration information into a corresponding JS function.
Further, as shown in fig. 5, step S102 includes steps S301 to S303.
S301, field information in the tag configuration information is obtained.
In the embodiment of the present invention, the field information in the tag configuration information is a data field corresponding to a tag and a tag name. For example, the data field in fig. 3 has basic information and verification, and the tag name has real-name authentication, number status, account opening duration, real-name authentication of bank card, validity period verification of identity card, or working address matching verification.
S302, obtaining the label value and the condition configuration information corresponding to the field information.
And S303, splicing the label value and the condition configuration information into a corresponding JS function.
In the embodiment of the present invention, specifically, the JS function is a Java Script function, and the tag value and the condition configuration information are assembled into the corresponding JS function, that is, by defining the Java Script function, the tag value and the condition configuration information are written into the defined Java Script function, and the call of the Java Script function is defined.
S103, generating the JS function into an executable script.
In the embodiment of the invention, the JS function is analyzed by using a script generation tool config.properties and a corresponding executable script is generated, the JS function can be placed in the same root directory as the JS function by using a script generation tool config.properties, and the JS function can also be placed in other paths, wherein the JS function can be configured, analyzed and a corresponding executable script is generated by using the script generation tool config.properties; if the JS function is placed under the same root directory as the config.properties, the config.properties acquiesces the JS function from the path of the same directory; if the JS function is placed in other paths, the user can set the placement path of the JS function through a path configuration file provided by config.properties so that the JS function is obtained by config.properties under the path set by the user; if the JS function is acquired by the config.properties, reading the content in the JS function into the memory, then analyzing the JS function to generate an executable script, presetting an analysis code in the config.properties, analyzing the JS function through the analysis code, and acquiring the content which should be acquired in the JS function in the analysis process according to the preset analysis code.
S104, loading the executable script into a local database.
In the embodiment of the present invention, the executable script is loaded into the local database, which specifically includes but is not limited to the following ways: the executable script is extracted into the local database by the data extraction component, for example, a user firstly establishes a database and a table in the local database, establishes a data extraction policy by the data extraction component, selects and fills an address where the executable script is located in the attribute setting option of the data extraction component, selects a table in the local database in the attribute setting option of the data extraction component, and can store the loaded executable script by the table, that is, load the executable script into the local database.
And S105, if an execution instruction is received, acquiring and executing the executable script from the local database.
Further, as shown in fig. 6, the executable script includes a plurality of JS functions, and step S105 includes steps S401 to S403.
S401, if an execution instruction is received, the executable script is obtained from the local database.
S402, executing each JS function in the executable script.
And S403, acquiring and saving the execution result of each JS function.
As can be seen from the above, in the embodiment of the present invention, by obtaining the tag configuration information input by the user, splicing the tag configuration information into the corresponding JS function, generating the executable script from the JS function, loading the executable script into the local database, and obtaining and executing the executable script from the local database if an execution instruction is received, the rule configuration can be flexibly performed, and the execution process of the rule is simple, so that the business requirements on the market are met.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a rule configuration method based on a rule engine according to a second embodiment of the present invention. The method can be operated in terminals such as smart phones (such as Android phones, IOS phones and the like), tablet computers, notebook computers, smart devices and the like. The method mainly configures the rules in the rule engine, can realize flexible rule configuration, has simple execution process of the configured rules, and can realize the close combination of the rule engine and a data source so as to meet the business requirements on the market. As shown in fig. 7, the steps of the method include S501 to S506.
S501, label configuration information input by a user is obtained.
In the embodiment of the present invention, the tag configuration information is defined by a user, the user can edit the tag configuration information according to the service requirement, and the tag configuration information may include the following contents: a) label value, risk FLAG, weight, and color, etc.; b) and the condition configuration information is established for the content in the a), wherein the condition configuration information is composed of logical operators.
It should be noted that, in the rules in the existing rule engine, the user cannot flexibly configure the rules in combination with the own service types, so that the existing rule has a single means for processing the services; the rule in the embodiment of the invention can be used for editing the label configuration information by a user according to the service requirement so as to make the rule meeting the service content of the user.
And S502, splicing the label configuration information into a corresponding JS function.
In the embodiment of the present invention, a tag value and condition configuration information in tag configuration information are obtained first, and then the obtained tag value and condition configuration information are assembled into a corresponding JS function, where the method for assembling the JS function specifically includes, but is not limited to, the following methods: by defining the Java Script function, the tag value and the condition configuration information are written into the defined JavaScript function, and the calling of the Java Script function is defined.
S503, creating a JSON data file for the JS functions, wherein different JS functions correspond to the same JSON data file.
In the embodiment of the invention, JSON data files corresponding to a plurality of JS functions are created, wherein different JS functions correspond to the same JSON data file, and data sources among different services can be combined by creating the JSON data files, so that the problem that the combination of rules in the current market and the data sources among different services in the market is not tight is solved.
And S504, generating an executable script from the JSON data file.
And S505, loading the executable script into a local database.
In the embodiment of the present invention, the executable script is loaded into the local database, which specifically includes but is not limited to the following ways: the executable script is extracted into the local database by the data extraction component, for example, a user firstly establishes a database and a table in the local database, establishes a data extraction policy by the data extraction component, selects and fills an address where the executable script is located in the attribute setting option of the data extraction component, selects a table in the local database in the attribute setting option of the data extraction component, and can store the loaded executable script by the table, that is, load the executable script into the local database.
S506, if the executable instruction is received, the executable script is obtained from the local database and executed.
As can be seen from the above, in the embodiment of the present invention, a JSON data file is created for a plurality of JSON functions, different JSON functions correspond to the same JSON data file, and the JSON data file is generated into an executable script, so that the rule in the rule engine can be tightly combined with the data source, and the problem of loose combination of the data source between the rule in the current market and each different service in the market is solved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
Referring to fig. 8, in response to the rule configuration method based on the rule engine, an embodiment of the present invention further provides a rule configuration terminal based on the rule engine, where the terminal 100 includes: the system comprises a first acquisition unit 101, a first assembling unit 102, a first generation unit 103, a loading unit 104 and a first execution unit 105.
The first obtaining unit 101 is configured to obtain tag configuration information input by a user.
And the first splicing unit 102 is configured to splice the tag configuration information into a corresponding JS function.
And a first generating unit 103, configured to generate the JS function into an executable script.
A loading unit 104, configured to load the executable script into a local database.
The first execution unit 105 is configured to, if an execution instruction is received, obtain and execute the executable script from the local database.
As shown in fig. 9, the first obtaining unit 101 includes:
a first providing unit 1011 for providing a page icon for the user to select, the page icon comprising one or more tags.
A second providing unit 1012, configured to provide a corresponding tab configuration page based on the tab selected by the user.
And a second generating unit 1013, configured to generate a corresponding tag configuration page based on an input of the tag configuration page by the user.
A second obtaining unit 1014, configured to obtain the tag configuration information through the tag configuration page.
As shown in fig. 10, the first splicing unit 102 includes:
a third obtaining unit 1021, configured to obtain field information in the tag configuration information.
A fourth obtaining unit 1022, configured to obtain the tag value and the condition configuration information corresponding to the field information.
And a second assembling unit 1023, configured to assemble the tag value and the condition configuration information into a corresponding JS function.
As shown in fig. 11, the first execution unit 105 includes:
a fifth obtaining unit 1051, configured to obtain the executable script from the local database if an execution instruction is received.
A second execution unit 1051, configured to execute each JS function in the executable script.
A sixth obtaining unit 1052, configured to obtain and save an execution result of each JS function.
Referring to fig. 12, in response to the rule configuration method based on the rule engine, an embodiment of the present invention further provides a rule configuration terminal based on the rule engine, where the terminal 200 includes: a first obtaining unit 201, a first assembling unit 202, a creating unit 203, a third generating unit 204, a loading unit 205, and a first executing unit 206.
The first obtaining unit 201 is configured to obtain tag configuration information input by a user.
And a first assembling unit 202, configured to assemble the tag configuration information into a corresponding JS function.
The creating unit 203 is configured to create a JSON data file for multiple JS functions, where different JSON functions correspond to the same JSON data file.
And a third generating unit 204, configured to generate an executable script from the JSON data file.
A loading unit 205, configured to load the executable script into a local database.
The first execution unit 206 is configured to, if an execution instruction is received, obtain and execute the executable script from the local database.
In terms of hardware implementation, the above first obtaining unit 101, the first assembling unit 102, the first generating unit 103, the loading unit 104, the first executing unit 105, and the like may be embedded in hardware or independent from the data processing apparatus, or may be stored in a memory of the data processing apparatus in a software form, so that the processor can call and execute operations corresponding to the above units. The processor can be a Central Processing Unit (CPU), a microprocessor, a singlechip and the like.
FIG. 13 is a schematic structural diagram of a rule configuration device based on a rule engine according to the present invention. As shown in fig. 13, the apparatus 300 may include: an input device 301, an output device 302, a transceiver 303, a memory 304, and a processor 305, wherein:
the input device 301 is configured to receive input data of an external access control apparatus. In a specific implementation, the input device 301 according to the embodiment of the present invention may include a keyboard, a mouse, an optical input device, a sound input device, a touch input device, a scanner, and the like.
The output device 302 is configured to output the output data of the access control apparatus to the outside. In a specific implementation, the output device 302 according to the embodiment of the present invention may include a display, a speaker, a printer, and the like.
The transceiver 303 is configured to transmit data to or receive data from other devices through a communication link. In a specific implementation, the transceiver 303 according to the embodiment of the present invention may include a transceiver device such as a radio frequency antenna.
The memory 304 is used for storing a program for implementing rule configuration based on the rule engine. In particular implementations, memory 304 of embodiments of the present invention may be system memory, such as volatile (e.g., RAM), non-volatile (e.g., ROM, flash memory, etc.), or some combination of the two. In particular implementations, the memory 304 of embodiments of the present invention may also be external storage outside the system, such as a magnetic disk, an optical disk, a magnetic tape, etc.
The processor 305 is configured to run a program stored in the memory to implement rule configuration based on a rule engine, and perform the following operations:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
and if an execution instruction is received, acquiring and executing the executable script from the local database.
Further, the acquiring tag configuration information input by the user includes:
providing a page icon for selection by a user, the page icon comprising one or more tabs;
providing a corresponding tag configuration page based on the tag selected by the user;
generating a corresponding tag configuration page based on the input of a user on the tag configuration page;
and acquiring the tag configuration information through the tag configuration page.
Further, the splicing the tag configuration information into a corresponding JS function includes:
acquiring field information in the label configuration information;
acquiring a label value and condition configuration information corresponding to the field information;
and splicing the label value and the condition configuration information into a corresponding JS function.
Further, the executable script includes a plurality of JS functions, and if an execution instruction is received, the executable script is obtained from the local database and executed, including:
if an execution instruction is received, the executable script is obtained from the local database;
executing each JS function in the executable script;
and acquiring and storing the execution result of each JS function.
Further, the processor 305 performs the following operations:
creating a JSON data file for a plurality of JS functions, wherein different JS functions correspond to the same JSON data file;
and generating an executable script from the JSON data file.
Those skilled in the art will appreciate that the embodiment of the rules engine based rule configuration device shown in FIG. 13 does not constitute a limitation on the specific construction of the rules engine based rule configuration device, and in other embodiments the rules engine based rule configuration device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. For example, in some embodiments, the rule configuration device based on the rule engine may only include a memory and a processor, and in such embodiments, the structures and functions of the memory and the processor are consistent with those of the embodiment shown in fig. 13, and are not described herein again.
The present invention provides a computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to perform the steps of:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
and if an execution instruction is received, acquiring and executing the executable script from the local database.
Further, the acquiring tag configuration information input by the user includes:
providing a page icon for selection by a user, the page icon comprising one or more tabs;
providing a corresponding tag configuration page based on the tag selected by the user;
generating a corresponding tag configuration page based on the input of a user on the tag configuration page;
and acquiring the tag configuration information through the tag configuration page.
Further, the splicing the tag configuration information into a corresponding JS function includes:
acquiring field information in the label configuration information;
acquiring a label value and condition configuration information corresponding to the field information;
and splicing the label value and the condition configuration information into a corresponding JS function.
Further, the executable script includes a plurality of JS functions, and if an execution instruction is received, the executable script is obtained from the local database and executed, including:
if an execution instruction is received, the executable script is obtained from the local database;
executing each JS function in the executable script;
and acquiring and storing the execution result of each JS function.
Further, the steps further include:
creating a JSON data file for a plurality of JS functions, wherein different JS functions correspond to the same JSON data file;
and generating an executable script from the JSON data file.
The foregoing storage medium of the present invention includes: various media that can store program codes, such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The elements of all embodiments of the present invention may be implemented by a general purpose integrated circuit, such as a CPU (central processing Unit), or by an ASIC (Application Specific integrated circuit).
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs.
The units in the terminal of the embodiment of the invention can be merged, divided and deleted according to actual needs.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A rule configuration method based on a rule engine is characterized by comprising the following steps:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
if an execution instruction is received, the executable script is obtained from the local database and executed;
wherein, the JS function is generated into an executable script, including
Analyzing the JS function by using a script generation tool config.properties and generating a corresponding executable script;
if the JS function is placed under the same root directory as the config.properties, the config.properties acquiesces the JS function from the path of the same directory;
if the JS function is placed in other paths, the user sets a placement path of the JS function through a path configuration file provided by config.properties so that the JS function is obtained by config.properties under the path set by the user;
and if the confirm, reading the content in the JS function into a memory, and then analyzing the JS function to generate an executable script.
2. The method of claim 1, wherein the obtaining of the tag configuration information input by the user comprises:
providing a page icon for selection by a user, the page icon comprising one or more tabs;
providing a corresponding tag configuration page based on the tag selected by the user;
generating a corresponding tag configuration page based on the input of a user on the tag configuration page;
and acquiring the tag configuration information through the tag configuration page.
3. The method of claim 1, wherein the assembling the tag configuration information into the corresponding JS function comprises:
acquiring field information in the label configuration information;
acquiring a label value and condition configuration information corresponding to the field information;
and splicing the label value and the condition configuration information into a corresponding JS function.
4. The method of claim 1, wherein the executable script comprises a plurality of JS functions, and wherein retrieving and executing the executable script from the local database if the execution instruction is received comprises:
if an execution instruction is received, the executable script is obtained from the local database;
executing each JS function in the executable script;
and acquiring and storing the execution result of each JS function.
5. The method of claim 1, wherein the method further comprises:
creating a JSON data file for a plurality of JS functions, wherein different JS functions correspond to the same JSON data file;
and generating an executable script from the JSON data file.
6. A rule configuration terminal based on a rule engine, the terminal comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring tag configuration information input by a user;
the first splicing unit is used for splicing the label configuration information into a corresponding JS function;
the first generation unit is used for generating the JS function into an executable script;
a loading unit, configured to load the executable script into a local database;
the first execution unit is used for acquiring and executing the executable script from the local database if an execution instruction is received;
the first generating unit is specifically configured to: analyzing the JS function by using a script generation tool config.properties and generating a corresponding executable script; if the JS function is placed under the same root directory as the config.properties, the config.properties acquiesces the JS function from the path of the same directory; if the JS function is placed in other paths, the user sets a placement path of the JS function through a path configuration file provided by config.properties so that the JS function is obtained by config.properties under the path set by the user; and if the confirm, reading the content in the JS function into a memory, and then analyzing the JS function to generate an executable script.
7. The terminal of claim 6, wherein the first obtaining unit comprises:
the device comprises a first providing unit, a second providing unit and a display unit, wherein the first providing unit is used for providing a page icon for a user to select, and the page icon comprises one or more tags;
the second providing unit is used for providing a corresponding tag configuration page based on the tag selected by the user;
the second generation unit is used for generating a corresponding tag configuration page based on the input of the user on the tag configuration page;
and the second acquisition unit is used for acquiring the tag configuration information through the tag configuration page.
8. The terminal of claim 6, wherein the first construction unit comprises:
a third obtaining unit, configured to obtain field information in the tag configuration information;
a fourth obtaining unit, configured to obtain a tag value and conditional configuration information corresponding to the field information;
and the second splicing unit is used for splicing the label value and the condition configuration information into a corresponding JS function.
9. The terminal of claim 6, wherein the executable script comprises a plurality of JS functions, and wherein the first execution unit comprises:
a fifth obtaining unit, configured to obtain the executable script from the local database if an execution instruction is received;
the second execution unit is used for executing each JS function in the executable script;
a sixth obtaining unit, configured to obtain and store an execution result of each JS function;
the terminal further comprises:
the creating unit is used for creating a JSON data file for the JS functions, and different JS functions correspond to the same JSON data file;
and the third generation unit is used for generating the JSON data file into an executable script.
10. A rules engine based rule configuration device, comprising:
a memory for storing a program for implementing the engine rule configuration; and
a processor for executing a program stored in the memory that implements engine rule configuration to perform the following operations:
acquiring label configuration information input by a user;
splicing the label configuration information into a corresponding JS function;
generating an executable script by the JS function;
loading the executable script into a local database;
if an execution instruction is received, the executable script is obtained from the local database and executed;
wherein, the JS function is generated into an executable script, including
Analyzing the JS function by using a script generation tool config.properties and generating a corresponding executable script;
if the JS function is placed under the same root directory as the config.properties, the config.properties acquiesces the JS function from the path of the same directory;
if the JS function is placed in other paths, the user sets a placement path of the JS function through a path configuration file provided by config.properties so that the JS function is obtained by config.properties under the path set by the user;
and if the confirm, reading the content in the JS function into a memory, and then analyzing the JS function to generate an executable script.
CN201710357844.5A 2017-05-19 2017-05-19 Rule configuration method based on rule engine, terminal and equipment Active CN107797826B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201710357844.5A CN107797826B (en) 2017-05-19 2017-05-19 Rule configuration method based on rule engine, terminal and equipment
PCT/CN2018/083630 WO2018210096A1 (en) 2017-05-19 2018-04-19 Rule engine-based rule configuration method, terminal and device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710357844.5A CN107797826B (en) 2017-05-19 2017-05-19 Rule configuration method based on rule engine, terminal and equipment

Publications (2)

Publication Number Publication Date
CN107797826A CN107797826A (en) 2018-03-13
CN107797826B true CN107797826B (en) 2020-03-17

Family

ID=61530302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710357844.5A Active CN107797826B (en) 2017-05-19 2017-05-19 Rule configuration method based on rule engine, terminal and equipment

Country Status (2)

Country Link
CN (1) CN107797826B (en)
WO (1) WO2018210096A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107797826B (en) * 2017-05-19 2020-03-17 平安科技(深圳)有限公司 Rule configuration method based on rule engine, terminal and equipment
CN108304591A (en) * 2018-03-16 2018-07-20 深圳市买买提信息科技有限公司 A kind of method for customizing of label, system and terminal device
CN108614862A (en) * 2018-03-28 2018-10-02 国家计算机网络与信息安全管理中心 Real-time tag treating method and apparatus based on stream calculation engine
CN108958871A (en) * 2018-07-03 2018-12-07 广州唯品会信息科技有限公司 Page configuration of opening an account method, apparatus, system and computer readable storage medium
CN110895463B (en) * 2018-09-13 2023-06-20 百度在线网络技术(北京)有限公司 Label processing method, device, equipment and computer readable storage medium
CN109446443B (en) * 2018-10-18 2021-11-09 武汉斗鱼网络科技有限公司 Label updating method, device, equipment and storage medium
CN109918048B (en) * 2018-12-27 2022-09-06 北京奇艺世纪科技有限公司 Target object extraction method, device and system and computer readable storage medium
CN110335079B (en) * 2019-07-02 2022-02-25 上海上湖信息技术有限公司 Intelligent task scheduling method and device based on instruction set
CN111552506B (en) * 2020-02-24 2023-09-12 远景智能国际私人投资有限公司 Service rule configuration method, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117202A (en) * 2009-12-30 2011-07-06 北大方正集团有限公司 J2EE architecture-based code generating device
CN105446799A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Method and system for performing rule management in computer system
CN106055716A (en) * 2016-07-13 2016-10-26 北京智网易联科技有限公司 Method and equipment for automatically generating website

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7975232B2 (en) * 2005-10-31 2011-07-05 Sap Ag Systems and methods for extensible document generation
US8463606B2 (en) * 2009-07-13 2013-06-11 Genesys Telecommunications Laboratories, Inc. System for analyzing interactions and reporting analytic results to human-operated and system interfaces in real time
CN104331288B (en) * 2014-10-31 2017-08-01 北京思特奇信息技术股份有限公司 A kind of configurationization shows the method and system of dynamic page
CN107797826B (en) * 2017-05-19 2020-03-17 平安科技(深圳)有限公司 Rule configuration method based on rule engine, terminal and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117202A (en) * 2009-12-30 2011-07-06 北大方正集团有限公司 J2EE architecture-based code generating device
CN105446799A (en) * 2014-08-22 2016-03-30 阿里巴巴集团控股有限公司 Method and system for performing rule management in computer system
CN106055716A (en) * 2016-07-13 2016-10-26 北京智网易联科技有限公司 Method and equipment for automatically generating website

Also Published As

Publication number Publication date
WO2018210096A1 (en) 2018-11-22
CN107797826A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN107797826B (en) Rule configuration method based on rule engine, terminal and equipment
CN111104635B (en) Method and device for generating form webpage
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
WO2014204987A1 (en) Method and apparatus for customized software development kit (sdk) generation
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN109754072B (en) Processing method of network offline model, artificial intelligence processing device and related products
RU2639667C2 (en) Context invitation in trial version of application
CN111033465B (en) Terminal device, UI extension method, and recording medium
CN110633959A (en) Method, device, equipment and medium for creating approval task based on graph structure
CN111414739A (en) Excel data entry component, entry method and device
CN112306471A (en) Task scheduling method and device
CN114444935A (en) Processing method, device and equipment for customizing online workflow and storage medium
CN113741860A (en) Data processing method and device based on RPA robot
CN106293658A (en) A kind of interface assembly generates method and equipment thereof
CN111443945B (en) Component code modification method and device
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
CN115509668A (en) Method, device and equipment for constructing front-end page analytic framework and storage medium
KR101734306B1 (en) Multi program code automatic developing system
CN111078215B (en) Software product application method and device, storage medium and electronic equipment
CN114546375A (en) Page configuration method, page configuration device and electronic equipment
CN113705182A (en) Contract online generation method and device and readable storage medium
CN113312900A (en) Data verification method and device
CN113144619A (en) Method and system for visually configuring dynamic function
CN112486484A (en) Webpage version generation method and device
CN112714148A (en) Interface configuration method, device, equipment and 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
GR01 Patent grant
GR01 Patent grant