CN111552506A - Business rule configuration method, device and storage medium - Google Patents

Business rule configuration method, device and storage medium Download PDF

Info

Publication number
CN111552506A
CN111552506A CN202010112418.7A CN202010112418A CN111552506A CN 111552506 A CN111552506 A CN 111552506A CN 202010112418 A CN202010112418 A CN 202010112418A CN 111552506 A CN111552506 A CN 111552506A
Authority
CN
China
Prior art keywords
rule configuration
target
rule
configuration file
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010112418.7A
Other languages
Chinese (zh)
Other versions
CN111552506B (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.)
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte Ltd
Original Assignee
Shanghai Envision Innovation Intelligent Technology Co Ltd
Envision Digital International Pte 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 Shanghai Envision Innovation Intelligent Technology Co Ltd, Envision Digital International Pte Ltd filed Critical Shanghai Envision Innovation Intelligent Technology Co Ltd
Priority to CN202010112418.7A priority Critical patent/CN111552506B/en
Publication of CN111552506A publication Critical patent/CN111552506A/en
Application granted granted Critical
Publication of CN111552506B publication Critical patent/CN111552506B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method, a device and a storage medium for configuring business rules, and relates to the technical field of computer program development. The method comprises the following steps: acquiring a target rule configuration file from a rule configuration platform, wherein the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files for configuring service rules of application programs; selecting a target processing engine matched with the programming language of the target rule configuration file from the candidate processing engines, wherein the candidate processing engines comprise a plurality of processing engines matched with different programming languages; and configuring the target business rule by adopting the target rule configuration file through the target processing engine. In the technical scheme provided by the embodiment of the application, the first terminal can acquire and use the rule configuration files defined by different programming languages, so that the rule configuration files can be flexibly used.

Description

