CN110309142B - Method and device for rule management - Google Patents

Method and device for rule management Download PDF

Info

Publication number
CN110309142B
CN110309142B CN201810213257.3A CN201810213257A CN110309142B CN 110309142 B CN110309142 B CN 110309142B CN 201810213257 A CN201810213257 A CN 201810213257A CN 110309142 B CN110309142 B CN 110309142B
Authority
CN
China
Prior art keywords
rule
input
output
parameters
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810213257.3A
Other languages
Chinese (zh)
Other versions
CN110309142A (en
Inventor
康舒新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810213257.3A priority Critical patent/CN110309142B/en
Publication of CN110309142A publication Critical patent/CN110309142A/en
Application granted granted Critical
Publication of CN110309142B publication Critical patent/CN110309142B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/08Logistics, e.g. warehousing, loading or distribution; Inventory or stock management
    • G06Q10/087Inventory or stock management, e.g. order filling, procurement or balancing against orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Computational Linguistics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Human Resources & Organizations (AREA)
  • Software Systems (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

Embodiments of the present invention provide a method and an apparatus for rule management, which can rapidly configure and update a service rule, save manpower for research and development and testing, enable the service rule to be unnecessary to be redeployed online, facilitate system stability and service support, and implement rapid expansion of a service. The method comprises the following steps: pre-configuring a service rule in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a service rule, and the output parameter is an output parameter value if the input parameter meets the corresponding input parameter value; and when a rule judgment requirement exists, calculating an output result under the corresponding service rule according to the two-dimensional table by using the actual value of the input parameter.

Description

Method and device for rule management
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for rule management.
Background
With the continuous development of the service, when the rule judgment is performed, the factors influencing the result may also change continuously. For example, in the field of warehouse logistics, task allocation order grouping policies are generally implemented based on an attribute dimension of an order ex-warehouse type, that is, one order ex-warehouse type is compared with one order grouping policy; however, with the increase of the order types and the expansion of the attributes of the warehouse management system, some business orders need a plurality of attributes to contrast one group order strategy, namely, in the process of judging by using the business rules, the factors influencing the results change. The same situation may arise during initialization of the type of inventory order, inventory strategy, etc.
At present, in the service development process, the change of the service rule can be realized only by rewriting codes, and the service rule is continuously coded, tested and re-online along with the expansion of the service, so that the service rule is adapted to the new service expansion requirement, and the accurate rule judgment and result output can be performed.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
with the expansion of services, research and development personnel need to continuously code, test and re-online to meet the newly increased service judgment requirement, which is not beneficial to the stability of a service system and wastes human resources; in addition, the configuration and updating mode of the business rules are not favorable for the rapid expansion of the business types.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for rule management, which can rapidly configure and update a service rule, save manpower for research and development and testing, enable the service rule to be unnecessary to be redeployed online, facilitate system stability and service support, and implement rapid expansion of a service.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method of rule management.
The method for rule management in the embodiment of the invention comprises the following steps: pre-configuring a service rule in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a service rule, and the output parameter is an output parameter value if the input parameter meets the corresponding input parameter value; and when a rule judgment requirement exists, calculating an output result under the corresponding service rule according to the two-dimensional table by using the actual value of the input parameter.
Optionally, the two-dimensional table includes one or more business rules, and one business rule includes one or more input parameters and one or more output parameters.
Optionally, when there is a rule judgment requirement, calculating an output result under a corresponding service rule according to the two-dimensional table by using an actual value of an input parameter includes: matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter; and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result.
Optionally, matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter includes: and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
Optionally, the input and/or output parameters comprise at least one of: order type, production mode, order form mode and stock mode.
Optionally, the input parameters include an order type and a production mode, and the corresponding input parameter values are a single piece and an order mode in sequence; the output parameters are in a form of group list, and the corresponding output parameter values are in a single strategy.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for rule management.
The device for rule management in the embodiment of the invention comprises: the configuration module is used for pre-configuring the business rules in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a business rule, and the output parameters are output parameter values if the input parameters meet the corresponding input parameter values; and the judging module is used for calculating an output result under the corresponding business rule according to the two-dimensional table by using the actual value of the input parameter when the rule judging requirement exists.
Optionally, the two-dimensional table includes one or more business rules, and one business rule includes one or more input parameters and one or more output parameters.
Optionally, the determining module is further configured to: matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter; and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result.
Optionally, the determining module is further configured to: and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
Optionally, the input and/or output parameters comprise at least one of: order type, production mode, order form mode and stock mode.
Optionally, the input parameters include an order type and a production mode, and the corresponding input parameter values are a single piece and an order mode in sequence; the output parameters are in a form of group list, and the corresponding output parameter values are in a single strategy.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of rule management of an embodiment of the present invention.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a method of rule management of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: because a two-dimensional table form capable of being dynamically configured is used as a rule engine, and a technical means for pre-configuring and storing the rules is adopted, the technical problems that research and development personnel need to re-encode, test and go-on-line when the business rules need to be updated in the prior art are solved, the business rules need to be dynamically configured, the research and development personnel do not need to encode and test, a front-line quality control or business personnel can complete dynamic configuration of the business rules, and the logic conditions of the business rules are dynamically updated according to the business requirements, so that the technical effect of rapid expansion of the business can be realized; one or more business rules are stored in one two-dimensional table, and one business rule is set to contain one or more input parameters and one or more output parameters, so that the configuration efficiency of the business rules can be improved, and the requirements of business expansion can be met timely, efficiently and accurately; by traversing the service rules in the two-dimensional table, when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, the specific service rule is used as the service rule for rule judgment, so that the actual values representing the influence factors can be accurately established with the specific input parameters to accurately determine the specific service rule corresponding to the specific input parameters; after the business rule for rule judgment is matched from the two-dimensional table, the output parameter value of the output parameter of the business rule for rule judgment is used as an output result, so that the judgment result of the business rule can be accurately and quickly obtained according to the influence factors of the specific business type.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a method of rule management according to an embodiment of the invention;
FIG. 2 is a schematic diagram of a two-dimensional table in a method of rule management according to an embodiment of the invention;
FIG. 3 is a schematic diagram of the main modules of an apparatus for rule management according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 5 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiment of the invention provides a technical scheme of rule management, which can dynamically configure a service rule according to service requirements and output a judgment result by utilizing the service rule to judge conditions. In the embodiment of the invention, a dynamically configured rule engine is realized in a form of a two-dimensional table, the attribute determining the service policy is used as an input parameter (namely, a factor influencing a result), and the service policy is an output parameter (namely, a final service rule judgment result). The rules engine implements a business rule of "… if ….", i.e., if an input parameter satisfies a corresponding input parameter value, then the output parameter is an output parameter value.
Fig. 1 is a schematic diagram of the main steps of a method of rule management according to an embodiment of the invention.
As shown in fig. 1, a method for rule management according to an embodiment of the present invention mainly includes the following steps:
step S101: the method comprises the steps that a business rule is configured in advance in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form the business rule, and the output parameters are output parameter values if the input parameters meet the corresponding input parameter values.
In the embodiment of the present invention, the two-dimensional table may include one or more business rules, and one business rule may include one or more input parameters and one or more output parameters.
After the business rule is configured in step S101, step S102 performs condition judgment and result output by using the configured business rule.
Step S102: and when a rule judgment requirement exists, calculating an output result under the corresponding service rule according to the two-dimensional table by using the actual value of the input parameter.
The specific process of using the business rules to perform condition judgment and result output is as follows: matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter; and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result. Matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter comprises the following steps: and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
With the continuous development of the business, when the rule judgment is carried out, the factors influencing the result may also be continuously changed, and the rule management method of the embodiment of the invention can realize a dynamically configured rule engine, take the factors influencing the result as input parameters, and generate the result of the rule judgment by using the configured business rule.
Taking the field of warehouse logistics as an example, for order goods with located inventory, a picking task of a warehouse picking person needs to be generated, that is, task allocation is performed. Since the order types of warehouse production include single-piece (i.e. there is one product in one order), multiple-piece (i.e. there are multiple products in one order and multiple products are in one logical area of the warehouse), bulk and so on, it is necessary to generate the picking task for the products of the warehouse order according to the optimal picking mode, i.e. to determine the order-grouping strategy. The judgment of the task allocation form strategy can be realized by using the configuration and judgment method of the business rule of the embodiment of the invention, and the attribute determining the form strategy is used as an input parameter (a factor influencing a result), and the form strategy is an output parameter (a final result).
Fig. 2 is a schematic diagram of a two-dimensional table in a method of rule management according to an embodiment of the present invention. The following describes in detail a configuration process of a business rule in the embodiment of the present invention, taking an order form policy business as an example, with reference to fig. 2.
Three structural objects are first defined, as follows:
rule main information: t isZA rule representing a rule name z; t isZThe variables Rows and Cells are included.
Rule row information: rows ═ P1n,P2n...PmnWherein m denotes the row number, and m takes a value range of m>A positive integer of 1; n identification parameters are input or output, the values are i or o, when the values are i, the parameters are input parameters, and when the values are o, the parameters are output parameters; pinThe ith row input parameter or output parameter is identified.
Rule value information: cells ═ V1j,V2j...VmjWherein m denotes row serial number, the value range is the same as m in the rule row information, j denotes column number, j denotes value range j>A positive integer of 1; vijRepresenting the input or output parameter value for the ith row and the jth column.
Taking the above structure object, the group policy rule is taken as an example:
the business rule configuration of the "group policy" is as follows:
rule main information: t isGroup order policy
Rule row information: rows ═ order type1iProduction mode2iTo form a list3o}
Rule value information: cells ═ one piece11Order mode21Strategy of singleton31}
TGroup order policyThe business rules of (2) are shown in a two-dimensional table as shown in fig. 2, one column for one rule and one rule interpreted as "… if …".
Where column 1 rules explain:
column 1: if the "order type is single" and the "production mode is order mode", the "group order mode" is a "single policy".
That is, implementing a dynamically configurable rules Engine using a two-dimensional table will affect the reason for the form policySubstituting the element as actual value into the two-dimensional table, and when the actual value is matched with the input parameter value (such as single piece, order mode) of corresponding input parameter one by one, indicating that the T can be usedGroup order policyPerforms rule judgment and result output on the business rule of (A), so that T is outputGroup order policyThe output parameter value of the output parameter of the business rule is used as the final rule judgment result (such as a single policy).
After the business rules are configured, the process of utilizing the business rules to calculate the flow, namely utilizing the business rules to judge the business is as follows:
step A: firstly, T isZThe actual values of all the input parameters in (a) are defined as map ═ { q ═ q1,q2...qx},qx=<pxi,value>,pxiParameter indicating that the x-th type in Rows is input type, i indicates input parameter, qxIn the form of key-value pairs in the set of maps, representing the xth input parameter pxiThe corresponding relation with the actual value; the value range of x is the m value of all input parameters of n ═ i in Rows; value is the actual value of the input parameter.
And B: define all Rules as Rules ═ { R ═ R1,R2...RjJ has the same value range as j in Cells; all row information and column information of the same column number in Cells are taken as a rule Ry={V1y,V2y…VmyThe value of m is the same as that of m in Rows, and the value range of y is the value of the serial number in the Cells; wherein, the m value here can be composed of two parts { mi, mo }, mi represents all input parameters p in RowsmiCorresponding m, mo represents all output parameters p in RowsmoCorresponding to m. RyAnd the value of the input or output parameter of Rows in the column number y is shown.
And C: defining an output result obtained after the actual value is judged by the service rule in the step A as outMap ═ s1,s2…su},su=<puo,VuyAll output parameters p in the value Rows of >, umoCorresponding value of m, puoRepresenting the u-th output parameter, and o representing the output parameter type in Rows; vuyAnd the value of the u-th output parameter in Rows in the column serial number y is shown.
Traversing Rules in B, and setting each service rule RyMiddle input parameter pmiSubstituting for qxP of key-value pairxiIn (1) to obtain RyMiddle input parameter pmiCorresponding relation with the actual value, and comparing the actual value with RyMiddle input parameter pmiCorresponding input parameter value VmyComparing if all actual values are equal to the corresponding input parameter values VmyIf the two rules are the same (i.e. matching), the business rule is established (i.e. the business rule can be used for business judgment); will output the parameter pmoSubstitution into suP of (a)uoObtaining the output parameter values of all the output parameters of the business rule as the final output result outMap ═ s1,s2…su}。
The rule engine of the embodiment of the invention not only can realize the dynamic configuration of the service rule for generating the form policy, but also can configure and realize the corresponding service rule for other newly added services, such as the services of the warehouse order type, the inventory policy and the like of the initial warehouse management system wms, as long as the service rule conforms to the formal rule of 'if …, …'.
According to the technical scheme of the rule management of the embodiment of the invention, the two-dimensional table form capable of being dynamically configured is used as the rule engine to perform the technical means of pre-configuring and storing the rules, so that the technical problems that research personnel need to re-encode, test and go on-line when the service rules need to be updated in the prior art are solved, the service rules are dynamically configured, the research personnel code is not needed, the test is not needed, the configuration can be completed by one-line quality control or service personnel, and the technical effect of service expansion is quickly realized; one or more business rules are stored in one two-dimensional table, and one business rule is set to contain one or more input parameters and one or more output parameters, so that the configuration efficiency of the business rules can be improved, and the requirements of business expansion can be met timely, efficiently and accurately; by traversing the service rules in the two-dimensional table, when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, the specific service rule is used as the service rule for rule judgment, so that the actual values representing the influence factors can be accurately established with the specific input parameters to accurately determine the specific service rule corresponding to the specific input parameters; after the business rule for rule judgment is matched from the two-dimensional table, the output parameter value of the output parameter of the business rule for rule judgment is used as an output result, so that the judgment result of the business rule can be accurately and quickly obtained according to the influence factors of the specific business type.
FIG. 3 is a schematic diagram of the main modules of an apparatus for rule management according to an embodiment of the present invention.
As shown in fig. 3, the apparatus 300 for rule management according to the embodiment of the present invention mainly includes the following modules: a configuration module 301 and a determination module 302.
The configuration module 301 is configured to pre-configure a service rule in a two-dimensional table, where row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, and row information and column information under the same column number form a service rule, which represents that if an input parameter satisfies a corresponding input parameter value, an output parameter is an output parameter value; and the judging module 302 is configured to calculate an output result under a corresponding business rule according to the two-dimensional table by using an actual value of the input parameter when the rule judges a requirement.
In the embodiment of the invention, the two-dimensional table comprises one or more business rules, and one business rule comprises one or more input parameters and one or more output parameters.
The determining module 302 may further be configured to: matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter; and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result. Moreover, the determining module 302 may be further configured to: and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
From the above description, it can be seen that, because the two-dimensional table form capable of dynamic configuration is adopted as the rule engine, and the technical means of rule pre-configuration and storage is adopted, the technical problems that in the prior art, when the service rule needs to be updated, research and development personnel need to re-encode, test and go online are solved, the service rule is required to be dynamically configured, the research and development personnel do not need to encode, the test is not needed, the configuration can be completed by a front-line quality control or service personnel, and the technical effect of service expansion is quickly realized; one or more business rules are stored in one two-dimensional table, and one business rule is set to contain one or more input parameters and one or more output parameters, so that the configuration efficiency of the business rules can be improved, and the requirements of business expansion can be met timely, efficiently and accurately; by traversing the service rules in the two-dimensional table, when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, the specific service rule is used as the service rule for rule judgment, so that the actual values representing the influence factors can be accurately established with the specific input parameters to accurately determine the specific service rule corresponding to the specific input parameters; after the business rule for rule judgment is matched from the two-dimensional table, the output parameter value of the output parameter of the business rule for rule judgment is used as an output result, so that the judgment result of the business rule can be accurately and quickly obtained according to the influence factors of the specific business type.
Fig. 4 illustrates an exemplary system architecture 400 to which the rule management method or rule management apparatus of an embodiment of the invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have installed thereon various communication client applications, such as shopping-like applications, web browser applications, search-like applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server providing various services, such as a background management server (for example only) providing support for shopping websites browsed by users using the terminal devices 401, 402, 403. The backend management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (for example, target push information, product information — just an example) to the terminal device.
It should be noted that the rule management method provided by the embodiment of the present invention is generally executed by the server 405, and accordingly, the rule management apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a configuration module and a determination module. Where the names of these modules do not in some cases constitute a limitation of the module itself, for example, a configuration module may also be described as a "module for pre-configuring business rules in a two-dimensional table".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: pre-configuring a service rule in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a service rule, and the output parameter is an output parameter value if the input parameter meets the corresponding input parameter value; and when a rule judgment requirement exists, calculating an output result under the corresponding service rule according to the two-dimensional table by using the actual value of the input parameter.
According to the technical scheme of the embodiment of the invention, because a two-dimensional table form capable of being dynamically configured is used as a rule engine to perform the technical means of pre-configuring and storing the rules, the technical problems that research personnel need to re-encode, test and go online when the service rules need to be updated in the prior art are solved, the service rules are dynamically configured, the research personnel do not need to encode, the test is not needed, the configuration can be completed by one-line quality control or service personnel, and the technical effect of service expansion is rapidly realized; one or more business rules are stored in one two-dimensional table, and one business rule is set to contain one or more input parameters and one or more output parameters, so that the configuration efficiency of the business rules can be improved, and the requirements of business expansion can be met timely, efficiently and accurately; by traversing the service rules in the two-dimensional table, when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, the specific service rule is used as the service rule for rule judgment, so that the actual values representing the influence factors can be accurately established with the specific input parameters to accurately determine the specific service rule corresponding to the specific input parameters; after the business rule for rule judgment is matched from the two-dimensional table, the output parameter value of the output parameter of the business rule for rule judgment is used as an output result, so that the judgment result of the business rule can be accurately and quickly obtained according to the influence factors of the specific business type.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of rule management, comprising:
three structural objects are defined as follows: rule main information: t isZA rule representing a rule name z; t isZThe variables Rows and Cells are included; rule row information: rows ═ P1n,P2n...PmnWherein m denotes the row number, and m takes a value range of m>A positive integer of 1; n identification parameters are input or output, the values are i or o, when the values are i, the parameters are input parameters, and when the values are o, the parameters are output parameters; pinIdentifying an input parameter or an output parameter of the ith row; rule value information: cells ═ V1j,V2j...VmjWherein m denotes row serial number, the value range is the same as m in the rule row information, j denotes column number, j denotes value range j>A positive integer of 1; vijRepresents the input or output parameter value of the ith row and the jth column;
pre-configuring a service rule in the rule main information in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a service rule, and the service rule represents that if the input parameters meet the corresponding input parameter values, the output parameters are output parameter values; and
when a rule judgment requirement exists, calculating an output result under a corresponding service rule according to the two-dimensional table by using an actual value of an input parameter;
the input parameters comprise order types and production modes, and the corresponding input parameter values are in single-piece and order modes in sequence; the output parameters are in a form of group list, and the corresponding output parameter values are in a single strategy.
2. The method of claim 1, wherein the two-dimensional table comprises one or more business rules, and wherein a business rule comprises one or more input parameters and one or more output parameters.
3. The method of claim 1, wherein when there is a rule judgment requirement, calculating an output result under a corresponding business rule according to the two-dimensional table by using an actual value of an input parameter comprises:
matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter;
and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result.
4. The method of claim 3, wherein matching business rules for rule determination in the two-dimensional table using actual values of the input parameters comprises:
and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
5. An apparatus for rule management, comprising:
a configuration module for defining three structural objects as follows: rule main information: t isZA rule representing a rule name z; t isZThe variables Rows and Cells are included; rule row information: rows ═ P1n,P2n...PmnWherein m denotes the row number, and m takes a value range of m>A positive integer of 1; n identification parameters are input or output, the values are i or o, when the values are i, the parameters are input parameters, and when the values are o, the parameters are output parameters; pinIdentifying an input parameter or an output parameter of the ith row; rule value information: cells ═ V1j,V2j...VmjWherein m denotes row serial number, the value range is the same as m in the rule row information, j denotes column number, j denotes value range j>A positive integer of 1; vijRepresents the input or output parameter value of the ith row and the jth column; pre-configuring a service rule in the rule main information in a two-dimensional table mode, wherein row information of the two-dimensional table represents input and/or output parameters, column information represents input and/or output parameter values, the row information and the column information under the same column number form a service rule, and the service rule represents that if the input parameters meet the corresponding input parameter values, the output parameters are output parameter values; and
the judging module is used for calculating an output result under the corresponding business rule according to the two-dimensional table by using the actual value of the input parameter when a rule judging requirement exists;
the input parameters comprise order types and production modes, and the corresponding input parameter values are in single-piece and order modes in sequence; the output parameters are in a form of group list, and the corresponding output parameter values are in a single strategy.
6. The apparatus of claim 5, wherein the two-dimensional table comprises one or more business rules, and wherein a business rule comprises one or more input parameters and one or more output parameters.
7. The apparatus of claim 5, wherein the determining module is further configured to:
matching the business rule for rule judgment in the two-dimensional table by using the actual value of the input parameter;
and taking the output parameter value of the output parameter of the business rule for rule judgment as an output result.
8. The apparatus of claim 5, wherein the determining module is further configured to:
and traversing the service rules in the two-dimensional table, and when the actual values of the input parameters are matched with the input parameter values of all the input parameters of the specific service rule, taking the specific service rule as the service rule for rule judgment.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201810213257.3A 2018-03-15 2018-03-15 Method and device for rule management Active CN110309142B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810213257.3A CN110309142B (en) 2018-03-15 2018-03-15 Method and device for rule management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810213257.3A CN110309142B (en) 2018-03-15 2018-03-15 Method and device for rule management

