WO2018210096A1 - Rule engine-based rule configuration method, terminal and device, and storage medium - Google Patents

Rule engine-based rule configuration method, terminal and device, and storage medium Download PDF

Info

Publication number
WO2018210096A1
WO2018210096A1 PCT/CN2018/083630 CN2018083630W WO2018210096A1 WO 2018210096 A1 WO2018210096 A1 WO 2018210096A1 CN 2018083630 W CN2018083630 W CN 2018083630W WO 2018210096 A1 WO2018210096 A1 WO 2018210096A1
Authority
WO
WIPO (PCT)
Prior art keywords
configuration information
executable script
label
user
rule
Prior art date
Application number
PCT/CN2018/083630
Other languages
French (fr)
Chinese (zh)
Inventor
李志国
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2018210096A1 publication Critical patent/WO2018210096A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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

Landscapes

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

Abstract

Disclosed in an embodiment of the present invention are a rule engine-based rule configuration method, terminal and device, and a storage medium. The method comprises: acquiring tag configuration information inputted by a user; combining the tag configuration information to form a corresponding JS function; generating an executable script from the JS function; loading the executable script to a local database; and if an execution instruction has been received, acquiring the executable script from the local database, and executing the same. The present invention can flexibly configure a rule, requires a simple process of executing the rule, and can realize close integration of a rule in a rule engine with a data source, thereby satisfying market service requirements.

Description

