CN111880921A - Job processing method and device based on rule engine and computer equipment - Google Patents

Job processing method and device based on rule engine and computer equipment Download PDF

Info

Publication number
CN111880921A
CN111880921A CN202010762966.4A CN202010762966A CN111880921A CN 111880921 A CN111880921 A CN 111880921A CN 202010762966 A CN202010762966 A CN 202010762966A CN 111880921 A CN111880921 A CN 111880921A
Authority
CN
China
Prior art keywords
job
rule
processed
processing
data
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
CN202010762966.4A
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.)
Ping An International Smart City Technology Co Ltd
Original Assignee
Ping An International Smart City Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An International Smart City Technology Co Ltd filed Critical Ping An International Smart City Technology Co Ltd
Priority to CN202010762966.4A priority Critical patent/CN111880921A/en
Publication of CN111880921A publication Critical patent/CN111880921A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system

Landscapes

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

Abstract

The application relates to the technical field of artificial intelligence, and provides a job processing method, a job processing device, computer equipment and a storage medium based on a rule engine, wherein the method comprises the following steps: acquiring a preset data rule; calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule; performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information; acquiring the service type of each job to be processed; and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types. The method and the device realize automatic generation and separation of the jobs to be processed, and can automatically distribute the jobs to be processed to the corresponding job execution applications for processing according to the service types of the jobs to be processed, thereby effectively improving the arrangement processing efficiency of the jobs. In addition, the application also relates to a block chain technology, and the data rule can be stored in the block chain.

Description