Publications (2)

Publication Number Publication Date
CN110309142A CN110309142A (en) 2019-10-08
CN110309142B true CN110309142B (en) 2022-04-12

Family

ID=68073650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810213257.3A Active CN110309142B (en) 2018-03-15 2018-03-15 Method and device for rule management

Country Status (1)

Country Link
CN (1) CN110309142B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104497A (en) * 2019-11-21 2020-05-05 北京明略软件系统有限公司 Rule matching method and device and computer readable storage medium
CN111158649A (en) * 2019-12-23 2020-05-15 中国建设银行股份有限公司 Method and device for configuring multi-level parameters
CN111651439A (en) * 2020-04-29 2020-09-11 中国平安财产保险股份有限公司 Data auditing method and device and computer readable storage medium
CN112230890B (en) * 2020-09-11 2023-09-12 重庆誉存大数据科技有限公司 Rule configuration method and device and result reliability judging method thereof
CN112150257B (en) * 2020-11-26 2021-03-26 炬星科技(深圳)有限公司 Order processing method, cloud system, electronic device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103019726A (en) * 2012-12-19 2013-04-03 中国电子科技集团公司第十五研究所 Management method and device of software system service rules
CN103838706A (en) * 2012-11-22 2014-06-04 江苏现代造船技术有限公司 Flexible management information system with process and form customization function
CN107450919A (en) * 2017-07-25 2017-12-08 上海壹账通金融科技有限公司 BPM method, equipment and computer-readable recording medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101122983A (en) * 2007-08-28 2008-02-13 南京联创科技股份有限公司 Condition configuration management method
US9201665B2 (en) * 2009-08-23 2015-12-01 Bank Of America Corporation Outputting presentation code updated for a particular user in response to receiving a page identifier
US11163736B2 (en) * 2013-03-04 2021-11-02 Avaya Inc. System and method for in-memory indexing of data
US10592521B2 (en) * 2015-04-03 2020-03-17 Oracle International Corporation Method and system for implementing target model configuration metadata for a log analytics system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103838706A (en) * 2012-11-22 2014-06-04 江苏现代造船技术有限公司 Flexible management information system with process and form customization function
CN103019726A (en) * 2012-12-19 2013-04-03 中国电子科技集团公司第十五研究所 Management method and device of software system service rules
CN107450919A (en) * 2017-07-25 2017-12-08 上海壹账通金融科技有限公司 BPM method, equipment and computer-readable recording medium