Business rule configuration method, device and storage medium
Technical Field
The embodiment of the application relates to the technical field of computer program development, in particular to a method and a device for configuring business rules and a storage medium.
Background
With the development of computer technology, the development process of computer programs is more and more complicated.
In the related art, the terminal can only acquire the rule configuration file defined by a single programming language from the rule configuration platform to configure the service rule, and is not flexible enough.
Disclosure of Invention
The embodiment of the application provides a method, a device and a storage medium for configuring business rules, which can realize flexible configuration of the business rules. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for configuring a service rule, where the method includes:
acquiring a target rule configuration file from a rule configuration platform, wherein the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files for configuring service rules of application programs;
selecting a target processing engine which is adaptive to the programming language of the target rule configuration file from candidate processing engines, wherein the candidate processing engines comprise a plurality of processing engines adaptive to different programming languages;
and configuring the target business rule by adopting the target rule configuration file through the target processing engine.
Optionally, the configuring, by the target processing engine, the target business rule by using the target rule configuration file includes:
reading the target rule configuration file through the target processing engine;
inputting input parameters corresponding to the target rule configuration file into the target processing engine;
and configuring the target business rule in the target processing engine according to the input parameters to obtain output parameters corresponding to the target rule configuration file.
Optionally, the method further comprises:
responding to the abnormal configuration of the target business rule, and determining a preset output parameter corresponding to the target business rule;
and determining the preset output parameter as the output parameter.
Optionally, the method further comprises:
acquiring a configuration updating notice, wherein the configuration updating notice is used for informing a terminal storing the target rule configuration file to update the target rule configuration file;
acquiring an updated target rule configuration file from the rule configuration platform according to the configuration updating notice;
and storing the updated target rule configuration file in a local storage unit.
On the other hand, an embodiment of the present application provides a method for configuring a service rule, where the method includes:
receiving a plurality of rule configuration files defined by different programming languages, wherein the rule configuration files are files for configuring the service rules of the application programs;
classifying and storing the rule configuration files according to the services corresponding to the rule configuration files;
receiving a configuration file acquisition request sent by a terminal, wherein the configuration file acquisition request is used for requesting to acquire a target rule configuration file;
and sending the target rule configuration file to the terminal.
Optionally, the storing the rule configuration files in a classified manner according to the services corresponding to the rule configuration files includes:
storing the rule configuration files in a database in a classified manner according to the services corresponding to the rule configuration files; or, storing the rule configuration files in a database in a classified manner according to the service corresponding to the rule configuration files, and caching the rule configuration files in a local memory.
Optionally, the method further comprises:
saving a historical version of the target rule configuration file;
and responding to a historical version acquisition request, and sending the historical version of the target rule configuration file to the terminal sending the historical version acquisition request.
In another aspect, an embodiment of the present application provides a device for configuring a business rule, where the device includes:
the system comprises a file acquisition module, a rule configuration module and a rule configuration module, wherein the file acquisition module is used for acquiring a target rule configuration file from a rule configuration platform, the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files used for configuring service rules of application programs;
the engine selection module is used for selecting a target processing engine matched with the programming language of the target rule configuration file from candidate processing engines, wherein the candidate processing engines comprise a plurality of processing engines matched with different programming languages;
and the rule configuration module is used for configuring the target business rule by adopting the target rule configuration file through the target processing engine.
Optionally, the rule configuring module is configured to:
reading the target rule configuration file through the target processing engine;
inputting input parameters corresponding to the target rule configuration file into the target processing engine;
and configuring the target business rule in the target processing engine according to the input parameters to obtain output parameters corresponding to the target rule configuration file.
Optionally, the apparatus further comprises:
the parameter determining module is used for responding to the abnormal configuration of the target business rule and determining a preset output parameter corresponding to the target business rule;
the parameter determining module is further configured to determine the preset output parameter as the output parameter.
Optionally, the apparatus further comprises:
a notification obtaining module, configured to obtain a configuration update notification, where the configuration update notification is used to notify a terminal storing the target rule configuration file to update the target rule configuration file;
the file acquisition module is also used for acquiring an updated target rule configuration file from the rule configuration platform according to the configuration updating notice;
the file storage module is further configured to store the updated target rule configuration file in a local storage unit.
In another aspect, an embodiment of the present application provides a business rule configuration apparatus, where the apparatus includes:
the file receiving module is used for receiving a plurality of rule configuration files defined by different programming languages, wherein the rule configuration files are files for configuring the service rules of the application program;
the file storage module is used for storing the rule configuration files in a classified manner according to the services corresponding to the rule configuration files;
the device comprises a request receiving module, a configuration rule configuration module and a configuration file obtaining module, wherein the request receiving module is used for receiving a configuration file obtaining request sent by a terminal, and the configuration file obtaining request is used for requesting to obtain a target rule configuration file;
and the file sending module is used for sending the target rule configuration file to the terminal.
Optionally, the file storage module is configured to:
storing the rule configuration files in a database in a classified manner according to the services corresponding to the rule configuration files;
or, storing the rule configuration files in a database in a classified manner according to the service corresponding to the rule configuration files, and caching the rule configuration files in a local memory.
Optionally, the apparatus further comprises:
the file storage module is used for storing the historical version of the target rule configuration file;
the file sending module is further configured to send the historical version of the target rule configuration file to the terminal that sent the historical version obtaining request, in response to the historical version obtaining request.
In another aspect, the present application provides a terminal, where the terminal includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned service rule configuration method on the terminal side.
In another aspect, the present application provides a server, where the server includes a processor and a memory, where the memory stores a computer program, and the computer program is loaded and executed by the processor to implement the above-mentioned method for configuring a service rule on the server side.
In still another aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor of a terminal to implement the above-mentioned service rule configuration method on the terminal side.
In still another aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor of a server to implement the above-mentioned method for configuring a service rule on the server side.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
the target rule configuration file is obtained from the rule configuration platform, the target processing engine matched with the programming language of the target rule configuration file is selected from the candidate processing engines, and the target business rule is configured by adopting the target rule configuration file through the target processing engine, so that the first terminal can obtain and use the rule configuration files defined by different programming languages, and the first terminal can flexibly use the rule configuration file.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a business rule configuration system provided by one embodiment of the present application;
FIG. 2 is a flow chart of a business rule configuration method provided by an embodiment of the present application;
FIG. 3 is a flow chart of a business rule configuration method according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a display interface of a second terminal according to an embodiment of the present application;
FIG. 5 is a block diagram of a business rule configuration apparatus provided by an embodiment of the present application;
FIG. 6 is a block diagram of a business rule configuration apparatus according to another embodiment of the present application;
FIG. 7 is a block diagram of a business rule configuration apparatus according to another embodiment of the present application;
FIG. 8 is a block diagram of a business rule configuration apparatus according to another embodiment of the present application;
fig. 9 is a block diagram of a terminal according to an embodiment of the present application;
fig. 10 is a block diagram of a server according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of methods consistent with aspects of the present application, as detailed in the appended claims.
Referring to fig. 1, a schematic diagram of a business rule configuration system according to an embodiment of the present application is shown. As shown in fig. 1, the system 100 includes a first terminal 110 and a rule configuration platform 120.
The first terminal 110 has a plurality of processing engines adapted to different programming languages installed therein, and the processing engines can be used to configure the business rules in the rule configuration file.
The rule configuration platform 120 is used to collect, manage and distribute rule configuration files and provide the rule configuration files to the first terminal 110. The rule configuration platform 120 may include one or more servers. A network connection may be established between (the server of) the rule configuration platform 120 and the first terminal 110.
Optionally, the rule configuration platform 120 includes a first server and a second server. The first server is used to receive, manage and distribute rule profiles, the second server is used to store a database 130, and the database 130 is used to store rule profiles. The rule configuration platform 120 may query and/or retrieve the rule configuration file required by the first terminal 110 from the database 130.
The system 100 may further include a second terminal 140, where the second terminal 140 is configured to enter the rule configuration file into the rule configuration platform 120, and a network connection may be established between the second terminal 140 and the rule configuration platform 120.
The first terminal 110 and the second terminal 140 are electronic devices with data calculation, processing and storage capabilities. The terminal may be a PC (Personal Computer), a smartphone, a tablet, a wearable device, a smart robot, or the like. The first terminal 110 and the second terminal 140 may be the same terminal or different terminals, which is not limited in this embodiment of the application.
The technical solution of the present application will be described below by means of several embodiments.
Referring to fig. 2, a flowchart of a business rule configuration method according to an embodiment of the present application is shown. In the present embodiment, the method is mainly applied to the first terminal described above for example. The method comprises the following steps (201-203):
step 201, a target rule configuration file is obtained from a rule configuration platform.
The rule configuration platform is used for storing a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files for configuring the service rules of the application programs.
A business rule may refer to a business logic set in a business. Illustratively, one business rule in a financial application may be: if the monthly income of the user is more than 0 and less than or equal to 5000 yuan, not recommending financial products to the user; if the monthly income of the user is more than 5000 yuan and less than 10000 yuan, recommending a financial product with smaller money to the user; and if the monthly income of the user is more than or equal to 1000 yuan, recommending financial products with larger money amount to the user.
The programming language adopted by the rule configuration file stored in the rule configuration platform may be js language, groovy language, python language, java language, or other programming languages, which is not limited in this embodiment of the present application.
Illustratively, the contents of the rule configuration file in groovy language are as follows:
Figure BDA0002390488360000061
Figure BDA0002390488360000071
step 202, selecting a target processing engine adapted to the programming language of the target rule configuration file from the candidate processing engines.
The first terminal may have a candidate processing engine installed therein. Wherein the candidate processing engines may include a plurality of processing engines adapted to different programming languages. The target rule configuration file adopts a programming language which is matched with the programming language supported by the target processing engine. For example, if the target rule configuration file is written in groovy language, the target rule configuration file can only run in a processing engine supporting groovy language; for another example, if the target rule configuration file is written in java language, the target rule configuration file can only run in a processing engine that supports java language.
Step 203, configuring the target business rule by the target processing engine by adopting the target rule configuration file.
And running the target rule configuration file in the target processing engine, namely configuring the target business rules contained in the target rule configuration file.
In some possible embodiments, step 203 may specifically include the following sub-steps:
1. reading a target rule configuration file through a target processing engine;
2. inputting input parameters corresponding to the target rule configuration file into a target processing engine;
3. and configuring the target business rule in the target processing engine according to the input parameters to obtain the output parameters corresponding to the target rule configuration file.
The input parameter may be automatically input into the target processing engine by the first terminal or an application program in the first terminal, or may be manually input into the target processing engine by a developer of the application program through the first terminal, which is not limited in this embodiment of the present application.
For example, for the exemplary business rule in step 201 above, when the input parameter is 4000, the output parameter may be "no financial products are recommended to the user"; when the input parameter is 7000, the output parameter may be "recommend a financial product with a smaller amount to the user"; when the input parameter is 22000, the output parameter may be "recommend financial products with a larger amount to the user".
To sum up, in the technical solution provided in this embodiment of the application, the target rule configuration file is obtained from the rule configuration platform, the target processing engine adapted to the programming language of the target rule configuration file is selected from the candidate processing engines, and the target rule configuration file is used to configure the target service rule through the target processing engine, so that the first terminal can obtain and use the rule configuration files defined by different programming languages, and further the first terminal can flexibly use the rule configuration file.
In some optional embodiments, the method may further comprise the steps of:
1. responding to the abnormal configuration of the target business rule, and determining a preset output parameter corresponding to the target business rule;
2. and determining the preset output parameters as the output parameters.
When the target service rule configuration is abnormal (the target service rule cannot process the input parameters, or the target rule configuration file is damaged, or the target rule configuration file cannot be acquired), the preset output parameters can be determined as the output parameters. For example, for the exemplary business rule in step 201, if the preset output parameter is "recommend a financial product with a smaller amount to the user", when the configuration of the business rule is abnormal, the "recommend a financial product with a smaller amount to the user" may be directly output as the output parameter.
In the implementation manner, when the target service rule configuration is abnormal, the preset output parameter is determined as the output parameter, and the output parameter can be ensured to be obtained, so that the risk of running interruption of the application program is reduced.
In some optional embodiments, before the step 201, the following steps may be further included:
1. receiving a service rule configuration request, wherein the service rule configuration request is used for requesting to configure a target service rule;
2. responding to the service rule configuration request, and generating a configuration file acquisition request;
3. in response to the configuration file acquisition request, the step of acquiring the target rule configuration file from the rule configuration platform is performed.
In the implementation manner, when the service rule configuration request is received, the corresponding target rule configuration file may be determined according to the service rule configuration request, so as to generate a configuration file acquisition request, and further perform the step of acquiring the target rule configuration file from the rule configuration platform.
In some optional embodiments, the method may further comprise the steps of:
1. acquiring a configuration updating notice, wherein the configuration updating notice is used for informing a terminal storing a target rule configuration file to update the target rule configuration file;
2. acquiring an updated target rule configuration file from the rule configuration platform according to the configuration updating notice;
3. and storing the updated target rule configuration file in a local storage unit.
After the step 201, the target rule configuration file may be stored in the local storage unit, and when the target rule configuration file needs to be obtained, the target rule configuration file may be directly obtained from the local storage unit, so as to reduce the time for obtaining the target rule configuration file.
After the updated target rule configuration file is stored in the local storage unit, the target rule configuration file before updating in the local storage unit can be deleted, so that the storage space of the local storage unit is saved.
In some possible embodiments, the rule configuration platform may notify the terminal storing the target rule configuration file to update the target rule configuration file through a distributed service (zookeeper).
In the implementation mode, the target rule configuration file stored in the local storage unit can be updated in time by acquiring the configuration updating notification, and the method is convenient and quick.
Referring to fig. 3, a flowchart of a business rule configuration method according to another embodiment of the present application is shown. In the present embodiment, the method is mainly applied to the rule configuration platform described above for illustration. The method comprises the following steps (301-304):
in step 301, a plurality of rule configuration files defined by different programming languages are received.
Wherein the rule configuration file is a file for configuring the business rules of the application program.
In some possible embodiments, step 301 may further include obtaining an updated target rule profile. After the updated target rule configuration file is obtained, a configuration update notification may be sent, where the configuration update notification is used to notify the terminal storing the target rule configuration file to update the target rule configuration file.
In some possible embodiments, the rule configuration file is sent by the second terminal to the rule configuration platform. The rule configuration platform can store the historical version of the target rule configuration file; when the history version acquisition request is received, the history version of the target rule configuration file may be transmitted to the terminal that issued the history version acquisition request. So that the second terminal can generate an updated target rule profile with reference to the historical version of the target rule profile.
Referring to fig. 4, a schematic diagram of a display interface of a second terminal according to an embodiment of the present application is shown. As shown in fig. 4, the display interface for entering the target rule configuration file in the second terminal illustratively includes a file display area 41, a test control 42, a save control 43 and a history version control 44, and the file display area 41 is used for displaying the content of the input target rule configuration file. When the test control 42 is clicked, the operation condition of the input target rule configuration file can be tested; when the save control 42 is clicked, the contents of the input target rule configuration file may be saved; when the historical version control 44 is clicked, the historical version of the target rule configuration file may be obtained from the rule configuration platform and displayed in the file display area 41.
Step 302, storing the rule configuration files in a classified manner according to the services corresponding to the rule configuration files.
The rule profiles may correspond to different kinds of services, such as financial services, takeaway services, ticketing services, and the like. The rule profiles may be stored in classes according to the traffic class, for example, the same class of traffic may be stored in the same data block or the same server.
In some possible embodiments, the rule configuration files are classified and stored in the database according to the services corresponding to the rule configuration files. Correspondingly, when the rule configuration platform needs to send the target rule configuration file to the first terminal, the target rule configuration file is obtained from the database in response to that the target rule configuration file is not stored in the local memory and the target rule configuration file is stored in the database.
In some possible embodiments, the rule configuration files are classified and stored in the database according to the services corresponding to the rule configuration files, and are cached in the local memory. Correspondingly, when the rule configuration platform needs to send the target rule configuration file to the first terminal, the target rule configuration file is obtained from the local memory in response to the fact that the target rule configuration file is cached in the local memory, and therefore time for obtaining the target rule configuration file is shortened.
Step 303, receiving a configuration file obtaining request sent by the terminal, where the configuration file obtaining request is used to request to obtain a target rule configuration file.
The configuration file obtaining request sent by the terminal can be an encrypted request, and the rule configuration platform can decrypt the encrypted configuration file obtaining request so as to determine the target rule configuration file requested by the terminal.
Step 304, sending the target rule configuration file to the terminal.
In summary, in the technical solution provided in the embodiment of the present application, the rule configuration platform stores the plurality of rule configuration files defined by different programming languages in a classified manner, so that the storage of the rule configuration files is more orderly, and the time for responding to the configuration file acquisition request is further reduced.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 5, a block diagram of a business rule configuration apparatus according to an embodiment of the present application is shown. The apparatus 500 has a function of implementing the above-mentioned service rule configuration method example at the terminal side, and the function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The apparatus 500 may be the first terminal described above, or may be provided on the first terminal. The apparatus 500 may include: a file acquisition module 510, an engine selection module 520, and a rule configuration module 530.
The file obtaining module 510 is configured to obtain a target rule configuration file from a rule configuration platform, where the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration file is a file used for configuring a service rule of an application program.
The engine selecting module 520 is configured to select a target processing engine adapted to the programming language of the target rule configuration file from candidate processing engines, where the candidate processing engines include multiple processing engines adapted to different programming languages.
The rule configuration module 530 is configured to configure, by the target processing engine, the target business rule by using the target rule configuration file.
To sum up, in the technical solution provided in this embodiment of the application, the target rule configuration file is obtained from the rule configuration platform, the target processing engine adapted to the programming language of the target rule configuration file is selected from the candidate processing engines, and the target rule configuration file is used to configure the target service rule through the target processing engine, so that the first terminal can obtain and use the rule configuration files defined by different programming languages, and further the first terminal can flexibly use the rule configuration file.
In an exemplary embodiment, the rule configuration module 530 is configured to:
reading the target rule configuration file through the target processing engine;
inputting input parameters corresponding to the target rule configuration file into the target processing engine;
and configuring the target business rule in the target processing engine according to the input parameters to obtain output parameters corresponding to the target rule configuration file.
In an exemplary embodiment, as shown in fig. 6, the apparatus 500 further comprises: a parameter determination module 540.
The parameter determining module 540 is configured to determine, in response to the target business rule configuration exception, a preset output parameter corresponding to the target business rule.
The parameter determining module 540 is further configured to determine the preset output parameter as the output parameter.
In an exemplary embodiment, as shown in fig. 6, the apparatus 500 further comprises: a notification acquisition module 550 and a file storage module 560.
The notification obtaining module 550 is configured to obtain a configuration update notification, where the configuration update notification is used to notify the terminal storing the target rule configuration file to update the target rule configuration file.
The file obtaining module 510 is further configured to obtain an updated target rule configuration file from the rule configuration platform according to the configuration update notification.
The file storage module 560 is configured to store the updated target rule configuration file in a local storage unit.
Referring to fig. 7, a block diagram of a business rule configuration apparatus according to an embodiment of the present application is shown. The device 700 has a function of implementing the above-mentioned service rule configuration method example on the server side, and the function may be implemented by hardware, or may be implemented by hardware executing corresponding software. The apparatus 700 may be the server described above, or may be provided on a server. The apparatus 700 may include: a file receiving module 710, a file storing module 720, a request receiving module 730, and a file sending module 740.
The file receiving module 710 is configured to receive a plurality of rule configuration files defined by different programming languages, where the rule configuration files are files for configuring business rules of an application program.
The file storage module 720 is configured to store the rule configuration files in a classified manner according to the services corresponding to the rule configuration files.
The request receiving module 730 is configured to receive a configuration file obtaining request sent by a terminal, where the configuration file obtaining request is used to request to obtain a target rule configuration file.
The file sending module 740 is configured to send the target rule configuration file to the terminal.
In summary, in the technical solution provided in the embodiment of the present application, the rule configuration platform stores the plurality of rule configuration files defined by different programming languages in a classified manner, so that the storage of the rule configuration files is more orderly, and the time for responding to the configuration file acquisition request is further reduced.
In an exemplary embodiment, the file storage module 720 is configured to:
storing the rule configuration files in a database in a classified manner according to the services corresponding to the rule configuration files;
or, storing the rule configuration files in a database in a classified manner according to the service corresponding to the rule configuration files, and caching the rule configuration files in a local memory.
In an exemplary embodiment, as shown in fig. 8, the apparatus 700 further comprises a file saving module 750.
The file saving module 750 is configured to save a history version of the target rule configuration file.
The file sending module 740 is further configured to, in response to the historical version obtaining request, send the historical version of the target rule configuration file to the terminal that sent the historical version obtaining request.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 9, a block diagram of a terminal according to an embodiment of the present application is shown. The terminal 900 may be an electronic device such as a mobile phone, a tablet computer, a game console, an electronic book reader, a multimedia player, a wearable device, a PC, etc. The terminal is used for implementing the service rule configuration method on the terminal side provided in the above embodiment. The terminal may be the terminal 900 in the implementation environment shown in fig. 1. Specifically, the method comprises the following steps:
in general, terminal 900 includes: a processor 901 and a memory 902.
Processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. The processor 901 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (field Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 901 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in the memory 902 is used to store a computer program and is configured to be executed by one or more processors to implement the above-described terminal-side traffic rule configuration method.
In some embodiments, terminal 900 can also optionally include: a peripheral interface 903 and at least one peripheral. The processor 901, memory 902, and peripheral interface 903 may be connected by buses or signal lines. Various peripheral devices may be connected to the peripheral interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a touch display screen 905, a camera 906, an audio circuit 907, a positioning component 908, and a power supply 909.
Those skilled in the art will appreciate that the configuration shown in fig. 9 does not constitute a limitation of terminal 900, and may include more or fewer components than those shown, or may combine certain components, or may employ a different arrangement of components.
Referring to fig. 10, a block diagram of a server according to an embodiment of the present application is shown. The server is configured to implement the method for configuring the service rule on the server side provided in the foregoing embodiment. Specifically, the method comprises the following steps:
the server 1000 includes a CPU (Central Processing Unit) 1001, a system Memory 1004 including a RAM (Random Access Memory) 1002 and a ROM (Read-Only Memory) 1003, and a system bus 1005 connecting the system Memory 1004 and the Central Processing Unit 1001. The server 1000 also includes a basic I/O (Input/Output) system 1006, which facilitates the transfer of information between devices within the computer, and a mass storage device 1007, which stores an operating system 1013, application programs 1014, and other program modules 1012.
The basic input/output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse, keyboard, etc., for user input of information. Wherein the display 1008 and input device 1009 are connected to the central processing unit 1001 through an input-output controller 1010 connected to the system bus 1005. The basic input/output system 1006 may also include an input/output controller 1010 for receiving and processing input from a number of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input-output controller 1010 also provides output to a display screen, a printer, or other type of output device.
The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM (Compact disk Read-Only Memory) drive.
Without loss of generality, the computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash Memory or other solid state Memory technology, CD-ROM, DVD (Digital Video Disc) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage media is not limited to the foregoing. The system memory 1004 and mass storage device 1007 described above may be collectively referred to as memory.
The server 1000 may also operate as a remote computer connected to a network via a network, such as the internet, according to various embodiments of the present application. That is, the server 1000 may be connected to the network 1012 through the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to another type of network or a remote computer system (not shown).
In an exemplary embodiment, there is also provided a computer-readable storage medium having stored therein a computer program which, when executed by a processor of a terminal, implements the above-described service rule configuration method at the terminal side.
In an exemplary embodiment, a computer-readable storage medium is also provided, in which a computer program is stored, which when executed by a processor of a server, implements the above-described server-side business rule configuration method.
In an exemplary embodiment, there is also provided a computer program product for implementing the above-mentioned terminal-side business rule configuration method when the computer program product is executed by a processor of a terminal.
In an exemplary embodiment, a computer program product is also provided, which, when being executed by a processor of a server, is configured to implement the above-mentioned server-side business rule configuration method.
It should be understood that reference to "a plurality" herein means two or more. Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for configuring business rules, the method comprising:
acquiring a target rule configuration file from a rule configuration platform, wherein the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files for configuring service rules of application programs;
selecting a target processing engine which is adaptive to the programming language of the target rule configuration file from candidate processing engines, wherein the candidate processing engines comprise a plurality of processing engines adaptive to different programming languages;
and configuring the target business rule by adopting the target rule configuration file through the target processing engine.
2. The method of claim 1, wherein said configuring, by said target processing engine, target business rules using said target rule profile comprises:
reading the target rule configuration file through the target processing engine;
inputting input parameters corresponding to the target rule configuration file into the target processing engine;
and configuring the target business rule in the target processing engine according to the input parameters to obtain output parameters corresponding to the target rule configuration file.
3. The method of claim 2, further comprising:
responding to the abnormal configuration of the target business rule, and determining a preset output parameter corresponding to the target business rule;
and determining the preset output parameter as the output parameter.
4. The method of claim 1, further comprising:
acquiring a configuration updating notice, wherein the configuration updating notice is used for informing a terminal storing the target rule configuration file to update the target rule configuration file;
acquiring an updated target rule configuration file from the rule configuration platform according to the configuration updating notice;
and storing the updated target rule configuration file in a local storage unit.
5. A method for configuring business rules, the method comprising:
receiving a plurality of rule configuration files defined by different programming languages, wherein the rule configuration files are files for configuring the service rules of the application programs;
classifying and storing the rule configuration files according to the services corresponding to the rule configuration files;
receiving a configuration file acquisition request sent by a terminal, wherein the configuration file acquisition request is used for requesting to acquire a target rule configuration file;
and sending the target rule configuration file to the terminal.
6. The method according to claim 5, wherein the storing the rule configuration files according to the service corresponding to the rule configuration files by classification comprises:
storing the rule configuration files in a database in a classified manner according to the services corresponding to the rule configuration files;
or the like, or, alternatively,
and storing the rule configuration files in a database in a classified manner according to the service corresponding to the rule configuration files, and caching the rule configuration files in a local memory.
7. The method of claim 5 or 6, further comprising:
saving a historical version of the target rule configuration file;
and responding to a historical version acquisition request, and sending the historical version of the target rule configuration file to the terminal sending the historical version acquisition request.
8. A business rule configuration apparatus, the apparatus comprising:
the system comprises a file acquisition module, a rule configuration module and a rule configuration module, wherein the file acquisition module is used for acquiring a target rule configuration file from a rule configuration platform, the rule configuration platform stores a plurality of rule configuration files defined by different programming languages in a classified manner, and the rule configuration files are files used for configuring service rules of application programs;
the engine selection module is used for selecting a target processing engine matched with the programming language of the target rule configuration file from candidate processing engines, wherein the candidate processing engines comprise a plurality of processing engines matched with different programming languages;
and the rule configuration module is used for configuring the target business rule by adopting the target rule configuration file through the target processing engine.
9. A business rule configuration apparatus, the apparatus comprising:
the file receiving module is used for receiving a plurality of rule configuration files defined by different programming languages, wherein the rule configuration files are files for configuring the service rules of the application program;
the file storage module is used for storing the rule configuration files in a classified manner according to the services corresponding to the rule configuration files;
the device comprises a request receiving module, a configuration rule configuration module and a configuration file obtaining module, wherein the request receiving module is used for receiving a configuration file obtaining request sent by a terminal, and the configuration file obtaining request is used for requesting to obtain a target rule configuration file;
and the file sending module is used for sending the target rule configuration file to the terminal.
10. A computer-readable storage medium, in which a computer program is stored, the computer program being loaded and executed by a processor to implement the business rule configuration method according to any one of claims 1 to 4 or the business rule configuration method according to any one of claims 5 to 7.
CN202010112418.7A 2020-02-24 2020-02-24 Service rule configuration method, device and storage medium Active CN111552506B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010112418.7A CN111552506B (en) 2020-02-24 2020-02-24 Service rule configuration method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010112418.7A CN111552506B (en) 2020-02-24 2020-02-24 Service rule configuration method, device and storage medium

Publications (2)

Publication Number Publication Date
CN111552506A true CN111552506A (en) 2020-08-18
CN111552506B CN111552506B (en) 2023-09-12

Family

ID=72000036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010112418.7A Active CN111552506B (en) 2020-02-24 2020-02-24 Service rule configuration method, device and storage medium

Country Status (1)

Country Link
CN (1) CN111552506B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703739A (en) * 2021-09-03 2021-11-26 上海森亿医疗科技有限公司 Cross-language fusion computing method, system and terminal based on omiga engine
CN114546389A (en) * 2022-04-25 2022-05-27 浙江大华技术股份有限公司 Front-end page generation method, audio and video analysis method, device and medium
WO2023092981A1 (en) * 2021-11-24 2023-06-01 青岛海尔科技有限公司 Streaming data processing method, rule plug-in, and streaming data processing module and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075413A1 (en) * 2012-09-07 2014-03-13 Inadev Corporation Workflow-based application generator
CN107797826A (en) * 2017-05-19 2018-03-13 平安科技(深圳)有限公司 A kind of regular collocation method, terminal and the equipment of rule-based engine
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device
CN110825488A (en) * 2019-09-29 2020-02-21 山东中创软件工程股份有限公司 Business processing method and device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140075413A1 (en) * 2012-09-07 2014-03-13 Inadev Corporation Workflow-based application generator
CN107797826A (en) * 2017-05-19 2018-03-13 平安科技(深圳)有限公司 A kind of regular collocation method, terminal and the equipment of rule-based engine
CN110704037A (en) * 2019-08-28 2020-01-17 贵州医渡云技术有限公司 Rule engine implementation method and device
CN110825488A (en) * 2019-09-29 2020-02-21 山东中创软件工程股份有限公司 Business processing method and device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DIBYENDUSEKHAR GOSWAMI 等: "Rule engine for validating complex business objects", 《PLOP \'13: PROCEEDINGS OF THE 20TH CONFERENCE ON PATTERN LANGUAGES OF PROGRAMS》, pages 1 - 18 *
张伟: "应用规则引擎与Web服务分离业务规则", 《电脑知识与技术》, pages 54 - 55 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113703739A (en) * 2021-09-03 2021-11-26 上海森亿医疗科技有限公司 Cross-language fusion computing method, system and terminal based on omiga engine
CN113703739B (en) * 2021-09-03 2023-05-09 上海森亿医疗科技有限公司 Cross-language fusion calculation method, system and terminal based on omiga engine
WO2023092981A1 (en) * 2021-11-24 2023-06-01 青岛海尔科技有限公司 Streaming data processing method, rule plug-in, and streaming data processing module and system
CN114546389A (en) * 2022-04-25 2022-05-27 浙江大华技术股份有限公司 Front-end page generation method, audio and video analysis method, device and medium

Also Published As

Publication number Publication date
CN111552506B (en) 2023-09-12

Similar Documents

Publication Publication Date Title
CN111552506B (en) Service rule configuration method, device and storage medium
CN108073429B (en) Payment mode configuration method, device, equipment and storage medium
CN110888696A (en) Page display method and system, computer system and computer readable medium
JP7397094B2 (en) Resource configuration method, resource configuration device, computer equipment, and computer program
CN104520834A (en) System and method for end-to-end exposure of exported representations of native data types to third-party applications
CN110222775A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN112269830A (en) Big data analysis method, system, computer equipment and storage medium thereof
CN104267872A (en) Application program APP information display method and device and mobile terminal
CN108804295A (en) log information recording method and device
CN114385164A (en) Page generation and rendering method and device, electronic equipment and storage medium
CN111985197A (en) Template generation method based on medical information
CN112114787A (en) Report generation method and device and storage medium
CN115168162A (en) Multi-gray-scale issuing method and device based on ingress controller in container environment and storage medium
CN112650804B (en) Big data access method, device, system and storage medium
CN111666166A (en) Service providing method, device, equipment and storage medium
CN111459542A (en) Method, device and system for determining recommended configuration index, storage medium and equipment
CN107480269B (en) Object display method and system, medium and computing equipment
CN112182400B (en) Message processing method, message processing device, electronic equipment and storage medium
CN115455097A (en) Wind control data processing method, system, computer equipment and storage medium
CN114676272A (en) Information processing method, device and equipment of multimedia resource and storage medium
CN104346101A (en) Dynamic storage space allocation system and method
CN114647411A (en) Programming interface loading method and device, electronic equipment and storage medium
CN112990783A (en) Material allocation method, system, equipment and medium
CN111857879B (en) Data processing method, device, electronic equipment and computer readable medium
CN109634827A (en) Method and apparatus for generating information

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