一种基于规则引擎的规则配置方法、终端、设备以及存储介质Rule engine based rule configuration method, terminal, device and storage medium
本申请要求于2017年5月19日提交中国专利局、申请号为CN 201710357844.5、申请名称为“一种基于规则引擎的规则配置方法、终端以及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on May 19, 2017, the Chinese Patent Office, the application number is CN 201710357844.5, and the application name is "a rule engine-based rule configuration method, terminal and device". This is incorporated herein by reference.
技术领域Technical field
本申请涉及计算机技术领域,尤其涉及一种基于规则引擎的规则配置方法、终端、设备以及存储介质。The present application relates to the field of computer technologies, and in particular, to a rule engine-based rule configuration method, a terminal, a device, and a storage medium.
背景技术Background technique
规则引擎,最早来源于人工智能领域内的专家系统,专家系统使用知识库处理业务数据并推断相关的结论。规则引擎是在生产运行环境执行一组商业规则的软件系统,它使得政策规则可以脱离应用代码进行定义、测试、执行以及维护。规则引擎使用符合特定语法的规则语言进行规则的定义,通常规则和应用代码分离,并且使用申明式的方式告诉“需要做什么”,而不是“怎么做”,规则引擎接受数据输入、解释业务规则、并根据业务规则作出相应的决策。The rule engine, originally derived from expert systems in the field of artificial intelligence, uses the 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 that allows policy rules to be defined, tested, executed, and maintained from the application code. The rules engine uses a rule language that conforms to a specific grammar to define the rules. Usually the rules are separated from the application code, and the affirmative way is used to tell "what needs to be done" instead of "how to do it". The rules engine accepts data input and interprets business rules. And make corresponding decisions based on business rules.
目前,规则引擎在各个市场被广泛使用,例如金融、通信等,以适应市场中业务的快速变化。但是目前市场上规则引擎中的规则与各个市场的业务逻辑结合并不紧密,与各个市场的业务数据源结合也不紧密,而且规则的执行实现过程也很复杂、无法灵活配置,这就导致利用现有规则引擎中所制定的规则无法满足各个市场的业务需求。Currently, rule engines are widely used in various markets, such as finance, communications, etc., to adapt to rapid changes in business in the market. However, the rules in the rule engine on the market are not closely integrated with the business logic of each market. The integration of business data sources in various markets is not tight, and the implementation process of rules is complicated and cannot be flexibly configured. The rules established in the existing rules engine cannot meet the business needs of each market.
发明内容Summary of the invention
本申请实施例提供一种基于规则引擎的规则配置方法、终端、设备以及存储介质,可以灵活地进行规则配置,并且规则的执行过程简单,还可以实现规则引擎中的规则与数据源的紧密结合,满足了市场上的业务需求。The embodiment of the present application provides a rule-based rule configuration method, a terminal, a device, and a storage medium, which can flexibly perform rule configuration, and the rule execution process is simple, and the rules and rules in the rule engine can be closely integrated. To meet the business needs of the market.
一方面,本申请实施例提供了一种基于规则引擎的规则配置方法,该方法包括:In one aspect, the embodiment of the present application provides a rule engine-based rule configuration method, where the method includes:
获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
另一方面,本申请实施例提供了一种基于规则引擎的规则配置终端,该终端包括:On the other hand, the embodiment of the present application provides a rule-based rule configuration terminal, and the terminal includes:
第一获取单元,用于获取用户输入的标签配置信息;a first acquiring unit, configured to acquire label configuration information input by the user;
第一拼装单元,用于将所述标签配置信息拼装成相对应的JS函数;a first assembling unit, configured to assemble the label configuration information into a corresponding JS function;
第一生成单元,用于将所述JS函数生成可执行脚本;a first generating unit, configured to generate an executable script by using the JS function;
加载单元,用于将所述可执行脚本加载至本地数据库中;a loading unit, configured to load the executable script into a local database;
第一执行单元,用于若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The first execution unit is configured to acquire and execute the executable script from the local database if an execution instruction is received.
又一方面,本申请实施例还提供一种基于规则引擎的规则配置设备,存储器,用于存储实现引擎规则配置的程序;以及In another aspect, the embodiment of the present application further provides a rule-based rule configuration device, and a memory, configured to store a program for implementing engine rule configuration;
处理器,用于运行所述存储器中存储的实现引擎规则配置的程序,以执行以下操作:a processor for running a program implemented in the memory that implements an engine rule configuration to perform the following operations:
获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
再一方面,本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者一个以上计算机程序,所述一个或者一个以上计算机程序可被一个或者一个以上的处理器执行,以实现以下步骤:In still another aspect, an embodiment of the present application further provides a computer readable storage medium, where the one or more computer programs are stored, and the one or more computer programs can be processed by one or more Executed to implement the following steps:
获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
本申请实施例可以灵活地进行规则配置,并且规则的执行过程简单,还可以实现规则引擎中的规则与数据源的紧密结合,满足了市场上的业务需求。The embodiment of the present application can flexibly perform rule configuration, and the rule execution process is simple, and the rules in the rule engine are closely combined with the data source to meet the business requirements in the market.
附图说明DRAWINGS
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the description of the embodiments will be briefly described below. Obviously, the drawings in the following description are some embodiments of the present application, For the ordinary technicians, other drawings can be obtained based on these drawings without any creative work.
图1是本申请实施例提供的一种基于规则引擎的规则配置方法的示意流程图。FIG. 1 is a schematic flowchart of a rule engine-based rule configuration method according to an embodiment of the present application.
图2是本申请实施例提供的一种基于规则引擎的规则配置方法的另一示意流程图。FIG. 2 is another schematic flowchart of a rule engine-based rule configuration method according to an embodiment of the present application.
图3是本申请实施例所述页面图标的显示示意图。FIG. 3 is a schematic diagram of displaying a page icon according to an embodiment of the present application.
图4是本申请实施例所述标签配置页面的显示示意图。4 is a schematic diagram of display of a label configuration page according to an embodiment of the present application.
图5是本申请实施例提供的一种基于规则引擎的规则配置方法的另一示意流程图。FIG. 5 is another schematic flowchart of a rule engine-based rule configuration method according to an embodiment of the present application.
图6是本申请实施例提供的一种基于规则引擎的规则配置方法的另一示意流程图。FIG. 6 is another schematic flowchart of a rule engine-based rule configuration method according to an embodiment of the present application.
图7是本申请另一实施例提供的一种基于规则引擎的规则配置方法的示意流程图。FIG. 7 is a schematic flowchart of a rule engine-based rule configuration method according to another embodiment of the present application.
图8是本申请实施例提供的一种基于规则引擎的规则配置终端的示意性框图。FIG. 8 is a schematic block diagram of a rule-based rule configuration terminal according to an embodiment of the present application.
图9是本申请实施例提供的一种基于规则引擎的规则配置终端的另一示意性框图。FIG. 9 is another schematic block diagram of a rule-based rule-configured terminal according to an embodiment of the present application.
图10是本申请实施例提供的一种基于规则引擎的规则配置终端的另一示意性框图。FIG. 10 is another schematic block diagram of a rule-based rule-configured terminal according to an embodiment of the present application.
图11是本申请实施例提供的一种基于规则引擎的规则配置终端的另一示意性框图。FIG. 11 is another schematic block diagram of a rule-based rule-configured terminal according to an embodiment of the present application.
图12是本申请实施例提供的一种基于规则引擎的规则配置终端的另一示意性框图。FIG. 12 is another schematic block diagram of a rule-based rule-configured terminal according to an embodiment of the present application.
图13是本申请实施例提供的一种基于规则引擎的规则配置设备的结构组成示意图。FIG. 13 is a schematic structural diagram of a rule-based rule configuration device according to an embodiment of the present application.
具体实施方式detailed description
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the drawings in the embodiments of the present application. It is obvious that the described embodiments are a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The use of the terms "comprising", "comprising", "","," The presence or addition of a plurality of other features, integers, steps, operations, elements, components, and/or collections thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。The terminology used herein is for the purpose of describing particular embodiments and is not intended to be limiting. As used in the specification and the appended claims, the claims
请参阅图1,图1是本申请实施例一提供的一种基于规则引擎的规则配置方法的示意图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。该方法主要是对规则引擎中的规则进行配置,可以实现灵活地规则配置,所配置的规则执行过程简单,还可以实现规则引擎与数据源的紧密结合,以满足了市场上的业务需求。如图1所示,该方法的步骤包括S101~S105。Referring to FIG. 1 , FIG. 1 is a schematic diagram of a rule engine-based rule configuration method according to Embodiment 1 of the present application. The method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. The method is mainly for configuring rules in the rule engine, and can implement flexible rule configuration. The configured rules are simple to execute, and the rules engine and the data source can be closely combined to meet the business requirements in the market. As shown in FIG. 1, the steps of the method include S101 to S105.
S101,获取用户输入的标签配置信息。S101. Obtain label configuration information input by a user.
在本申请实施例中,所述标签配置信息由用户自行定义,用户可以根据业务的需要编辑标签配置信息,所述标签配置信息可以包括以下内容:a)标签值、风险FLAG、权重以及颜色等等;b)针对a)中的内容进行制定的条件配置信息,其中,条件配置信息由逻辑运算符构成。In the embodiment of the present application, the label configuration information is defined by the user, and the user can edit the label configuration information according to the needs of the service. The label configuration information may include the following contents: a) label value, risk FLAG, weight, color, and the like. And b) conditional configuration information that is formulated for the content in a), wherein the conditional configuration information is composed of logical operators.
需要说明的是,现有的规则引擎中的规则,用户无法对规则结合自己的业务类型进行灵活配置,导致现有的规则处理业务的手段单一;本申请实施例中的规则,可以根据业务的需要由用户自行编辑标签配置信息,以制定出满足自 身业务内容的规则。It should be noted that the rules in the existing rule engine cannot be flexibly configured by the user in combination with the service type of the rule, and the existing rule processing service is single. The rules in the embodiment of the present application may be based on the service. The user needs to edit the label configuration information to create a rule that satisfies the content of the business.
进一步地,如图2所示,步骤S101包括步骤S201~S204。Further, as shown in FIG. 2, step S101 includes steps S201 to S204.
S201,提供页面图标以供用户选择,所述页面图标包括一项或者多项标签。S201. A page icon is provided for selection by a user, and the page icon includes one or more tags.
在本申请实施例中,例如图3所示,提供页面图标G供用户选择,在页面图标G中对应一项数据栏位G1,该数据栏位G1对应与数据栏位G1相关的一项或者多项标签G2,每一项标签G2均对应相关的操作G3,操作G3可以为用户提供相对应的标签G2的编辑操作,以供用户输入相对应的标签配置信息。In the embodiment of the present application, for example, as shown in FIG. 3, a page icon G is provided for user selection, and a page data G corresponds to a data field G1 corresponding to an item related to the data field G1 or The plurality of labels G2, each of the labels G2 corresponds to the related operation G3, and the operation G3 can provide the user with the corresponding editing operation of the label G2 for the user to input the corresponding label configuration information.
S202,基于用户所选择的标签,提供相应的标签配置页面。S202. Provide a corresponding label configuration page based on the label selected by the user.
在本申请实施例中,页面图标上的每一项标签均对应相关的操作,用户可以选择页面图标上的任意标签进行操作,该操作为编辑操作,例如图3所示,用户选择开户时长的标签,并点击编辑操作进入与该编辑操作相对应的标签配置页面。In the embodiment of the present application, each item on the page icon corresponds to a related operation, and the user can select any label on the page icon to perform an operation, and the operation is an editing operation, for example, as shown in FIG. 3, the user selects an account opening time. Label and click the edit operation to enter the label configuration page corresponding to the edit operation.
S203,基于用户在标签配置页面的输入,生成相对应的标签配置页面。S203. Generate a corresponding label configuration page based on the input of the user on the label configuration page.
在本申请实施例中,根据用户所选择的标签生成相对应的标签配置页面,一项标签对应一个标签配置页面,例如图4所示,用户选择了开户时长标签标并点击编辑操作后进入该标签的标签配置页面H,在开户时长的标签配置页面H中,用户可以编辑标签的配置信息如标签值、风险FLAG、权重以及颜色等,其中标签的配置信息中如标签值、风险FLAG、权重以及颜色等可以由用户自行选择或者定义,另外,用户还可以编辑标签的条件配置信息,如图4中的判断条件,其中判断条件可以由用户自行选择或者定义。In the embodiment of the present application, a corresponding label configuration page is generated according to the label selected by the user, and one label corresponds to one label configuration page. For example, as shown in FIG. 4, the user selects the account opening time label and clicks the editing operation to enter the label. The tag configuration page H of the tag, in the tag configuration page H of the account opening time, the user can edit the tag configuration information such as the tag value, the risk FLAG, the weight, and the color, etc., wherein the tag configuration information includes the tag value, the risk FLAG, and the weight. The color and the like can be selected or defined by the user. In addition, the user can also edit the conditional configuration information of the tag, as shown in the determination condition in FIG. 4, wherein the determination condition can be selected or defined by the user.
S204,通过所述标签配置页面获取所述标签配置信息。S204. Obtain the label configuration information by using the label configuration page.
在本申请实施例中,将用户在所述标签配置页面上输入的针对所述标签的编辑内容作为所述标签的配置信息,不同的标签配置页面上输入的标签配置信息不相同。In the embodiment of the present application, the edited content for the label input by the user on the label configuration page is used as the configuration information of the label, and the label configuration information input on different label configuration pages is different.
S102,将所述标签配置信息拼装成相对应的JS函数。S102. Assemble the tag configuration information into a corresponding JS function.
进一步地,如图5所示,步骤S102包括步骤S301~S303。Further, as shown in FIG. 5, step S102 includes steps S301 to S303.
S301,获取标签配置信息中的字段信息。S301. Obtain field information in the label configuration information.
在本申请实施例中,所述标签配置信息中的字段信息为标签对应的数据栏位、标签名称。例如,在图3中的数据栏位有基础信息及验证,标签名称有身份实名认证、号码状态、开户时长、银行卡实名认证、身份证有效期验证或者 工作地址匹配验证。In the embodiment of the present application, the field information in the label configuration information is a data field and a label name corresponding to the label. For example, the data field in Figure 3 has basic information and verification. The tag name has identity real name authentication, number status, account opening time, bank card real name authentication, ID card validity period verification, or work address matching verification.
S302,获取与所述字段信息相对应的标签值和条件配置信息。S302. Obtain a label value and condition configuration information corresponding to the field information.
S303,将所述标签值和条件配置信息拼装成相对应的JS函数。S303. Assemble the tag value and the condition configuration information into a corresponding JS function.
在本申请实施例中,具体地,所述JS函数为Java Script函数,所述将标签值和条件配置信息拼装成相对应的JS函数,即,通过定义Java Script函数,将标签值和条件配置信息写入所定义的Java Script函数中,并定义Java Script函数的调用。In the embodiment of the present application, specifically, the JS function is a Java Script function, and the label value and the condition configuration information are assembled into a corresponding JS function, that is, the label value and the condition are configured by defining a Java Script function. Information is written into the defined Java Script function and defines the call to the Java Script function.
S103,将所述JS函数生成可执行脚本。S103. Generate the executable script by using the JS function.
在本申请实施例中,通过利用脚本生成工具config.properties将所述JS函数进行解析并生成相对应的可执行脚本,可以将所述JS函数放置在与脚本生成工具config.properties相同根目录下,也可以将所述JS函数放置在其它路径下,其中,脚本生成工具config.properties能够对JS函数进行配置、解析并生成相对应的可执行脚本;若将所述JS函数放置在与config.properties相同根目录下,config.properties默认从与其相同目录的路径下获取JS函数;若将所述JS函数放置在其它路径中,用户可以通过config.properties提供的路径配置文件设置JS函数的放置路径以使config.properties在用户所设置的路径下获取JS函数;若config.properties获取到JS函数后,将JS函数中的内容读入内存,然后对所述JS函数进行解析并生成可执行脚本,在config.properties中预设有解析代码,通过解析代码对所述JS函数进行解析,按照预设的解析代码在解析过程中获取JS函数中应该获取的内容。In the embodiment of the present application, the JS function can be parsed by using the script generation tool config.properties to generate a corresponding executable script, and the JS function can be placed in the same root directory as the script generation tool config.properties. The JS function can also be placed in other paths, wherein the script generation tool config.properties can configure, parse, and generate a corresponding executable script for the JS function; if the JS function is placed in the config. In the same root directory of properties, config.properties defaults to get the JS function from the path of the same directory; if the JS function is placed in another path, the user can set the JS function placement path through the path configuration file provided by config.properties. So that config.properties gets the JS function in the path set by the user; if config.properties gets the JS function, reads the contents of the JS function into memory, and then parses the JS function and generates an executable script. The parsing code is pre-configured in config.properties, and the JS function is parsed by parsing the code. Parsing code according to a predetermined function JS acquires the content should be acquired in the resolution process.
S104,将所述可执行脚本加载至本地数据库中。S104. Load the executable script into a local database.
在本申请实施例中,将所述可执行脚本加载至本地数据库中,具体包括但不限于以下方式:通过数据提取构件把所述可执行脚本提取到本地数据库中,例如,用户先在本地数据库中建立数据库和表格,通过数据提取构件建立数据提取策略,在数据提取构件的属性设置选项中选择并填写所述可执行脚本所在的地址,在数据提取构件的属性设置选项中选择本地数据库中的表格,通过该表格可以存储所加载的所述可执行脚本,即,将所述可执行脚本加载至本地数据库中。In the embodiment of the present application, the executable script is loaded into a local database, including but not limited to the following manner: extracting the executable script into a local database by using a data extraction component, for example, the user first in the local database Establish a database and a table, establish a data extraction strategy through the data extraction component, select and fill in the address of the executable script in the property setting option of the data extraction component, and select the local database in the property setting option of the data extraction component. a form by which the executable script loaded can be stored, ie, the executable script is loaded into a local database.
S105,若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。S105. If an execution instruction is received, the executable script is obtained and executed from the local database.
进一步地,如图6所示,所述可执行脚本包括多个JS函数,步骤S105包括步骤S401~S403。Further, as shown in FIG. 6, the executable script includes a plurality of JS functions, and step S105 includes steps S401 to S403.
S401,若接收到执行指令,从所述本地数据库中获取所述可执行脚本。S401. Acquire the executable script from the local database if an execution instruction is received.
S402,执行所述可执行脚本中的每一个JS函数。S402. Execute each JS function in the executable script.
S403,获取并保存所述每一个JS函数的执行结果。S403. Acquire and save an execution result of each of the JS functions.
由以上可见,本申请实施例通过获取用户输入的标签配置信息,将所述标签配置信息拼装成相对应的JS函数,将所述JS函数生成可执行脚本,将所述可执行脚本加载至本地数据库中,若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本,可以灵活地进行规则配置,并且规则的执行过程简单,满足了市场上的业务需求。It can be seen from the above that the embodiment of the present application obtains the label configuration information input by the user, assembles the label configuration information into a corresponding JS function, generates an executable script by the JS function, and loads the executable script to the local In the database, if an execution instruction is received, the executable script is obtained and executed from the local database, the rules can be flexibly configured, and the execution process of the rules is simple, and the business requirements in the market are met.
请参阅图7,图7是本申请实施例二提供的一种基于规则引擎的规则配置方法的示意图。该方法可以运行在智能手机(如Android手机、IOS手机等)、平板电脑、笔记本电脑以及智能设备等终端中。该方法主要是对规则引擎中的规则进行配置,可以实现灵活地规则配置,所配置的规则执行过程简单,还可以实现规则引擎与数据源的紧密结合,以满足了市场上的业务需求。如图7所示,该方法的步骤包括S501~S506。Referring to FIG. 7, FIG. 7 is a schematic diagram of a rule engine-based rule configuration method according to Embodiment 2 of the present application. The method can be run on terminals such as smart phones (such as Android phones, IOS phones, etc.), tablets, laptops, and smart devices. The method is mainly for configuring rules in the rule engine, and can implement flexible rule configuration. The configured rules are simple to execute, and the rules engine and the data source can be closely combined to meet the business requirements in the market. As shown in FIG. 7, the steps of the method include S501 to S506.
S501,获取用户输入的标签配置信息。S501. Obtain label configuration information input by a user.
在本申请实施例中,所述标签配置信息由用户自行定义,用户可以根据业务的需要编辑标签配置信息,所述标签配置信息可以包括以下内容:a)标签值、风险FLAG、权重以及颜色等等;b)针对a)中的内容进行制定的条件配置信息,其中,条件配置信息由逻辑运算符构成。In the embodiment of the present application, the label configuration information is defined by the user, and the user can edit the label configuration information according to the needs of the service. The label configuration information may include the following contents: a) label value, risk FLAG, weight, color, and the like. And b) conditional configuration information that is formulated for the content in a), wherein the conditional configuration information is composed of logical operators.
需要说明的是,现有的规则引擎中的规则,用户无法对规则结合自己的业务类型进行灵活配置,导致现有的规则处理业务的手段单一;本申请实施例中的规则,可以根据业务的需要由用户自行编辑标签配置信息,以制定出满足自身业务内容的规则。It should be noted that the rules in the existing rule engine cannot be flexibly configured by the user in combination with the service type of the rule, and the existing rule processing service is single. The rules in the embodiment of the present application may be based on the service. The user needs to edit the label configuration information to create a rule that satisfies the content of the business.
S502,将所述标签配置信息拼装成相对应的JS函数。S502. The label configuration information is assembled into a corresponding JS function.
在本申请实施例中,先获取标签配置信息中的标签值和条件配置信息,再将所获取的标签值和条件配置信息拼装成相对应的JS函数,拼装成JS函数的方式具体包括但不限于以下方式:通过定义Java Script函数,将标签值和条件配置信息写入所定义的Java Script函数中,并定义Java Script函数的调用。In the embodiment of the present application, the label value and the condition configuration information in the label configuration information are obtained first, and then the obtained label value and the condition configuration information are assembled into a corresponding JS function, and the manner of assembling the JS function includes but not It is limited to the following ways: By defining a Java Script function, the tag value and conditional configuration information are written into the defined Java Script function, and the call of the Java Script function is defined.
S503,为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件。S503, create a JSON data file for multiple JS functions, and different JS functions correspond to the same JSON data file.
在本申请实施例中,创建与多个JS函数相对应的JSON数据文件,其中,不同的JS函数对应相同的JSON数据文件,通过创建JSON数据文件可以将不同业务之间的数据源结合起来,解决了目前市场上的规则与市场上各个不同业务之间数据源结合不紧密的问题。In the embodiment of the present application, a JSON data file corresponding to multiple JS functions is created, wherein different JS functions correspond to the same JSON data file, and data sources between different services can be combined by creating a JSON data file. It solves the problem that the current market rules are not closely integrated with the data sources between different businesses in the market.
S504,将所述JSON数据文件生成可执行脚本。S504. Generate an executable script by using the JSON data file.
S505,将所述可执行脚本加载至本地数据库中。S505. Load the executable script into a local database.
在本申请实施例中,将所述可执行脚本加载至本地数据库中,具体包括但不限于以下方式:通过数据提取构件把所述可执行脚本提取到本地数据库中,例如,用户先在本地数据库中建立数据库和表格,通过数据提取构件建立数据提取策略,在数据提取构件的属性设置选项中选择并填写所述可执行脚本所在的地址,在数据提取构件的属性设置选项中选择本地数据库中的表格,通过该表格可以存储所加载的所述可执行脚本,即,将所述可执行脚本加载至本地数据库中。In the embodiment of the present application, the executable script is loaded into a local database, including but not limited to the following manner: extracting the executable script into a local database by using a data extraction component, for example, the user first in the local database Establish a database and a table, establish a data extraction strategy through the data extraction component, select and fill in the address of the executable script in the property setting option of the data extraction component, and select the local database in the property setting option of the data extraction component. a form by which the executable script loaded can be stored, ie, the executable script is loaded into a local database.
S506,若接收到可执行指令,从所述本地数据库中获取并执行所述可执行脚本。S506. If an executable instruction is received, the executable script is obtained and executed from the local database.
由以上可见,本申请实施例通过对多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件,将所述JSON数据文件生成可执行脚本,可以实现规则引擎中的规则与数据源的紧密结合,解决了目前市场上的规则与市场上各个不同业务之间数据源结合不紧密的问题。It can be seen from the above that the embodiment of the present application creates a JSON data file for multiple JS functions, and different JS functions correspond to the same JSON data file, and the JSON data file generates an executable script, which can implement rules and rules in the rule engine. The close integration of data sources solves the problem that the current market rules are not closely integrated with the data sources between different businesses in the market.
本领域普通技术人员可以理解实现上述实施例方法中的全部或者部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium. When executed, the flow of an embodiment of the methods as described above may be included. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
请参阅图8,对应上述一种基于规则引擎的规则配置方法,本申请实施例还提出一种基于规则引擎的规则配置终端,该终端100包括:第一获取单元101、第一拼装单元102、第一生成单元103、加载单元104、第一执行单元105。Referring to FIG. 8 , corresponding to the rule-based rule-based rule configuration method, the embodiment of the present application further provides a rule-based rule-configured terminal, where the terminal 100 includes: a first acquiring unit 101, a first assembling unit 102, The first generation unit 103, the loading unit 104, and the first execution unit 105.
其中,所述第一获取单元101,用于获取用户输入的标签配置信息。The first obtaining unit 101 is configured to acquire label configuration information input by a user.
第一拼装单元102,用于将所述标签配置信息拼装成相对应的JS函数。The first assembling unit 102 is configured to assemble the label configuration information into a corresponding JS function.
第一生成单元103,用于将所述JS函数生成可执行脚本。The first generating unit 103 is configured to generate an executable script by using the JS function.
加载单元104,用于将所述可执行脚本加载至本地数据库中。The loading unit 104 is configured to load the executable script into a local database.
第一执行单元105,用于若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The first execution unit 105 is configured to obtain and execute the executable script from the local database if an execution instruction is received.
如图9所示,所述第一获取单元101,包括:As shown in FIG. 9, the first acquiring unit 101 includes:
第一提供单元1011,用于提供页面图标以供用户选择,所述页面图标包括一项或者多项标签。The first providing unit 1011 is configured to provide a page icon for the user to select, and the page icon includes one or more labels.
第二提供单元1012,用于基于用户所选择的标签,提供相应的标签配置页面。The second providing unit 1012 is configured to provide a corresponding label configuration page based on the label selected by the user.
第二生成单元1013,用于基于用户在标签配置页面的输入,生成相对应的标签配置页面。The second generating unit 1013 is configured to generate a corresponding label configuration page based on the input of the user on the label configuration page.
第二获取单元1014,用于通过所述标签配置页面获取所述标签配置信息。The second obtaining unit 1014 is configured to obtain the label configuration information by using the label configuration page.
如图10所示,所述第一拼装单元102,包括:As shown in FIG. 10, the first assembling unit 102 includes:
第三获取单元1021,用于获取标签配置信息中的字段信息。The third obtaining unit 1021 is configured to obtain field information in the label configuration information.
第四获取单元1022,用于获取与所述字段信息相对应的标签值和条件配置信息。The fourth obtaining unit 1022 is configured to acquire a label value and condition configuration information corresponding to the field information.
第二拼装单元1023,用于将所述标签值和条件配置信息拼装成相对应的JS函数。The second assembling unit 1023 is configured to assemble the label value and the condition configuration information into corresponding JS functions.
如图11所示,所述第一执行单元105,包括:As shown in FIG. 11, the first execution unit 105 includes:
第五获取单元1051,用于若接收到执行指令,从所述本地数据库中获取所述可执行脚本。The fifth obtaining unit 1051 is configured to obtain the executable script from the local database if an execution instruction is received.
第二执行单元1051,用于执行所述可执行脚本中的每一个JS函数。The second execution unit 1051 is configured to execute each JS function in the executable script.
第六获取单元1052,用于获取并保存所述每一个JS函数的执行结果。The sixth obtaining unit 1052 is configured to acquire and save an execution result of each of the JS functions.
请参阅图12,对应上述一种基于规则引擎的规则配置方法,本申请实施例还提出一种基于规则引擎的规则配置终端,该终端200包括:第一获取单元201、第一拼装单元202、创建单元203、第三生成单元204、加载单元205、第一执行单元206。Referring to FIG. 12, corresponding to the rule-based rule-based rule configuration method, the embodiment of the present application further provides a rule-based rule-configured terminal, where the terminal 200 includes: a first acquiring unit 201, a first assembling unit 202, The creating unit 203, the third generating unit 204, the loading unit 205, and the first executing unit 206.
其中,所述第一获取单元201,用于获取用户输入的标签配置信息。The first obtaining unit 201 is configured to acquire label configuration information input by the user.
第一拼装单元202,用于将所述标签配置信息拼装成相对应的JS函数。The first assembling unit 202 is configured to assemble the label configuration information into a corresponding JS function.
创建单元203,用于为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件。The creating unit 203 is configured to create a JSON data file for the plurality of JS functions, and the different JS functions correspond to the same JSON data file.
第三生成单元204,用于将所述JSON数据文件生成可执行脚本。The third generating unit 204 is configured to generate an executable script by using the JSON data file.
加载单元205,用于将所述可执行脚本加载至本地数据库中。The loading unit 205 is configured to load the executable script into a local database.
第一执行单元206,用于若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The first execution unit 206 is configured to obtain and execute the executable script from the local database if an execution instruction is received.
图13为本申请一种基于规则引擎的规则配置设备的结构组成示意图。如图13所示,该设备300可包括:输入装置301、输出装置302、收发装置303、存储器304以及处理器305,其中:FIG. 13 is a schematic structural diagram of a rule-based rule configuration device according to the present application. As shown in FIG. 13, the device 300 can include an input device 301, an output device 302, a transceiver 303, a memory 304, and a processor 305, where:
所述输入装置301,用于接收外部访问控制设备的输入数据。具体实现中,本申请实施例所述的输入装置301可包括键盘、鼠标、光电输入装置、声音输入装置、触摸式输入装置、扫描仪等。The input device 301 is configured to receive input data of an external access control device. In a specific implementation, the input device 301 in the embodiment of the present application may include a keyboard, a mouse, a photoelectric input device, a sound input device, a touch input device, a scanner, and the like.
所述输出装置302,用于对外输出访问控制设备的输出数据。具体实现中,本申请实施例所述的输出装置302可包括显示器、扬声器、打印机等。The output device 302 is configured to output output data of the access control device to the outside. In a specific implementation, the output device 302 described in this embodiment of the present application may include a display, a speaker, a printer, and the like.
所述收发装置303,用于通过通信链路向其他设备发送数据或者从其他设备接收数据。具体实现中,本申请实施例的收发装置303可包括射频天线等收发器件。The transceiver device 303 is configured to send data to or receive data from other devices through a communication link. In a specific implementation, the transceiver 303 of the embodiment of the present application may include a transceiver device such as a radio frequency antenna.
所述存储器304,可以包括非易失性存储介质和内存储器。非易失性存储介质可存储操作系统和存储用于实现基于规则引擎的规则配置方法的程序指令。内存储器为非易失性存储介质中的程序指令的运行提供环境。处理器305用于提供计算和控制能力,支撑整个基于规则引擎的规则配置设备的运行。上述程序指令被处理器305执行时,可使得处理器305执行上述基于规则引擎的规则配置方法。The memory 304 can include a non-volatile storage medium and an internal memory. The non-volatile storage medium can store an operating system and store program instructions for implementing a rules engine-based rule configuration method. The internal memory provides an environment for the operation of program instructions in a non-volatile storage medium. The processor 305 is configured to provide computing and control capabilities to support the operation of the entire rule engine based rule configuration device. When the above program instructions are executed by the processor 305, the processor 305 can be caused to execute the above rule engine based rule configuration method.
具体地,所述处理器305,用于运行所述存储器304中存储的实现基于规则引擎的规则配置方法的程序,以执行如下操作:Specifically, the processor 305 is configured to run a program that implements a rule engine-based rule configuration method stored in the memory 304 to perform the following operations:
获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
在一个实施例中,所述获取用户输入的标签配置信息,包括:In an embodiment, the obtaining the label configuration information input by the user includes:
提供页面图标以供用户选择,所述页面图标包括一项或者多项标签;Providing a page icon for the user to select, the page icon including one or more tags;
基于用户所选择的标签,提供相应的标签配置页面;Providing a corresponding label configuration page based on the label selected by the user;
基于用户在标签配置页面的输入,生成相对应的标签配置页面;Generating a corresponding label configuration page based on input of the user on the label configuration page;
通过所述标签配置页面获取所述标签配置信息。Obtaining the label configuration information by using the label configuration page.
在一个实施例中,所述将所述标签配置信息拼接成相对应的JS函数,包括:In one embodiment, the splicing the tag configuration information into a corresponding JS function includes:
获取标签配置信息中的字段信息;Obtain field information in the label configuration information;
获取与所述字段信息相对应的标签值和条件配置信息;Obtaining a tag value and condition configuration information corresponding to the field information;
将所述标签值和条件配置信息拼装成相对应的JS函数。The tag value and conditional configuration information are assembled into corresponding JS functions.
在一个实施例中,所述可执行脚本包括多个JS函数,所述若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本,包括:In one embodiment, the executable script includes a plurality of JS functions, and if the execution instructions are received, the executable script is obtained and executed from the local database, including:
若接收到执行指令,从所述本地数据库中获取所述可执行脚本;Obtaining the executable script from the local database if an execution instruction is received;
执行所述可执行脚本中的每一个JS函数;Executing each JS function in the executable script;
获取并保存所述每一个JS函数的执行结果。Get and save the execution result of each of the JS functions.
在一个实施例中,所述处理器305还执行如下操作:In one embodiment, the processor 305 also performs the following operations:
为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件;Create a JSON data file for multiple JS functions. Different JS functions correspond to the same JSON data file.
将所述JSON数据文件生成可执行脚本。The JSON data file is generated to generate an executable script.
本领域技术人员可以理解,图13中示出的基于规则引擎的规则配置设备的实施例并不构成对基于规则引擎的规则配置设备具体构成的限定,在其他实施例中,基于规则引擎的规则配置设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。例如,在一些实施例中,基于规则引擎的规则配置设备可以仅包括存储器及处理器,在这样的实施例中,存储器及处理器的结构及功能与图13所示实施例一致,在此不再赘述。It will be understood by those skilled in the art that the embodiment of the rule engine based rule configuration device shown in FIG. 13 does not constitute a limitation on the specific configuration of the rule engine based rule configuration device. In other embodiments, the rule engine based rules The configuration device may include more or fewer components than illustrated, or some components may be combined, or different component arrangements. For example, in some embodiments, the rules engine-based rule configuration device may include only a memory and a processor. In such an embodiment, the structure and function of the memory and processor are consistent with the embodiment shown in FIG. Let me repeat.
本申请提供了一种计算机可读存储介质,计算机可读存储介质存储有一个或者一个以上计算机程序,所述一个或者一个以上计算机程序可被一个或者一个以上的处理器执行,以实现上述基于规则引擎的规则配置方法。The application provides a computer readable storage medium storing one or more computer programs, the one or more computer programs being executable by one or more processors to implement the above-described rules The rule configuration method of the engine.
本申请前述的存储介质包括:磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等各种可以存储程序代码的介质。The foregoing storage medium of the present application includes: a magnetic disk, an optical disk, a read-only memory (ROM), and the like, which can store various program codes.
本申请所有实施例中的单元可以通过通用集成电路,例如CPU(Central  Processing Unit,中央处理器),或通过ASIC(Application Specific Integrated Circuit,专用集成电路)来实现。The units in all the embodiments of the present application 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 present application may be sequentially adjusted, merged, and deleted according to actual needs.
本申请实施例终端中的单元可以根据实际需要进行合并、划分和删减。The units in the terminal in the embodiment of the present application may be combined, divided, and deleted according to actual needs.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The foregoing is only a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto, and any equivalents can be easily conceived by those skilled in the art within the technical scope disclosed in the present application. Modifications or substitutions are intended to be included within the scope of the present application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