Job processing method and device based on rule engine and computer equipment
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a method and a device for processing jobs based on a rule engine and computer equipment.
Background
The data sharing exchange platform is an information exchange platform which is constructed by integrating a plurality of scattered application information systems and through a computer network, and enables a plurality of application subsystems to transmit and share information/data, so that the utilization rate of information resources is improved, the data sharing exchange platform becomes a basic target for information construction, interconnection and intercommunication among distributed heterogeneous systems are ensured, a central database is established, data extraction, concentration, loading and display are completed, and unified data processing and exchange are constructed.
However, the existing data sharing and exchanging platform has a few disadvantages, and when the current data sharing and exchanging platform arranges the job to be processed, the job arrangement is manually performed on a web interface by a person, so that the manual arrangement mode consumes a lot of manpower and time, and the job arrangement efficiency is low. Or the job arrangement method can be fixed by adopting a hard coding mode, the hard coding mode is easy to generate a large amount of repeated codes, the development cost is higher, the job cannot be distributed according to the requirement, and the flexibility of job arrangement is low.
Disclosure of Invention
The application mainly aims to provide a rule engine-based job processing method, a rule engine-based job processing device, a rule engine-based job processing computer device and a storage medium, and aims to solve the technical problems that when an existing data sharing exchange platform arranges jobs needing to be processed, a large amount of manpower and time are consumed in a manual arrangement mode, the arrangement efficiency of the jobs is low, the development cost of an adopted hard coding mode is high, the jobs cannot be distributed as required, and the flexibility of job arrangement is low.
The application provides a job processing method based on a rule engine, which comprises the following steps:
acquiring a preset data rule;
calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule;
performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information;
acquiring the service type of each job to be processed;
and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
Optionally, after the step of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service type, the method includes:
acquiring the number of first jobs to be processed distributed to a first job execution application, wherein the first job execution application is any one of all the job execution applications;
judging whether the number is more than 2;
if the number is judged to be larger than 2, calling a plurality of pre-created containers with the same number in the first job execution application;
establishing one-to-one mapping relations for the container and the first to-be-processed operation respectively;
and according to the mapping relation, respectively carrying out corresponding processing on the first to-be-processed operation through the container.
Optionally, before the step of obtaining the preset data rule, the method includes:
receiving an input rule statement;
judging whether an execution result corresponding to the rule statement is stored in advance;
if the execution result corresponding to the rule statement is judged not to be prestored, a preset analysis module is called to analyze the rule statement to obtain an analysis result corresponding to the rule statement;
and converting the analysis result into a corresponding data rule.
Optionally, after the step of determining whether the execution result corresponding to the rule statement is stored in advance, the method includes:
if judging that an execution result corresponding to the rule statement is prestored, extracting the execution result;
and determining the execution result as the data rule.
Optionally, before the step of obtaining the preset data rule, the method includes:
displaying a preset number of data rule templates;
acquiring a specified data rule template selected by a user from the data rule templates;
and generating the data rule according to the editing operation of the user on the specified data rule template.
Optionally, after the step of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service type, the method includes:
judging whether an abnormal event occurs in the process of executing a second job to be processed by a second job execution application, wherein the second job execution application is any one of all the job execution applications;
if the second job execution application is judged to have an abnormal event in the process of executing the second job to be processed, acquiring an abnormal type corresponding to the abnormal event;
calling the rule engine to analyze and process the data rule, and extracting exception repair processing information corresponding to the exception event;
and executing the abnormal recovery processing corresponding to the abnormal recovery processing information.
Optionally, before the step of determining whether an exception event occurs in the job execution process of the second job execution application, the method includes:
acquiring a designated job type corresponding to the second job to be processed;
calling the rule engine to analyze the data rule and extracting early warning mode information corresponding to the specified service type;
and monitoring the operation execution condition of the second operation execution application by adopting an early warning mode corresponding to the early warning mode information.
The present application further provides a job processing apparatus based on a rule engine, including:
the first acquisition module is used for acquiring a preset data rule;
the first analysis module is used for calling a rule engine to analyze the data rule and acquiring the operation information corresponding to the data rule;
the splitting module is used for performing job splitting processing according to the job information so as to generate a plurality of jobs to be processed corresponding to the job information;
the second acquisition module is used for acquiring the service type of each job to be processed;
and the distribution module is used for correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
The present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
The method, the device, the computer equipment and the storage medium for processing the job based on the rule engine have the following beneficial effects:
according to the job processing method, the job processing device, the computer equipment and the storage medium based on the rule engine, the rule engine is used for analyzing the pre-created data rules to split and generate the jobs to be processed corresponding to the data rules, and each job to be processed can be flexibly and automatically distributed to the corresponding job execution application to be processed according to the service type of the job to be processed, so that manual operation is not needed to arrange the jobs, and errors possibly caused by manual operation are reduced. And moreover, a fixed hard coding mode is not needed to be adopted for operation arrangement, a large number of repeated codes are avoided, the labor time cost is effectively saved, and the arrangement efficiency and the processing efficiency of the operation to be processed are improved.
Drawings
FIG. 1 is a flow chart illustrating a method for processing a job based on a rules engine according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a rule engine based job processing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
Referring to fig. 1, a job processing method based on a rule engine according to an embodiment of the present application includes:
s1: acquiring a preset data rule;
s2: calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule;
s3: performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information;
s4: acquiring the service type of each job to be processed;
s5: and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
As described in the above steps S1 to S5, the execution subject of the embodiment of the present method is a job processing apparatus based on a rule engine. In practical applications, the job processing apparatus based on the rule engine may be implemented by a virtual apparatus, such as a software code, or may be implemented by an entity apparatus written or integrated with a related execution code, and may perform human-computer interaction with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device, for example, the job processing apparatus based on the rule engine may be a data exchange sharing platform, the automatic analysis platform is specifically designed with a rule engine based on a data sharing exchange service, a service feature library for data sharing exchange is established, and a data rule is edited, defined, and designed through an intuitive user interface, and finally, the data rule is analyzed by an actual programming code to implement a data exchange sharing platform for job splitting and arranging. The job processing apparatus based on the rule engine provided by this embodiment can split and generate the corresponding job to be processed by parsing the data rules through the rule engine, and allocate the job to be processed to the corresponding job execution application for processing according to the service type of the job to be processed, thereby effectively improving the arrangement processing efficiency of the job. Specifically, a preset data rule is first acquired. The generation method of the data rule is not particularly limited. For example, the user may refer to a data rule template provided by the device and customize the data rule as desired through a web page. Or the user can input the relevant rule statement into the device according to the actual business processing requirement, so that the device analyzes the rule statement to generate the data rule. The data rule includes data information on a job to be generated and processed. The data rule is a series of attribute rule sets which can embody the needs of users and are strongly related to the service (data sharing exchange service), and the information of the attribute rule sets can be respectively stored in a service feature library. Through the definition of the series of rule attributes, the rule engine can be used for analyzing the data rule subsequently to acquire information related to business processing, such as operation information, abnormal repair processing information, early warning mode information and the like, and analyzing and creating corresponding operations. After the data rule is obtained, a rule engine is called to analyze the data rule, and job information corresponding to the data rule is obtained. The rule engine is an engine for processing complex events according to a data rule set defined by the data sharing exchange service. And inputting some data rule attributes to obtain a final execution result in a deduction or induction mode. And the rule engine decouples the data service rule and the system code, so that the generation of repeated codes is reduced, the data service rule is updated in real time, and the system flexibility is effectively improved. In addition, after the data rule is analyzed by calling a preset rule engine, the operation information corresponding to the data rule is automatically generated. The job information may include user information, service type information, service processing requirement information, job type/kind information, job content information, job execution information (e.g., job execution manner, job execution period, etc.), and the like. In addition, the job type information is not particularly limited, and for example, the shared switching job may include at least three service types: and acquiring data from a database, acquiring data from a service interface, acquiring a file and the like, wherein a user can flexibly define a new job type. After the job information is obtained, job arrangement processing is carried out according to the job processing information so as to generate a plurality of jobs to be processed corresponding to the job information. The job splitting processing comprises calling a job template corresponding to the service processing requirement information, and modifying the job template according to the logic of the service processing requirement information and the job content information to complete the generation and splitting of each job to be processed. And after the jobs to be processed are generated, acquiring the service type of each job to be processed. Different jobs have different service types, and the service type corresponding to the job to be processed can be obtained from the job information. And finally, according to the service types, correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing. A certain number of job execution applications for executing the jobs are created in advance, and each job execution application is preset with a service type tag, that is, each job execution application is used for executing the job corresponding to the service type tag. The embodiment parses the pre-created data rules by using the rule engine to generate the jobs to be processed corresponding to the data rules, flexibly and automatically allocates each job to be processed to the corresponding job execution application according to the service type of the job to be processed, does not need manual operation to arrange the jobs, and reduces errors possibly caused by manual operation. And moreover, a fixed hard coding mode is not needed to be adopted for operation arrangement, a large number of repeated codes are avoided, the labor time cost is effectively saved, and the arrangement efficiency and the processing efficiency of the operation to be processed are improved. In addition, the user defines the attribute of the job through the data rule, and generates a deep technical language through the conversion of the rule engine to realize the processing of the job, so that the use difficulty of the user for data exchange sharing is effectively reduced, the user does not need to learn the content of how to perform job arrangement and job splitting, and the use experience of the user is improved.
Further, in an embodiment of the present application, after the step S6 of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types, the method includes:
s600: acquiring the number of first jobs to be processed distributed to a first job execution application, wherein the first job execution application is any one of all the job execution applications;
s601: judging whether the number is more than 2;
s602: if the number is judged to be larger than 2, calling a plurality of pre-created containers with the same number in the first job execution application;
s603: establishing one-to-one mapping relations for the container and the first to-be-processed operation respectively;
s604: and according to the mapping relation, respectively carrying out corresponding processing on the first to-be-processed operation through the container.
As described in steps S600 to S604 above, when the number of first tasks to be processed allocated to any one of the job execution applications is multiple, that is, the first job execution application is allocated to a plurality of first tasks to be processed, in order to improve the processing efficiency of each first task to be processed, the first job to be processed may be processed by container processing in the first job execution application. Specifically, after the step of correspondingly allocating the plurality of jobs to be processed to the preset plurality of job execution applications for processing according to the service type, the method includes: first, the number of first jobs to be processed assigned to a first job execution application is acquired, wherein the first job execution application is any one of all the job execution applications. In addition, each job to be processed is assigned to the corresponding job execution application according to the job type. And then judging whether the number is more than 2. If it is judged that the number of first jobs to be processed assigned to the first job execution application is greater than 2, the same number of pre-created containers as the above number are called within the above first job execution application. The containers in the first job execution application are created in advance by using a container technology, and the containers are isolated from each other and do not influence each other. After the successful calling of each container is completed, a one-to-one mapping relation is established between each container and each first task to be processed. The corresponding relations between the containers and the first tasks to be processed can be combined at will, and only the containers and the first tasks to be processed need to be ensured to be in one-to-one corresponding relation. And finally, respectively carrying out corresponding processing on the first tasks to be processed through the containers according to the mapping relation. By distributing each first task to be processed to each corresponding container in the first job execution application for parallel processing, the present embodiment effectively increases the task processing speed, and also effectively avoids the risk caused by the single point failure of the first job execution application.
Further, in an embodiment of the present application, before the step S1 of obtaining the preset data rule, the method includes:
s100: receiving an input rule statement;
s101: judging whether an execution result corresponding to the rule statement is stored in advance;
s102: if the execution result corresponding to the rule statement is judged not to be prestored, a preset analysis module is called to analyze the rule statement to obtain an analysis result corresponding to the rule statement;
s103: and converting the analysis result into a corresponding data rule.
As described in the foregoing steps S100 to S103, the step of obtaining the preset data rule may specifically include: an input rule statement is first received. The rule statement is input into the device by the user according to the actual business processing requirement. The statement type of the rule statement is not particularly limited, and may be, for example, an SQL execution statement. And then judging whether the execution result corresponding to the rule statement is stored in advance. After the device executes the specific rule statement input by the user each time, the device stores the specific execution result obtained after the specific rule statement is executed, for example, the specific execution result can be stored in a pre-created folder or a database. And if the execution result corresponding to the rule statement is not prestored, calling a preset analysis module to analyze the rule statement to obtain a corresponding analysis result. The analysis module is an analysis tool used for analyzing and converting the rule statement input by the user. Since the rule statements input by the user are easily understood and accepted by human beings, but are not suitable for being directly run in the machine. There is a need to translate the rule statements into a language that the machine can recognize. And finally, converting the analysis result into a corresponding data rule, so that a subsequent rule engine can conveniently and quickly analyze the obtained data rule, thereby obtaining the operation information corresponding to the data rule.
Further, in an embodiment of the present application, after the step S101 of determining whether the execution result corresponding to the rule statement is stored in advance, the method includes:
s104: if judging that an execution result corresponding to the rule statement is prestored, extracting the execution result;
s105: and determining the execution result as the data rule.
As described in steps S104 to S105, in the determination of whether or not the execution result corresponding to the regular term is stored in advance, in addition to the determination result in which the execution result corresponding to the regular term is not stored in advance, a determination result in which the execution result corresponding to the regular term is stored in advance may be present. Specifically, the step of determining whether or not the execution result corresponding to the rule sentence is stored in advance includes: and if the execution result corresponding to the rule sentence is judged to be stored in advance, extracting the execution result. And after the execution result is obtained, determining the execution result as the data rule. In this embodiment, when it is determined that the rule statement is executed before and the execution result corresponding to the rule statement is stored, the previously backed-up execution result is directly extracted as the data rule, so that repeated acquisition operations are avoided, and the speed of acquiring the data rule is effectively increased.
Further, in an embodiment of the present application, after the step S103 of converting the analysis result into the corresponding data rule, the method includes:
s106: performing backup processing on the data rule to obtain a backed-up data rule;
s107: and storing the backed-up data rule to a block chain of a block chain system.
As described in steps S106 to S107, after the data rule is obtained, the data rule may be backed up. Specifically, after the step of converting the analysis result into the corresponding data rule, the method may include: performing backup processing on the data rule to obtain a backed-up data rule; and after the backed-up data rule is obtained, storing the backed-up data rule to a block chain of a block chain system. In this embodiment, the block chain is used to store and manage the backed-up data rule, so that the security and the non-tamper property of the backed-up data rule are effectively ensured. In addition, after the data rules after backup are backed up and stored, the process of analyzing and converting the rule statements again is not needed when the same rule statements input by the user are received next time, so that the resources and the running time occupied by obtaining the data rules are effectively saved, and the overall efficiency of obtaining the data rules is effectively improved.
Further, in an embodiment of the present application, before the step S1 of obtaining the preset data rule, the method includes:
s110: displaying a preset number of data rule templates;
s111: acquiring a specified data rule template selected by a user from the data rule templates;
s112: and generating the data rule according to the editing operation of the user on the specified data rule template.
As described in steps S110 to S112, before the step of obtaining the preset data rule, a generation process of generating the data rule may be further included. Specifically, before the step of obtaining the preset data rule, the method includes: firstly, displaying a preset number of data rule templates. And then acquiring the specified data rule template selected by the user from the data rule templates. And finally, generating the data rule according to the editing operation of the user on the specified data rule template. The user establishes data rules as required through the web page, and the system can provide a plurality of sets of default data rule templates for reference. The user can customize the required data rule on the basis, and also can copy some existing data rule templates recommended by the system in a one-key mode through the cloning function. In addition, the data rule generated after the user edits the specified data rule template is a series of attribute rule sets which can reflect the needs of the user and are strongly related to the data sharing exchange service.
In an embodiment of the application, after the step S6 of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types includes:
s610: judging whether an abnormal event occurs in the process of executing a second job to be processed by a second job execution application, wherein the second job execution application is any one of all the job execution applications;
s611: if the second job execution application is judged to have an abnormal event in the process of executing the second job to be processed, acquiring an abnormal type corresponding to the abnormal event;
s612: calling the rule engine to analyze and process the data rule, and extracting exception repair processing information corresponding to the exception event;
s613: and executing the abnormal recovery processing corresponding to the abnormal recovery processing information.
As described in steps S610 to S613, if an abnormal event occurs during the process of executing the job to be processed by the job execution application, the apparatus may further extract the abnormal repair processing information corresponding to the abnormal event according to the data rule, and further implement the automatic repair processing corresponding to the abnormal event according to the abnormal repair processing information. Specifically, after the step of correspondingly allocating the plurality of jobs to be processed to the preset plurality of job execution applications for processing according to the service type, the method may further include: firstly, whether an abnormal event occurs in the process of executing a second job to be processed by a second job execution application is judged, wherein the second job execution application is any one job execution application in all the job execution applications. And if the second job execution application is judged to have an abnormal event in the process of executing the second job to be processed, acquiring an abnormal type corresponding to the abnormal event, and acquiring the abnormal type corresponding to the abnormal event. And then calling the rule engine to analyze the data rule and extract the abnormal repairing processing information corresponding to the abnormal event. And finally, when the abnormal repairing processing information is obtained, executing the abnormal repairing processing corresponding to the abnormal repairing processing information. After the job execution application generates an exception in the job execution process, the rule engine can perform self-detection and repair based on the exception type defined by the data rule and a corresponding exception handling mode, so that the effect of exception self-healing is realized. For example, if the API interface performs data acquisition and network abnormal interruption occurs, the data rule may analyze the abnormal repair information corresponding to the network interruption abnormal type as breakpoint continuous transmission according to the network interruption abnormal type defined by the data rule, and then automatically perform breakpoint continuous transmission processing according to the abnormal repair information. In the embodiment, when an abnormal event occurs in the process of executing the to-be-processed operation by the operation execution application, the rule engine intelligently and quickly performs self-detection and repair based on the abnormal type defined by the data rule and the corresponding abnormal processing mode, so that the safety and the stability of the execution process of the to-be-processed operation are effectively ensured.
Further, in an embodiment of the present application, before the step S610 of determining whether the second job execution application has an abnormal event in the process of executing the second job to be processed, the method includes:
s6100: acquiring a designated job type corresponding to the second job to be processed;
s6101: calling the rule engine to analyze the data rule and extracting early warning mode information corresponding to the specified service type;
s6102: and monitoring the operation execution condition of the second operation execution application by adopting an early warning mode corresponding to the early warning mode information.
As described in the above steps S6100 to S6102, before the process of determining whether the second job execution application has an abnormal event in the process of executing the second job to be processed, the method further includes a process of monitoring and warning the job execution process of the second job execution application by using a warning manner of the designated job type corresponding to the second job to be processed. Specifically, before the step of determining whether an abnormal event occurs in the process of executing the second job to be processed by the second job execution application, the method includes: first, a designated job type corresponding to the second job to be processed is acquired. And then calling the rule engine to analyze the data rule and extract the early warning mode information corresponding to the specified service type. And finally, monitoring the operation execution condition of the second operation execution application by adopting an early warning mode corresponding to the early warning mode information. In the early warning method based on different operation types defined by the data rule, the early warning modes corresponding to the different operation types can be analyzed according to the rule engine, the execution conditions of each different type of operation can be monitored for a long time by adopting the corresponding early warning modes, and judgment and early warning can be performed for the operation which is possibly abnormal, so that the purpose of preventing the operation from happening in the bud can be achieved.
Referring to fig. 2, an embodiment of the present application further provides a job processing apparatus based on a rule engine, including:
the first acquisition module 1 is used for acquiring a preset data rule;
the first analysis module 2 is used for calling a rule engine to analyze the data rule and acquiring the operation information corresponding to the data rule;
the disassembling module 3 is used for performing job disassembling processing according to the job information so as to generate a plurality of jobs to be processed corresponding to the job information;
the second obtaining module 4 is configured to obtain a service type of each job to be processed;
and the distribution module 5 is configured to correspondingly distribute the multiple jobs to be processed to multiple preset job execution applications for processing according to the service type.
In this embodiment, the implementation process of the functions and actions of the first obtaining module, the first parsing module, the splitting module, the second obtaining module and the allocating module in the job processing apparatus based on the rule engine is specifically described in the implementation processes corresponding to steps S1 to S5 in the vulnerability processing method, and is not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
a third obtaining module, configured to obtain a number of first jobs to be processed that are allocated to a first job execution application, where the first job execution application is any one of all the job execution applications;
the first judging module is used for judging whether the number is more than 2;
a calling module, configured to call, if it is determined that the number is greater than 2, a plurality of pre-created containers that are the same as the number in the first job execution application;
the mapping module is used for establishing one-to-one mapping relation between the container and the first to-be-processed operation respectively;
and the processing module is used for respectively carrying out corresponding processing on the first to-be-processed operation through the container according to the mapping relation.
In this embodiment, the implementation process of the functions and actions of the third obtaining module, the first determining module, the calling module, the mapping module and the processing module in the job processing apparatus based on the rule engine is specifically described in the implementation process corresponding to steps S600 to S604 in the vulnerability processing method, and is not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
the receiving module is used for receiving the input rule statement;
the second judgment module is used for judging whether an execution result corresponding to the rule statement is stored in advance;
the second analysis module is used for calling a preset analysis module to analyze the rule statement to obtain an analysis result corresponding to the rule statement if the execution result corresponding to the rule statement is not prestored;
and the conversion module is used for converting the analysis result into a corresponding data rule.
In this embodiment, the implementation processes of the functions and functions of the receiving module, the second determining module, the second parsing module, and the converting module in the job processing apparatus based on the rule engine are specifically described in the implementation processes corresponding to steps S100 to S103 in the vulnerability processing method, and are not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
the first extraction module is used for extracting the execution result if the execution result corresponding to the rule statement is pre-stored;
a determining module, configured to determine the execution result as the data rule.
In this embodiment, the implementation processes of the functions and actions of the first extraction module and the determination module in the job processing apparatus based on the rule engine are specifically described in the implementation processes corresponding to steps S104 to S105 in the vulnerability processing method, and are not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
the backup module is used for carrying out backup processing on the data rule to obtain a backed-up data rule;
and the storage module is used for storing the backed-up data rule to a block chain of a block chain system.
In this embodiment, the implementation process of the functions and actions of the backup module and the storage module in the job processing apparatus based on the rule engine is specifically described in the implementation process corresponding to steps S106 to S107 in the vulnerability processing method, and is not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
the display module is used for displaying a preset number of data rule templates;
the fourth acquisition module is used for acquiring a specified data rule template selected by a user from the data rule templates;
and the generating module is used for generating the data rule according to the editing operation of the user on the specified data rule template.
In this embodiment, the implementation processes of the functions and functions of the display module, the fourth obtaining module, and the generating module in the job processing apparatus based on the rule engine are specifically described in the implementation processes corresponding to steps S110 to S112 in the vulnerability processing method, and are not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
the third judging module is used for judging whether an abnormal event occurs in the process of executing a second job to be processed by a second job execution application, wherein the second job execution application is any one job execution application in all the job execution applications;
the fifth obtaining module is used for obtaining an abnormal type corresponding to an abnormal event if the second job execution application is judged to have the abnormal event in the process of executing the second job to be processed;
the second extraction module is used for calling the rule engine to analyze and process the data rule and extracting the abnormal repairing and processing information corresponding to the abnormal event;
and the execution module is used for executing the exception recovery processing corresponding to the exception recovery processing information.
In this embodiment, the implementation processes of the functions and actions of the third determining module, the fifth obtaining module, the second extracting module and the executing module in the job processing apparatus based on the rule engine are specifically described in the implementation processes corresponding to steps S610 to S613 in the vulnerability processing method, and are not described herein again.
Further, in an embodiment of the present application, the job processing apparatus based on a rule engine includes:
a sixth obtaining module, configured to obtain a specified job type corresponding to the second job to be processed;
the third extraction module is used for calling the rule engine to analyze and process the data rule and extracting the early warning mode information corresponding to the specified service type;
and the monitoring module is used for monitoring the operation execution condition of the second operation execution application by adopting an early warning mode corresponding to the early warning mode information.
In this embodiment, the implementation processes of the functions and functions of the sixth obtaining module, the third extracting module and the monitoring module in the job processing apparatus based on the rule engine are specifically described in the implementation processes corresponding to steps S610 to S613 in the vulnerability processing method, and are not described herein again.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is designed to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data such as data rules, job information and service types. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of rule engine based job processing.
The processor executes the job processing method based on the rule engine, and comprises the following steps:
acquiring a preset data rule;
calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule;
performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information;
acquiring the service type of each job to be processed;
and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
Those skilled in the art will appreciate that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the apparatus and the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for processing a job based on a rule engine is implemented, specifically:
to sum up, the method, the apparatus, the computer device and the storage medium for processing a job based on a rule engine provided in the embodiment of the present application obtain a preset data rule; calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule; performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information; acquiring the service type of each job to be processed; and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types. According to the method and the device, the pre-created data rules are analyzed by using the rule engine, the to-be-processed jobs corresponding to the data rules are generated in a splitting mode, each to-be-processed job can be flexibly and automatically distributed to the corresponding job execution application to be processed according to the service type of the to-be-processed job, manual operation is not needed to arrange the jobs, and errors possibly caused by manual operation are reduced. And moreover, a fixed hard coding mode is not needed to be adopted for operation arrangement, a large number of repeated codes are avoided, the labor time cost is effectively saved, and the arrangement efficiency and the processing efficiency of the operation to be processed are improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Further, the computer usable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the blockchain node, and the like.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A job processing method based on a rule engine is characterized by comprising the following steps:
acquiring a preset data rule;
calling a rule engine to analyze the data rule and acquiring operation information corresponding to the data rule;
performing job splitting processing according to the job information to generate a plurality of jobs to be processed corresponding to the job information;
acquiring the service type of each job to be processed;
and correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
2. The rule engine-based job processing method according to claim 1, wherein after the step of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service type, the method comprises:
acquiring the number of first jobs to be processed distributed to a first job execution application, wherein the first job execution application is any one of all the job execution applications;
judging whether the number is more than 2;
if the number is judged to be larger than 2, calling a plurality of pre-created containers with the same number in the first job execution application;
establishing one-to-one mapping relations for the container and the first to-be-processed operation respectively;
and according to the mapping relation, respectively carrying out corresponding processing on the first to-be-processed operation through the container.
3. The rule engine-based job processing method according to claim 1, wherein the step of obtaining the preset data rule is preceded by:
receiving an input rule statement;
judging whether an execution result corresponding to the rule statement is stored in advance;
if the execution result corresponding to the rule statement is judged not to be prestored, a preset analysis module is called to analyze the rule statement to obtain an analysis result corresponding to the rule statement;
and converting the analysis result into a corresponding data rule.
4. The method according to claim 3, wherein the step of determining whether or not an execution result corresponding to the rule statement is stored in advance comprises:
if judging that an execution result corresponding to the rule statement is prestored, extracting the execution result;
and determining the execution result as the data rule.
5. The rule engine-based job processing method according to claim 1, wherein the step of obtaining the preset data rule is preceded by:
displaying a preset number of data rule templates;
acquiring a specified data rule template selected by a user from the data rule templates;
and generating the data rule according to the editing operation of the user on the specified data rule template.
6. The rule engine-based job processing method according to claim 1, wherein after the step of correspondingly allocating the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service type, the method comprises:
judging whether an abnormal event occurs in the process of executing a second job to be processed by a second job execution application, wherein the second job execution application is any one of all the job execution applications;
if the second job execution application is judged to have an abnormal event in the process of executing the second job to be processed, acquiring an abnormal type corresponding to the abnormal event;
calling the rule engine to analyze and process the data rule, and extracting exception repair processing information corresponding to the exception event;
and executing the abnormal recovery processing corresponding to the abnormal recovery processing information.
7. The rules engine-based job processing method according to claim 6, wherein the step of determining whether an exception event occurs during the execution of the job by the second job execution application is preceded by:
acquiring a designated job type corresponding to the second job to be processed;
calling the rule engine to analyze the data rule and extracting early warning mode information corresponding to the specified service type;
and monitoring the operation execution condition of the second operation execution application by adopting an early warning mode corresponding to the early warning mode information.
8. A rules engine based job processing apparatus comprising:
the first acquisition module is used for acquiring a preset data rule;
the first analysis module is used for calling a rule engine to analyze the data rule and acquiring the operation information corresponding to the data rule;
the splitting module is used for performing job splitting processing according to the job information so as to generate a plurality of jobs to be processed corresponding to the job information;
the second acquisition module is used for acquiring the service type of each job to be processed;
and the distribution module is used for correspondingly distributing the plurality of jobs to be processed to a plurality of preset job execution applications for processing according to the service types.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202010762966.4A 2020-07-31 2020-07-31 Job processing method and device based on rule engine and computer equipment Pending CN111880921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010762966.4A CN111880921A (en) 2020-07-31 2020-07-31 Job processing method and device based on rule engine and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010762966.4A CN111880921A (en) 2020-07-31 2020-07-31 Job processing method and device based on rule engine and computer equipment

