[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN115495151A - Rule engine migration method, device, equipment, storage medium and program product - Google Patents

Rule engine migration method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN115495151A
CN115495151A CN202211176952.XA CN202211176952A CN115495151A CN 115495151 A CN115495151 A CN 115495151A CN 202211176952 A CN202211176952 A CN 202211176952A CN 115495151 A CN115495151 A CN 115495151A
Authority
CN
China
Prior art keywords
module
relevant parameters
rule engine
functional
extracting
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.)
Pending
Application number
CN202211176952.XA
Other languages
Chinese (zh)
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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202211176952.XA priority Critical patent/CN115495151A/en
Publication of CN115495151A publication Critical patent/CN115495151A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Landscapes

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

Abstract

The application provides a rule engine migration method, a rule engine migration device, a rule engine migration equipment, a rule engine migration storage medium and a rule engine migration program product. Relate to big data processing technology field, include: dividing the rule engine according to functions to obtain different types of functional modules; respectively extracting relevant parameters corresponding to the functional modules; and (4) migrating the relevant parameters corresponding to the functional modules through the matched interfaces, and executing the relevant parameters by adopting a specified language. By dividing the rule engine into modules according to different functions, when specific coding is realized, only the realization of each independent unit is needed to be concerned, the whole process is not needed to be known, and therefore the migration processing of the whole rule engine process can be accurately and efficiently completed under the condition of reducing the labor cost.

Description

