The embodiment of the present invention provides a dynamic expansion method and system of rules. Among them, the method includes: if the rules corresponding to the target business attributes in the business list are judged to be extensible, the number of fields of the target business attributes is obtained and taken as the first number; and the rules are expanded to make the sum of the rules and the extended rules be the first number. By storing the rules corresponding to the target business attributes in the business order into the business rule engine, we can determine whether the rules are extensible and bind the information to the rules. When traversing the target business attributes, we can judge whether the rules are extensible or not according to the information of the corresponding rules. When the rules are extensible, we can get the words of the target business attributes. The number of segments and the number of rule extensions are determined according to the number, so that the sum of pre-stored rules and extended rules in the business transaction engine is the number, so that the dynamic expansion of rules can be realized.
【技术实现步骤摘要】
一种规则的动态扩展方法及系统
本专利技术实施例涉及计算机
,尤其涉及一种规则的动态扩展方法及系统。
技术介绍
在房产交易过程中,通常需要使用两个系统进行相互配合从而完成房产的交易,这两个系统分别为交易系统和交易规则引擎。例如在买房场景下,首先,用户会在交易系统中填写交易单,其中,交易单中通常包含多个业务属性,例如共同买受人姓名、国籍等业务属性;然后,交易系统将用户填写好的交易单传输至交易规则引擎,交易规则引擎根据接收到的交易单中的某些业务属性进行规则匹配,并将匹配到的规则实体返回给交易系统,以使得交易系统根据这些规则实体,执行相应的操作。现有技术中的交易规则引擎中对于一个业务属性通常只存储有一套规则,仅当业务属性的字段为一个时才能进行规则匹配,当业务属性的字段为多个时,无法正确地进行规则匹配甚至无法进行规则匹配。
技术实现思路
针对现有技术中存在的技术问题,本专利技术实施例提供一种规则的动态扩展方法及系统。第一方面,本专利技术实施例提供一种规则的动态扩展方法,包括:判断步骤,若判断获知业务单中目标业务属性对应的规则可扩展,则获取所述目标业务属性的字段个数并作为第 ...
【技术保护点】
1.一种规则的动态扩展方法,其特征在于,包括:判断步骤,若判断获知业务单中目标业务属性对应的规则可扩展,则获取所述目标业务属性的字段个数并作为第一数量;和,扩展步骤,将所述规则进行扩展,以使得所述规则与扩展后的规则的数量总和为所述第一数量。
【技术特征摘要】
1.一种规则的动态扩展方法,其特征在于,包括:判断步骤,若判断获知业务单中目标业务属性对应的规则可扩展,则获取所述目标业务属性的字段个数并作为第一数量;和,扩展步骤,将所述规则进行扩展,以使得所述规则与扩展后的规则的数量总和为所述第一数量。2.根据权利要求1所述的方法,其特征在于,所述判断步骤,之前还包括:接收业务系统发送的业务单,并遍历所述业务单中的每一业务属性,将每次遍历到的属性作为目标业务属性。3.根据权利要求1所述的方法,其特征在于,所述判断步骤,包括:若判断获知所述业务单中目标业务属性对应的规则可扩展,则基于Aviator工具,计算所述目标业务属性的字段个数并作为所述第一数量。4.根据权利要求1-3任一所述的方法,其特征在于,所述扩展步骤,之后还包括:规则集合生成步骤,将所述规则与扩展后的规则组成规则集合;匹配步骤,分别将所述目标业务属性的每一字段与所述规则集合中的每一规则进行一一匹配,得到每一字段匹配的规则实体。5.根据权利要求4所述的方法,其特征在于,所述匹配步骤,之后还包括:将每一字段匹配的规则实体返回给业务系统,以使得所述业务系统根据接...
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。