Also Published As

Publication number Publication date
CN110309142A (en) 2019-10-08

Similar Documents

Publication Publication Date Title
CN110309142B (en) Method and device for rule management
CN111061956B (en) Method and apparatus for generating information
CN110019080B (en) Data access method and device
US9171257B2 (en) Recommender evaluation based on tokenized messages
CN111427971B (en) Business modeling method, device, system and medium for computer system
US10223397B1 (en) Social graph based co-location of network users
CN110866040B (en) User portrait generation method, device and system
CN111324786A (en) Method and device for processing consultation problem information
CN109961299A (en) The method and apparatus of data analysis
CN107291835B (en) Search term recommendation method and device
CN110866625A (en) Promotion index information generation method and device
CN112749323B (en) Method and device for constructing user portrait
CN113989058A (en) Service generation method and device
US20180129664A1 (en) System and method to recommend a bundle of items based on item/user tagging and co-install graph
CN112784861A (en) Similarity determination method and device, electronic equipment and storage medium
US20190272512A1 (en) Systems and methods for providing an electronic line-of-business gateway
CN113869904B (en) Suspicious data identification method, device, electronic equipment, medium and computer program
CN112966971B (en) Project workload assessment method and device
US20130232172A1 (en) Methods and systems for matching expressions
CN112819555B (en) Article recommendation method and device
CN113743906A (en) Method and device for determining service processing strategy
CN112906723A (en) Feature selection method and device
CN113538080A (en) Task list splitting method and device
CN109726882A (en) The method and apparatus that a kind of pair of object is evaluated
CN110874386A (en) Method and device for establishing category mapping relation

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