Publications (1)

Publication Number Publication Date
CN111880921A true CN111880921A (en) 2020-11-03

Family

ID=73204383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010762966.4A Pending CN111880921A (en) 2020-07-31 2020-07-31 Job processing method and device based on rule engine and computer equipment

Country Status (1)

Country Link
CN (1) CN111880921A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580980A (en) * 2020-12-18 2021-03-30 中国人寿保险股份有限公司 Service processing method and device and electronic equipment
CN112764828A (en) * 2021-01-06 2021-05-07 重庆百瓶科技有限公司 Business logic management method and device, computer equipment and medium
CN113760198A (en) * 2021-11-04 2021-12-07 浙江华云信息科技有限公司 Fusion processing method and device suitable for middle stage rule engine and storage medium
WO2022142016A1 (en) * 2020-12-30 2022-07-07 平安科技(深圳)有限公司 Rule engine-based parameter conversion method and apparatus, and device and medium
CN112580980B (en) * 2020-12-18 2024-05-31 中国人寿保险股份有限公司 Service processing method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150142878A1 (en) * 2013-11-17 2015-05-21 Nimbix, Inc. Dynamic creation and execution of containerized applications in cloud computing
CN105205121A (en) * 2015-09-11 2015-12-30 浪潮集团有限公司 Processing data monitoring method
CN107153679A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 A kind of extraction statistical method and system for semi-structured big data
CN109408205A (en) * 2017-08-16 2019-03-01 北京京东尚科信息技术有限公司 Method for scheduling task and device based on hadoop cluster
CN109766184A (en) * 2018-12-28 2019-05-17 北京金山云网络技术有限公司 Distributed task scheduling processing method, device, server and system
CN109784646A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Method for allocating tasks, device, storage medium and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150142878A1 (en) * 2013-11-17 2015-05-21 Nimbix, Inc. Dynamic creation and execution of containerized applications in cloud computing
CN105205121A (en) * 2015-09-11 2015-12-30 浪潮集团有限公司 Processing data monitoring method
CN107153679A (en) * 2017-04-18 2017-09-12 北京思特奇信息技术股份有限公司 A kind of extraction statistical method and system for semi-structured big data
CN109408205A (en) * 2017-08-16 2019-03-01 北京京东尚科信息技术有限公司 Method for scheduling task and device based on hadoop cluster
CN109784646A (en) * 2018-12-14 2019-05-21 深圳壹账通智能科技有限公司 Method for allocating tasks, device, storage medium and server
CN109766184A (en) * 2018-12-28 2019-05-17 北京金山云网络技术有限公司 Distributed task scheduling processing method, device, server and system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112580980A (en) * 2020-12-18 2021-03-30 中国人寿保险股份有限公司 Service processing method and device and electronic equipment
CN112580980B (en) * 2020-12-18 2024-05-31 中国人寿保险股份有限公司 Service processing method and device and electronic equipment
WO2022142016A1 (en) * 2020-12-30 2022-07-07 平安科技(深圳)有限公司 Rule engine-based parameter conversion method and apparatus, and device and medium
CN112764828A (en) * 2021-01-06 2021-05-07 重庆百瓶科技有限公司 Business logic management method and device, computer equipment and medium
CN112764828B (en) * 2021-01-06 2023-05-16 重庆百瓶科技有限公司 Business logic management method and device, computer equipment and medium
CN113760198A (en) * 2021-11-04 2021-12-07 浙江华云信息科技有限公司 Fusion processing method and device suitable for middle stage rule engine and storage medium

