Business rule verification method and device, equipment and medium
By analyzing, sorting and matching the business rules to be verified in the business management system, the problem of non-uniqueness of the new business rule template is solved to ensure the uniqueness of the business rule template and the normal operation of the business logic.
Patent Information
- Application Number
- CN202311147531.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2025-03-07
AI Technical Summary
In the business management system, the new business rule template has not been verified, resulting in the non-uniqueness of the business rule template and affecting the normal operation of the business logic.
By analyzing the business rules string to be verified, we obtain a list of sub-rules sets to be verified with the business rules relationships, and sort them according to the preset sorting rules to form an ordered sub-rules set list, and then match and analyze it with the total table of ordered sub-rules sets of existing business rules to complete the verification of business rules.
Ensure the uniqueness of business rule templates, avoid duplicate additions caused by different string order, and ensure smooth operation of business management logic of the business management system.
Smart Images

Figure CN119579052A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to a business rule verification method, device, equipment and medium. Background Art
[0002] In some business management systems (such as warehouse management systems), business rule templates that can implement specific business logic in different business scenarios in each business field are usually configured. One specific business scenario corresponds to one business rule template (i.e., one matching condition). In the actual business management process, each business element in the actual business information string is matched one by one with each business element in the business rule template string at the business element granularity. When each business element satisfies the matching condition, a unique target business rule template can be determined to determine the unique business execution logic.
[0003] However, in the process of implementing the present invention, it was found that there are at least the following technical problems in the prior art: Usually, in the application process of the business management system, new business rule templates can be flexibly added according to the business needs of users, but the newly added business rule templates have not been verified, and the uniqueness of the newly added business rule templates cannot be determined. For example, business rule templates with the same business elements but different corresponding element string orders are added, or business rule templates with overlapping value ranges of business element matching conditions are added. In the subsequent rule matching process, multiple business rule templates may be matched, thereby affecting the normal operation of the business logic. Summary of the invention
[0004] The embodiments of the present invention provide a business rule verification method, apparatus, equipment and medium, which can verify the business rules to be verified during the process of business rule updating. The verification results are not constrained by the character order of business elements in the business rules, and the addition of identical business rules is avoided, thereby ensuring the uniqueness of the business rule template in the business rule database, so that the business management logic of the business management system can run smoothly during operation.
[0005] In a first aspect, an embodiment of the present invention provides a business rule verification method, the method comprising:
[0006] Obtain a business rule string to be verified, and parse the business rule string to be verified to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships;
[0007] Sorting the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to a preset sorting rule to obtain a list of ordered sub-rule sets to be checked;
[0008] The list of ordered sub-rule sets to be verified is matched and analyzed with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be verified.
[0009] In a second aspect, an embodiment of the present invention further provides a rule matching device, the device comprising:
[0010] The to-be-verified rule parsing module is used to obtain the to-be-verified business rule string, and parse the to-be-verified business rule string to obtain a to-be-verified sub-rule set list whose business rule relationships are all AND relationships;
[0011] A to-be-verified rule sorting module is used to sort the business rules in each to-be-verified sub-rule set in the to-be-verified sub-rule set list according to a preset sorting rule to obtain an ordered sub-rule set list to be verified;
[0012] The rule verification module is used to match and analyze the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario, and complete the verification process of the business rule character string to be verified.
[0013] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0014] one or more processors;
[0015] A memory for storing one or more programs;
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the business rule verification method provided by any embodiment of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a business rule verification method as provided in any embodiment of the present invention.
[0018] The embodiments of the above invention have the following advantages or beneficial effects:
[0019] The embodiment of the present invention, after each acquisition of the business rule string to be verified, parses the business rule string to be verified, obtains a list of sub-rule sets to be verified whose business rule relationships are all AND relationships; then, sorts the business rules in each sub-rule set to be verified in the sub-rule set list to be verified according to the preset sorting rules, obtains a list of ordered sub-rule sets to be verified; finally, matches and analyzes the list of ordered sub-rule sets to be verified with the total table of ordered sub-rule sets of existing business rules in the corresponding business scenario, completes the verification process of the business rule string to be verified, in which the matching analysis based on the ordered set can avoid repeated addition of the same rule elements due to different string orders, and performs verification after sorting out the relationship between the rule elements in the business rule to be verified, thereby realizing the feasibility of business rule verification. The technical solution of the embodiment of the present invention solves the problem of lack of new business rule verification process in the business management system, can analyze and determine the uniqueness of the template to be verified from the business element level, avoids the redundancy of the business rule template caused by adding the same business rule template in the business management system, and is conducive to the smooth operation of the business management logic of the business management system. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of a business rule verification method provided by an embodiment of the present invention;
[0021] Figure 2 is a flow chart of a business rule verification method provided by an embodiment of the present invention;
[0022] Figure 3 is a flow chart of a business rule string parsing example provided by an embodiment of the present invention;
[0023] Figure 4 It is a flowchart of a business rule verification example based on dictionary order provided by an embodiment of the present invention;
[0024] Figure 5 It is a structural diagram of a business rule verification method device provided by an embodiment of the present invention;
[0025] Figure 6 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0027] Figure 1This is a flow chart of a business rule verification method provided by an embodiment of the present invention. This embodiment can be applied to the process of business rule processing in a business management system, such as the scenario of setting business rules for a certain business field in a Warehouse Management System (WMS). The method can be executed by a business rule verification device, which can be implemented by software and / or hardware and integrated into a computer device with application development function.
[0028] like Figure 1 As shown, the business rule verification method of this embodiment includes the following steps:
[0029] S110, obtaining a business rule character string to be verified, and parsing the business rule character string to be verified to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships.
[0030] The business rule string can be a string used to describe the business execution logic corresponding to any business scenario in any business field, or a condition description string for implementing any business execution process. The business rule string to be verified can be a business rule string that needs to be added to the business system, or a business rule string that needs to be matched and verified with the actual standard business rule string in the business scenario of business information verification.
[0031] Typically, a business rule string may include business rule relationship symbols and business rule elements. Among them, business rule elements represent information such as data items in business rules and their corresponding values. Business rule relationship symbols represent the association relationship between data items in business rule elements, or the numerical relationship between data items. Business rule relationship symbols may include one or more relationship symbols such as equal to, greater than, less than, and, or, function, business value, left bracket, right bracket, etc. For example, in a warehouse management system, in a business scenario for managing the specifications of outbound packaging boxes, the outbound packing rule string may include business rule elements such as volume, weight, maximum number of pieces, and rule relationship matching strings such as the value range interval of each business rule element.
[0032] Furthermore, the business rule string to be verified is parsed, that is, the business rule is split into multiple union sets consisting of business rule elements. Each set in the list of sub-rule sets to be verified corresponding to the business rule string to be verified is matched with each set corresponding to the target reference business rule, which realizes the minimum granularity of the pairwise comparison of business rules, can achieve the effect of complete verification, and reduce the risks brought by the newly added matching conditions to each application scenario.
[0033] Specifically, in the process of parsing the business rule string to be checked, the business rule relationship symbols and business rule elements in the business rule string to be checked can be identified; then, the business rule elements are decomposed and combined according to the identified business rule relationship symbols. In this process, the relationship dimensions of the business rule relationship symbols are divided according to the brackets, the "or relationship" is split within a relationship dimension, and the business rule relationship symbols are combined between the relationship dimensions with associated relationships, so as to obtain a set of business rule elements whose multiple business rule relationships are all "and relationships" in parallel, forming the list of sub-rule sets to be checked.
[0034] S120: Sort the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to a preset sorting rule to obtain a list of ordered sub-rule sets to be checked.
[0035] Since business rule strings usually contain associations of "and" and "or", the inconsistency in the order of business rule elements cannot be resolved simply by character matching. That is, business rules with the same content but different orders of business rule elements cannot be verified. In order to facilitate the verification of the inclusion relationship between the two set lists in the subsequent matching verification process, it is necessary to sort the sub-rule strings in each sub-rule set to be verified according to a preset sorting rule. Among them, the preset sorting rule is a unified sorting rule used for sorting after parsing existing business rules and sorting after parsing business rule strings to be verified. For example, it can be arranged in dictionary order.
[0036] For example, a list of sub-rule sets to be checked is: {{a=1, c=3, b=2}, {b=2, a=1, d=4}}. The business rule elements of each set in the list are sorted in lexicographic order, and the sorted sub-rule set list to be checked is finally obtained: {{a=1, b=2, c=3}, {a=1, b=2, d=4}}.
[0037] S130: Match and analyze the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be verified.
[0038] The total list of ordered sub-rule sets of existing business rules is the sum of multiple ordered sub-rule set lists of all-AND relationships obtained by parsing all business rule strings that have been set in the same application business scenario as the business rule string to be verified. The total list of ordered sub-rule sets can be understood as the business rule standard that the business relationship system refers to during the business management process.
[0039] When verifying the business rule string to be verified, it is necessary to match and analyze the sub-rule strings in each set of the ordered sub-rule set list to be verified with the rule strings in each set in the ordered sub-rule set total table. When the sub-rule strings in each set of the ordered sub-rule set list to be verified and the rule strings in each set in the ordered sub-rule set total table are not subsets of each other, the verification can be passed, otherwise the verification fails. When the business rule string to be verified is a business rule string that needs to be added to the business system, it can be determined based on the verification result whether to add the business rule string to be verified to the business rule database of the corresponding business management system; when the business rule string to be verified is a business rule string that needs to be matched and verified with the actual standard business rule string in the business scenario of business information verification, it can be determined based on the verification result whether it can match the corresponding target business rule.
[0040] By using the business rule verification method in this embodiment, the target verification result can be achieved in the following scenarios: Assume that there is a business rule condition a>7, and a new business rule a>5 needs to be added. During the verification process, it is determined through verification that the original business rules and the newly added business rules are subsets of each other, and new additions are not allowed. If a new business rule a>5 is added, all subsequent query conditions of a=x and x∈(8, positive infinity) will hit two rule templates. When there is a business rule a>5, a new business rule a>7 needs to be added. At this time, it is also regarded as a situation where the original business rules and the newly added business rules are subsets of each other, and new additions are not allowed. If a new rule is added, subsequent queries will hit two rule templates as in the above scenario. Therefore, as long as the verification fails, the rule template corresponding to the business rule to be added will not be added, nor will the rule template corresponding to the newly added application scenario be retrieved using the existing business rules, which does not conform to the actual application scenario.
[0041] It should be noted that, in which a itself is taken as a business rule element of a business rule, the existing business rules and the newly added business rules are mutually subsets, which expresses whether the business rules composed of each element have an intersection, and the intersection here does not mean a subset in the strict mathematical sense. For example: from a mathematical point of view, any pair of business rule elements a or b in the two business rules (a>1, b>2) and ((a>2, b>5) are not mutually subsets, but this embodiment believes that as long as there are overlapping parts in the matching verification process of the relevant application scenario, they are considered to be mutually subsets, unless other elements c=1 are combined to distinguish.
[0042] The technical solution of this embodiment is to parse the business rule string to be verified after each acquisition of the business rule string to be verified, and obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships; then, sort the business rules in each sub-rule set to be verified in the sub-rule set list to be verified according to the preset sorting rules to obtain a list of ordered sub-rule sets to be verified; finally, match and analyze the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule string to be verified. In this process, the matching analysis based on the ordered set can avoid repeated addition of the same rule elements due to different string orders, and verify after sorting out the relationship between the rule elements in the business rules to be verified, so as to realize the feasibility of the business rule verification sheet. The technical solution of the embodiment of the present invention solves the problem of lack of new business rule verification process in the business management system, and can determine the uniqueness of the template to be verified by analyzing from the business element level, avoid the redundancy of business rule templates caused by adding the same business rule template in the business management system, and facilitate the smooth operation of the business management logic of the business management system.
[0043] Figure 2 This is a flow chart of a business rule verification method in an embodiment of the present invention. This embodiment and the business rule verification method in the above embodiment belong to the same inventive concept, and further describes the process of parsing the business rule string. The method can be executed by a business rule verification device, which can be implemented by software and / or hardware and integrated in a computer device with application development function.
[0044] like Figure 2 As shown, the business rule verification method of this embodiment includes the following steps:
[0045] S210: parse all business rule strings in the target business field, and sort the parsing results to obtain a total list of ordered sub-rule sets in which all the business rule relationships corresponding to the business rule strings are AND relationships.
[0046] In this embodiment, in order to enable the business management system to verify new business rules or effectively verify business rules in the business management process, it is necessary to pre-process all business rule strings in the target business field. The pre-processing process is to parse each business rule string in all business rule strings to build a business rule database.
[0047] Specifically, the purpose of parsing each business rule string in the target business field is to split the string composed of "&&", "||", "(", ")" and various business rule elements in the string into multiple element sets composed of all "&&" conditions, and pay more attention to the relationship between various business rule elements.
[0048] In an optional implementation, the idea of depth-first search can be remembered, and the merging relationship between "&&", "||", connectors and brackets can be fully considered. A stack container can be used to temporarily store the set of business rule elements returned on the right side of the current bracket, such as: {c=2, a=1}; and another stack container can be used to temporarily store the relationship between the current bracket and the set of business rule elements on the right, namely "&&" and "||". When encountering a left bracket, first obtain the business rule element set result of the current bracket dimension through depth-first search, and then continuously combine and calculate with the above two stack containers, and finally obtain a set list of multiple full "&&" business rule elements corresponding to each business rule string. The whole is a recursive call process of a character recognition function. After integrating the set lists corresponding to each business rule string, a total table can be obtained. The sub-business rule strings in each set can be sorted before or after the set list is summarized, so as to obtain a total list of ordered sub-rule sets in which the business rule relationships corresponding to all business rule strings are and relationships.
[0049] S220. When the business rule string to be verified in the target business field is obtained, the business rule string to be verified is processed according to the string parsing and sorting rules in the above steps to obtain a list of ordered sub-rule sets to be verified corresponding to the business rule string to be verified.
[0050] The process of parsing and sorting the business rule character string to be checked is the same process as the process of parsing and sorting the existing business rule character string in the target business field in S210.
[0051] Specifically, each character in the business rule string to be checked can be identified from left to right. When no right bracket symbol is identified, a new rule relationship level is divided for each left bracket symbol identified. Then, when a right bracket symbol is identified in the new rule relationship level, the new rule relationship level is determined to be the minimum rule relationship level. Furthermore, starting from the minimum rule relationship level, recursively perform the element relationship decomposition and / or combination of the business rule elements of each rule relationship level according to the AND relationship symbol, or relationship symbol or bracket symbol of each rule relationship level, and obtain a list of hierarchical sub-rule sets to be checked corresponding to each rule relationship level, until a list of sub-rule sets to be checked corresponding to the entire business rule string to be checked is obtained.
[0052] Further, the element relationships of the business rule elements of each rule relationship layer are decomposed and / or combined according to the AND relationship symbol, OR relationship symbol or bracket symbol of each rule relationship layer, and the list of hierarchical sub-rule sets to be verified corresponding to each rule relationship layer is obtained. It can be for the hierarchical business rule strings to be verified in each rule relationship layer, and the rule relationship dimensions are divided according to the left bracket symbol and the right bracket symbol of the relationship matching. In each rule relationship dimension, the two element strings connected by the AND relationship symbol are merged into a dimension rule set, and the two element strings connected by the OR relationship symbol are decomposed into two parallel dimension rule sets. In two rule relationship dimensions with an association relationship in the same rule relationship layer, the rule strings in the dimension rule sets corresponding to the two rule relationship dimensions can be decomposed or combined according to the association relationship to obtain the list of hierarchical sub-rule sets to be verified corresponding to each rule relationship layer. The decomposition and combination process can be that when the association relationship is an AND relationship, the dimension rule sets corresponding to the two rule relationship dimensions are respectively combined and merged; when the association relationship is an OR relationship, the dimension rule sets corresponding to the two rule relationship dimensions are used as sets with parallel relationships. It can be understood that, for two rule relationship dimensions that are associated with each other in the same rule relationship layer, the rule relationship layer where they are located is a relationship dimension of a larger level that includes the relationship dimensions that are associated with each other.
[0053] In order to facilitate verification of the inclusion relationship between two rule sets in the subsequent matching process, each rule set needs to be arranged in lexicographical order.
[0054] For example, the process of parsing a business rule string to be verified can be referred to Figure 3 In this example, the string to be checked is represented as: "((alternartive1&&alternative2)&&(alternative3||alternative4))", where the combination of alternate and numbers represents different business rule elements.
[0055] Figure 3 The process shown is as follows:
[0056] a) When the first left bracket is identified, recursive calls are made until the business rule element set list of the current dimension is returned, and it is determined whether the character stack has associated characters. If so, the result stack list is popped out for merging; otherwise, the result is returned directly;
[0057] b) When the second left bracket is called, the process recurses to the right bracket of the current dimension and returns the list of business rule element sets in the current dimension (corresponding to Figure 3In the process, when "&&" is encountered, the character on the left is not ")", it is judged that alternative1 and alternative2 belong to the same dimension. There is no need to push "&&" and the business rule element set list {alternative2} on the right into the character stack and result stack respectively. The set lists on the left and right sides of "&&" can be merged to obtain the business rule element set list of the current dimension as {{alternative1, alternative2}}.
[0058] c) When the second "&&" association character is called, it is found that the left side is ")". It is determined that the business rule element set lists on the left and right sides do not belong to the same dimension. It is necessary to return the return result on the right side through a recursive call first, and temporarily store the association relationship of the current dimension and the business rule element set list on the right side to their respective stacks, waiting to trace back to the left side "(", which is used to merge the business rule element set lists on the left and right sides.
[0059] d) When the third left bracket is called, the process recurses to the right bracket of the current dimension as above and returns the business rule element set list in the current dimension. The difference from the process in b) is that the associated character of the current dimension is "||", and the business rule element set lists on both sides need to be merged as a parallel relationship, and the business rule element set list of the current dimension is {{alternative3},{alternative4}}.
[0060] e) When the last ")" is called, the recursive call reaches the last layer, so it is pruned and the result is returned.
[0061] f) As described in c), during the backtracking process, the business rule element set list on the right side of the second "&&" association character is pushed into the result stack, so the current dimension result stack content is {{alternative3},{alternative4}}, and the symbol stack content is "&&".
[0062] g) As described in a), when the first left bracket is encountered during the upward tracing process, it is determined that the symbol stack result is not empty. Get the top associated character "&&" of the symbol stack and the top business rule element set list of the result stack, that is, the content described in f). Then get the business rule element set list result on the left side of the associated character obtained by recursively calling the current dimension backward, that is, the result obtained in b). The associated characters determine that the two are in an "and" relationship. Finally, the merged business rule element set list can be expressed as: {{alternative1, alternative2, alternative3}, {alternative1, alternative2, alternative4}}.
[0063] S230: Match each ordered sub-rule set to be verified in the list of ordered sub-rule sets to be verified with each set in the total list of ordered sub-rule sets.
[0064] S240: If any of the ordered sub-rule sets to be verified and any set in the total list of ordered sub-rule sets are subsets of each other, verification fails.
[0065] If the ordered sub-rule set to be verified and any set in the total table of ordered sub-rule sets are subsets of each other, that is, the two sets are composed of the same business rule elements and the range values of the corresponding business rule elements are the same, then the verification fails. The verified business rule string cannot be added to the business management system.
[0066] S250: Determine that each ordered sub-rule set to be verified has passed verification in the list of ordered sub-rule sets to be verified, if each ordered sub-rule set to be verified is in a true subset relationship with any set in the total list of ordered sub-rule sets, the elements in the sets are the same but the element values are different, or the elements in the sets are different.
[0067] The situations described in this step are all situations where there is no conflict between the two sets being matched.
[0068] S260: When all the ordered sub-rule sets to be verified have passed the verification, the verification of the verification business rule character string is successful.
[0069] The technical solution of this embodiment is to first construct a total list of ordered sub-rule sets after parsing all business rules in the target scenario, and then, after each business rule string to be verified is obtained, the business rule string to be verified is parsed to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships; then, the business rules in each sub-rule set to be verified in the sub-rule set list to be verified are sorted according to the preset sorting rules to obtain a list of ordered sub-rule sets to be verified; finally, the list of ordered sub-rule sets to be verified is matched and analyzed with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule string to be verified. In this process, the matching analysis based on the ordered set can avoid repeated addition of the same rule elements due to different string orders, and the verification is performed after sorting out the relationship between the rule elements in the business rules to be verified, so as to realize the feasibility of the business rule verification sheet. The technical solution of the embodiment of the present invention solves the problem of lack of new business rule verification process in the business management system, and can analyze and determine the uniqueness of the template to be verified from the business element level, avoid the redundancy of the business rule template caused by adding the same business rule template in the business management system, and facilitate the smooth operation of the business management logic of the business management system.
[0070] In a specific example, the process of managing the business rules in the business management system by applying the technical solution provided in this embodiment can be referred to as follows: Figure 4 The process shown.
[0071] exist Figure 4 In the example, the existing condition database is the business rule database in any business field, from which the existing condition string set (N business rule strings) can be read. According to the business rule string parsing method in the above embodiment, each existing condition string can be split into a set of atomic business rule elements (business rule elements) to obtain an atomic set list of existing conditions, and further sorted in lexicographic order to obtain a lexicographically ordered atomic set list of existing conditions List1. <map1>(i.e. the total list of ordered sub-rule sets).
[0072] After obtaining the conditions to be configured (business rule string to be verified), the dictionary sequence atomic set list List2 of the conditions to be configured is obtained through the string parsing and sorting rules in the above steps. <map2>(i.e. the ordered list of sub-rule sets to be verified).
[0073] Furthermore, Map2 and Map1 are compared and verified in pairs. The verification process includes the following three scenarios:
[0074] First, verification failure scenario: when each business rule element set Map2 and any business rule element set in Map1 are subsets of each other, that is, the two sets are composed of the same business rule elements, and the range values of the corresponding business rule elements are the same.
[0075] Second, skip the scenario: when the business rule element sets Map2 and any business rule element set in Map1 are true subsets of each other; one set contains business rule elements that the other set does not contain; or the two sets contain the same business rule elements, but with different range values. In the above cases, it is considered that no conflict occurs, and the verification process of Map2 and subsequent Map1 continues.
[0076] Third, verification success scenario: after the verification of each business rule element set Map2 and any business rule element set in Map1, no verification failure scenario occurs, the verification is considered successful.
[0077] For example, assuming that Map2 includes {a=1, b=2, c=3} and {a=1, b=2, d=4}; Map1 includes {a=1, b=2}, {a=1, b=2, c=6}, {a=1, b=2, e=7} and {a=1, b=2, c=3, e=5}, the verification process is as follows:
[0078] When {a=1, b=2, c=3} is checked against {a=1, b=2}, the pattern string business rule element set is a true subset of the matching string business rule element set, which is a skip scenario; when {a=1, b=2, d=4} is checked against {a=1, b=2}, it is also a skip scenario.
[0079] When {a=1, b=2, c=3} is checked against {a=1, b=2, c=6}, the pattern string business rule element set and the matching string business rule element set have the same element "c", but different element range values, which is a skip scenario; when {a=1, b=2, d=4} is checked against {a=1, b=2, c=6}, the pattern string business rule element set and the matching string business rule element set have different elements, that is, the two only have the intersection of {a=1, b=2}, which is a skip scenario.
[0080] When {a=1, b=2, c=3} is checked against {a=1, b=2, e=7}, there are different elements between the pattern string business rule element set and the matching string business rule element set, which is a skip scenario; similarly, when {a=1, b=2, d=4} is checked against {a=1, b=2, e=7}, it can be skipped directly.
[0081] When {a=1, b=2, c=3} is checked with {a=1, b=2, c=3, e=5}, the matching string business rule element set is a true subset of the pattern string business rule element set, which belongs to the skip scenario; when {a=1, b=2, d=4} is checked with {a=1, b=2, c=3, e=5}, the two only have the intersection of {a=1, b=2}, which also belongs to the skip scenario.
[0082] When all the above verification processes are completed, there is no verification failure scenario, so the business rule element set list corresponding to the matching string and the business rule element set list corresponding to the pattern string are successfully verified, that is, the matching condition to be configured does not conflict with the existing matching condition, and the matching condition to be configured can be added to the existing matching condition for subsequent query use. From another perspective, if in the verification process of any two business rule element sets mentioned above, the two business rule element sets are subsets of each other, this situation is considered to be a conflict between the matching condition to be configured and the existing matching condition, and the verification process is directly jumped out, and the matching condition to be configured cannot be added for subsequent query use.
[0083] Furthermore, the application of the business rule verification method in actual production application scenarios is analyzed.
[0084] For the warehouse management platform system, on the one hand, it is necessary to receive orders issued by multiple upstream client order systems and convert the order data messages into corresponding internal objects before executing subsequent business logic; on the other hand, it is necessary to generate messages from the response information of the downstream outbound business module, inbound business module and in-stock business module, and then send them back to the designated upstream system. Since the parsing templates of the business and data messages are one-to-one corresponding, when a query condition queries multiple templates, the rule management platform cannot determine which one is the correct template, which will directly block the subsequent business processing flow of the current order information, or block the business process of the upstream system, and wait for manual intervention. During this period, orders of the same type will trigger the same problem and continue to block the backlog. If the number of outbound orders increases significantly during a major promotion event, it will affect the normal operation of the business.
[0085] In the first case, taking "receiving fresh food orders from the first system" as an example, upstream system sources include but are not limited to the first system, the second system, the third system, etc.; incoming order types include but are not limited to it01 (purchase order), it03 (customer return order), it08 (fresh food order), etc.; processing types include but are not limited to 10 (order receipt) and 20 (order cancellation).
[0086] If the order receiving mode of the system is expressed as follows: the order system source is "first system", the order type is "fresh food order", and the order processing type is "order receiving".
[0087] If in a business processing process, the obtained matching condition string is escaped and expressed as: the order type is "fresh food order", the order system source is "first system", and the order processing type is "order receiving". The difference between the two is that the system source and the order type business meaning are different. However, judging from the escaped content, the three matching condition strings all correspond to the "first system fresh food order receiving" business.
[0088] The current rule management platform does not have any verification logic for the newly added matching condition strings. Even if the newly added matching condition strings are compared character by character to see if there are any conflicts, this application scenario cannot be met. If there are any two matching condition strings in the system, when the "First System Fresh Order Receiving" business query matching template is used, these two matching condition strings will definitely be hit, resulting in the blocking of the execution of the order of the current business type.
[0089] After using the conditional complete verification method in the embodiment of the present invention, for this application scenario, no matter which existing pattern condition string is, when other matching condition strings to be configured are added, the pattern condition string (existing business rule string) and the matching condition string (business rule string to be verified) will be split into an atomic set list consisting of three business rule elements, and after sorting in lexicographic order, the same business rule element set list is obtained: {{handleType=10, orderSource=clps, orderType=it08}}, so as to achieve the purpose of complete verification, and the matching condition string to be configured cannot be added, and subsequent business queries will not match the two condition strings. Among them, clps is the symbolic representation of the first system.
[0090] For the problem of disordered business rule elements in the above-mentioned matching conditions, the technical solution in the embodiment of the present invention is to sort the business rule elements in the atomic set list according to the lexicographic order first, and then compare them one by one, so as to solve the problem of different arrangement order of business rule elements. Compared with the common MySQL storage engine, the above-mentioned problem can be solved, but there is a premise that each business rule element in the matching condition needs to be stored as a separate column in the table before it can be used as a condition for matching. However, in the actual production application scenario, the number of business rule elements contained in the matching condition cannot be determined and is not uniform, and the database cannot meet the use of accessing the matching condition in a separate column. Therefore, the matching conditions composed of each business rule element in the application scenario can only be matched in the way of string access, and in an application scenario, multiple matching conditions are often spliced by the relationship of "and" and "or", resulting in the condition verification cannot be applied to the database to simply search in the way of string matching. Therefore, the present invention proposes a way of atomizing the matching condition string, first atomizing it into a set of multiple business rule elements composed of all "and", and then verifying it according to the matching verification principle, which is enough to solve the problem of disordered business rule elements in the matching condition string.
[0091] The second case takes the outbound "return order feedback" scenario as an example. In the two operation nodes of "review completed" and "shipping completed" in the specific business process, each element will be assembled to match the pattern condition string to obtain the corresponding upstream system, and then the order information will be returned to the specified upstream system. The operation types include but are not limited to 0 (initialization completed), 10 (positioning completed), 50 (review completed), 60 (packaging completed), 70 (shipping completed); order types include but are not limited to 10 (sales customer orders), 13 (return orders), 36 (internal matching orders); order system sources include but are not limited to 1 (first source) and 6 (second source).
[0092] The escaped string of the mode condition for the return order is: the order operation type is "Review Completed", and the order type is "Return Order", and the order system source is "First Source", or the order type is "Return Order", and the order system source is "First Source".
[0093] If the pattern condition string has a scenario of "self-operated return order review and completion" that needs to be returned to the upstream system, and the R&D personnel do not understand the specific return order return business scenario, when adding a matching condition string for this business scenario, even if it has the same prefix as the existing pattern condition string, the two condition strings are not exactly the same, and the matching condition string is finally added to the existing pattern condition string set. When the combination condition of {nodeType="50"&&orderType="13"&&orderSource="1"} is used to query the matching pattern condition string to obtain the returned upstream system information, the pattern condition string and the matching string will be matched at the same time, which will not only affect the information return of the new business, but also the return information of the original business cannot be returned to the specified system. The result reflected in the business is that a batch of items is returned to the supplier by the storage center, and the review and delivery have been completed, and it needs to be returned to the upstream system to deduct the upstream inventory. Due to problems in the intermediate return link, the upstream and downstream inventories are inconsistent. During this period, the upstream continues to receive orders from customers, and these orders cannot be processed normally.
[0094] Pattern condition string The above scenario is just a relatively simple one among many application scenarios, and the various business rule elements in the business are intricately intertwined, and it is difficult to discern and completely distinguish them based on human subjective experience alone. If ordinary "customer orders" encounter this one-to-many situation during a period of high business volume, tens of millions of orders will fail to be processed and wait for manual access. On the one hand, it increases the difficulty of subsequent processing work, and on the other hand, it will affect the availability of the service, leading to unpredictable consequences.
[0095] For this application scenario, when adding a matching condition string, the conditional complete verification method in the embodiment of the present invention will parse the above matching strings into a business rule element set list of the atomic full "&&". After sorting in lexicographic order, the business rule element set list corresponding to the pattern condition string is: {{nodeType="50"&&orderSource="1"&&orderType="13"}, {nodeType="70"&&orderSource="1"&&orderType="13"}}; the business rule element set list corresponding to the matching condition string is: {{nodeType="50"&&orderSource="1"&&orderType="13"}}. During the verification process, the existing business rule element sets in the two set lists are subsets of each other, indicating that the verification has a conflict and no new matching condition string will be added. Since the query is performed by assembling the union set of business elements, the condition verification method also first parses the condition string to be configured into a set of atomic business rule elements and then compares them. Therefore, this method is not limited by the concatenation order of the business rule elements of the two compared condition strings, and can achieve the purpose of complete verification of the matching conditions.
[0096] Figure 5 A structural schematic diagram of a business rule verification device provided in an embodiment of the present invention. This embodiment can be applied to the process of business management system processing business rules for projects, such as the scenario of setting business rules for a certain business field in the Warehouse Management System (WMS). The device can be implemented by software and / or hardware and integrated into the business management system corresponding to the computer terminal device with application development function.
[0097] like Figure 5 As shown, the business rule verification device includes: a to-be-verified rule parsing module 310 , a to-be-verified rule sorting module 320 and a rule verification module 330 .
[0098] Among them, the rule parsing module 310 to be checked is used to obtain the business rule character string to be checked, and parse the business rule character string to be checked to obtain a list of sub-rule sets to be checked in which all business rule relationships are AND relationships; the rule sorting module 320 to be checked is used to sort the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to the preset sorting rules to obtain a list of ordered sub-rule sets to be checked; the rule verification module 330 is used to match and analyze the list of ordered sub-rule sets to be checked with the total table of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be checked.
[0099] The technical solution of this embodiment is to parse the business rule string to be verified after each acquisition of the business rule string to be verified, and obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships; then, sort the business rules in each sub-rule set to be verified in the sub-rule set list to be verified according to the preset sorting rules to obtain a list of ordered sub-rule sets to be verified; finally, match and analyze the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule string to be verified. In this process, the matching analysis based on the ordered set can avoid repeated addition of the same rule elements due to different string orders, and verify after sorting out the relationship between the rule elements in the business rules to be verified, so as to realize the feasibility of the business rule verification sheet. The technical solution of the embodiment of the present invention solves the problem of lack of new business rule verification process in the business management system, and can determine the uniqueness of the template to be verified by analyzing from the business element level, avoid the redundancy of business rule templates caused by adding the same business rule template in the business management system, and facilitate the smooth operation of the business management logic of the business management system.
[0100] Optionally, the to-be-verified rule parsing module 310 is specifically used for:
[0101] Identify the business rule relationship symbols and business rule elements in the business rule character string to be verified;
[0102] The business rule elements are decomposed and combined according to the business rule relationship symbols to obtain a set of business rule elements whose multiple parallel business rule relationships are all AND relationships, forming the list of sub-rule sets to be checked.
[0103] Optionally, the to-be-verified rule parsing module 310 is further used to:
[0104] Identify each character in the business rule element from left to right, and if no right bracket symbol is identified, divide a new rule relationship level for each left bracket symbol identified;
[0105] In the case where a right bracket symbol is identified in the new rule relationship hierarchy, determining the new rule relationship hierarchy to be a minimum rule relationship hierarchy;
[0106] Starting from the minimum rule relationship layer, recursively perform element relationship decomposition and / or combination of the business rule elements of each rule relationship layer according to the and relationship symbol, or relationship symbol or bracket symbol of each rule relationship layer, and obtain the list of hierarchical sub-rule sets to be checked corresponding to each rule relationship layer, until the list of sub-rule sets to be checked corresponding to the entire business rule string to be checked is obtained.
[0107] Optionally, the to-be-verified rule parsing module 310 is further used to:
[0108] For the hierarchical business rule strings to be verified at each rule relationship layer, the rule relationship dimensions are divided according to the left bracket symbol and the right bracket symbol of the relationship matching;
[0109] In each rule relationship dimension, two element strings connected with a relationship symbol are merged into one dimension rule set, and two element strings connected with an or relationship symbol are decomposed into two parallel dimension rule sets;
[0110] In two rule relationship dimensions with an associated relationship, the rule character strings in the dimensional rule sets corresponding to the two rule relationship dimensions are disassembled or combined according to the associated relationship to obtain a list of hierarchical sub-rule sets to be verified corresponding to each rule relationship layer.
[0111] Optionally, the to-be-verified rule parsing module 310 is further used to:
[0112] When the association relationship is an AND relationship, the dimension rule sets corresponding to the two rule relationship dimensions are combined and merged respectively;
[0113] When the association relationship is an OR relationship, the dimension rule sets corresponding to the two rule relationship dimensions are taken as sets in parallel relationship.
[0114] Optionally, the rule verification module 330 is specifically used for:
[0115] Matching each ordered sub-rule set to be checked in the list of ordered sub-rule sets to be checked with each set in the total list of ordered sub-rule sets;
[0116] In the case where any ordered sub-rule set to be verified and any set in the total list of ordered sub-rule sets are subsets of each other, the verification fails.
[0117] Optionally, the rule verification module 330 may also be specifically used for:
[0118] In the case where each ordered sub-rule set to be verified in the list of ordered sub-rule sets to be verified is in a true subset relationship with each set in the total list of ordered sub-rule sets, the elements in the sets are the same but the values of the elements are different, or the elements of the sets are different, it is determined that each ordered sub-rule set to be verified has passed verification;
[0119] When all the ordered sub-rule sets to be verified have passed the verification, the verification of the verification business rule character string is successful.
[0120] The business rule verification device provided in the embodiment of the present invention can execute the business rule verification method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0121] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 6 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 6 The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as an intelligent controller and server, a mobile phone and other terminal devices.
[0122] like Figure 6 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0123] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0124] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0125] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0126] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0127] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0128] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the business rule verification method provided by the embodiment of the present invention, which includes:
[0129] Obtain a business rule string to be verified, and parse the business rule string to be verified to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships;
[0130] Sorting the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to a preset sorting rule to obtain a list of ordered sub-rule sets to be checked;
[0131] The list of ordered sub-rule sets to be verified is matched and analyzed with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be verified.
[0132] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the business rule verification method provided by any embodiment of the present invention is implemented. The method includes:
[0133] Obtain a business rule string to be verified, and parse the business rule string to be verified to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships;
[0134] Sorting the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to a preset sorting rule to obtain a list of ordered sub-rule sets to be checked;
[0135] The list of ordered sub-rule sets to be verified is matched and analyzed with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be verified.
[0136] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0137] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0138] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0139] Computer program code for performing the operation of the present invention may be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0141] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A business rule verification method, characterized in that: include: Obtain a business rule string to be verified, and parse the business rule string to be verified to obtain a list of sub-rule sets to be verified whose business rule relationships are all AND relationships; Sorting the business rules in each sub-rule set to be checked in the list of sub-rule sets to be checked according to a preset sorting rule to obtain a list of ordered sub-rule sets to be checked; The list of ordered sub-rule sets to be verified is matched and analyzed with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule character string to be verified.
2. The method according to claim 1, characterized in that The business rule character string to be checked is parsed to obtain a list of sub-rule sets to be checked whose business rule relationships are all AND relationships, including: Identify the business rule relationship symbols and business rule elements in the business rule character string to be verified; The business rule elements are decomposed and combined according to the business rule relationship symbols to obtain a set of business rule elements whose multiple parallel business rule relationships are all AND relationships, forming the list of sub-rule sets to be checked.
3. The method according to claim 2, characterized in that The step of performing element relationship decomposition and combination on the business rule elements according to the business rule relationship symbols to form the list of sub-rule sets to be checked comprises: Identify each character in the business rule element from left to right, and if no right bracket symbol is identified, divide a new rule relationship level for each left bracket symbol identified; In the case where a right bracket symbol is identified in the new rule relationship hierarchy, determining the new rule relationship hierarchy to be a minimum rule relationship hierarchy; Starting from the minimum rule relationship layer, recursively perform element relationship decomposition and / or combination of the business rule elements of each rule relationship layer according to the and relationship symbol, or relationship symbol or bracket symbol of each rule relationship layer, and obtain the list of hierarchical sub-rule sets to be checked corresponding to each rule relationship layer, until the list of sub-rule sets to be checked corresponding to the entire business rule string to be checked is obtained.
4. The method according to claim 3, characterized in that: According to the AND relationship symbol, OR relationship symbol or bracket symbol of each rule relationship layer, the element relationship of the business rule elements of each rule relationship layer is respectively decomposed and / or combined to obtain a list of hierarchical sub-rule sets to be verified corresponding to each rule relationship layer, including: For the hierarchical business rule strings to be verified at each rule relationship layer, the rule relationship dimensions are divided according to the left bracket symbol and the right bracket symbol of the relationship matching; In each rule relationship dimension, two element strings connected with a relationship symbol are merged into one dimension rule set, and two element strings connected with an or relationship symbol are decomposed into two parallel dimension rule sets; In two rule relationship dimensions with an associated relationship, the rule character strings in the dimensional rule sets corresponding to the two rule relationship dimensions are disassembled or combined according to the associated relationship to obtain a list of hierarchical sub-rule sets to be verified corresponding to each rule relationship layer.
5. The method according to claim 4, characterized in that According to the association relationship, the rule strings in the dimension rule set corresponding to the two rule relationship dimensions are disassembled or combined, including: When the association relationship is an AND relationship, the dimension rule sets corresponding to the two rule relationship dimensions are combined and merged respectively; When the association relationship is an OR relationship, the dimension rule sets corresponding to the two rule relationship dimensions are taken as sets in parallel relationship.
6. The method according to any one of claims 1 to 5, characterized in that: Matching and analyzing the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the verification business rule string, including: Matching each ordered sub-rule set to be checked in the list of ordered sub-rule sets to be checked with each set in the total list of ordered sub-rule sets; In the case where any ordered sub-rule set to be verified and any set in the total list of ordered sub-rule sets are subsets of each other, the verification fails.
7. The method according to any one of claims 1 to 5, characterized in that: Matching and analyzing the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario to complete the verification process of the business rule string to be verified, including: In the case where each of the ordered sub-rule sets to be verified in the list of ordered sub-rule sets to be verified is in a true subset relationship with any set in the total list of ordered sub-rule sets, the elements in the sets are the same but the element values are different, or the elements in the sets are different, it is determined that each of the ordered sub-rule sets to be verified passes verification; When all the ordered sub-rule sets to be verified have passed the verification, the verification of the verification business rule character string is successful.
8. A business rule verification method and device, characterized in that: include: The to-be-verified rule parsing module is used to obtain the to-be-verified business rule string, and parse the to-be-verified business rule string to obtain a to-be-verified sub-rule set list whose business rule relationships are all AND relationships; A to-be-verified rule sorting module is used to sort the business rules in each to-be-verified sub-rule set in the to-be-verified sub-rule set list according to a preset sorting rule to obtain an ordered sub-rule set list to be verified; The rule verification module is used to match and analyze the list of ordered sub-rule sets to be verified with the total list of ordered sub-rule sets of existing business rules in the corresponding business scenario, and complete the verification process of the business rule character string to be verified.
9. A computer device, characterized in that: The computer device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the business rule verification method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the business rule verification method as described in any one of claims 1 to 7 is implemented.