Claims (20)

  1. 一种基于规则引擎的规则配置方法,其特征在于,所述方法包括:A rule engine-based rule configuration method, the method comprising:
    获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
    将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
    将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
    将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
    若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
  2. 如权利要求1所述的方法,其特征在于,所述获取用户输入的标签配置信息,包括:The method of claim 1, wherein the obtaining the label configuration information input by the user comprises:
    提供页面图标以供用户选择,所述页面图标包括一项或者多项标签;Providing a page icon for the user to select, the page icon including one or more tags;
    基于用户所选择的标签,提供相应的标签配置页面;Providing a corresponding label configuration page based on the label selected by the user;
    基于用户在标签配置页面的输入,生成相对应的标签配置页面;Generating a corresponding label configuration page based on input of the user on the label configuration page;
    通过所述标签配置页面获取所述标签配置信息。Obtaining the label configuration information by using the label configuration page.
  3. 如权利要求1所述的方法,其特征在于,所述将所述标签配置信息拼接成相对应的JS函数,包括:The method of claim 1, wherein the splicing the tag configuration information into a corresponding JS function comprises:
    获取标签配置信息中的字段信息;Obtain field information in the label configuration information;
    获取与所述字段信息相对应的标签值和条件配置信息;Obtaining a tag value and condition configuration information corresponding to the field information;
    将所述标签值和条件配置信息拼装成相对应的JS函数。The tag value and conditional configuration information are assembled into corresponding JS functions.
  4. 如权利要求1所述的方法,其特征在于,所述可执行脚本包括多个JS函数,所述若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本,包括:The method of claim 1, wherein the executable script comprises a plurality of JS functions, and if the execution instructions are received, obtaining and executing the executable script from the local database comprises:
    若接收到执行指令,从所述本地数据库中获取所述可执行脚本;Obtaining the executable script from the local database if an execution instruction is received;
    执行所述可执行脚本中的每一个JS函数;Executing each JS function in the executable script;
    获取并保存所述每一个JS函数的执行结果。Get and save the execution result of each of the JS functions.
  5. 如权利要求1所述的方法,其特征在于,所述方法还包括:The method of claim 1 wherein the method further comprises:
    为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件;Create a JSON data file for multiple JS functions. Different JS functions correspond to the same JSON data file.
    将所述JSON数据文件生成可执行脚本。The JSON data file is generated to generate an executable script.
  6. 一种基于规则引擎的规则配置终端,其特征在于,所述终端包括:A rule-based rule-configured terminal, wherein the terminal includes:
    第一获取单元,用于获取用户输入的标签配置信息;a first acquiring unit, configured to acquire label configuration information input by the user;
    第一拼装单元,用于将所述标签配置信息拼装成相对应的JS函数;a first assembling unit, configured to assemble the label configuration information into a corresponding JS function;
    第一生成单元,用于将所述JS函数生成可执行脚本;a first generating unit, configured to generate an executable script by using the JS function;
    加载单元,用于将所述可执行脚本加载至本地数据库中;a loading unit, configured to load the executable script into a local database;
    第一执行单元,用于若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The first execution unit is configured to acquire and execute the executable script from the local database if an execution instruction is received.
  7. 如权利要求6所述的终端,其特征在于,所述第一获取单元,包括:The terminal according to claim 6, wherein the first obtaining unit comprises:
    第一提供单元,用于提供页面图标以供用户选择,所述页面图标包括一项或者多项标签;a first providing unit, configured to provide a page icon for the user to select, the page icon including one or more labels;
    第二提供单元,用于基于用户所选择的标签,提供相应的标签配置页面;a second providing unit, configured to provide a corresponding label configuration page based on the label selected by the user;
    第二生成单元,用于基于用户在标签配置页面的输入,生成相对应的标签配置页面;a second generating unit, configured to generate a corresponding label configuration page based on an input of the user on the label configuration page;
    第二获取单元,用于通过所述标签配置页面获取所述标签配置信息。The second obtaining unit is configured to obtain the label configuration information by using the label configuration page.
  8. 如权利要求6所述的终端,其特征在于,所述第一拼装单元,包括:The terminal according to claim 6, wherein the first assembling unit comprises:
    第三获取单元,用于获取标签配置信息中的字段信息;a third acquiring unit, configured to acquire field information in the label configuration information;
    第四获取单元,用于获取与所述字段信息相对应的标签值和条件配置信息;a fourth acquiring unit, configured to acquire a label value and condition configuration information corresponding to the field information;
    第二拼装单元,用于将所述标签值和条件配置信息拼装成相对应的JS函数。The second assembling unit is configured to assemble the label value and the condition configuration information into corresponding JS functions.
  9. [根据细则26改正28.05.2018]
    如权利要求6所述的终端,其特征在于,所述可执行脚本包括多个JS函数,所述第一执行单元,包括:
    第五获取单元,用于若接收到执行指令,从所述本地数据库中获取所述可执行脚本;
    第二执行单元,用于执行所述可执行脚本中的每一个JS函数;
    第六获取单元,用于获取并保存所述每一个JS函数的执行结果。
    [Correct according to Rule 26 28.05.2018]
    The terminal according to claim 6, wherein the executable script comprises a plurality of JS functions, and 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;
    a second execution unit, configured to execute each JS function in the executable script;
    And a sixth obtaining unit, configured to acquire and save an execution result of each of the JS functions.
  10. 如权利要求6所述的终端,其特征在于,所述终端还包括:The terminal according to claim 6, wherein the terminal further comprises:
    创建单元,用于为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件;Create a unit for creating a JSON data file for multiple JS functions. Different JS functions correspond to the same JSON data file.
    第三生成单元,用于将所述JSON数据文件生成可执行脚本。And a third generating unit, configured to generate an executable script by using the JSON data file.
  11. 一种基于规则引擎的规则配置设备,其特征在于,包括:A rule-based rule configuration device, comprising:
    存储器,用于存储实现引擎规则配置的程序;以及a memory for storing programs that implement engine rule configuration;
    处理器,用于运行所述存储器中存储的实现引擎规则配置的程序,以执行 以下操作:a processor for running a program implemented in the memory that implements an engine rule configuration to perform the following operations:
    获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
    将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
    将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
    将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
    若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
  12. 如权利要求11所述的设备,其特征在于,所述获取用户输入的标签配置信息,包括:The device according to claim 11, wherein the obtaining the label configuration information input by the user comprises:
    提供页面图标以供用户选择,所述页面图标包括一项或者多项标签;Providing a page icon for the user to select, the page icon including one or more tags;
    基于用户所选择的标签,提供相应的标签配置页面;Providing a corresponding label configuration page based on the label selected by the user;
    基于用户在标签配置页面的输入,生成相对应的标签配置页面;Generating a corresponding label configuration page based on input of the user on the label configuration page;
    通过所述标签配置页面获取所述标签配置信息。Obtaining the label configuration information by using the label configuration page.
  13. 如权利要求11所述的设备,其特征在于,所述将所述标签配置信息拼接成相对应的JS函数,包括:The device according to claim 11, wherein the splicing the tag configuration information into a corresponding JS function comprises:
    获取标签配置信息中的字段信息;Obtain field information in the label configuration information;
    获取与所述字段信息相对应的标签值和条件配置信息;Obtaining a tag value and condition configuration information corresponding to the field information;
    将所述标签值和条件配置信息拼装成相对应的JS函数。The tag value and conditional configuration information are assembled into corresponding JS functions.
  14. 如权利要求11所述的设备,其特征在于,所述可执行脚本包括多个JS函数,所述若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本,包括:The device according to claim 11, wherein the executable script comprises a plurality of JS functions, and if the execution instruction is received, acquiring and executing the executable script from the local database comprises:
    若接收到执行指令,从所述本地数据库中获取所述可执行脚本;Obtaining the executable script from the local database if an execution instruction is received;
    执行所述可执行脚本中的每一个JS函数;Executing each JS function in the executable script;
    获取并保存所述每一个JS函数的执行结果。Get and save the execution result of each of the JS functions.
  15. 如权利要求11所述的设备,其特征在于,所述处理器还执行以下操作:The device of claim 11 wherein said processor further performs the following operations:
    为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件;Create a JSON data file for multiple JS functions. Different JS functions correspond to the same JSON data file.
    将所述JSON数据文件生成可执行脚本。The JSON data file is generated to generate an executable script.
  16. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有一个或者一个以上计算机程序,所述一个或者一个以上计算机程序可被一个或者一个以上的处理器执行,以实现以下步骤:A computer readable storage medium, wherein the computer readable storage medium stores one or more computer programs, the one or more computer programs being executable by one or more processors to implement the following step:
    获取用户输入的标签配置信息;Obtaining label configuration information input by the user;
    将所述标签配置信息拼装成相对应的JS函数;Assembling the label configuration information into a corresponding JS function;
    将所述JS函数生成可执行脚本;Generating an executable script by the JS function;
    将所述可执行脚本加载至本地数据库中;Loading the executable script into a local database;
    若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本。The executable script is obtained and executed from the local database if an execution instruction is received.
  17. 如权利要求16所述的计算机可读存储介质,其特征在于,所述获取用户输入的标签配置信息,包括:The computer readable storage medium according to claim 16, wherein the obtaining the label configuration information input by the user comprises:
    提供页面图标以供用户选择,所述页面图标包括一项或者多项标签;Providing a page icon for the user to select, the page icon including one or more tags;
    基于用户所选择的标签,提供相应的标签配置页面;Providing a corresponding label configuration page based on the label selected by the user;
    基于用户在标签配置页面的输入,生成相对应的标签配置页面;Generating a corresponding label configuration page based on input of the user on the label configuration page;
    通过所述标签配置页面获取所述标签配置信息。Obtaining the label configuration information by using the label configuration page.
  18. 如权利要求16所述的计算机可读存储介质,其特征在于,所述将所述标签配置信息拼接成相对应的JS函数,包括:The computer readable storage medium of claim 16, wherein the splicing the tag configuration information into a corresponding JS function comprises:
    获取标签配置信息中的字段信息;Obtain field information in the label configuration information;
    获取与所述字段信息相对应的标签值和条件配置信息;Obtaining a tag value and condition configuration information corresponding to the field information;
    将所述标签值和条件配置信息拼装成相对应的JS函数。The tag value and conditional configuration information are assembled into corresponding JS functions.
  19. 如权利要求16所述的计算机可读存储介质,其特征在于,所述可执行脚本包括多个JS函数,所述若接收到执行指令,从所述本地数据库中获取并执行所述可执行脚本,包括:The computer readable storage medium of claim 16, wherein the executable script comprises a plurality of JS functions, and if the execution instructions are received, the executable script is retrieved and executed from the local database ,include:
    若接收到执行指令,从所述本地数据库中获取所述可执行脚本;Obtaining the executable script from the local database if an execution instruction is received;
    执行所述可执行脚本中的每一个JS函数;Executing each JS function in the executable script;
    获取并保存所述每一个JS函数的执行结果。Get and save the execution result of each of the JS functions.
  20. 如权利要求16所述的计算机可读存储介质,其特征在于,所述步骤还包括:The computer readable storage medium of claim 16 wherein said step further comprises:
    为多个JS函数创建一个JSON数据文件,不同的JS函数对应相同的JSON数据文件;Create a JSON data file for multiple JS functions. Different JS functions correspond to the same JSON data file.
    将所述JSON数据文件生成可执行脚本。The JSON data file is generated to generate an executable script.
