Rule configuration method, system, device and equipment and storage medium
By configuring data models, combined expressions and subrules in the rule engine, the problems of high configuration complexity and high labor costs of existing rule engines are solved, and the rule configuration is simplified and cost reduction is achieved.
Patent Information
- Application Number
- CN202411268841.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2024-12-31
AI Technical Summary
The existing rule engine has high complexity and high labor costs in terms of rule configuration.
By responding to data model configuration operations, the data model is configured according to the basic data type, and expressions, data models and subrules are combined into configuration rules. The subrules are independent logical units and can be called by configuration rules without writing complex code, simplifying rules Configuration process.
Reduces the complexity and labor cost of rule configuration, and realizes the simplicity and speed of rule configuration. The rule configuration device sends configuration rules to the server for the rule caller device to call and generates call results.
Smart Images

Figure CN119225712A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a rule configuration method, system, device, equipment and storage medium. Background Art
[0002] The rule engine evolved from the reasoning engine. It is a component embedded in the application that separates business decisions from application code and uses predefined semantic modules to write business decisions. It accepts data input, interprets business rules, and makes business decisions based on business rules.
[0003] At present, although the existing rule engines are powerful, their rule configuration is complex and the labor cost is high. Summary of the invention
[0004] The present disclosure provides a rule configuration method, system, device, equipment and storage medium to at least solve the problems of high complexity and high labor cost of existing rule configuration.
[0005] The technical solution of the present disclosure is as follows:
[0006] The present disclosure provides a rule configuration method, including:
[0007] In response to the data model configuration operation, configuring the data model according to the basic data type;
[0008] In response to a rule configuration operation, combining the expression, the data model and the sub-rule into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule;
[0009] The configuration rule is sent to a server so that the rule calling device can call the configuration rule from the server and generate a calling result.
[0010] Optionally, configuring the data model according to the basic data type includes:
[0011] The data model is configured according to at least one basic data type of a number, a string, and a Boolean type.
[0012] Optionally, the rule configuration operation is a drag operation or an option configuration operation.
[0013] Optionally, the expression includes functions, operators and connectives;
[0014] The function includes at least one of the following: taking the minimum value, taking the maximum value, the average value, a random number, converting a value into a numerical value, and whether a string is contained;
[0015] The operator includes at least one of the following: addition, subtraction, multiplication, division, equal, greater than, less than, equal, greater than or equal to, less than or equal to, not equal to, remainder, and question mark;
[0016] The conjunction includes at least one of the following: and, or, not, colon, semicolon, left bracket and right bracket.
[0017] The present disclosure also provides a rule configuration system, including:
[0018] A rule configuration device, configured to configure a data model according to a basic data type in response to a data model configuration operation; in response to the rule configuration operation, combine an expression, the data model and a sub-rule into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; and send the configuration rule to a server;
[0019] A rule calling device, configured to send a call request to the server in response to a rule calling operation, wherein the call request carries input data;
[0020] The server is used to store the configuration rules sent by the rule configuration device; receive the call request sent by the rule calling device, match the target configuration rules corresponding to the input data according to the input data, execute the policy corresponding to the target configuration rules to generate a call result; and send the call result to the rule calling device.
[0021] Optionally, before executing the policy corresponding to the target configuration rule, the server may also be used to:
[0022] Determining whether the input data satisfies a condition of the target configuration rule;
[0023] When the input data satisfies the condition of the target configuration rule, a policy corresponding to the target configuration rule is executed.
[0024] The present disclosure also provides a rule configuration device, including:
[0025] A first configuration module, configured to configure the data model according to the basic data type in response to the data model configuration operation;
[0026] A second configuration module, configured to combine the expression, the data model and the sub-rule into a configuration rule in response to a rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule;
[0027] The sending module is used to send the configuration rule to the server so that the rule calling device can call the configuration rule from the server and generate a calling result.
[0028] The present disclosure also provides an electronic device, including:
[0029] processor;
[0030] a memory for storing instructions executable by the processor;
[0031] The processor is configured to execute the instructions to implement each step in the above method.
[0032] The embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step in the above method is implemented.
[0033] The embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements each step in the above method when executed by a processor.
[0034] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0035] In some embodiments of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation; the rule configuration device combines the expression, data model and sub-rule into a configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule, without writing complex code, and the configuration rule can be generated based on the combination of expression, data model and sub-rule, and the rule configuration is simple and fast; the rule configuration device sends the configuration rule to the server, so that the rule caller device can call the configuration rule from the server and generate a call result; the present disclosure does not need to write complex code, thereby reducing labor costs.
[0036] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0038] Figure 1 A flowchart of a rule configuration system provided for an exemplary embodiment of the present disclosure;
[0039] Figure 2 A schematic diagram of a data model management interface provided by the present disclosure;
[0040] Figure 3A rule configuration interface provided for an exemplary embodiment of the present disclosure;
[0041] Figure 4 A schematic diagram of a rule configuration method provided for an exemplary embodiment of the present disclosure;
[0042] Figure 5 A schematic diagram of the structure of a rule configuration device provided for an exemplary embodiment of the present disclosure;
[0043] Figure 6 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0044] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0045] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0046] It should be noted that the user information involved in this disclosure includes but is not limited to: user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure comply with the relevant laws and regulations and do not violate public order and good morals.
[0047] Currently, rule engine technologies include: ILOG rule engine, Drools rule engine and URule rule engine, etc.
[0048] ILOG rule engine is designed based on Java environment. As a commercial-grade product, it integrates a full range of tool chains from rule modeling, writing, testing, deployment to execution and maintenance, effectively supports the full life cycle management of enterprise-level business rules, and helps enterprises achieve efficient and flexible business decisions.
[0049] Drools rule engine is open source software. It provides powerful rule definition and management capabilities, taking into account the efficient execution of business rules, convenient data access, high flexibility and configurability of the system. Its wide range of application scenarios covers e-commerce, social networks, mobile applications and other fields, proving its strong value in enterprise-level application development.
[0050] URule rule engine is a rule engine written in pure Java. It provides an open source free version based on the Apache-2.0 protocol and a more comprehensive commercial PRO version. URule greatly simplifies the process of quickly defining, maintaining and publishing business rules through its diverse rule design tools, intuitive visualization platform, excellent high-performance processing capabilities and flexible usage modes. It is an important tool for enterprises to achieve intelligent business decision-making.
[0051] Although business rule engines such as ILOG JRules, Drools and URule are known for their powerful functions and flexibility, it cannot be ignored that they also come with some significant disadvantages, especially in terms of functional complexity and difficulty of use. These characteristics may make their application in certain scenarios less ideal.
[0052] ILOG rule engine provides a rich tool set and highly flexible rule definition capabilities, but this complexity also poses a major challenge. The depth of its rule language and tool set requires users to delve deeply into its internal mechanisms, which may mean high learning costs and a long time to get started for non-technical experts or projects with limited resources. In addition, although the support of multiple operating modes increases flexibility, it also increases the complexity of configuration and the possibility of errors, making system maintenance and upgrades more cumbersome.
[0053] Drools rule engine, with the increasing complexity of business logic and the surge in the number of rules, Drools rule management and maintenance gradually reveal their limitations. Users need to invest a lot of energy to organize, optimize and monitor these rules to ensure the stability and performance of the system. In addition, Drools performance optimization is not easy and requires deep Java programming skills and performance tuning experience, which may be a big obstacle for non-technical teams or projects with limited resources.
[0054] The visual interface of the URule rule engine does lower the threshold for rule definition, allowing non-technical personnel to participate in rule formulation. However, with the continuous accumulation and complexity of business rules, the challenges of URule in rule management and maintenance are becoming increasingly prominent. Users need to face how to effectively organize, classify and retrieve these rules to ensure that they can be executed efficiently and accurately by the system. In addition, URule may need to be integrated with other systems to achieve more comprehensive functional coverage, which further increases the complexity and cost of implementation.
[0055] In summary, although rule engines such as ILOG, Drools, and URule are powerful, their rule configuration is complex and labor-intensive.
[0056] In response to the above technical problems, in some embodiments of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation; the rule configuration device combines the expression, data model and sub-rule into a configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule, without writing complex code, and the configuration rule can be generated based on the combination of expression, data model and sub-rule, and the rule configuration is simple and fast; the rule configuration device sends the configuration rule to the server, so that the rule caller device can call the configuration rule from the server and generate a call result; the present disclosure does not need to write complex code, thereby reducing labor costs.
[0057] The technical solutions provided by various embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0058] Figure 1 FIG. 1 is a flow chart of a rule configuration system 10 provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, the rule configuration system 10 includes: a rule configuration device 10a, a rule calling device 10b and a server 10c. The rule configuration device 10a and the rule calling device 10b establish a communication connection with the server 10c. Figure 1 The rule configuration device 10a, rule calling device 10b and server 10c presented in the figure are only exemplary and do not constitute limitation to their implementation forms.
[0059] Among them, a wireless connection can be used between the rule configuration device 10a and the server 10c. Optionally, the rule configuration device 10a can establish a communication connection with the server 10c using WIFI, Bluetooth, infrared or other communication methods, or the rule configuration device 10a establishes a communication connection with the server 10c through a mobile network. Among them, the network standard of the mobile network can be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, 5G-Advanced, WiMax, etc.
[0060] A wireless connection may be used between the rule calling device 10b and the server 10c. Optionally, the rule calling device 10b may establish a communication connection with the server 10c by using WIFI, Bluetooth, infrared or other communication methods, or the rule calling device 10b may establish a communication connection with the server 10c through a mobile network. The network standard of the mobile network may be any one of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4G+ (LTE+), 5G, 5G-Advanced, WiMax, etc.
[0061] In this embodiment, the rule configuration device 10a and the rule calling device 10b may be terminal devices. Among them, the terminal device includes but is not limited to a mobile station (MS), a mobile terminal, a mobile phone, a handset and a portable equipment, etc. The terminal device can communicate with one or more core networks via a radio access network (RAN). For example, the terminal device can be a mobile phone (or a "cellular" phone), a computer with wireless communication function, etc. The terminal device can also be a computer with wireless transceiver function, a virtual reality (VR) terminal device, an AR terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc., and the operating system installed on the terminal device includes but is not limited to: IOS, Android, windows, linux, Mac OS and other operating systems. In different networks, the terminal may be called different names, such as user equipment, mobile station, subscriber unit, station, cellular phone, personal digital assistant, wireless modem, wireless communication device, handheld device, laptop computer, cordless phone, wireless local loop station, television, etc. For the convenience of description, it is referred to as terminal equipment in this embodiment.
[0062] In this embodiment, the implementation form of the server 10c is not limited. For example, the server can be a conventional server, a cloud server, a cloud host, a virtual center, and other server devices. The server mainly includes a processor, a hard disk, a memory, a system bus, and a general computer architecture type.
[0063] In order to more clearly understand the technical contents of the present disclosure, the terms involved in the present disclosure are explained.
[0064] The data model, a data structure composed of basic data types and custom data types, can be used as an input parameter of the rule engine. The fields of the data model can be directly used in the rule engine expression.
[0065] A function is a set of code blocks written to complete a specific task. These code blocks can receive input (called parameters), perform a series of operations, and may return output (called return value). For example, the MIN() function implements the function of obtaining the minimum value of a set of data.
[0066] Operators mainly consist of arithmetic operators, including: +, -, *, / , =, >, <, ==, >=, <=, !=, % and ?.
[0067] Connectors, which consist of logical operators and connection symbols, include: &&, ||, !, :, ;, (, and).
[0068] Sub-rules are independent logical units and can be called by configuration rules.
[0069] The receiving function is a special type of function that maps the http interface to the rule engine function according to the user's configuration.
[0070] In this embodiment, the rule configuration device 10a is used to configure the data model according to the basic data type in response to the data model configuration operation; in response to the rule configuration operation, the expression, the data model and the sub-rule are combined into the configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; and the configuration rule is sent to the server 10c; the server 10c is used to store the configuration rule sent by the rule configuration device; the rule calling device 10b is used to send a call request to the server 10c in response to the rule calling operation, wherein the call request carries input data; the server 10c receives the call request sent by the rule calling device 10b, and the server 10c matches the target configuration rule corresponding to the input data according to the input data, executes the policy corresponding to the target configuration rule to generate a call result; the server 10c sends the call result to the rule calling device 10b.
[0071] In some embodiments of the present disclosure, the rule calling device 10b carries input data and sends a request to the server 10c via the HTTP protocol; after receiving the request, the server 10c matches the correct rule according to the input data; the server 10c checks whether the conditions of the rule are met, and if so, executes the action of the rule; the server 10c outputs the result generated after executing the rule.
[0072] It should be noted that basic data types include but are not limited to: numbers, strings, and Boolean types.
[0073] In some embodiments of the present disclosure, the rule configuration device 10a configures the data model according to the basic data type in response to the data model configuration operation. One achievable manner is to configure the data model according to at least one basic data type of a number, a string, and a Boolean type. The present disclosure provides a graphical interface for managing data models, and new types can be customized through basic data models, such as defining a model of a person, including age (number), name (string), gender (string), and whether married (Boolean type).
[0074] Figure 2 The following is a schematic diagram of a data model management interface provided by the present disclosure. Figure 2 As shown in the figure, the data model management interface displays multiple fields: ID card, score and grade. The data type of ID card is string, the data type of score is number, and the data type of grade is number. Users can edit and delete the corresponding fields through the data model management interface.
[0075] In some embodiments of the present disclosure, the rule configuration device 10a combines expressions, data models and sub-rules into configuration rules in response to rule configuration operations. The expressions include functions, operators and connectors; the functions include at least one of the following: taking the minimum value, taking the maximum value, average value, random number, converting the value into a numerical value and whether it contains a string; the operators include at least one of the following: addition, subtraction, multiplication, division, equal to, greater than, less than, equal, greater than or equal to, less than or equal to, not equal to, remainder and question mark; the connectors include at least one of the following: and, or, not, colon, semicolon, left bracket and right bracket. The rule configuration operation is a drag operation or an option configuration operation.
[0076] Figure 3 A rule configuration interface is provided for an exemplary embodiment of the present disclosure. Figure 3 As shown, the present disclosure provides a rule configuration interface, where users can define and manage rules by dragging, configuring, etc., without having to write complex code; users can define rules and combine functions, operators, connectors, data models, sub-rules and other elements into rules according to business needs; reusable logical units can be abstracted into an independent sub-rule, which can then be referenced by other rules to implement complex business rules. In addition, the rule configuration interface can be used to test and verify the rules; the rule configuration interface can be used to implement the rule publishing function, and only published rules can be executed.
[0077] In some embodiments of the present disclosure, before executing the policy corresponding to the target configuration rule, the server 10c determines whether the input data meets the conditions of the target configuration rule; if the input data meets the conditions of the target configuration rule, the server 10c executes the policy corresponding to the target configuration rule.
[0078] In some embodiments of the present disclosure, rule execution details are queried based on dimensions such as cluster name, request time, request ID, status information, rule group code, and rule code.
[0079] In some embodiments of the present disclosure, the execution of the configuration rules is statistically maintained in the management interface according to the cluster name, request time, rule group code, rule code, etc., and the number of requests and the request success ratio are statistically plotted.
[0080] In some embodiments of the present disclosure, operation logs are viewed based on user information, cluster information, operation content, operation time, etc. The present disclosure can conveniently view rule-related operation logs.
[0081] The present disclosure provides a friendly editing page to implement data model definition, rule arrangement, and one-click rule publishing. Users can easily get started without complicated operation steps or deep technical background.
[0082] In the above-mentioned system embodiment of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation; the rule configuration device combines the expression, data model and sub-rule into the configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule, without writing complex code, and the configuration rule can be generated based on the combination of expression, data model and sub-rule, and the rule configuration is simple and fast; the rule configuration device sends the configuration rule to the server, so that the rule caller device can call the configuration rule from the server and generate a call result; the present disclosure does not need to write complex code, thereby reducing labor costs.
[0083] From the perspective of rule configuration equipment, Figure 4 FIG. 1 is a schematic diagram of a rule configuration method provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, the method includes:
[0084] S401: In response to a data model configuration operation, configure a data model according to a basic data type;
[0085] S402: In response to the rule configuration operation, the expression, the data model and the sub-rule are combined into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule;
[0086] S403: Send the configuration rule to the server so that the rule calling device can call the configuration rule from the server and generate a calling result.
[0087] In this embodiment, a rule configuration device is used to configure a data model according to a basic data type in response to a data model configuration operation; in response to a rule configuration operation, an expression, a data model and a sub-rule are combined into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; and the configuration rule is sent to a server; the server is used to store the configuration rule sent by the rule configuration device; a rule calling device is used to send a call request to the server in response to a rule calling operation, wherein the call request carries input data; the server receives the call request sent by the rule calling device, and the server matches the target configuration rule corresponding to the input data according to the input data, executes the policy corresponding to the target configuration rule to generate a call result; the server sends the call result to the rule calling device.
[0088] In some embodiments of the present disclosure, a rule-calling device carries input data and sends a request to a server via the HTTP protocol; after receiving the request, the server matches the correct rule based on the input data; the server checks whether the conditions of the rule are met, and if so, executes the action of the rule; the server outputs the result generated after executing the rule.
[0089] It should be noted that basic data types include but are not limited to: numbers, strings, and Boolean types.
[0090] In some embodiments of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation. One achievable manner is to configure the data model according to at least one basic data type of a number, a string, and a Boolean type. The present disclosure provides a graphical interface for managing data models, and new types can be customized through basic data models, such as defining a model of a person, including age (number), name (string), gender (string), and whether married (Boolean type).
[0091] The data model management interface displays multiple fields: ID card, grades, and grades. The data type of ID card is string, the data type of grades is number, and the data type of grade is number. Users can edit and delete the corresponding fields through the data model management interface.
[0092] In some embodiments of the present disclosure, the rule configuration device combines expressions, data models, and sub-rules into configuration rules in response to rule configuration operations. The expressions include functions, operators, and connectors; the functions include at least one of the following: minimum value, maximum value, average value, random number, value conversion to numeric value, and whether a string is included; the operators include at least one of the following: addition, subtraction, multiplication, division, equal to, greater than, less than, equal to, greater than or equal to, less than or equal to, not equal to, remainder, and question mark; the connectors include at least one of the following: and, or, not, colon, semicolon, left bracket, and right bracket.
[0093] The present disclosure provides a rule configuration interface, where users can define and manage rules by dragging and dropping, configuring, etc., without having to write complex code; users can define rules and combine functions, operators, connectors, data models, sub-rules and other elements into rules according to business needs; reusable logical units can be abstracted into an independent sub-rule, which can then be referenced by other rules to implement complex business rules. In addition, the rule configuration interface can be used to test and verify the rules; the rule configuration interface can be used to implement the rule publishing function, and only published rules can be executed.
[0094] In some embodiments of the present disclosure, before executing the policy corresponding to the target configuration rule, the server determines whether the input data meets the conditions of the target configuration rule; if the input data meets the conditions of the target configuration rule, the server executes the policy corresponding to the target configuration rule.
[0095] In some embodiments of the present disclosure, rule execution details are queried based on dimensions such as cluster name, request time, request ID, status information, rule group code, and rule code.
[0096] In some embodiments of the present disclosure, the execution of the configuration rules is statistically maintained in the management interface according to the cluster name, request time, rule group code, rule code, etc., and the number of requests and the request success ratio are statistically plotted.
[0097] In some embodiments of the present disclosure, operation logs are viewed based on user information, cluster information, operation content, operation time, etc. The present disclosure can conveniently view rule-related operation logs.
[0098] The present disclosure provides a friendly editing page to implement data model definition, rule arrangement, and one-click rule publishing. Users can easily get started without complicated operation steps or deep technical background.
[0099] In the above method embodiment of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation; the rule configuration device combines the expression, data model and sub-rule into a configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule, without writing complex code, and the configuration rule can be generated based on the combination of expression, data model and sub-rule, and the rule configuration is simple and fast; the rule configuration device sends the configuration rule to the server, so that the rule caller device can call the configuration rule from the server and generate a call result; the present disclosure does not need to write complex code, thereby reducing labor costs.
[0100] Figure 5FIG. 5 is a schematic diagram of a rule configuration device 50 provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the rule configuration device 50 includes: a first configuration module 51, a second configuration module 52 and a sending module 53.
[0101] The first configuration module 51 is used to configure the data model according to the basic data type in response to the data model configuration operation;
[0102] A second configuration module 52, for combining expressions, data models and sub-rules into configuration rules in response to the rule configuration operation, wherein the sub-rules are independent logical units and can be called by the configuration rules;
[0103] The sending module 53 is used to send the configuration rules to the server so that the rule calling device can call the configuration rules from the server and generate a calling result.
[0104] Optionally, when configuring the data model according to the basic data type, the first configuration module 51 is used to:
[0105] Configure the data model based on at least one basic data type among number, string, and Boolean types.
[0106] Optionally, the rule configuration operation is a drag operation or an option configuration operation.
[0107] Optionally, an expression includes functions, operators, and connectives;
[0108] The functions include at least one of the following: minimum value, maximum value, average value, random number, value conversion to numeric value, and whether to contain a string;
[0109] The operators include at least one of the following: addition, subtraction, multiplication, division, equal, greater than, less than, equal, greater than or equal to, less than or equal to, not equal to, remainder, and question mark;
[0110] The conjunctions include at least one of the following: and, or, not, colon, semicolon, left bracket, and right bracket.
[0111] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0112] Figure 6 FIG. 1 is a schematic diagram of a structure of an electronic device provided by an exemplary embodiment of the present disclosure. Figure 6 As shown, the electronic device includes: a memory 61 and a processor 62. In addition, the electronic device also includes a power supply component 63 and a communication component 64.
[0113] The memory 61 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.
[0114] Memory 61 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0115] The communication component 64 is used for data transmission with other devices.
[0116] The processor 62 can execute computer instructions stored in the memory 61 to: configure the data model according to the basic data type in response to the data model configuration operation; combine the expression, data model and sub-rule into a configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; send the configuration rule to the server so that the rule caller device can call the configuration rule from the server and generate a call result.
[0117] Accordingly, the present disclosure also provides a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores the computer program and the computer program is executed by one or more processors, the one or more processors execute Figure 4 Each step in the method embodiment.
[0118] Accordingly, the present disclosure also provides a computer program product, the computer program product includes a computer program / instruction, the computer program / instruction is executed by a processor Figure 4 Each step in the method embodiment.
[0119] Above Figure 6 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0120] Above Figure 6 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0121] The electronic device also includes a display screen and an audio component.
[0122] The display screen includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0123] The audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0124] In the above-mentioned apparatus, device, storage medium and computer program product embodiments of the present disclosure, the rule configuration device configures the data model according to the basic data type in response to the data model configuration operation; the rule configuration device combines the expression, data model and sub-rule into a configuration rule in response to the rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule, without writing complex code, and the configuration rule can be generated based on the combination of expression, data model and sub-rule, and the rule configuration is simple and fast; the rule configuration device sends the configuration rule to the server, so that the rule caller device can call the configuration rule from the server and generate a call result; the present disclosure does not need to write complex code, thereby reducing labor costs.
[0125] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0131] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0133] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A rule configuration method, characterized in that: include: In response to the data model configuration operation, configuring the data model according to the basic data type; In response to a rule configuration operation, combining the expression, the data model and the sub-rule into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; The configuration rule is sent to a server so that the rule calling device can call the configuration rule from the server and generate a calling result.
2. The method according to claim 1, characterized in that The step of configuring the data model according to the basic data type includes: The data model is configured according to at least one basic data type of a number, a string, and a Boolean type.
3. The method according to claim 1, characterized in that The rule configuration operation is a drag operation or an option configuration operation.
4. The method according to claim 1, characterized in that: The expression includes functions, operators and connectives; The function includes at least one of the following: taking the minimum value, taking the maximum value, the average value, a random number, converting a value into a numerical value, and whether a string is contained; The operator includes at least one of the following: addition, subtraction, multiplication, division, equal, greater than, less than, equal, greater than or equal to, less than or equal to, not equal to, remainder, and question mark; The conjunction includes at least one of the following: and, or, not, colon, semicolon, left bracket and right bracket.
5. A rule configuration system, characterized in that: include: A rule configuration device, configured to configure the data model according to the basic data type in response to the data model configuration operation; In response to a rule configuration operation, combining the expression, the data model and the sub-rule into a configuration rule, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; and sending the configuration rule to a server; A rule calling device, configured to send a call request to the server in response to a rule calling operation, wherein the call request carries input data; The server is used to store the configuration rules sent by the rule configuration device; receive the call request sent by the rule calling device, match the target configuration rules corresponding to the input data according to the input data, execute the policy corresponding to the target configuration rules to generate a call result; and send the call result to the rule calling device.
6. The system according to claim 5, characterized in that Before executing the policy corresponding to the target configuration rule, the server may also be used to: Determining whether the input data satisfies a condition of the target configuration rule; When the input data satisfies the condition of the target configuration rule, a policy corresponding to the target configuration rule is executed.
7. A rule configuration device, characterized in that: include: A first configuration module, configured to configure the data model according to the basic data type in response to the data model configuration operation; A second configuration module, configured to combine the expression, the data model and the sub-rule into a configuration rule in response to a rule configuration operation, wherein the sub-rule is an independent logical unit and can be called by the configuration rule; The sending module is used to send the configuration rule to the server so that the rule calling device can call the configuration rule from the server and generate a calling result.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement each step in the method according to any one of claims 1 to 4.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 4 is implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.