Rule engine migration method, apparatus, device, storage medium and program product
Technical Field
The present application relates to the field of big data processing technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for migrating a rule engine.
Background
At present, the occupation and check rules of credit line management and control of the credit line component are realized by using a rule engine, and in the application process of the rule engine, the conditions that the rule engine is moved out and realized by using a specified language are usually involved according to actual needs.
However, when the specified language is migrated from the rule engine, a lot of time is needed to parse the rule content in the current rule engine, and there may be problems of missing and omission. For the main flow chart of the rule engine, one node may correspond to a new flow chart, the loops are buckled, the logic is complex, the number of rules is huge, the whole flow logic cannot be comprehensively combed, and a large amount of manpower is required to complete the work.
Disclosure of Invention
The application provides a rule engine migration method, a rule engine migration device, a rule engine migration equipment, a rule engine migration storage medium and a rule engine migration program product, which are used for solving the technical problems of low efficiency and poor accuracy in the existing rule engine migration coding implementation.
In a first aspect, the present application provides a migration method of a rule engine, including: dividing the rule engine according to functions to obtain different types of functional modules;
extracting relevant parameters corresponding to the functional modules respectively;
and migrating the relevant parameters corresponding to the functional modules through matched interfaces, and executing the relevant parameters by adopting a specified language.
In a second aspect, the present application provides a migration apparatus for a rule engine, including:
the rule engine dividing module is used for dividing the rule engine according to functions to obtain different types of functional modules;
the relevant parameter extraction module is used for respectively extracting relevant parameters corresponding to the functional modules;
and the migration module is used for migrating the relevant parameters corresponding to the functional module through the matched interface and executing the relevant parameters by adopting a specified language.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the methods described herein.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor, are configured to implement the method described herein.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the method described herein.
According to the rule engine migration method, the rule engine migration device, the rule engine migration equipment, the rule engine migration medium and the rule engine migration program product, the rule engine is divided into the modules according to different functions, when specific coding is achieved, only the fact that each unit is independent needs to be paid attention to, the whole process does not need to be known, and therefore migration processing of the whole rule engine process can be accurately and efficiently completed under the condition that labor cost is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the principles of the application.
FIG. 1 is a first flowchart of migration of a rules engine provided in an embodiment of the present application;
FIG. 2 is a flow chart II of migration of a rules engine provided in an embodiment of the present application;
FIG. 3 is a flow chart of migration of a rules engine provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a migration apparatus of a rule engine according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
With the above figures, there are shown specific embodiments of the present application, which will be described in more detail below. The drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the concepts of the application by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same 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 apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific embodiments. These several specific embodiments may be combined with each other below, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings. In the technical scheme of the application, the data acquisition, storage, use, processing and the like all conform to relevant regulations of national laws and regulations
Fig. 1 is a flowchart of a migration method of a rule engine according to an embodiment of the present application. As shown in fig. 1, the method comprises the following steps:
and step S101, dividing the rule engine according to functions to obtain different types of functional modules.
Optionally, the rule engine is divided according to functions to obtain different types of function modules, including: acquiring a distribution structure of a rule engine and functional attributes of each distribution structure; and dividing the distribution structure according to the function attributes to obtain different types of function modules, wherein the function modules comprise a flow class module, an execution unit module and a numerical class module.
Specifically, the rule engine in the embodiment may specifically be an ibmlogic rule engine, and of course, the embodiment is only an example, and the specific type of the rule engine for performing migration is not limited. After the specific type of the rule engine is determined, the rule engine is analyzed to obtain the distribution structure of the rule engine and the functional attributes of the distribution structure, and the functional attributes of each distribution structure in the rule engine, namely the specific functions of the distribution structures in the rule engine, are determined without combing the whole logic flow of the rule engine during analysis. After the functional attributes of the distribution structures are determined, the distribution structures may be divided according to the functional attributes to obtain different types of functional modules.
The functional modules may include a flow class module, an execution unit module, and a value class module: the flow class module is mainly responsible for requesting judgment flow of the rule engine, a main body part of the rule engine comprises a flow chart, the judgment flow of each rule is processed in the flow chart, each node of the flow chart can be a new flow, and the embodiment does not limit the specific content of each node; the execution unit module is mainly responsible for specifically processing the request after the request is circulated, and essentially processes the parameters input by the rule set, wherein the request comprises the rule set and the decision tree; the value class module comprises a constant class module and a global variable class module, wherein the constant class module is mainly responsible for defining a constant in the rule engine, and the global variable class module is mainly responsible for variables used in the whole process of the request circulation. Of course, in the present embodiment, the flow class module, the execution unit module, and the value class module are merely exemplified, and the specific types of the function modules included in the rule engine are not limited, and it is within the scope of the present application as long as each module corresponds to a different function.
And step S102, extracting relevant parameters corresponding to the functional modules respectively.
Optionally, the extracting the relevant parameters corresponding to the function modules respectively includes: extracting operation information of each node in the flow class module, wherein the operation information comprises initial operation, final operation, rule selection and judgment and execution of the next node; the operation information is taken as a relevant parameter.
Optionally, the extracting the relevant parameters corresponding to the functional modules respectively includes: extracting a rule set and a decision tree in an execution unit module; a rule set decision tree is taken as a relevant parameter.
Optionally, the extracting the relevant parameters corresponding to the functional modules respectively includes: extracting a constant value in the constant class module; extracting global variables in the global variable class module; constant values and global variables are taken as relevant parameters.
Optionally, the extracting the relevant parameters corresponding to the functional modules respectively includes: extracting request parameter classes in the global variable class module; expanding according to the request parameter class and a specified expansion mode to obtain expansion information; and taking the expansion information as a relevant parameter.
Specifically, in the embodiment, when the rule engine is migrated, different relevant parameters are extracted according to different types of the function modules, and for the process type module, the process diagram includes a plurality of nodes, and the operation of each node may be summarized as the following operation information: initial operation, final operation, rule selection and judgment, and executing the next node, wherein the rule selection is an actual data processing unit, and the operation information is taken as the relevant information of the flow class module. And the contained rule set decision tree is directly used as the relevant information of the functional module for the execution unit. For the constant class module, the contained constant value is directly used as the relevant information of the functional module, for example, the constant value x =1, etc. For the global variable class module, the global variable class module includes two numerical forms, namely a global variable and a request parameter class, the global variable is directly extracted as a relevant parameter of the global variable class module, and for the request parameter class, the extension information is obtained by extending according to a specified extension mode and is used as a relevant parameter of the global variable class module, wherein the specified extension mode can be that a new delete class is realized for the request parameter class, the new class is inherited, and the extension information is obtained according to an inheritance result.
Optionally, after extracting the relevant parameters corresponding to the functional modules respectively, the method further includes: creating a matched java interface according to the relevant parameters corresponding to the functional module; and establishing an incidence relation between the functional module and the java interface, wherein the incidence relation comprises a corresponding relation between the identifier of the functional module and the identifier of the java interface.
Specifically, in the embodiment, after the relevant parameters corresponding to the functional modules are respectively extracted, a matched java interface is also created according to the relevant parameters corresponding to the functional modules, for the process class module a, the extracted initialization operation, final operation, rule selection, judgment and execution of the next node determine a java interface 1, and the corresponding relationship between the process class module a and the java interface 1 is established; aiming at the execution unit module, determining a java interface 2 from the extracted rule set and the decision tree, establishing a corresponding relation between the execution unit module B and the java interface 2, and realizing the interface by each single rule, so that each execution unit can be called in the process and the rule corresponding to the process node in the rule engine is selected; aiming at the constant class module C, determining a java interface 3 of the extracted constant value, and establishing a corresponding relation between the constant class module C and the java interface 3; and aiming at the global variable class module D, determining a java interface 4 according to the extracted global variable or the expanded expansion information, and establishing a corresponding relation between the global variable class module D and the java interface 4.
And step S103, migrating the relevant parameters corresponding to the functional module through the matched interface, and executing the relevant parameters by adopting a specified language.
Fig. 2 is a flowchart of migration of a rule engine provided in this embodiment, where fig. 2 mainly specifically describes step S103, and includes the following steps:
and step S1031, obtaining the identification of the functional module.
In this embodiment, when migrating the rule engine, an individual code migration may be performed on one module in the rule engine alone without considering the overall flow logic, so that after determining the functional module to be migrated in the current rule engine, the identifier of the functional module may be obtained.
And S1032, determining a java interface matched with the functional module according to the identification and the association relation of the functional module.
In the embodiment, when the rule engine is migrated, after the specified function module needs to be migrated and the identifier B of the specified function module is acquired, the java interface 2 matched with the function module B may be determined according to the previously established association relationship between the function module B and the java interface.
And step S1033, the relevant parameters corresponding to the functional module are migrated out through the matched java interface, and the relevant parameters are executed by adopting java language.
Specifically, in this embodiment, after the java2 interface matched with the functional module B is determined, the relevant data, such as the rule set and the decision tree, are migrated through the java interface 2, and the java language is used to execute the relevant parameters. For example, when it is determined that the functional module B is an execution unit module, the java interface 2 corresponding to the module is obtained, and when parameter migration is performed, it specifically means that each individual rule can call the execution unit module through the java interface 2 in the flow, and the rule corresponding to the flow node in the rule engine is selected, so that the execution unit is implemented through java language. Of course, this embodiment is merely an example, and does not limit the specific migration manner of each functional module in the rule engine. Therefore, in the embodiment, when the rule engine is migrated, one small module of the rule engine can be individually and independently migrated without considering the overall flow logic, so that a large amount of labor time is saved, meanwhile, due to the design of the nodes, the flow property of the rule engine is reserved, and the later maintenance and verification are more efficiently realized.
In the embodiment, the rule engine is divided into modules according to different functions, and when specific coding is realized, only independent units need to be concerned, and the whole process does not need to be known, so that the migration processing of the whole rule engine process can be accurately and efficiently completed under the condition of reducing the labor cost.
Fig. 3 is a flowchart three of the migration method for a rule engine according to the embodiment of the present application, in which a step of verifying an execution result is added after executing a relevant parameter using a specified language. As shown in fig. 3, the method comprises the following steps:
step S201, dividing the rule engine according to functions to obtain different types of function modules.
Optionally, the rule engine is divided according to functions to obtain different types of function modules, including: acquiring a distribution structure of a rule engine and functional attributes of each distribution structure; and dividing the distribution structure according to the function attributes to obtain different types of function modules, wherein the function modules comprise a flow class module, an execution unit module and a numerical class module.
Step S202, extracting the relevant parameters corresponding to the functional modules respectively.
Optionally, the extracting the relevant parameters corresponding to the function modules respectively includes: extracting operation information of each node in the flow class module, wherein the operation information comprises initial operation, final operation, rule selection and judgment and execution of the next node; the operation information is taken as a relevant parameter.
Optionally, the extracting the relevant parameters corresponding to the function modules respectively includes: extracting a rule set and a decision tree in an execution unit module; and taking the rule set decision tree as a relevant parameter.
Optionally, the extracting the relevant parameters corresponding to the functional modules respectively includes: extracting a constant value in the constant class module; extracting global variables in the global variable class module; constant values and global variables are taken as relevant parameters.
Optionally, the extracting the relevant parameters corresponding to the functional modules respectively includes: extracting a request parameter class in the global variable class module; expanding according to the request parameter class and a specified expansion mode to obtain expansion information; and taking the expansion information as a relevant parameter.
Step S203, the relevant parameters corresponding to the functional module are migrated through the matched interface, and the relevant parameters are executed by adopting the specified language.
And step S204, verifying the execution result, and giving an alarm when the verification is determined to be abnormal.
In this embodiment, after the rule engine is migrated using the matched interface and executed using java language, the execution result is also obtained, and the obtained execution result is checked, which may specifically be detecting whether a messy code exists in the execution result or whether a situation that is obviously inconsistent with an actual situation exists in the execution result, and if so, determining that the checking fails.
It should be noted that in this embodiment, an alarm is given when it is determined that the verification fails, so as to remind the user that the rule engine fails to migrate, and a voice alarm manner or an image alarm manner may be specifically used when giving an alarm. The user can timely adjust the migration of the rule engine according to the alarm prompt, so that the accuracy of the migration of the rule engine is further improved.
In the embodiment, the rule engine is divided into modules according to different functions, and when specific coding is realized, only the realization of each independent unit needs to be concerned, the whole process does not need to be known, so that the migration processing of the whole rule engine process can be accurately and efficiently completed under the condition of reducing the labor cost.
Fig. 4 is a schematic structural diagram of a migration apparatus of a rule engine according to an embodiment of the present application. As shown in fig. 4, the migration apparatus of the rule engine includes: a rules engine partitioning module 310, a relevant parameter extraction module 320, and a migration module 330.
The rule engine partitioning module 310 is configured to partition the rule engine according to functions to obtain different types of function modules;
a relevant parameter extracting module 320, configured to extract relevant parameters corresponding to the functional modules respectively;
the migration module 330 is configured to migrate out the relevant parameters corresponding to the functional module through the matched interface, and execute the relevant parameters by using a specified language.
Optionally, the rule engine partitioning module is configured to obtain a distribution structure of the rule engine and a functional attribute of each distribution structure;
and dividing the distribution structure according to the function attributes to obtain different types of function modules, wherein the function modules comprise a flow class module, an execution unit module and a numerical class module.
Optionally, the relevant parameter extracting module is configured to extract operation information of each node in the process class module, where the operation information includes an initial operation, a final operation, rule selection, and judgment, and executes a next node;
the operation information is taken as a relevant parameter.
Optionally, the related parameter extracting module is configured to extract a rule set and a decision tree in the execution unit module;
and taking the rule set decision tree as a relevant parameter.
Optionally, the numerical value class module includes a constant class module and a global variable class module; the related parameter extraction module is used for extracting the constant values in the constant class module;
extracting global variables in the global variable class module;
constant values and global variables are taken as relevant parameters.
Optionally, the relevant parameter extracting module is configured to extract the request parameter class in the global variable class module;
expanding according to the request parameter class and a specified expansion mode to obtain expansion information;
and taking the expansion information as a relevant parameter.
Optionally, the apparatus further includes an interface creating module, configured to create a java interface according to the relevant parameter corresponding to the function module;
and establishing an incidence relation between the functional module and the java interface, wherein the incidence relation comprises a corresponding relation between the identifier of the functional module and the identifier of the java interface.
Optionally, the migration module is configured to obtain an identifier of the functional module;
determining a java interface matched with the functional module according to the identification and the association relation of the functional module;
and migrating the relevant parameters corresponding to the functional module through the matched java interface, and executing the relevant parameters by adopting java language.
Optionally, the rules engine comprises an ibmliog rules engine.
Optionally, the apparatus further includes a verification module, configured to verify the execution result; and when the verification is determined to be abnormal, alarming and prompting are carried out.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can all be implemented in the form of software invoked by a processing element; or can be implemented in the form of hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
FIG. 5 illustrates a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 5, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM12, and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as the migration method of the rules engine.
In some embodiments, the migration method of the rules engine may be implemented as a computer program that is tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the migration method of the rules engine described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the migration method of the rules engine by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user may provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the Internet.
The computing system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
Embodiments of the present invention further provide a computer program product, including a computer program, where the computer program, when executed by a processor, implements the migration method of a rule engine as provided in any embodiment of the present application.
Computer program product in implementing the computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and including conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A migration method of a rule engine is characterized by comprising the following steps:
dividing the rule engine according to functions to obtain different types of functional modules;
extracting relevant parameters corresponding to the functional modules respectively;
and migrating the relevant parameters corresponding to the functional modules through matched interfaces, and executing the relevant parameters by adopting a specified language.
2. The method of claim 1, wherein dividing the rule engine by function obtains different types of function modules, comprising:
acquiring a distribution structure of the rule engine and functional attributes of each distribution structure;
and dividing the distribution structure according to the functional attributes to obtain different types of functional modules, wherein the functional modules comprise a flow class module, an execution unit module and a value class module.
3. The method according to claim 2, wherein the extracting the relevant parameters corresponding to the functional modules respectively comprises:
extracting operation information of each node in the process type module, wherein the operation information comprises initial operation, final operation, rule selection and judgment, and execution of a next node;
and taking the operation information as the related parameters.
4. The method according to claim 2, wherein the extracting the relevant parameters corresponding to the functional modules respectively comprises:
extracting a rule set and a decision tree in the execution unit module;
and setting the rule set to the decision tree as the relevant parameters.
5. The method of claim 2, wherein the numerical class modules include a constant class module and a global variable class module;
the respectively extracting the relevant parameters corresponding to the functional modules includes:
extracting a constant value in the constant class module;
extracting global variables in the global variable class module;
and taking the constant value and the global variable as the related parameters.
6. The method according to claim 5, wherein the extracting the relevant parameters corresponding to the functional modules respectively comprises:
extracting a request parameter class in the global variable class module;
expanding according to the request parameter class according to a specified expansion mode to obtain expansion information;
and taking the expansion information as the related parameters.
7. The method according to claim 1, wherein after the extracting the relevant parameters corresponding to the functional modules respectively, further comprises:
creating a matched java interface according to the relevant parameters corresponding to the functional module;
and establishing an association relation between the functional module and the java interface, wherein the association relation comprises a corresponding relation between the identifier of the functional module and the identifier of the java interface.
8. The method of claim 7, wherein the migrating the relevant parameters corresponding to the functional module through a matched interface and executing the relevant parameters by using a specified language includes:
acquiring the identification of the functional module;
determining a java interface matched with the functional module according to the identifier of the functional module and the incidence relation;
and migrating the relevant parameters corresponding to the functional module through the matched java interface, and executing the relevant parameters by adopting java language.
9. The method of any of claims 1 to 8, wherein the rules engine comprises an IBM ILog rules engine.
10. The method of claim 1, wherein after migrating the relevant parameters corresponding to the functional module through a matched interface and executing the relevant parameters by using a specified language, the method further comprises:
checking an execution result;
and when the verification is determined to be abnormal, alarming and prompting are carried out.
11. A migration apparatus for a rules engine, comprising:
the rule engine dividing module is used for dividing the rule engine according to functions to obtain different types of functional modules;
the relevant parameter extraction module is used for respectively extracting relevant parameters corresponding to the functional modules;
and the migration module is used for migrating the relevant parameters corresponding to the functional module through the matched interface and executing the relevant parameters by adopting a specified language.
12. The apparatus according to claim 11, wherein the rule engine partitioning module is configured to obtain distribution structures of the rule engine and functional attributes of the distribution structures;
and dividing the distribution structure according to the functional attributes to obtain different types of functional modules, wherein the functional modules comprise a flow class module, an execution unit module and a numerical class module.
13. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-10.
14. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1-10.
15. A computer program product, characterized in that it comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1-10.
CN202211176952.XA 2022-09-26 2022-09-26 Rule engine migration method, device, equipment, storage medium and program product Pending CN115495151A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211176952.XA CN115495151A (en) 2022-09-26 2022-09-26 Rule engine migration method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211176952.XA CN115495151A (en) 2022-09-26 2022-09-26 Rule engine migration method, device, equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN115495151A true CN115495151A (en) 2022-12-20