PCT/CN2018/083630 2017-05-19 2018-04-19 Rule engine-based rule configuration method, terminal and device, and storage medium WO2018210096A1 (en)

Applications Claiming Priority (2)

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

Publications (1)

Publication Number Publication Date
WO2018210096A1 true WO2018210096A1 (en) 2018-11-22

Family

ID=61530302

Family Applications (1)

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

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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101253A1 (en) * 2005-10-31 2007-05-03 Holger Bohle Systems and methods for extensible document generation
CN102117202A (en) * 2009-12-30 2011-07-06 北大方正集团有限公司 J2EE architecture-based code generating device
CN104331288A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Method and system for showing dynamic page in configured manner
CN107797826A (en) * 2017-05-19 2018-03-13 平安科技(深圳)有限公司 A kind of regular collocation method, terminal and the equipment of rule-based engine

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070101253A1 (en) * 2005-10-31 2007-05-03 Holger Bohle Systems and methods for extensible document generation
CN102117202A (en) * 2009-12-30 2011-07-06 北大方正集团有限公司 J2EE architecture-based code generating device
CN104331288A (en) * 2014-10-31 2015-02-04 北京思特奇信息技术股份有限公司 Method and system for showing dynamic page in configured manner
CN107797826A (en) * 2017-05-19 2018-03-13 平安科技(深圳)有限公司 A kind of regular collocation method, terminal and the equipment of rule-based engine

