CN115033816A - Rule engine-based business processing method, apparatus, computer equipment and medium - Google Patents
Rule engine-based business processing method, apparatus, computer equipment and medium Download PDFInfo
- Publication number
- CN115033816A CN115033816A CN202210734098.8A CN202210734098A CN115033816A CN 115033816 A CN115033816 A CN 115033816A CN 202210734098 A CN202210734098 A CN 202210734098A CN 115033816 A CN115033816 A CN 115033816A
- Authority
- CN
- China
- Prior art keywords
- rule
- node
- configuration
- business
- matched
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/957—Browsing optimisation, e.g. caching or content distillation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/901—Indexing; Data structures therefor; Storage structures
- G06F16/9024—Graphs; Linked lists
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/177—Editing, e.g. inserting or deleting of tables; using ruled lines
- G06F40/18—Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0633—Workflow analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Databases & Information Systems (AREA)
- Human Resources & Organizations (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Strategic Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Data Mining & Analysis (AREA)
- Economics (AREA)
- Educational Administration (AREA)
- Computer Security & Cryptography (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Marketing (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本申请适用于规则引擎技术领域,尤其涉及一种基于规则引擎的业务处理方法、装置、计算机设备及介质。该方法获取业务数据和业务数据在业务流程所处的业务状态,从而确定目标流程节点,调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点,结合目标流程节点的下阶段处理条件,确定下阶段流程节点,更新业务数据在业务流程所处的业务状态,在一个流程节点中设置多个规则配置表,以匹配多个规则,避免设置多个流程节点,降低了流程节点设计的复杂程度,满足了在实际应用场景中同一流程节点对多种规则的需求。
The present application applies to the technical field of rule engines, and in particular, relates to a business processing method, apparatus, computer equipment and medium based on a rule engine. The method obtains the business data and the business state of the business data in the business process, thereby determines the target process node, calls N rule configuration tables corresponding to the target process node, parses each rule configuration table, determines the order of the rule nodes, and arranges the business The data is matched with the corresponding rule content according to the order of the rule nodes, and the matching rule nodes and the unmatched rule nodes are determined. Combined with the next stage processing conditions of the target process node, the next stage process node is determined, and the business data is updated in the business process. In the business state, set multiple rule configuration tables in one process node to match multiple rules, avoid setting multiple process nodes, reduce the complexity of process node design, and satisfy the same process node in practical application scenarios. The need for multiple rules.
Description
技术领域technical field
本申请适用于规则引擎技术领域,尤其涉及一种基于规则引擎的业务处理方法、装置、计算机设备及介质。The present application applies to the technical field of rule engines, and in particular, relates to a business processing method, apparatus, computer equipment and medium based on a rule engine.
背景技术Background technique
目前,随着互联网技术的普及,在线审批、检测、校验等方式成为有效提高工作效率的审核方式,以满足庞大的业务审核需求。然而上述的审核方式均需要依赖平台、系统等,对于业务较为复杂、流程时常变化的情况,就需要对平台或系统中与业务或流程相关的硬编码进行修改和上线,这种情况下就需要大量的资源来维护平台或系统。为了降低维护的难度和复杂程度,采用规则引擎的方式将流程节点与审核所执行的硬编码分割开来,将硬编码变更为代码存储于数据库中,形成规则引擎,在每次执行相应的流程节点时,调用规则引擎中的规则进行自动审核等操作,但是就实际使用场景而言,针对一个流程节点对应的规则可能不止一个,需要设计冗余的节点来执行本应该在同一个节点中完成的规则,导致流程节点的设计较为复杂,不利于修改和套用。因此,如何在保证基础流程节点的情况下,实现复杂业务的处理,以提高在实际场景中的适用性成为亟待解决的问题。At present, with the popularization of Internet technology, online approval, testing, verification and other methods have become the audit methods to effectively improve work efficiency to meet the huge business audit needs. However, the above-mentioned audit methods all need to rely on platforms, systems, etc. In the case of complex business and frequent changes in the process, it is necessary to modify and launch the hard-coding related to the business or process in the platform or system. In this case, it is necessary to Lots of resources to maintain a platform or system. In order to reduce the difficulty and complexity of maintenance, a rule engine is used to separate the process nodes from the hard codes executed by the audit, and the hard codes are changed into codes and stored in the database to form a rule engine, which executes the corresponding process each time. When the node is used, the rules in the rule engine are called for automatic auditing and other operations. However, in terms of actual usage scenarios, there may be more than one rule corresponding to a process node. It is necessary to design redundant nodes to execute operations that should be completed in the same node. , which makes the design of process nodes more complicated, which is not conducive to modification and application. Therefore, how to realize the processing of complex services and improve the applicability in actual scenarios while ensuring the basic process nodes has become an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本申请实施例提供了一种基于规则引擎的业务处理方法、装置、计算机设备及介质,以解决在保证基础流程节点的情况下,实现复杂业务的处理,以提高在实际场景中的适用性的问题。In view of this, the embodiments of the present application provide a business processing method, device, computer equipment and medium based on a rule engine, so as to solve the problem of realizing complex business processing under the condition of ensuring basic process nodes, so as to improve the performance in practical scenarios. question of applicability.
第一方面,本申请实施例提供一种基于规则引擎的业务处理方法,所述业务处理方法包括:In a first aspect, an embodiment of the present application provides a rule engine-based business processing method, where the business processing method includes:
获取业务数据和所述业务数据在业务流程所处的业务状态,分析所述业务状态,确定所述业务数据对应的目标流程节点;Acquiring business data and the business state of the business data in the business process, analyzing the business state, and determining the target process node corresponding to the business data;
调用与所述目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,所述规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,N为大于1的整数;Call N rule configuration tables corresponding to the target process node, parse each rule configuration table, and determine the order of the rule nodes, where the rule configuration table contains the current rule node, the current rule content, the preceding rule node and The rear rule node, N is an integer greater than 1;
将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点;The business data is sequentially matched with the corresponding rule content according to the order of the rule nodes, and the rule nodes that hit and match and the rule nodes that do not hit are determined;
根据所述命中匹配的规则节点和所述未命中匹配的规则节点,结合所述目标流程节点的下阶段处理条件,确定下阶段流程节点,并根据所述下阶段流程节点,更新所述业务数据在所述业务流程所处的业务状态。According to the hit matching rule node and the miss matching rule node, combined with the next stage processing conditions of the target process node, determine the next stage process node, and update the business data according to the next stage process node The business state in which the business process is located.
在一实施方式中,在将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之前,还包括:In one embodiment, before the business data is sequentially matched with the corresponding rule content according to the order of the rule nodes, and before determining the rule node that hits the match and the rule node that does not hit the match, it also includes:
按照所述规则节点排序依次预编译对应的规则内容;The corresponding rule contents are precompiled in sequence according to the ordering of the rule nodes;
将预编译的时间顺序,将对应预编译结果依次缓存,形成缓存队列;Cache the precompiled time sequence and the corresponding precompiled results in sequence to form a cache queue;
将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点包括:The business data is sequentially matched with the corresponding rule content according to the order of the rule nodes, and the rule nodes that are hit and matched and the rule nodes that are not matched include:
将所述缓存队列中的预编译结果依次与所述业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。The precompiled results in the cache queue are sequentially matched with the service data, and the rule nodes that hit the matching and the rule nodes that do not hit are determined.
在一实施方式中,将所述缓存队列中的预编译结果依次与所述业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点包括:In one embodiment, the precompiled results in the cache queue are sequentially matched with the service data, and determining the matching rule node and the missing matching rule node include:
使用表达式求值引擎对所述缓存队列中的预编译结果依次进行表达式解析,得到对应的解析结果;Using an expression evaluation engine to sequentially perform expression parsing on the precompiled results in the cache queue to obtain corresponding parsing results;
将对应的解析结果与所述业务数据进行相似度比较,确定相似度满足阈值的解析结果对应的规则节点为命中匹配的规则节点,确定相似度不满足所述阈值的解析结果对应的规则节点为未命中匹配的规则节点。Compare the similarity between the corresponding analysis result and the business data, determine that the rule node corresponding to the analysis result whose similarity meets the threshold is the rule node for hit matching, and determine that the rule node corresponding to the analysis result whose similarity does not meet the threshold is Missing matching rule nodes.
在一实施方式中,在将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之后,还包括:In one embodiment, after the business data is sequentially matched with the corresponding rule content according to the order of the rule nodes, and after determining the rule node that hits the match and the rule node that does not hit the match, it also includes:
从展示模板数据库中确定命中匹配的规则节点对应的展示模板;Determine the display template corresponding to the matching rule node from the display template database;
将所述业务数据填入所述展示模板中进行展示。The business data is filled in the display template for display.
在一实施方式中,在调用与所述目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序之前,还包括:In one embodiment, before calling the N rule configuration tables corresponding to the target process nodes, parsing each rule configuration table, and determining the order of the rule nodes, the method further includes:
获取用户的配置请求;Get the user's configuration request;
根据所述配置请求,调用配置模板表,所述配置模板表用于采集所述用户对原始配置的修改数据;calling a configuration template table according to the configuration request, where the configuration template table is used to collect modification data of the original configuration by the user;
使用采集得到的修改数据,更新所述配置模板表,确定更新后的配置模板表为一规则配置表。Using the collected modification data, the configuration template table is updated, and the updated configuration template table is determined to be a rule configuration table.
在一实施方式中,根据所述配置请求,调用配置模板表包括:In one embodiment, according to the configuration request, invoking the configuration template table includes:
解析所述配置请求,确定所述配置请求对应的流程节点的类型信息;Parse the configuration request, and determine the type information of the process node corresponding to the configuration request;
根据所述类型信息,从配置模板数据库中确定并调用配置模板表。According to the type information, the configuration template table is determined and called from the configuration template database.
在一实施方式中,根据所述命中匹配的规则节点和所述未命中匹配的规则节点,结合所述目标流程节点的下阶段处理条件,确定下阶段流程节点包括:In one embodiment, according to the hit matching rule node and the miss matching rule node, combined with the next stage processing conditions of the target process node, determining the next stage process node includes:
若所述未命中匹配的规则节点为所述规则节点排序中第一个规则节点,则确定规则配置错误,若所述命中规则的规则节点为所述规则节点排序中第一个规则节点,则确定规则配置正确;If the rule node that does not hit the matching rule is the first rule node in the rule node ordering, it is determined that the rule configuration is wrong; if the rule node that hits the rule is the first rule node in the rule node ordering, then Make sure the rules are configured correctly;
若确定规则配置错误,则确定下阶段流程节点为所述目标流程节点的上一个流程节点,若确定规则配置正确,则确定下阶段流程节点为所述目标流程节点的下一个流程节点,其中,所述目标流程节点的下阶段处理条件为在规则配置错误时,返回上一个流程节点,在规则匹配错误时,执行下一个流程节点。If it is determined that the rule configuration is incorrect, the next stage process node is determined to be the previous process node of the target process node, and if it is determined that the rule configuration is correct, the next stage process node is determined to be the next process node of the target process node, wherein, The processing condition of the next stage of the target process node is to return to the previous process node when the rule configuration is incorrect, and execute the next process node when the rule matching is incorrect.
第二方面,本申请实施例提供一种基于规则引擎的业务处理装置,所述业务处理装置包括:In a second aspect, an embodiment of the present application provides a rule engine-based service processing apparatus, where the service processing apparatus includes:
流程节点确定模块,用于获取业务数据和所述业务数据在业务流程所处的业务状态,分析所述业务状态,确定所述业务数据对应的目标流程节点;a process node determination module, configured to acquire business data and the business state of the business data in the business process, analyze the business state, and determine the target process node corresponding to the business data;
规则节点排序模块,用于调用与所述目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,所述规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,N为大于1的整数;The rule node sorting module is used to call N rule configuration tables corresponding to the target process nodes, parse each rule configuration table, and determine the order of the rule nodes, where the rule configuration table contains the current rule node, the current rule content , the pre-rule node and the post-rule node, N is an integer greater than 1;
规则节点匹配模块,用于将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点;A rule node matching module, configured to sequentially match the business data with the corresponding rule content according to the order of the rule nodes, and determine the rule node that hits the match and the rule node that does not hit the match;
流程节点处理模块,用于根据所述命中匹配的规则节点和所述未命中匹配的规则节点,结合所述目标流程节点的下阶段处理条件,确定下阶段流程节点,并根据所述下阶段流程节点,更新所述业务数据在所述业务流程所处的业务状态。A process node processing module, configured to determine the next-stage process node according to the hit-matched rule node and the miss-matched rule node, in combination with the next-stage processing conditions of the target process node, and according to the next-stage process A node, which updates the business state of the business data in the business process.
在一实施方式中,所述业务处理装置还包括:In one embodiment, the service processing apparatus further includes:
预编译模块,用于在将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之前,按照所述规则节点排序依次预编译对应的规则内容;The pre-compilation module is configured to, before matching the business data with the corresponding rule content in order according to the order of the rule nodes, and before determining the rule nodes that hit the match and the rule nodes that did not hit the match, pre-order the rule nodes in order. Compile the corresponding rule content;
缓存模块,用于将预编译的时间顺序,将对应预编译结果依次缓存,形成缓存队列;The cache module is used to cache the precompiled time sequence and the corresponding precompiled results in sequence to form a cache queue;
所述规则节点匹配模块包括:The rule node matching module includes:
规则节点匹配单元,用于将所述缓存队列中的预编译结果依次与所述业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。A rule node matching unit, configured to sequentially match the precompiled results in the cache queue with the service data, and determine a rule node that hits a match and a rule node that doesn't match.
在一实施方式中,所述规则节点匹配单元包括:In one embodiment, the rule node matching unit includes:
解析运算子单元,用于使用表达式求值引擎对所述缓存队列中的预编译结果依次进行表达式解析,得到对应的解析结果;a parsing operation subunit, used for using an expression evaluation engine to perform expression parsing on the precompiled results in the cache queue in turn to obtain corresponding parsing results;
匹配运算子单元,用于将对应的解析结果与所述业务数据进行相似度比较,确定相似度满足阈值的解析结果对应的规则节点为命中匹配的规则节点,确定相似度不满足所述阈值的解析结果对应的规则节点为未命中匹配的规则节点。The matching operation subunit is used to compare the similarity between the corresponding analysis result and the business data, determine that the rule node corresponding to the analysis result whose similarity meets the threshold is the rule node that hits the matching, and determine that the similarity does not meet the threshold. The rule node corresponding to the parsing result is the rule node of the miss match.
在一实施方式中,所述业务处理装置还包括:In one embodiment, the service processing apparatus further includes:
展示模板确定模块,用于在将所述业务数据按照所述规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之后,从展示模板数据库中确定命中匹配的规则节点对应的展示模板;The display template determination module is used to match the business data with the corresponding rule content in sequence according to the rule node ordering, and after determining the hit matching rule node and the miss matching rule node, determine the hit from the display template database The display template corresponding to the matching rule node;
展示模块,用于将所述业务数据填入所述展示模板中进行展示。The display module is used for filling the business data into the display template for display.
在一实施方式中,所述业务处理装置还包括:In one embodiment, the service processing apparatus further includes:
配置请求获取模块,用于在调用与所述目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序之前,获取用户的配置请求;a configuration request obtaining module, configured to obtain the user's configuration request before calling the N rule configuration tables corresponding to the target process nodes, parse each rule configuration table, and determine the ordering of the rule nodes;
配置模板调用模块,用于根据所述配置请求,调用配置模板表,所述配置模板表用于采集所述用户对原始配置的修改数据;a configuration template calling module, configured to call a configuration template table according to the configuration request, where the configuration template table is used to collect modification data of the original configuration by the user;
配置表更新模块,用于使用采集得到的修改数据,更新所述配置模板表,确定更新后的配置模板表为一规则配置表。The configuration table updating module is used to update the configuration template table using the collected modification data, and determine that the updated configuration template table is a rule configuration table.
在一实施方式中,所述配置模板调用模块包括:In one embodiment, the configuration template invocation module includes:
配置类型确定单元,用于解析所述配置请求,确定所述配置请求对应的流程节点的类型信息;a configuration type determination unit, configured to parse the configuration request, and determine the type information of the process node corresponding to the configuration request;
配置模板调用单元,用于根据所述类型信息,从配置模板数据库中确定并调用配置模板表。The configuration template calling unit is configured to determine and call the configuration template table from the configuration template database according to the type information.
在一实施方式中,所述流程节点处理模块包括:In one embodiment, the process node processing module includes:
规则配置判断模块,用于若所述未命中匹配的规则节点为所述规则节点排序中第一个规则节点,则确定规则配置错误,若所述命中规则的规则节点为所述规则节点排序中第一个规则节点,则确定规则配置正确;The rule configuration judgment module is used to determine that the rule configuration is wrong if the rule node of the miss match is the first rule node in the rule node sorting, and if the rule node of the hit rule is the rule node sorting The first rule node determines that the rule configuration is correct;
下一节点确定模块,用于若确定规则配置错误,则确定下阶段流程节点为所述目标流程节点的上一个流程节点,若确定规则配置正确,则确定下阶段流程节点为所述目标流程节点的下一个流程节点,其中,所述目标流程节点的下阶段处理条件为在规则配置错误时,返回上一个流程节点,在规则匹配错误时,执行下一个流程节点。The next node determination module is configured to determine that the next stage process node is the previous process node of the target process node if it is determined that the rule configuration is incorrect, and if it is determined that the rule configuration is correct, then determine that the next stage process node is the target process node The next process node of the target process node, wherein the processing condition of the next stage of the target process node is to return to the previous process node when the rule configuration is incorrect, and execute the next process node when the rule matching is incorrect.
第三方面,本申请实施例提供一种计算机设备,所述计算机设备包括处理器、存储器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面所述的基于规则引擎的业务处理方法。In a third aspect, an embodiment of the present application provides a computer device, the computer device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, where the processor executes the The computer program implements the rule engine-based business processing method described in the first aspect.
第四方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的基于规则引擎的业务处理方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the rule-based engine according to the first aspect. business processing method.
本申请实施例与现有技术相比存在的有益效果是:本申请通过获取业务数据和业务数据在业务流程所处的业务状态,分析业务状态,确定对应的目标流程节点,调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点,根据命中匹配的规则节点和未命中匹配的规则节点,结合目标流程节点的下阶段处理条件,确定下阶段流程节点,并根据下阶段流程节点,更新业务数据在业务流程所处的业务状态,在一个流程节点中设置多个规则配置表,以匹配多个规则,避免设置多个流程节点,降低了流程节点设计的复杂程度,同时,满足了在实际应用场景中同一流程节点对多种规则的需求。Compared with the prior art, the embodiments of the present application have the following beneficial effects: the present application obtains the business data and the business state of the business data in the business process, analyzes the business state, determines the corresponding target process node, and invokes the corresponding target process node. Corresponding N rule configuration tables, parse each rule configuration table, and determine the order of rule nodes. The rule configuration table contains the current rule node, the current rule content, the pre-rule node and the post-rule node, and the business data According to the order of the rule nodes, the corresponding rule content is matched in order, and the matching rule nodes and the missing matching rule nodes are determined. , determine the next stage process node, and update the business state of the business data in the business process according to the next stage process node, set multiple rule configuration tables in one process node to match multiple rules, avoid setting multiple process nodes , which reduces the complexity of the process node design, and at the same time, satisfies the requirements of the same process node for multiple rules in practical application scenarios.
附图说明Description of drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only for the present application. In some embodiments, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without any creative effort.
图1是本申请实施例一提供的一种基于规则引擎的业务处理方法的一应用环境示意图;1 is a schematic diagram of an application environment of a rule engine-based business processing method provided in Embodiment 1 of the present application;
图2是本申请实施例二提供的一种基于规则引擎的业务处理方法的流程示意图;2 is a schematic flowchart of a business processing method based on a rule engine provided in Embodiment 2 of the present application;
图3是本申请实施例三提供的一种基于规则引擎的业务处理方法的流程示意图;3 is a schematic flowchart of a rule engine-based business processing method provided in Embodiment 3 of the present application;
图4是本申请实施例四提供的一种基于规则引擎的业务处理装置的结构示意图;4 is a schematic structural diagram of a rule engine-based service processing apparatus provided in Embodiment 4 of the present application;
图5是本申请实施例五提供的一种计算机设备的结构示意图。FIG. 5 is a schematic structural diagram of a computer device according to Embodiment 5 of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
本申请实施例可以基于人工智能技术对相关的数据进行获取和处理。其中,人工智能(Artificial Intelligence,AI)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。The embodiments of the present application may acquire and process related data based on artificial intelligence technology. Among them, artificial intelligence (AI) is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. .
人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、机器人技术、生物识别技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。The basic technologies of artificial intelligence generally include technologies such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation/interaction systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning/deep learning.
应理解,以下实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the following embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
为了说明本申请的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present application, the following specific embodiments are used for description.
本申请实施例一提供的一种基于规则引擎的业务处理方法,可应用在如图1的应用环境中,其中,客户端与服务端进行通信。其中,客户端包括但不限于掌上电脑、桌上型计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、云端计算机设备、个人数字助理(personal digital assistant,PDA)等计算机设备。服务端可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The rule engine-based business processing method provided in the first embodiment of the present application can be applied in the application environment as shown in FIG. 1 , in which the client and the server communicate. Among them, clients include but are not limited to PDAs, desktop computers, notebook computers, ultra-mobile personal computers (UMPC), netbooks, cloud computing devices, personal digital assistants (PDAs), etc. computer equipment. The server can be implemented by an independent server or a server cluster composed of multiple servers.
参见图2,是本申请实施例二提供的一种基于规则引擎的业务处理方法的流程示意图,上述基于规则引擎的业务处理方法在图1中的服务端和客户端中均可使用,前提是上述服务端和客户端对应的计算机设备均连接相应的业务系统、数据库、规则库等用于支撑业务处理所需的必要设备,或者上述服务端和客户端对应的计算机设备中运行业务系统,并连接或者配置数据库、规则库等。上述业务处理方法用在业务系统中,实现对业务系统中业务数据的处理,包括业务数据的状态更新、规则校验等。如图2所示,该基于规则引擎的业务处理方法可以包括以下步骤:Referring to FIG. 2, it is a schematic flowchart of a business processing method based on a rule engine provided in Embodiment 2 of the present application. The above business processing method based on a rule engine can be used in both the server and the client in FIG. 1, provided that The computer equipment corresponding to the above-mentioned server and client is connected to the corresponding business system, database, rule base, etc. to support necessary equipment required for business processing, or the business system is run in the computer equipment corresponding to the above-mentioned server and client, and Connect or configure databases, rule libraries, etc. The above-mentioned business processing method is used in a business system to realize the processing of business data in the business system, including state update of business data, rule verification, and the like. As shown in Figure 2, the rule engine-based business processing method may include the following steps:
步骤S201,获取业务数据和业务数据在业务流程所处的业务状态,分析业务状态,确定业务数据对应的目标流程节点。In step S201, the business data and the business state of the business data in the business process are acquired, the business state is analyzed, and the target process node corresponding to the business data is determined.
本申请中,上述业务处理方法可以应用于任意的业务系统中,以实现业务系统中相应业务数据的处理。在一业务系统中,根据需求针对其中一业务数据制定处理流程,在任一时刻获取业务数据及其在对应业务流程中所处的业务状态,即可根据业务状态确定其在业务流程中对应的流程节点(也即是目标流程节点)。In this application, the above-mentioned business processing method can be applied to any business system, so as to realize the processing of corresponding business data in the business system. In a business system, a processing flow is formulated for one of the business data according to the requirements, and the business data and its business state in the corresponding business process can be obtained at any time, and the corresponding process in the business process can be determined according to the business state. node (that is, the target process node).
业务数据可以是指在业务系统中提交的审批数据、增删改查数据等,依据业务系统的应用场景不同,该业务数据可以包含不同的类型;业务流程可以是指业务系统中设定的流程,针对不同的业务数据对应的业务流程可以不相同;业务状态可以是指业务数据在业务系统中所处的状态,该状态在建立业务系统时由人工根据需求设定。例如,针对业务系统为财务系统而言,业务数据可以为财务审批数据,业务状态包括一级审核状态、二级审核状态和放款状态,财务审批在财务系统中需要依次进行一级审核、二级审核和放款等业务流程,如果财务审批在一级审核完成后,即进入二级审核,对应的业务状态为二级审核状态。Business data can refer to the approval data submitted in the business system, adding, deleting, modifying and checking data, etc. According to different application scenarios of the business system, the business data can contain different types; business process can refer to the process set in the business system, The business processes corresponding to different business data may be different; the business state may refer to the state of the business data in the business system, and the state is manually set according to requirements when the business system is established. For example, if the business system is a financial system, the business data can be financial approval data, and the business status includes the first-level approval status, the second-level approval status, and the loan status. For business processes such as review and loan, if the financial approval is completed in the first-level review, it will enter the second-level review, and the corresponding business status is the second-level review status.
业务数据在业务流程中达到某个业务状态后,可以根据该业务状态预先配置的属性值来更新业务数据中表征业务状态的属性,分析业务状态即为对业务数据的表征业务状态的属性进行提取来得到属性值。在业务系统中,表征每个业务状态的属性值与业务流程的流程节点形成映射关系,因此,确定业务状态后即可确定流程节点。在一实施方式中,该映射关系可以使用映射map表示。After the business data reaches a certain business state in the business process, the attributes representing the business state in the business data can be updated according to the preconfigured attribute values of the business state. Analyzing the business state is to extract the attributes representing the business state of the business data. to get the property value. In the business system, the attribute value representing each business state forms a mapping relationship with the process node of the business process. Therefore, the process node can be determined after the business state is determined. In one embodiment, the mapping relationship may be represented by a mapping map.
步骤S202,调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序。Step S202, call N rule configuration tables corresponding to the target process node, parse each rule configuration table, and determine the order of the rule nodes.
本申请中,规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,N为大于1的整数。In this application, the rule configuration table includes the current rule node, the current rule content, the preceding rule node, and the succeeding rule node, and N is an integer greater than 1.
流程节点的执行规则与节点分割开,执行规则独立为至少一个规则配置表,在该规则配置表中设置有规则节点名称、规则内容、前置的规则节点名称和后置的规则节点名称,此时,流程节点与执行规则分开,在对流程节点的执行规则进行修改时,无需对流程节点进行硬编码,有助于提高管理效率。The execution rules of the process nodes are separated from the nodes, and the execution rules are independently at least one rule configuration table. The rule configuration table is set with the name of the rule node, the content of the rule, the name of the pre-rule node and the name of the post-rule node. When the process node is separated from the execution rules, when the execution rules of the process nodes are modified, there is no need to hardcode the process nodes, which helps to improve the management efficiency.
上述流程节点对应至少一个规则配置表,每个规则配置表对应一种规则,因此,该流程节点可以对应多个规则,而规则的使用顺序由规则配置表中配置的信息来确定。例如,第一规则配置表中当前的规则节点为规则节点A,前置的规则节点为规则节点B,后置的规则节点为规则节点C,则该第二规则配置表中的规则内容需要在规则节点B对应的规则内容执行后才能够执行。The above process node corresponds to at least one rule configuration table, and each rule configuration table corresponds to one type of rule. Therefore, the process node can correspond to multiple rules, and the order of use of the rules is determined by the information configured in the rule configuration table. For example, the current rule node in the first rule configuration table is rule node A, the preceding rule node is rule node B, and the rear rule node is rule node C, then the rule content in the second rule configuration table needs to be in the The rule content corresponding to the rule node B can be executed only after the rule content is executed.
规则配置表可以为以下结构:The rule configuration table can have the following structure:
Rule_category:当前规则所对应的规则种类;Rule_category: The rule category corresponding to the current rule;
Rule_id:Rule_category规则类别下对应的ID,统一类别下,ID唯一,其作用是对图中节点唯一性进行定位;Rule_id: The corresponding ID under the Rule_category rule category. Under the unified category, the ID is unique, and its function is to locate the uniqueness of the nodes in the graph;
Prev_id:Rule_category规则类别下对应的前置规则节点ID;Prev_id: The corresponding pre-rule node ID under the Rule_category rule category;
Next_id:Rule_category规则类别下对应的后置规则节点ID;Next_id: The corresponding post-rule node ID under the Rule_category rule category;
Rule_type:规则种类,和Rule_category不同,代表当前规则的匹配方式,如rule_type为boolOne时(最新定义见枚举类RuleTypeEnum),表示当前规则匹配逻辑;Rule_type: The type of rule, which is different from Rule_category, which represents the matching method of the current rule. For example, when rule_type is boolOne (see the enumeration class RuleTypeEnum for the latest definition), it represents the matching logic of the current rule;
Rule_content:规则,由google aviator表达式引擎驱动规则判断,支持四则运算,变量运算,三元运算符等;Rule_content: rule, driven by the google aviator expression engine, supports four arithmetic operations, variable operations, ternary operators, etc.;
True_action:规则命中时返回的文案;True_action: the text returned when the rule hits;
False_action:规则不命中时返回的文案。False_action: The copy returned when the rule is not hit.
使用规则配置表来配置规则节点,使规则能够更加灵活的配置,不仅能够支持当前的业务场景,也更有利于后期的拓展。Use the rule configuration table to configure rule nodes, so that the rules can be configured more flexibly, which not only supports the current business scenario, but also is more conducive to later expansion.
可选的是,在调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序之前,还包括:Optionally, before invoking the N rule configuration tables corresponding to the target process nodes, parsing each rule configuration table, and determining the order of the rule nodes, the method further includes:
获取用户的配置请求;Get the user's configuration request;
根据配置请求,调用配置模板表,配置模板表用于采集用户对原始配置的修改数据;According to the configuration request, the configuration template table is called, and the configuration template table is used to collect the modification data of the original configuration by the user;
使用采集得到的修改数据,更新配置模板表,确定更新后的配置模板表为一规则配置表。Using the collected modification data, the configuration template table is updated, and the updated configuration template table is determined as a rule configuration table.
其中,用户可根据需求对目标流程节点对应的规则配置表进行增删改查等操作,也即是用户生成配置请求,配置请求用于表示用户想要配置的流程节点的类型,并以此来调用对应的配置模板表。本质上,所有的配置模板表的架构可以相同,不同的流程节点对应的配置模板表中原始配置可能不相同。当然,在一实施方式中,不同流程节点的类型调用的配置模板表的架构和原始配置均可以不相同。Among them, the user can perform operations such as adding, deleting, modifying and checking the rule configuration table corresponding to the target process node according to the needs, that is, the user generates a configuration request, and the configuration request is used to indicate the type of the process node that the user wants to configure, and use this to call The corresponding configuration template table. In essence, the schema of all configuration template tables may be the same, and the original configurations in the configuration template tables corresponding to different process nodes may be different. Of course, in an embodiment, the structure and original configuration of the configuration template table invoked by different process node types may be different.
用户对配置模板表中原始配置进行修改,也即是将配置模板表进行配置,得到配置好的表,该配置好的表即为对应目标流程节点的一个规则配置表,目标流程节点与规则配置表分割,规则配置表可以被修改,从而实现对目标流程节点的规则的修改,简单且易于实现。The user modifies the original configuration in the configuration template table, that is, configures the configuration template table to obtain a configured table. The configured table is a rule configuration table corresponding to the target process node. The target process node and rule configuration The table is divided, and the rule configuration table can be modified, so as to realize the modification of the rules of the target process node, which is simple and easy to implement.
可选的是,根据配置请求,调用配置模板表包括:Optionally, according to the configuration request, invoking the configuration template table includes:
解析配置请求,确定配置请求对应的流程节点的类型信息;Parse the configuration request, and determine the type information of the process node corresponding to the configuration request;
根据类型信息,从配置模板数据库中确定并调用配置模板表。Based on the type information, the configuration template table is determined and recalled from the configuration template database.
其中,配置请求中包含流程节点的类型信息,不同的类型对应有相应的配置模板表,该配置模板表可以存储在配置模板数据库中,可通过查询调用。The configuration request includes type information of process nodes, and different types correspond to corresponding configuration template tables, which can be stored in a configuration template database and can be called by query.
步骤S203,将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。Step S203 , match the service data with the corresponding rule content in order according to the order of the rule nodes, and determine the rule nodes that hit the matching and the rule nodes that did not hit the matching.
本申请中,在确定规则节点排序后,按照规则节点的排序依次调用对应的规则内容与业务数据进行匹配。匹配可以是指将业务数据与规则内容进行比较,来确定业务数据是否符合规则内容所规定的,如果业务数据符合规则内容的规定,则确定为命中匹配,对应的规则节点即为命中匹配的规则节点,如果业务数据不符合规则内容的规定,则确定为未命中匹配,对应的规则节点即为未命中匹配的规则节点。In the present application, after determining the ordering of the rule nodes, the corresponding rule contents are called in sequence according to the ordering of the rule nodes to match the service data. Matching can refer to comparing the business data with the rule content to determine whether the business data conforms to the rule content. If the business data conforms to the rule content, it is determined as a hit match, and the corresponding rule node is the hit match rule. node, if the business data does not meet the requirements of the rule content, it is determined to be a miss match, and the corresponding rule node is the miss match rule node.
例如,业务数据为一压缩数据包,一规则节点对应的规则内容为数据包大小不大于文件大小阈值,当该压缩数据包的大小不大于该文件大小阈值时,即为符合规则内容,当该压缩数据包的大小大于该文件大小阈值时,即为不符合规则内容。For example, the service data is a compressed data packet, and the content of the rule corresponding to a rule node is that the size of the data packet is not greater than the file size threshold. When the size of the compressed data package is larger than the file size threshold, the content does not meet the rules.
可选的是,在将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之前,还包括:Optionally, before matching the business data with the corresponding rule content according to the order of the rule nodes, and determining the rule nodes that hit the matching and the rule nodes that did not hit the matching, the method further includes:
按照规则节点排序依次预编译对应的规则内容;Precompile the corresponding rule content in sequence according to the order of the rule nodes;
将预编译的时间顺序,将对应预编译结果依次缓存,形成缓存队列;Cache the precompiled time sequence and the corresponding precompiled results in sequence to form a cache queue;
将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点包括:Match the business data with the corresponding rule content in order according to the order of the rule nodes, and determine the rule nodes that hit and match and the rule nodes that do not hit include:
将缓存队列中的预编译结果依次与业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。Match the precompiled results in the cache queue with the business data in sequence, and determine the matching rule node and the missing matching rule node.
其中,为了规则引擎的进一步加速和应对高并发场景,可以对规则节点的规则内容进行预编译,预编译按照规则节点的顺序进行,从而根据预编译的时间顺序,可以将预编译结果依次缓存,形成缓存队列,用于后续的匹配操作。在一实施方式中,上述的预编译可以引入了Guava Cache插件,以此来预编译规则内容。Among them, in order to further accelerate the rule engine and deal with high concurrency scenarios, the rule content of the rule node can be pre-compiled, and the pre-compilation is performed in the order of the rule nodes, so that the pre-compilation results can be sequentially cached according to the time sequence of the pre-compilation. A cache queue is formed for subsequent matching operations. In one embodiment, the above-mentioned pre-compilation may introduce a Guava Cache plug-in, thereby pre-compiling rule content.
预编译即为形成可执行的文件,按照顺序来执行对应的文件,从而实现业务数据与规则的匹配判断,以确定命中匹配的规则节点和未命中匹配的规则节点。Pre-compilation is to form executable files, and the corresponding files are executed in sequence, so as to realize the matching judgment between business data and rules, and determine the rule nodes that hit the matching and the rule nodes that did not hit the matching.
可选的是,将缓存队列中的预编译结果依次与业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点包括:Optionally, the precompiled results in the cache queue are sequentially matched with the business data, and the rule nodes that are hit and matched and the rule nodes that are not matched include:
使用表达式求值引擎对缓存队列中的预编译结果依次进行表达式解析,得到对应的解析结果;Use the expression evaluation engine to perform expression parsing on the precompiled results in the cache queue in turn to obtain the corresponding parsing results;
将对应的解析结果与业务数据进行相似度比较,确定相似度满足阈值的解析结果对应的规则节点为命中匹配的规则节点,确定相似度不满足阈值的解析结果对应的规则节点为未命中匹配的规则节点。Compare the similarity between the corresponding parsing results and the business data, determine that the rule node corresponding to the parsing result whose similarity meets the threshold is the rule node that hits the match, and determine that the rule node corresponding to the parsing result whose similarity does not meet the threshold is the one that misses the match rule node.
其中,规则内容的本质为规则表达式,而在预编译结果中,需要使用表达式求值引擎来来进行表达式解析,从而得到解析结果,该解析结果可以包括规则表达式。The essence of the rule content is a regular expression, and in the precompiled result, an expression evaluation engine needs to be used to parse the expression, so as to obtain a parsing result, and the parsing result may include a regular expression.
将解析结果与业务数据进行相似度比较,根据比较结果来确定是否匹配,如果解析结果为规则表达式,则可将业务数据对应的字符串与规则表达式进行比对,判断业务数据对应的字符串是否属于规则表达式的,此时的阈值为100%,如果是,则说明业务数据与解析结果为相似,否则说明业务数据与解析结果为不相似。Compare the similarity between the parsing result and the business data, and determine whether they match according to the comparison result. If the parsing result is a regular expression, you can compare the character string corresponding to the business data with the regular expression to determine the character corresponding to the business data. Whether the string belongs to a regular expression, the threshold at this time is 100%. If so, it means that the business data is similar to the parsing result; otherwise, it means that the business data and the parsing result are dissimilar.
步骤S204,根据命中匹配的规则节点和未命中匹配的规则节点,结合目标流程节点的下阶段处理条件,确定下阶段流程节点。Step S204: Determine the next-stage process node according to the hit-matched rule node and the miss-matched rule node in combination with the next-stage processing conditions of the target process node.
本申请中,在一个目标流程节点中包括至少一个规则配置表,也即是采用了至少一个规则节点进行规则匹配,因此,命中匹配的规则节点可以为0个,也可以为多个,未命中匹配的规则节点可以为0个,也可以为多个。In this application, at least one rule configuration table is included in a target process node, that is, at least one rule node is used for rule matching. Therefore, the number of matching rule nodes may be 0 or more, and there may be no hits. There can be 0 or more matching rule nodes.
下阶段处理条件可以是指目标流程节点进入下一个阶段处理所需要满足的条件,该条件可以为多种条件的组合。例如,下阶段处理条件为存在1个命中匹配的规则节点即可进入下一个流程节点,即只要存在命中匹配的规则节点,下阶段流程节点即为业务流程中目标流程节点的下一个流程节点;又如,下节点处理条件为规则节点排序中第一个规则节点为未命中匹配的规则节点需要返回上一个流程节点,即规则节点排序中第一个规则节点未命中匹配,下阶段流程节点为业务流程中目标流程节点的上一个流程节点。The next-stage processing condition may refer to a condition that the target process node needs to meet to enter the next-stage processing, and the condition may be a combination of multiple conditions. For example, the processing condition of the next stage is that there is one matching rule node to enter the next process node, that is, as long as there is a matching rule node, the next stage process node is the next process node of the target process node in the business process; For another example, if the processing condition of the next node is that the first rule node in the rule node sorting is a miss-matched rule node, it needs to return to the previous process node, that is, the first rule node in the rule node sorting is a miss-matched rule node, and the next-stage process node is The previous process node of the target process node in the business process.
在一实施方式中,下阶段处理条件可以根据命中规则的规则节点个数与未命中匹配的规则节点的个数的比值来确定下阶段流程节点,如,在比值超过比值阈值时,即命中规则的规则节点个数较多,业务流程中目标流程节点的下一个流程节点作为下阶段流程节点,在比值低于比值阈值时,即命中规则的规则节点个数较少,业务流程中目标流程节点的上一个流程节点作为下阶段流程节点。In one embodiment, the processing condition of the next stage may determine the next stage process node according to the ratio of the number of rule nodes that hit the rule to the number of rule nodes that did not hit the matching rule. For example, when the ratio exceeds the ratio threshold, the rule is hit. The number of rule nodes is large, and the next process node of the target process node in the business process is the next-stage process node. When the ratio is lower than the ratio threshold, the number of rule nodes that hit the rule is small, and the target process node in the business process The previous process node is used as the next stage process node.
可选的是,在将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之后,还包括:Optionally, after matching the business data with the corresponding rule contents according to the order of the rule nodes, and determining the rule nodes that hit the matching and the rule nodes that did not hit the matching, the method further includes:
从展示模板数据库中确定命中匹配的规则节点对应的展示模板;Determine the display template corresponding to the matching rule node from the display template database;
将业务数据填入展示模板中进行展示。Fill in the business data into the display template for display.
其中,为了方便用户的查看,使得用户了解规则匹配的结果,以判断结果是否正确,形成人机交互的功能,对应的在确定命中匹配的规则节点和未命中匹配的规则节点之后,还可以将业务数据展示出来,当然,展示中还需要体现匹配的规则节点的规则特征,因此,需要根据匹配的规则节点来给出展示模板,该展示模板能够表征对应规则节点的规则特征。Among them, in order to facilitate the user's viewing, let the user know the result of the rule matching, to judge whether the result is correct, and form the function of human-computer interaction. The business data is displayed. Of course, the display also needs to reflect the rule characteristics of the matching rule nodes. Therefore, a display template needs to be given according to the matching rule nodes, and the display template can represent the rule characteristics of the corresponding rule nodes.
将业务数据填入展示模板中进行展示,从而使得用户既能够了解到业务数据,也能够了解到命中匹配的规则节点,以防止匹配中命中出错导致后续一系列的错误问题。上述的展示模板数据库与配置模板数据库可以采用一个数据库进行存储。Fill in the business data into the display template for display, so that the user can not only know the business data, but also know the matching rule nodes, so as to prevent the hit error in the matching and lead to a series of subsequent errors. The above-mentioned presentation template database and configuration template database may be stored in one database.
步骤S205,根据下阶段流程节点,更新业务数据在业务流程所处的业务状态。Step S205 , according to the next stage process node, update the business state of the business data in the business process.
本申请中,在确定下阶段流程节点后,即可根据流程节点与表征业务状态的属性值的关系来确定当前的业务状态的属性值,从而以该属性值更新业务状态。最终,所有的流程节点和对应的规则节点形成响应链路,实现对业务数据的自动化处理,有助于提高处理效率。In the present application, after determining the next stage process node, the attribute value of the current business state can be determined according to the relationship between the process node and the attribute value representing the business state, so as to update the business state with the attribute value. Finally, all process nodes and corresponding rule nodes form a response link to realize automatic processing of business data, which helps to improve processing efficiency.
本申请实施例通过获取业务数据和业务数据在业务流程所处的业务状态,分析业务状态,确定对应的目标流程节点,调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点,根据命中匹配的规则节点和未命中匹配的规则节点,结合目标流程节点的下阶段处理条件,确定下阶段流程节点,并根据下阶段流程节点,更新业务数据在业务流程所处的业务状态,在一个流程节点中设置多个规则配置表,以匹配多个规则,避免设置多个流程节点,降低了流程节点设计的复杂程度,同时,满足了在实际应用场景中同一流程节点对多种规则的需求。The embodiment of the present application obtains the business data and the business state of the business data in the business process, analyzes the business state, determines the corresponding target process node, calls N rule configuration tables corresponding to the target process node, and parses each rule configuration table , determine the order of the rule nodes, the rule configuration table contains the current rule node, the current rule content, the pre-rule node and the post-rule node, and match the business data with the corresponding rule content according to the order of the rule nodes, determine The rule node that hits the match and the rule node that misses the match, according to the rule node that hits the match and the rule node that doesn't match, combined with the next-stage processing conditions of the target process node, determine the next-stage process node, and according to the next-stage process node, Update the business state of the business data in the business process, set multiple rule configuration tables in one process node to match multiple rules, avoid setting multiple process nodes, and reduce the complexity of process node design. In practical application scenarios, the same process node requires multiple rules.
参见图3,是本申请实施例三提供的一种基于规则引擎的业务处理方法的流程示意图,如图3所示,该基于规则引擎的业务处理方法可以包括以下步骤:Referring to FIG. 3, it is a schematic flowchart of a rule engine-based business processing method provided in Embodiment 3 of the present application. As shown in FIG. 3, the rule engine-based business processing method may include the following steps:
步骤S301,获取业务数据和业务数据在业务流程所处的业务状态,分析业务状态,确定业务数据对应的目标流程节点。In step S301, the business data and the business state of the business data in the business process are acquired, the business state is analyzed, and the target process node corresponding to the business data is determined.
步骤S302,调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序。Step S302, call N rule configuration tables corresponding to the target process node, parse each rule configuration table, and determine the order of the rule nodes.
步骤S303,将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。Step S303: Match the business data with the corresponding rule content in order according to the order of the rule nodes, and determine the rule nodes that hit the matching and the rule nodes that do not hit the matching.
其中,步骤S301至步骤S303与上述步骤S201至步骤S203的内容相同,可参考步骤S201至步骤S203的描述,在此不再赘述。The contents of steps S301 to S303 are the same as the above-mentioned steps S201 to S203 , and the descriptions of steps S201 to S203 may be referred to, which will not be repeated here.
步骤S304,若未命中匹配的规则节点为规则节点排序中第一个规则节点,则确定规则配置错误,若命中规则的规则节点为规则节点排序中第一个规则节点,则确定规则配置正确。Step S304, if the rule node that does not hit the matching rule is the first rule node in the rule node ordering, it is determined that the rule configuration is incorrect, and if the rule node that hits the rule is the first rule node in the rule node ordering, it is determined that the rule configuration is correct.
本申请中,只要是规则节点排序中第一个规则节点没有命中匹配,则可以说明该业务数据无法通过目标流程节点,即输出规则配置错误,只要是规则节点排序中第一个规则节点命中匹配,则可以说明该业务数据可以通过目标流程节点,即输出规则配置正确。In this application, as long as the first rule node in the rule node sorting does not have a hit match, it means that the business data cannot pass through the target process node, that is, the output rule configuration is wrong, as long as the first rule node in the rule node sorting hits a match , it means that the business data can pass through the target process node, that is, the output rules are configured correctly.
在一实施方式中,若不存在未命中匹配的规则节点,则确定规则配置正确,即在所有规则均匹配的情况下,才能够通过该目标流程节点。In one embodiment, if there is no unmatched rule node, it is determined that the rule configuration is correct, that is, when all the rules are matched, the target process node can be passed.
步骤S305,若确定规则配置错误,则确定下阶段流程节点为目标流程节点的上一个流程节点,若确定规则配置正确,则确定下阶段流程节点为目标流程节点的下一个流程节点。Step S305, if it is determined that the rule configuration is wrong, the next stage process node is determined to be the previous process node of the target process node, and if it is determined that the rule configuration is correct, the next stage process node is determined to be the next process node of the target process node.
本申请中,目标流程节点的下阶段处理条件为在规则配置错误时,返回上一个流程节点,在规则匹配错误时,执行下一个流程节点。In the present application, the processing condition of the next stage of the target process node is to return to the previous process node when the rule configuration is incorrect, and execute the next process node when the rule matching is incorrect.
下阶段处理条件采用简单的[0,1]模式,即规则配置错误为0,规则配置正确为1,如果收到0,则确定下阶段流程节点为目标流程节点的上一个流程节点,如果收到1,则确定下阶段流程节点为目标流程节点的下一个流程节点,从而提高了The next stage processing condition adopts a simple [0, 1] mode, that is, the rule configuration error is 0, and the rule configuration is correct 1. If 0 is received, the next stage process node is determined to be the previous process node of the target process node. to 1, the next stage process node is determined as the next process node of the target process node, thereby improving the
步骤S306,根据下阶段流程节点,更新业务数据在业务流程所处的业务状态。Step S306, according to the next stage process node, update the business state of the business data in the business process.
其中,步骤S306与上述步骤S205的内容相同,可参考步骤S205的描述,在此不再赘述。The content of step S306 is the same as that of the above-mentioned step S205, and reference may be made to the description of step S205, which will not be repeated here.
本申请实施例提出的规则引擎能够根据数据库配置的规则,自动对流程中的增员信息进行规则校验,并根据校验结果返回各种不同的对应处理方式。通过数据库进行配置的方式,免除了变更规则时必须要发版而需要的人力。如此,大大降低了运营、机构方面必须要投入的人力,提高了规则变更整个流程的效率,使新规则能够更快更敏捷的落地并响应前线业务对规则具体细节方面的反馈。这能够帮助企业高效改善服务质量,提高用户满意度。规则引擎同时也将纷繁复杂的规则封装了起来,使增员项目的代码更加简洁,核心逻辑更加清晰突出,有利于降低代码后期的维护成本和新开发者的上手成本,增加项目鲁班性和维护性。这使项目更易于维护和迭代,长期维护成本下降。通过整个规则引擎按轻量进行设计,在可以完整支持现有业务逻辑的情况下,尽可能保持轻量。结合业务场景,设计了数据库配置规则的配置逻辑,可以更好的响应业务需求,降低人力成本。The rule engine proposed in the embodiment of the present application can automatically perform rule verification on the personnel addition information in the process according to the rules configured in the database, and return various corresponding processing methods according to the verification result. The configuration through the database eliminates the need for manpower that must be released when changing the rules. In this way, the manpower that must be invested in operations and institutions is greatly reduced, the efficiency of the entire rule change process is improved, and the new rules can be implemented faster and more agilely, and respond to the feedback of the front-line business on the specific details of the rules. This can help companies efficiently improve service quality and increase user satisfaction. The rule engine also encapsulates the complicated rules, making the code of the add-on project more concise and the core logic more clear and prominent, which is beneficial to reduce the maintenance cost in the later stage of the code and the start-up cost of new developers, and increase the project's performance and maintenance. sex. This makes projects easier to maintain and iterate, and long-term maintenance costs go down. The entire rule engine is designed to be lightweight, so as to fully support the existing business logic, keep it as lightweight as possible. Combined with business scenarios, the configuration logic of database configuration rules is designed, which can better respond to business needs and reduce labor costs.
对应于上文实施例的基于规则引擎的业务处理方法,图4示出了本申请实施例四提供的基于规则引擎的业务处理装置的结构框图,上述基于规则引擎的业务处理装置在图1中的服务端和客户端中均可使用,前提是上述服务端和客户端对应的计算机设备均连接相应的业务系统、数据库、规则库等用于支撑业务处理所需的必要设备,或者上述服务端和客户端对应的计算机设备中运行业务系统,并连接或者配置数据库、规则库等。上述业务处理方法用在业务系统中,实现对业务系统中业务数据的处理,包括业务数据的状态更新、规则校验等。为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the business processing method based on the rule engine of the above embodiment, FIG. 4 shows a block diagram of the structure of the business processing apparatus based on the rule engine provided in Embodiment 4 of the present application, and the above-mentioned business processing apparatus based on the rule engine is shown in FIG. 1 . It can be used in both the server and client of the above-mentioned server, provided that the computer equipment corresponding to the above-mentioned server and client is connected to the corresponding business system, database, rule base and other necessary equipment to support business processing, or the above-mentioned server Run the business system in the computer equipment corresponding to the client, and connect or configure the database, rule base, etc. The above-mentioned business processing method is used in a business system to realize the processing of business data in the business system, including state update of business data, rule verification, and the like. For the convenience of description, only the parts related to the embodiments of the present application are shown.
参见图4,该基于规则引擎的业务处理装置包括:Referring to Figure 4, the rule engine-based business processing device includes:
流程节点确定模块41,用于获取业务数据和业务数据在业务流程所处的业务状态,分析业务状态,确定业务数据对应的目标流程节点;The process
规则节点排序模块42,用于调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序,规则配置表中包含当前的规则节点、当前的规则内容、前置的规则节点和后置的规则节点,N为大于1的整数;The rule
规则节点匹配模块43,用于将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点;The rule
流程节点处理模块44,用于根据命中匹配的规则节点和未命中匹配的规则节点,结合目标流程节点的下阶段处理条件,确定下阶段流程节点,并根据下阶段流程节点,更新业务数据在业务流程所处的业务状态。The process
可选的是,该业务处理装置还包括:Optionally, the service processing device further includes:
预编译模块,用于在将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之前,按照规则节点排序依次预编译对应的规则内容;The pre-compilation module is used to pre-compile the corresponding rule content in order according to the order of the rule nodes before matching the business data with the corresponding rule content in order according to the order of the rule nodes, and before determining the matched rule nodes and the unmatched rule nodes;
缓存模块,用于将预编译的时间顺序,将对应预编译结果依次缓存,形成缓存队列;The cache module is used to cache the precompiled time sequence and the corresponding precompiled results in sequence to form a cache queue;
上述规则节点匹配模块43包括:The above-mentioned rule
规则节点匹配单元,用于将缓存队列中的预编译结果依次与业务数据进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点。The rule node matching unit is used to sequentially match the precompiled results in the cache queue with the service data, and determine the rule node that hits the match and the rule node that does not hit the match.
可选的是,上述规则节点匹配单元包括:Optionally, the above rule node matching unit includes:
解析运算子单元,用于使用表达式求值引擎对缓存队列中的预编译结果依次进行表达式解析,得到对应的解析结果;The parsing operation subunit is used to perform expression parsing on the precompiled results in the cache queue in turn by using the expression evaluation engine to obtain corresponding parsing results;
匹配运算子单元,用于将对应的解析结果与业务数据进行相似度比较,确定相似度满足阈值的解析结果对应的规则节点为命中匹配的规则节点,确定相似度不满足阈值的解析结果对应的规则节点为未命中匹配的规则节点。The matching operation sub-unit is used to compare the similarity between the corresponding analysis result and the business data, determine that the rule node corresponding to the analysis result whose similarity meets the threshold is the rule node that hits the matching, and determine that the analysis result whose similarity does not meet the threshold corresponds to The rule node is the rule node that misses the match.
可选的是,该业务处理装置还包括:Optionally, the service processing device further includes:
展示模板确定模块,用于在将业务数据按照规则节点排序依次与对应的规则内容进行匹配,确定命中匹配的规则节点和未命中匹配的规则节点之后,从展示模板数据库中确定命中匹配的规则节点对应的展示模板;The display template determination module is used to match the business data with the corresponding rule content according to the order of the rule nodes, and determine the matching rule node from the display template database after determining the matching rule node and the missing matching rule node from the display template database. The corresponding display template;
展示模块,用于将业务数据填入展示模板中进行展示。The display module is used to fill in the business data into the display template for display.
可选的是,该业务处理装置还包括:Optionally, the service processing device further includes:
配置请求获取模块,用于在调用与目标流程节点对应的N个规则配置表,解析每个规则配置表,确定规则节点排序之前,获取用户的配置请求;The configuration request obtaining module is used to obtain the user's configuration request before calling the N rule configuration tables corresponding to the target process node, parse each rule configuration table, and determine the order of the rule nodes;
配置模板调用模块,用于根据配置请求,调用配置模板表,配置模板表用于采集用户对原始配置的修改数据;The configuration template calling module is used to call the configuration template table according to the configuration request, and the configuration template table is used to collect the modification data of the original configuration by the user;
配置表更新模块,用于使用采集得到的修改数据,更新配置模板表,确定更新后的配置模板表为一规则配置表。The configuration table updating module is used to update the configuration template table using the collected modified data, and determine that the updated configuration template table is a rule configuration table.
可选的是,上述配置模板调用模块包括:Optionally, the above configuration template calling module includes:
配置类型确定单元,用于解析配置请求,确定配置请求对应的流程节点的类型信息;The configuration type determination unit is used to parse the configuration request and determine the type information of the process node corresponding to the configuration request;
配置模板调用单元,用于根据类型信息,从配置模板数据库中确定并调用配置模板表。The configuration template calling unit is used to determine and call the configuration template table from the configuration template database according to the type information.
可选的是,上述流程节点处理模块44包括:Optionally, the above-mentioned process
规则配置判断模块,用于若未命中匹配的规则节点为规则节点排序中第一个规则节点,则确定规则配置错误,若命中规则的规则节点为规则节点排序中第一个规则节点,则确定规则配置正确;The rule configuration judgment module is used to determine that the rule configuration is incorrect if the rule node that does not hit the matching rule is the first rule node in the rule node ordering, and if the rule node that hits the rule is the first rule node in the rule node ordering, determine The rules are configured correctly;
下一节点确定模块,用于若确定规则配置错误,则确定下阶段流程节点为目标流程节点的上一个流程节点,若确定规则配置正确,则确定下阶段流程节点为目标流程节点的下一个流程节点,其中,目标流程节点的下阶段处理条件为在规则配置错误时,返回上一个流程节点,在规则匹配错误时,执行下一个流程节点。The next node determination module is used to determine that the next stage process node is the previous process node of the target process node if it is determined that the rule configuration is incorrect, and if it is determined that the rule configuration is correct, then determine that the next stage process node is the next process of the target process node node, where the next stage processing condition of the target process node is to return to the previous process node when the rule configuration is incorrect, and execute the next process node when the rule matching is incorrect.
需要说明的是,上述模块之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above modules are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be found in the method embodiments section for details. Repeat.
图5为本申请实施例五提供的一种计算机设备的结构示意图。如图5所示,该实施例的计算机设备包括:至少一个处理器(图5中仅示出一个)、存储器以及存储在存储器中并可在至少一个处理器上运行的计算机程序,处理器执行计算机程序时实现上述任意各个基于规则引擎的业务处理方法实施例中的步骤。FIG. 5 is a schematic structural diagram of a computer device according to Embodiment 5 of the present application. As shown in FIG. 5 , the computer device of this embodiment includes: at least one processor (only one is shown in FIG. 5 ), a memory, and a computer program stored in the memory and executable on the at least one processor, and the processor executes The computer program implements the steps in any of the foregoing embodiments of the rule engine-based business processing method.
该计算机设备可包括,但不仅限于,处理器、存储器。本领域技术人员可以理解,图5仅仅是计算机设备的举例,并不构成对计算机设备的限定,计算机设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括网络接口、显示屏和输入装置等。The computer equipment may include, but is not limited to, a processor, a memory. Those skilled in the art can understand that FIG. 5 is only an example of a computer device, and does not constitute a limitation to the computer device. The computer device may include more or less components than the one shown, or combine some components, or different components , for example, it may also include a network interface, a display screen, an input device, and the like.
所称处理器可以是CPU,该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific IntegratedCircuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor may be a CPU, and the processor may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field- Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
存储器包括可读存储介质、内存储器等,其中,内存储器可以是计算机设备的内存,内存储器为可读存储介质中的操作系统和计算机可读指令的运行提供环境。可读存储介质可以是计算机设备的硬盘,在另一些实施例中也可以是计算机设备的外部存储设备,例如,计算机设备上配备的插接式硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,存储器还可以既包括计算机设备的内部存储单元也包括外部存储设备。存储器用于存储操作系统、应用程序、引导装载程序(BootLoader)、数据以及其他程序等,该其他程序如计算机程序的程序代码等。存储器还可以用于暂时地存储已经输出或者将要输出的数据。The memory includes a readable storage medium, an internal memory, etc., wherein the internal memory may be a memory of a computer device, and the internal memory provides an environment for the execution of an operating system and computer-readable instructions in the readable storage medium. The readable storage medium may be a hard disk of a computer device, and in other embodiments, it may also be an external storage device of the computer device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), Secure Digital (SD) card, flash card (Flash Card), etc. Further, the memory may also include both an internal storage unit of the computer device and an external storage device. The memory is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as program codes of computer programs, and the like. The memory may also be used to temporarily store data that has been or will be output.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述装置中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质至少可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、计算机存储器、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the above apparatus, reference may be made to the corresponding process in the foregoing method embodiments, and details are not described herein again. The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program to instruct the relevant hardware. The computer program can be stored in a computer-readable storage medium, and the computer program can be processed When the device is executed, the steps of the foregoing method embodiments may be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate forms, and the like. The computer-readable medium may include at least: any entity or device capable of carrying computer program code, recording medium, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electrical Carrier signals, telecommunications signals, and software distribution media. For example, U disk, mobile hard disk, disk or CD, etc. In some jurisdictions, under legislation and patent practice, computer readable media may not be electrical carrier signals and telecommunications signals.
本申请实现上述实施例方法中的全部或部分流程,也可以通过一种计算机程序产品来完成,当计算机程序产品在计算机设备上运行时,使得计算机设备执行时实现可实现上述方法实施例中的步骤。This application implements all or part of the processes in the methods of the above embodiments, and can also be completed by a computer program product. When the computer program product runs on a computer device, when the computer device executes, the implementation of the above method embodiments can be realized. step.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the foregoing embodiments, the description of each embodiment has its own emphasis. For parts that are not described or described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/计算机设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/计算机设备实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/computer equipment and method may be implemented in other manners. For example, the apparatus/computer equipment embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components. May be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The recorded technical solutions are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in the application. within the scope of protection.
Claims (10)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210734098.8A CN115033816B (en) | 2022-06-27 | 2022-06-27 | Business processing method, device, computer equipment and medium based on rule engine |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210734098.8A CN115033816B (en) | 2022-06-27 | 2022-06-27 | Business processing method, device, computer equipment and medium based on rule engine |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN115033816A true CN115033816A (en) | 2022-09-09 |
| CN115033816B CN115033816B (en) | 2025-01-07 |
Family
ID=83127493
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210734098.8A Active CN115033816B (en) | 2022-06-27 | 2022-06-27 | Business processing method, device, computer equipment and medium based on rule engine |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115033816B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115185616A (en) * | 2022-09-14 | 2022-10-14 | 深圳依时货拉拉科技有限公司 | Business rule engine and processing method thereof |
| CN117453372A (en) * | 2023-11-23 | 2024-01-26 | 暗物质(北京)智能科技有限公司 | Task planning method and device, electronic equipment and storage medium |
| CN118427409A (en) * | 2024-07-04 | 2024-08-02 | 杭州乒乓智能技术有限公司 | Business request processing method and system based on rule matching and electronic device |
| CN119155352A (en) * | 2024-08-22 | 2024-12-17 | 上海逸迅信息科技有限公司 | Internet of things data processing method and device |
| WO2025016329A1 (en) * | 2023-07-14 | 2025-01-23 | 北京极智嘉科技股份有限公司 | Warehouse operation process configuration method and apparatus |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106909543A (en) * | 2015-12-22 | 2017-06-30 | 阿里巴巴集团控股有限公司 | The method for mode matching and device of a kind of regulation engine |
| CN110728519A (en) * | 2019-09-27 | 2020-01-24 | 支付宝(杭州)信息技术有限公司 | Processing method and device for refused payment task and server |
| CN111382928A (en) * | 2019-12-30 | 2020-07-07 | 苏州伽顿全盛信息科技有限公司 | Business process management BPM-based statement generating method and processing device |
| CN112150091A (en) * | 2019-06-28 | 2020-12-29 | 华为技术有限公司 | Method and device for processing business rules |
| WO2022068189A1 (en) * | 2020-09-30 | 2022-04-07 | 平安科技(深圳)有限公司 | Flow visualization monitoring method and apparatus, computer device, and storage medium |
| CN114611929A (en) * | 2022-03-10 | 2022-06-10 | 平安普惠企业管理有限公司 | Method, device and equipment for configuring business process and storage medium |
-
2022
- 2022-06-27 CN CN202210734098.8A patent/CN115033816B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106909543A (en) * | 2015-12-22 | 2017-06-30 | 阿里巴巴集团控股有限公司 | The method for mode matching and device of a kind of regulation engine |
| CN112150091A (en) * | 2019-06-28 | 2020-12-29 | 华为技术有限公司 | Method and device for processing business rules |
| CN110728519A (en) * | 2019-09-27 | 2020-01-24 | 支付宝(杭州)信息技术有限公司 | Processing method and device for refused payment task and server |
| CN111382928A (en) * | 2019-12-30 | 2020-07-07 | 苏州伽顿全盛信息科技有限公司 | Business process management BPM-based statement generating method and processing device |
| WO2022068189A1 (en) * | 2020-09-30 | 2022-04-07 | 平安科技(深圳)有限公司 | Flow visualization monitoring method and apparatus, computer device, and storage medium |
| CN114611929A (en) * | 2022-03-10 | 2022-06-10 | 平安普惠企业管理有限公司 | Method, device and equipment for configuring business process and storage medium |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115185616A (en) * | 2022-09-14 | 2022-10-14 | 深圳依时货拉拉科技有限公司 | Business rule engine and processing method thereof |
| WO2025016329A1 (en) * | 2023-07-14 | 2025-01-23 | 北京极智嘉科技股份有限公司 | Warehouse operation process configuration method and apparatus |
| CN117453372A (en) * | 2023-11-23 | 2024-01-26 | 暗物质(北京)智能科技有限公司 | Task planning method and device, electronic equipment and storage medium |
| CN117453372B (en) * | 2023-11-23 | 2024-04-09 | 暗物质(北京)智能科技有限公司 | Task planning method and device, electronic equipment and storage medium |
| CN118427409A (en) * | 2024-07-04 | 2024-08-02 | 杭州乒乓智能技术有限公司 | Business request processing method and system based on rule matching and electronic device |
| CN119155352A (en) * | 2024-08-22 | 2024-12-17 | 上海逸迅信息科技有限公司 | Internet of things data processing method and device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115033816B (en) | 2025-01-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115033816A (en) | Rule engine-based business processing method, apparatus, computer equipment and medium | |
| CN115827895A (en) | Vulnerability knowledge graph processing method, device, equipment and medium | |
| CN111538651B (en) | Interface testing method, device, server and storage medium | |
| US10915304B1 (en) | System optimized for performing source code analysis | |
| CN112596932A (en) | Service registration and interception method and device, electronic equipment and readable storage medium | |
| CN118963869B (en) | Large model task calling execution method and device based on knowledge graph | |
| CN116089446A (en) | Optimization control method and device for structured query statement | |
| CN114297663A (en) | Intelligent contract vulnerability detection method, device, equipment and storage medium | |
| CN115599359A (en) | Code generation method, device, equipment and medium | |
| US9251222B2 (en) | Abstracted dynamic report definition generation for use within information technology infrastructure | |
| CN114968816A (en) | Strategy testing method, device, equipment and storage medium based on data simulation | |
| CN115017054A (en) | Data synchronization test method, device, electronic device and storage medium | |
| CN111159203B (en) | Data association analysis method, platform, electronic equipment and storage medium | |
| CN115617661A (en) | Simulation system test method, device, electronic equipment and storage medium | |
| TWI765447B (en) | Decoupling method and system for decomposing services | |
| CN115292178A (en) | Test data searching method, device, storage medium and terminal | |
| CN115080898A (en) | View update method, device, device and medium based on front-end trigger scene | |
| CN116401410A (en) | Method, device, storage medium and equipment for accessing map data to multi-scene graph database | |
| CN114998038A (en) | Abnormal policy processing method and system | |
| CN114924977A (en) | AI-based unit testing method and related equipment | |
| CN114996427A (en) | Message display method, device, equipment and storage medium based on intelligent question answering | |
| CN114519005A (en) | Method, device and equipment for testing response text and storage medium | |
| US12367037B2 (en) | System optimized for performing source code analysis | |
| CN116719793B (en) | Link generation method, apparatus, device and storage medium | |
| CN121144330A (en) | A method, apparatus, program product, and storage medium for processing SQL statements. |
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 |