Family

ID=84472676

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211176952.XA Pending CN115495151A (en) 2022-09-26 2022-09-26 Rule engine migration method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN115495151A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116340187A (en) * 2023-05-25 2023-06-27 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium
CN116340187B (en) * 2023-05-25 2023-08-15 建信金融科技有限责任公司 Rule engine migration test method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112434952B (en) Service data rule judging method, device, equipment and storage medium
CN115150471A (en) Data processing method, device, equipment, storage medium and program product
CN113766487A (en) Cloud mobile phone information acquisition method, device, equipment and medium
CN117474091A (en) Knowledge graph construction method, device, equipment and storage medium
CN112905314A (en) Asynchronous processing method and device, electronic equipment, storage medium and road side equipment
CN115495151A (en) Rule engine migration method, device, equipment, storage medium and program product
CN112632251B (en) Reply content generation method, device, equipment and storage medium
CN114185641A (en) Virtual machine cold migration method and device, electronic equipment and storage medium
CN117724980A (en) Method and device for testing software framework performance, electronic equipment and storage medium
CN115687406A (en) Sampling method, device and equipment of call chain data and storage medium
CN113204538A (en) Method, apparatus, device, medium and program product for data migration
CN114816758B (en) Resource allocation method and device
CN116700996B (en) Memory allocation method, device, equipment and medium of neural network
CN117632748A (en) Method and device for determining smoke emission test case, electronic equipment and storage medium
CN115757275A (en) Asset information management method and device, electronic equipment and storage medium
CN114416678A (en) Resource processing method, device, equipment and storage medium
CN116069764A (en) Data verification method, device, electronic equipment and storage medium
CN118861018A (en) Database data correction method and device and electronic equipment
CN116483732A (en) Testing method, device and equipment based on multiple data sources
CN116382852A (en) Micro-service deployment method and device, electronic equipment and medium
CN118916006A (en) Custom service management method, device, equipment and storage medium
CN118520092A (en) Complaint event processing method and device, electronic equipment and storage medium
CN116308713A (en) Multiplexing method and device for business transaction codes, electronic equipment and storage medium
CN115454480A (en) Data updating method, device and system, vehicle and electronic equipment
CN116070601A (en) Data splicing method and device, electronic equipment and storage medium

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