Also Published As

Publication number Publication date
CN107797826A (en) 2018-03-13
CN107797826B (en) 2020-03-17

Similar Documents

Publication Publication Date Title
WO2018210096A1 (en) Rule engine-based rule configuration method, terminal and device, and storage medium
US10846153B2 (en) Bot creation with workflow development system
US9239705B2 (en) Method and apparatus for customized software development kit (SDK) generation
US11200033B2 (en) Application programming interface (API) based object oriented software development and textual analysis
CN109634598A (en) A kind of page display method, device, equipment and storage medium
CN108388622B (en) API interface dynamic generation method and device, computer equipment and storage medium
CN109725901A (en) Development approach, device, equipment and the computer storage medium of front-end code
CN111104635B (en) Method and device for generating form webpage
TW202113586A (en) Method and device for generating applet
CN106897153B (en) Method and system for calling application programming interface
CN108279882B (en) Framework generation method, device, equipment and computer readable medium
CN109981719A (en) Information processing method and its system, computer system and computer readable medium
CN110633959A (en) Method, device, equipment and medium for creating approval task based on graph structure
CN113076163A (en) Card rendering method and device
WO2021225901A1 (en) Techniques for converting natural speech to programming code
CN110187986B (en) Command management method, system, device and computer readable storage medium
CN113704820A (en) Application log coding method and device and computer readable storage medium
US20170235943A1 (en) Application Access Control Method and Apparatus
CN111324645A (en) Data processing method and device for block chain
CN116112457A (en) Method, device, computer equipment and storage medium for notifying message
WO2022099913A1 (en) Interface configuration method and apparatus, and device and medium
CN115509668A (en) Method, device and equipment for constructing front-end page analytic framework and storage medium
CN115904317A (en) Method, device, equipment and storage medium for uniformly calling front-end interface and back-end interface
CN113626001A (en) API dynamic editing method and device based on script
CN115202623A (en) Service capability using method, device and equipment

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18802413

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11/03/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18802413

Country of ref document: EP

Kind code of ref document: A1