Similar Documents

Publication Publication Date Title
CN111880921A (en) Job processing method and device based on rule engine and computer equipment
CN112632575A (en) Authority management method and device of business system, computer equipment and storage medium
CN111737963B (en) Configuration file based form filling method and device and computer equipment
CN112668041A (en) Document file generation method and device, computer equipment and storage medium
CN113642039B (en) Configuration method and device of document template, computer equipment and storage medium
CN113159737B (en) RPA service processing method, RPA management platform, device and medium
CN113326081A (en) Static resource processing method and device, computer equipment and storage medium
CN112637282B (en) Information pushing method and device, computer equipment and storage medium
CN112597158A (en) Data matching method and device, computer equipment and storage medium
CN114218097A (en) Test case generation method and device, computer equipment and storage medium
CN112650659B (en) Buried point setting method and device, computer equipment and storage medium
CN112434335A (en) Business problem processing method and device, computer equipment and storage medium
CN114237886A (en) Task processing method and device, computer equipment and storage medium
CN111130991A (en) Instant messaging information processing method and device, computer equipment and storage medium
CN112686580B (en) Workflow definition method and system capable of customizing flow
CN112965981B (en) Data checking method, device, computer equipment and storage medium
CN113051181A (en) Method, device, equipment and storage medium for determining incremental test coverage information
CN112199441A (en) Data synchronization processing method, device, equipment and medium based on big data platform
CN113191146B (en) Appeal data distribution method and device, computer equipment and storage medium
CN111865927A (en) Vulnerability processing method and device based on system, computer equipment and storage medium
CN113535260B (en) Simulator-based data processing method, device, equipment and storage medium
CN102591779A (en) Establishing method for workflow-based universal software testing process model
CN113177396B (en) Report generation method and device, computer equipment and storage medium
CN114238273A (en) Database management method, device, equipment and storage medium
CN114398441A (en) Data export method, data export device, computer 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