CN117032668A - Processing method, device, system and platform of visual rule engine - Google Patents

Processing method, device, system and platform of visual rule engine Download PDF

Info

Publication number
CN117032668A
CN117032668A CN202310996098.XA CN202310996098A CN117032668A CN 117032668 A CN117032668 A CN 117032668A CN 202310996098 A CN202310996098 A CN 202310996098A CN 117032668 A CN117032668 A CN 117032668A
Authority
CN
China
Prior art keywords
file
operator
rule engine
elements
operated
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
CN202310996098.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 United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
China Unicom Internet of Things Corp Ltd
Original Assignee
China United Network Communications Group Co Ltd
Unicom Digital Technology Co Ltd
China Unicom Internet of Things Corp 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 United Network Communications Group Co Ltd, Unicom Digital Technology Co Ltd, China Unicom Internet of Things Corp Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310996098.XA priority Critical patent/CN117032668A/en
Publication of CN117032668A publication Critical patent/CN117032668A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The application provides a processing method, a processing device, a processing system and a processing platform of a visual rule engine. The method comprises the following steps: generating an empty rule engine file in response to a new operation of a user; responding to the visual arrangement operation of a user on a plurality of operator elements and a plurality of relation elements, and generating a flow chart, wherein the operator elements and the relation elements are selected by the user according to business logic; converting the flow chart into data in a preset format, and checking the data in the preset format; if the verification is successful, generating a file to be compiled according to the flow chart; and compiling the file to be compiled to obtain a final rule engine file. The flow chart is generated and a series of analysis is carried out by responding to the visual arrangement operation of a user on a plurality of operator elements and relation elements according to the business logic, so that a final rule engine file is obtained, the visual arrangement of the business logic of the code layer is realized, and the efficiency of processing the rule engine is improved.

Description

Processing method, device, system and platform of visual rule engine
Technical Field
The present application relates to the field of rule engines, and in particular, to a method, an apparatus, a system, and a platform for processing a visual rule engine.
Background
With the advent of the industrial internet age, the internet of things technology has been widely popularized and applied. In the environment of the Internet of things, business logic and rules are frequently adjusted and updated, and the business logic and bottom data logic can be decoupled through a rule engine, so that business personnel can flexibly configure and adjust the behavior of the system of the Internet of things.
In the prior art, the rule conditions are mainly analyzed, and corresponding function functions are called according to the rule conditions to trigger execution rules and processing operations.
However, the prior art rule engine processing methods still reduce efficiency.
Disclosure of Invention
The application provides a processing method, a processing device, a processing system and a processing platform of a visual rule engine, which are used for solving the technical problem of low efficiency of processing the rule engine.
In a first aspect, the present application provides a method for processing a visualization rule engine, applied to a computer system, including:
in response to a new operation by a user, an empty rule engine file is generated.
And responding to the triggering operation of the user on the empty rule engine file, displaying editable job details, wherein the editable job details comprise visual arrangement operation functions provided for operator elements of all types and relation elements of all types.
Based on the editable job details, generating a flow chart in response to a visual arrangement operation of a user on a plurality of operator elements and a plurality of relation elements, wherein the operator elements and the relation elements are selected by the user according to business logic.
Converting the flow chart into data in a preset format, and checking the data in the preset format.
And if the verification is successful, generating a file to be compiled according to the flow chart.
And compiling the file to be compiled to obtain a final rule engine file.
Optionally, the method as described above, wherein the generating, based on the editable job details, in response to a user's visual arrangement operation for a plurality of operator elements and a plurality of relationship elements, includes: determining nodes and relation edges according to each operator element and each relation element, and generating an original flow chart; and updating the original flow chart according to the visualized arranging operation of the user on a plurality of operator elements and a plurality of relation elements to generate the flow chart.
Optionally, in the method as described above, after performing compiling processing on the file to be compiled to obtain a final rule engine file, the method further includes: uploading the final rule engine file to a file system; downloading the final rule engine file in the file system to a catalog to be operated, and determining the final rule engine file as the rule engine file to be operated; and sending the rule engine file to be operated to an open source streaming processing framework platform so that the open source streaming processing framework platform calls an enabling interface, and operating the rule engine file to be operated according to the operator elements of each type.
Optionally, the method as described above, wherein the operator elements of each type include an input operator, a filter operator, an aggregation operator, and an output operator; correspondingly, the rule engine file to be operated is sent to an open source stream processing framework platform, so that the open source stream processing framework platform calls an enabling interface, and the rule engine file to be operated is operated according to the operator elements of each type, and the method comprises the following steps: sending the rule engine file to be operated to the open source streaming processing framework platform so that the open source streaming processing framework platform calls an enabling interface, and executing the following steps on the operator elements of each type to operate the rule engine file to be operated: acquiring a designated data source according to the input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
Optionally, the method as described above, wherein generating the file to be compiled according to the flow chart includes: and generating a corresponding code file according to the flow chart, and determining the code file as the file to be compiled.
In a second aspect, the present application provides a processing method of a visualization rule engine, applied to a open-source type processing framework platform, including:
And receiving the rule engine file to be operated, which is sent by the computer system, wherein the rule engine file to be operated is obtained by uploading the final rule engine file to the file system by the computer system and downloading the final rule engine file in the file system to a catalog to be operated.
And calling an enabling interface, and running the rule engine file to be run according to the operator elements of each type.
Optionally, the method as described above, wherein the operator elements of each type include an input operator, a filter operator, an aggregation operator, and an output operator; correspondingly, the calling and enabling interface operates the rule engine file to be operated according to the operator elements of each type, and the method comprises the following steps: acquiring a designated data source according to the input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
In a third aspect, a processing device of a visualization rules engine, applied to a computer system, includes:
and the first response module is used for responding to the new operation of the user and generating an empty rule engine file.
And the second response module is used for responding to the triggering operation of the user on the empty rule engine file and displaying editable job details, wherein the editable job details comprise visual arrangement operation functions provided for operator elements of all types and relation elements of all types.
The first generation module is used for generating a flow chart according to the editable job details and in response to the visual arrangement operation of a user on a plurality of operator elements and a plurality of relation elements, wherein the operator elements and the relation elements are selected by the user according to business logic.
And the verification module is used for converting the flow chart into data in a preset format and verifying the data in the preset format.
And the second generation module is used for generating a file to be compiled according to the flow chart if the verification is successful.
And the compiling module is used for compiling the file to be compiled to obtain a final rule engine file.
In a fourth aspect, a processing apparatus of a visualization rules engine is applied to a open-flow type processing framework platform, and includes:
the receiving module is used for receiving the rule engine file to be operated, which is sent by the computer system, wherein the rule engine file to be operated is obtained by uploading the final rule engine file to the file system by the computer system and downloading the final rule engine file in the file system to a catalog to be operated.
And the operation module is used for calling an enabling interface and operating the rule engine file to be operated according to the operator elements of each type.
In a fifth aspect, the present application provides a computer system comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored in the memory, causing the at least one processor to perform the processing method of the visualization rules engine as described above in the first aspect and the various possible designs of the first aspect.
In a sixth aspect, the present application provides an open source streaming framework platform, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the processing method of the visualization rules engine as described above in the second aspect and the various possible designs of the second aspect.
In a seventh aspect, the present application provides a computer storage medium, where computer executable instructions are stored, when executed by a processor, to implement the processing method of the visualization rule engine according to the first aspect and the various possible designs of the first aspect.
In an eighth aspect, the present application provides a computer storage medium, where computer executable instructions are stored, when executed by a processor, to implement the processing method of the visualization rule engine according to the second aspect and the various possible designs of the second aspect.
According to the processing method, the processing device, the processing system and the processing platform of the visual rule engine, provided by the application, the flow chart is generated and a series of analysis is carried out by responding to the visual arrangement operation of a user on a plurality of operator elements and relation elements according to the business logic, so that a final rule engine file is obtained, and the visual arrangement of the business logic of a code layer is realized; and uploading the final rule engine file to a file system, downloading the final rule engine file from the file system to a directory to be operated, and sending the rule engine file to be operated to an open source streaming frame platform. Under the scene of multiple micro services, the rule engine files to be operated in the operation environment are ensured, so that the latest compiled rule engine files are used as the enabling interfaces for each call, frequent updating of the compiled rule engine files is avoided, and the efficiency of processing the rule engine files is improved.
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 an application scenario schematic diagram of a processing method of a visualization rule engine according to an embodiment of the present application;
FIG. 2 is a flow chart of a processing method of a visualization rule engine according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a processing method of a visualization rule engine according to another embodiment of the present application;
FIG. 4 is a schematic diagram of a processing device of a visualization rules engine according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a processing device of a visualization rules engine according to another embodiment of the present application;
FIG. 6 is a schematic diagram of a hardware architecture of a computer system according to an embodiment of the present application;
fig. 7 is a schematic hardware architecture of an open flow processing framework platform according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of the above drawings and will be described in more detail below. The drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but rather to illustrate the inventive concepts to those skilled in the art by reference to the specific embodiments.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
With the advent of the industrial internet age, the internet of things technology has been widely popularized and applied. In the environment of the Internet of things, business logic and rules are frequently adjusted and updated, and the business logic and bottom data logic can be decoupled through a rule engine, so that business personnel can flexibly configure and adjust the behavior of the system of the Internet of things. In the prior art, the rule condition is mainly analyzed, the corresponding function is called according to the rule condition to trigger the execution rule and the processing operation, and whether the corresponding business logic is realized or not can be determined according to the execution operation and the result after the processing operation, so that the efficiency is reduced.
In order to solve the above problems, the embodiments of the present application provide the following technical ideas: considering that whether the corresponding business logic is realized or not can be determined according to the result after the execution operation and the processing operation, the user-defined rule and configuration operation is thought, the flow chart is generated by responding to the new operation, the visual arrangement operation and the triggering operation of the user, and the executable rule engine file is obtained through a series of analysis, so that the visual arrangement of the code layer business logic is realized, and the efficiency is improved.
The application provides a processing method of a visual rule engine, which aims to solve the technical problems in the prior art.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a schematic view of a processing method of a visualization rule engine according to an embodiment of the present application. As shown in fig. 1, the system provided in this embodiment includes: computer system 10, file system 20, and open source streaming framework platform 30.
Wherein the computer system 10 comprises: a receiving means 101, a processor 102 and an output means 103.
It will be appreciated that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the method of identifying an article. In other possible embodiments of the present application, the architecture may include more or less components than those illustrated, or some components may be combined, some components may be split, or different component arrangements may be specifically determined according to the actual application scenario, and the present application is not limited herein. The components shown in fig. 1 may be implemented in hardware, software, or a combination of software and hardware.
In a specific implementation process, the receiving device 101 may be an input/output interface or a communication interface, so as to obtain a new operation, a visual arranging operation and a triggering operation of a user.
The processor 102 may process the user's new operations, visualization orchestration operations, and triggering operations to determine the final rule engine file.
The display means 103 may be used for displaying the final rule engine file.
The display device can also be a touch display screen, and is used for receiving a new operation, a visual arranging operation and a triggering operation of a user while displaying the content so as to realize interaction with the user.
It should be understood that the above-described processor may be implemented by a processor that reads instructions in a memory and executes the instructions, or may be implemented by a chip circuit.
In addition, the network architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and as a person of ordinary skill in the art can know, with evolution of the network architecture and occurrence of a new service scenario, the technical solution provided by the embodiments of the present application is also applicable to similar technical problems.
Wherein the file system 20 is configured to receive a final rule engine file uploaded by the computer system.
The open source stream processing framework platform 30 is configured to receive a rule engine file to be executed sent by the computer system, where the rule engine file to be executed is obtained by downloading, by the computer system, a final rule engine file in the file system to a directory to be executed.
Example 1
Fig. 2 is a schematic flow chart of a processing method of a visualization rule engine according to an embodiment of the present application, where the execution subject of the embodiment may be the computer system 10 in the embodiment shown in fig. 1, and the embodiment is not limited herein. As shown in fig. 2, the method includes:
s201: in response to a new operation by a user, an empty rule engine file is generated.
The rule engine file comprises user-defined rules and configuration operations for describing and managing the behaviors and rules of the rule engine so as to make decisions and operate at the time of operation.
Specifically, after receiving the new operation of the user, the receiving device responds to the new operation of the user to generate an empty rule engine file.
Specifically, the naming, description, modification, deletion and other processes of the empty rule engine file can also be performed in response to the naming, description, modification, deletion and other operations of the empty rule engine file by the user.
S202: and responding to the triggering operation of the empty rule engine file by the user, displaying editable job details, wherein the editable job details comprise visual arrangement operation functions provided for operator elements of each type and relation elements of each type.
Wherein, each type of operator element comprises an input operator, a filtering operator, an aggregation operator and an output operator. The parameters of the input operator include a product key and a device key for message filtering of the data source. The parameters of the filter operator include operators, filters, attribute fields, filter value types, and filter values. The parameters of the aggregation operator comprise a time window, a sliding window step length and grouping; wherein the grouping is of an array type, and the single grouping object comprises a name, an attribute field, an output name, an output field and a grouping type; wherein the packet types include various aggregation methods. Parameters of the output operator comprise database names, data table names and data tables; wherein the data table is an array type and a single data table object includes a name, an attribute field, an output name, an output field, and an attribute data type.
Each type of operator element has an attribute for uniquely identifying code, node type nodeType and other corresponding node types; each relation element comprises a predodecode of a start operator element and a postNodeCode of an end operator element, and the connection relation of the start operator element and the end operator element is represented; the initiator element has no predodecode or the predodecode has a value of 0.
Each type of operator element provides a scalable type, and the node type nodeType includes a prefix and a suffix. The prefix is an operator parent type, illustratively, the prefix "INPUT" represents an INPUT parent operator, the prefix "OUTPUT" represents an OUTPUT parent operator, the prefix "FILTER" represents a FILTER parent operator and the prefix "AGG" represents an aggregate parent operator; the suffix is a four-digit number, ranging from 0001-9999, identifying the child operator type.
The operator elements of each type also comprise name prompt information, an input domain, an output domain and parameter sets belonging to different node types. Wherein the input field is used to identify attributes for which filtering of the input is required; the output field is used to identify the specific attribute name that is output to.
Illustratively, "INPUT-0001" may represent that the INPUT source is a kafka message queue and "INPUT-0002" may represent that the INPUT source is a pulsar message queue.
Wherein, each type of relation element is the connection relation between each type of operator element; the triggering operation is an operation that a user clicks on an empty rule engine file.
S203: based on the editable job details, a flow graph is generated in response to a user's visual orchestration operation for a plurality of operator elements and a plurality of relationship elements, wherein the plurality of operator elements and the plurality of relationship elements are user-selected according to business logic.
Wherein the flow chart is a tool for graphically representing an algorithm, a flow or a system, and different symbols and arrows are used for representing different steps, decisions and flow control, so that the relation and flow between various parts in the program or the flow can be clearly shown.
Specifically, step S203 includes S2031 to S2032:
s2031: and determining nodes and relation edges according to each operator element and each relation element, and generating an original flow chart.
Specifically, each node in the flow graph is determined according to the identification of each operator element, the relation edge between each node in the flow graph is determined according to the connection relation between each operator element, and the original flow graph is determined according to each node and the relation edge between each node.
S2032: and updating the original flow chart according to the visualized arranging operation of the user on the operator elements and the relation elements to generate the flow chart.
Specifically, according to the dragging, pulling and dragging of each operator element and each relation element by a user, each operator element with position change in an original flow chart and each node and each relation edge corresponding to each relation element are identified; and updating the original flow chart according to the position change parameters of each node and each relation edge to generate the flow chart.
S204: converting the flow chart into data in a preset format, and checking the data in the preset format.
Optionally, the data in the preset format is data in JSON format.
Specifically, the org.json library is used for processing, a JSONONBject is created to represent the whole graph information, and the JSONOArray is used for respectively storing the information of each node and the information of each relation edge. Traversing the flow graph, extracting the attribute of each node and the attribute of each relation edge, and adding the extracted information into the created JSONOBject to realize the conversion of the flow graph into JSON format data.
Specifically, a JSON library in a programming language is used for analyzing JSON format data, a graph data structure is constructed according to the analyzed data, a traversing algorithm is used for checking whether a loop exists, and a complete legal flow graph is a directed acyclic graph and accords with all constraints of directed acyclic; alternatively, the graph data structure may be an adjacency table or an adjacency matrix; the traversal algorithm may be a depth-first search algorithm or a breadth-first search algorithm.
Specifically, if the verification fails, the user is required to edit the empty rule engine file, and the flow chart is generated and converted into the data in the JSON format in response to a series of operations of the user on the operator elements and the relation elements again until the verification is successful.
S205: and if the verification is successful, generating a file to be compiled according to the flow chart.
Specifically, if the verification is successful, the rule engine file information edited by the user operation is stored in a database. Defining a data structure for representing each node and each relation edge in the flow chart, analyzing the flow chart, constructing a set of each node and a set of each relation edge, generating a code file by using a template engine, and taking the code file as a file to be compiled.
S206: and compiling the file to be compiled to obtain a final rule engine file.
Wherein the compilation process is to convert the file to be compiled into machine code or bytecode that can be executed on the target platform so that the platform can understand and execute the code.
Specifically, a compiler is used for compiling a file to be compiled to obtain a class file, and the class file is packaged to obtain a rule engine jar file.
From the description of the embodiment, the flow chart is generated and a series of analysis is performed by responding to the visual arrangement operation of the user on the operator elements and the relation elements according to the business logic, so that the final rule engine file is obtained, the visual arrangement of the business logic of the code layer is realized, and the efficiency of processing the rule engine is improved.
In one embodiment of the present application, following step S206, the processing procedure for the final rule engine is further included on the basis of the embodiment of fig. 2, which is described in detail below:
s207: and uploading the final rule engine file to a file system.
Among these, file systems are a way to organize and manage files and directories on a computer storage device.
Alternatively, the file system may be a distributed file system (Hadoop Distributed File System, HDFS) in an Apache Hadoop ecosystem.
S208: and downloading the final rule engine file in the file system to the directory to be operated, and determining the final rule engine file as the rule engine file to be operated.
The directory to be operated is a directory in the target operation environment.
S209: and sending the rule engine file to be operated to the open source stream processing framework platform so that the open source stream processing framework platform calls an enabling interface, and operating the rule engine file to be operated according to operator elements of various types.
Wherein the open source streaming framework platform supports low latency and high throughput data stream processing. Alternatively, the open source streaming framework platform may be an Apache Flink.
Specifically, a rule engine file to be operated is sent to an open source streaming processing framework platform, so that the open source streaming processing framework platform calls an enabling interface, and the following steps are executed on operator elements of all types to operate the rule engine file to be operated: acquiring a designated data source by the root input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
Specifically, the rule engine file to be run can be sent to the Apache Flink by calling an application programming interface of the Apache Flink; and after the enabling interface is called, independently enabling a data processing task, and independently operating the rule engine file to be operated. Alternatively, the session mode of Apache Flink may be used. In the running process, a user cannot perform new operation, visual arrangement operation and triggering operation, the running state needs to be canceled firstly, and then the new operation, visual arrangement operation and triggering operation after the user editing operation are responded, so that each running is the latest rule engine jar file.
Specifically, after the enabling interface is called, the operation can also be stopped, and the rule engine file can be invalid after the operation is stopped. Alternatively, the run may be canceled by a command.
As can be seen from the above description of the embodiments, the final rule engine file is downloaded from the file system to the directory to be operated by uploading the final rule engine file to the file system, and the rule engine file to be operated is sent to the open source streaming framework platform. Under the scene of multiple micro services, the rule engine files to be operated in the operation environment are ensured, so that the latest compiled rule engine files are used as the enabling interfaces for each call, frequent updating of the compiled rule engine files is avoided, and the efficiency of processing the rule engine files is improved.
Example two
Fig. 3 is a schematic flow chart of a processing method of a visualization rule engine according to another embodiment of the present application, where the execution body of the embodiment may be a source-flow processing framework platform in the embodiment shown in fig. 1, or may be another source-flow processing framework platform, and the embodiment is not limited in particular herein. As shown in fig. 3, the method includes:
s301: and receiving a rule engine file to be operated, which is sent by the computer system, wherein the rule engine file to be operated is obtained by uploading a final rule engine file to a file system by the computer system and downloading the final rule engine file in the file system to a catalog to be operated.
S302: and calling an enabling interface, and running a rule engine file to be run according to the operator elements of each type.
Wherein, each type of operator element comprises an input operator, a filtering operator, an aggregation operator and an output operator. The parameters of the input operator include a product key and a device key for message filtering of the data source. Parameters of the filtering operator comprise operators, filters, attribute fields, filtering value types and filtering values; the parameters of the aggregation operator comprise a time window, a sliding window step length and grouping; wherein the grouping is of an array type, and the single grouping object comprises a name, an attribute field, an output name, an output field and a grouping type; wherein the packet types include various aggregation methods. Parameters of the output operator comprise database names, data table names and data tables; wherein the data table is an array type and a single data table object includes a name, an attribute field, an output name, an output field, and an attribute data type.
Specifically, the specific process of running the rule engine file to be run according to each type of operator element is as follows:
acquiring a designated data source according to an input operator;
determining a filtering condition according to the filtering operator;
determining an aggregation operation according to the aggregation operator;
and acquiring a specified output source according to the output operator.
The method comprises the steps of obtaining a specified data source according to parameters of an input operator, filtering information of the data source according to a product key and a device key, determining filtering conditions according to parameters of a filtering operator, determining aggregation operation required to be performed according to an aggregation function type and an aggregation attribute of an aggregation operator, and outputting data to the specified output source according to parameters of an output operator after a series of processing; alternatively, the data source may be kafka; the output source may be kafka.
Specifically, before invoking the enable interface, it needs to be ensured that the Flink cluster has been started.
Illustratively, the filter operator may increase the filter conditions of temperature >35& & humidity < 60; the aggregation operator may perform aggregation operations, such as SUM, AVG, MIN and MAX, on the specified attributes.
As can be seen from the description of the above embodiment, the rule engine file is run by the open source type processing framework platform, and different processes are performed according to different types of operator elements, so that the efficiency of rule engine file management in a dynamic arrangement scene for a user is improved.
Fig. 4 is a schematic structural diagram of a processing device of a visualization rule engine according to an embodiment of the present application. As shown in fig. 4, the processing device of the visualization rule engine includes: a first response module 401, a second response module 402, a first generation module 403, a verification module 404, a second generation module 405, and a compilation module 406.
A first response module 401, configured to generate an empty rule engine file in response to a new operation of a user;
a second response module 402, configured to display editable job details in response to a triggering operation of the empty rule engine file by a user, where the editable job details include a visual orchestration operation function provided for each type of operator element and each type of relationship element;
a first generating module 403, configured to generate a flow chart in response to a visual arrangement operation of a user on a plurality of operator elements and a plurality of relationship elements, where the plurality of operator elements and the plurality of relationship elements are selected by the user according to business logic, based on the editable job details;
the verification module 404 is configured to convert the flow chart into data in a preset format, and verify the data in the preset format;
A second generating module 405, configured to generate a file to be compiled according to the flow chart if the verification is successful;
and the compiling module 406 is configured to compile the file to be compiled to obtain a final rule engine file.
In one possible design, the first generating module 403 is specifically configured to: determining nodes and relation edges according to each operator element and each relation element, and generating an original flow chart; and updating the original flow chart according to the visualized arranging operation of the user on a plurality of operator elements and a plurality of relation elements to generate the flow chart.
In one possible design, the apparatus further comprises:
an uploading module 407, configured to upload the final rule engine file to a file system;
a downloading module 408, configured to download the final rule engine file in the file system to a directory to be executed, and determine the final rule engine file to be executed;
and the sending module 409 is configured to send the rule engine file to be executed to an open source stream processing framework platform, so that the open source stream processing framework platform invokes an enabling interface, and execute the rule engine file to be executed according to the operator elements of each type.
In one possible design, the operator elements of each type include an input operator, a filter operator, an aggregate operator, and an output operator; the sending module 409 is specifically configured to: sending the rule engine file to be operated to the open source streaming processing framework platform so that the open source streaming processing framework platform calls an enabling interface, and executing the following steps on the operator elements of each type to operate the rule engine file to be operated: acquiring a designated data source according to the input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
In one possible design, the second generating module 405 is specifically configured to: and generating a corresponding code file according to the flow chart, and determining the code file as the file to be compiled.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Fig. 5 is a schematic structural diagram of a processing device of a visualization rule engine according to another embodiment of the present application. As shown in fig. 5, the processing device of the visualization rule engine includes: a receiving module 501 and a running module 502.
A receiving module 501, configured to receive the rule engine file to be executed sent by the computer system, where the rule engine file to be executed is obtained by uploading the final rule engine file to the file system by the computer system, and downloading the final rule engine file in the file system to a directory to be executed;
and the operation module 502 is used for calling an enabling interface and operating the rule engine file to be operated according to the operator elements of each type.
In one possible design, the operator elements of each type include an input operator, a filter operator, an aggregate operator, and an output operator; the operation module 502 is specifically configured to: acquiring a designated data source according to the input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Fig. 6 is a schematic diagram of a hardware structure of a computer system according to an embodiment of the application. As shown in fig. 6, the computer system of the present embodiment includes: at least one processor 601 and memory 602; the memory stores computer-executable instructions; at least one processor executes computer-executable instructions stored in the memory that cause the at least one processor to perform the method of processing a visualization rules engine as described above.
Alternatively, the memory 602 may be separate or integrated with the processor 601.
When the memory 602 is provided separately, the computer system further comprises a bus 603 for connecting said memory 602 and the processor 601.
FIG. 7 is a schematic diagram of a hardware architecture of an open flow processing framework platform according to one embodiment of the present application. As shown in fig. 7, the open source streaming framework platform of the present embodiment includes: at least one processor 701 and memory 702; the memory stores computer-executable instructions; at least one processor executes computer-executable instructions stored in the memory that cause the at least one processor to perform the method of processing a visualization rules engine as described above.
Alternatively, the memory 702 may be separate or integrated with the processor 701.
When the memory 702 is provided independently, the open-source processing framework platform further comprises a bus 703 for connecting the memory 702 and the processor 701.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores computer execution instructions, and when a processor executes the computer execution instructions, the processing method of the visualization rule engine is realized.
The embodiment of the application also provides a computer program product, comprising a computer program which realizes the processing method of the visual rule engine when being executed by a processor.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are alternative embodiments, and that the acts and modules referred to are not necessarily required for the present application.
It should be further noted that, although the steps in the flowchart are sequentially shown as indicated by arrows, the steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps in the flowcharts may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order in which the sub-steps or stages are performed is not necessarily sequential, and may be performed in turn or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
It will be appreciated that the device embodiments described above are merely illustrative and that the device of the application may be implemented in other ways. For example, the division of the units/modules in the above embodiments is merely a logic function division, and there may be another division manner in actual implementation. For example, multiple units, modules, or components may be combined, or may be integrated into another system, or some features may be omitted or not performed.
In addition, each functional unit/module in each embodiment of the present application may be integrated into one unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated together, unless otherwise specified. The integrated units/modules described above may be implemented either in hardware or in software program modules.
The integrated units/modules, if implemented in hardware, may be digital circuits, analog circuits, etc. Physical implementations of hardware structures include, but are not limited to, transistors, memristors, and the like. The processor may be any suitable hardware processor, such as CPU, GPU, FPGA, DSP and ASIC, etc., unless otherwise specified. Unless otherwise indicated, the storage elements may be any suitable magnetic or magneto-optical storage medium, such as resistive Random Access Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random-Access Memory), enhanced dynamic Random Access Memory EDRAM (Enhanced Dynamic Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid Memory cube HMC (Hybrid Memory Cube), etc.
The integrated units/modules may be stored in a computer readable memory if implemented in the form of software program modules and sold or used as a stand-alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in whole or in part in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments. The technical features of the foregoing embodiments may be arbitrarily combined, and for brevity, all of the possible combinations of the technical features of the foregoing embodiments are not described, however, all of the combinations of the technical features should be considered as being within the scope of the disclosure.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (13)

1. A method of processing a visualization rules engine, applied to a computer system, comprising:
generating an empty rule engine file in response to a new operation of a user;
responding to the triggering operation of the user on the empty rule engine file, displaying editable job details, wherein the editable job details comprise visual arrangement operation functions provided for operator elements of all types and relation elements of all types;
Generating a flow chart based on the editable job details in response to a visual arrangement operation of a user on a plurality of operator elements and a plurality of relation elements, wherein the operator elements and the relation elements are selected by the user according to business logic;
converting the flow chart into data in a preset format, and checking the data in the preset format;
if the verification is successful, generating a file to be compiled according to the flow chart;
and compiling the file to be compiled to obtain a final rule engine file.
2. The method of claim 1, wherein the generating a flow graph based on the editable job details in response to a user's visual orchestration operation for a plurality of operator elements and a plurality of relationship elements comprises:
determining nodes and relation edges according to each operator element and each relation element, and generating an original flow chart;
and updating the original flow chart according to the visualized arranging operation of the user on a plurality of operator elements and a plurality of relation elements to generate the flow chart.
3. The method according to any one of claims 1 to 2, wherein after performing compiling processing on the file to be compiled to obtain a final rule engine file, the method further comprises:
Uploading the final rule engine file to a file system;
downloading the final rule engine file in the file system to a catalog to be operated, and determining the final rule engine file as the rule engine file to be operated;
and sending the rule engine file to be operated to an open source streaming processing framework platform so that the open source streaming processing framework platform calls an enabling interface, and operating the rule engine file to be operated according to the operator elements of each type.
4. A method according to claim 3, wherein the operator elements of each type comprise an input operator, a filter operator, an aggregate operator and an output operator;
correspondingly, the rule engine file to be operated is sent to an open source stream processing framework platform, so that the open source stream processing framework platform calls an enabling interface, and the rule engine file to be operated is operated according to the operator elements of each type, and the method comprises the following steps:
sending the rule engine file to be operated to the open source streaming processing framework platform so that the open source streaming processing framework platform calls an enabling interface, and executing the following steps on the operator elements of each type to operate the rule engine file to be operated: acquiring a designated data source according to the input operator; determining a filtering condition according to the filtering operator; determining an aggregation operation according to the aggregation operator; and acquiring a specified output source according to the output operator.
5. The method of claim 1, wherein generating a file to be compiled from the flow graph comprises:
and generating a corresponding code file according to the flow chart, and determining the code file as the file to be compiled.
6. A method for processing a visualization rules engine, applied to a open-source type processing framework platform, comprising:
receiving the rule engine file to be operated, which is sent by a computer system, wherein the rule engine file to be operated is obtained by uploading the final rule engine file to the file system by the computer system and downloading the final rule engine file in the file system to a catalog to be operated;
and calling an enabling interface, and running the rule engine file to be run according to the operator elements of each type.
7. The method of claim 6, wherein the operator elements of each type include an input operator, a filter operator, an aggregate operator, and an output operator;
correspondingly, the calling and enabling interface operates the rule engine file to be operated according to the operator elements of each type, and the method comprises the following steps:
acquiring a designated data source according to the input operator;
Determining a filtering condition according to the filtering operator;
determining an aggregation operation according to the aggregation operator;
and acquiring a specified output source according to the output operator.
8. A processing apparatus for a visualization rules engine, for application to a computer system, comprising:
the first response module is used for responding to the new operation of the user and generating an empty rule engine file;
the second response module is used for responding to the triggering operation of the user on the empty rule engine file and displaying editable job details, wherein the editable job details comprise visual arrangement operation functions provided for operator elements of all types and relation elements of all types;
the first generation module is used for responding to the visual arrangement operation of a user on a plurality of operator elements and a plurality of relation elements based on the editable job details, and generating a flow chart, wherein the operator elements and the relation elements are selected by the user according to business logic;
the verification module is used for converting the flow chart into data in a preset format and verifying the data in the preset format;
the second generation module is used for generating a file to be compiled according to the flow chart if the verification is successful;
And the compiling module is used for compiling the file to be compiled to obtain a final rule engine file.
9. A processing apparatus for a visualization rules engine, for application to an open-flow processing framework platform, comprising:
the receiving module is used for receiving the rule engine file to be operated, which is sent by the computer system, wherein the rule engine file to be operated is obtained by uploading the final rule engine file to the file system by the computer system and downloading the final rule engine file in the file system to a catalog to be operated;
and the operation module is used for calling an enabling interface and operating the rule engine file to be operated according to the operator elements of each type.
10. A computer system, comprising:
at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of processing a visualization rules engine of any of claims 1 to 5.
11. An open source streaming framework platform, comprising:
At least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing computer-executable instructions stored in the memory causes the at least one processor to perform the method of processing a visualization rules engine of any of claims 6 to 7.
12. A computer readable storage medium having stored therein computer executable instructions which, when executed by a processor, implement a method of processing a visualization rules engine as claimed in any of claims 1 to 5.
13. A computer-readable storage medium, in which computer-executable instructions are stored, which, when executed by a processor, implement a method of processing a visualization rules engine according to any of claims 6 to 7.
CN202310996098.XA 2023-08-08 2023-08-08 Processing method, device, system and platform of visual rule engine Pending CN117032668A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310996098.XA CN117032668A (en) 2023-08-08 2023-08-08 Processing method, device, system and platform of visual rule engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310996098.XA CN117032668A (en) 2023-08-08 2023-08-08 Processing method, device, system and platform of visual rule engine

Publications (1)

Publication Number Publication Date
CN117032668A true CN117032668A (en) 2023-11-10

Family

ID=88631108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310996098.XA Pending CN117032668A (en) 2023-08-08 2023-08-08 Processing method, device, system and platform of visual rule engine

Country Status (1)

Country Link
CN (1) CN117032668A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389541A (en) * 2023-12-13 2024-01-12 中国人民解放军国防科技大学 Configuration system and device for generating template based on dialogue retrieval
CN117743398A (en) * 2023-12-15 2024-03-22 智人开源(北京)科技有限公司 Real-time decision and data processing method based on rules in stream database

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117389541A (en) * 2023-12-13 2024-01-12 中国人民解放军国防科技大学 Configuration system and device for generating template based on dialogue retrieval
CN117389541B (en) * 2023-12-13 2024-02-23 中国人民解放军国防科技大学 Configuration system and device for generating template based on dialogue retrieval
CN117743398A (en) * 2023-12-15 2024-03-22 智人开源(北京)科技有限公司 Real-time decision and data processing method based on rules in stream database

Similar Documents

Publication Publication Date Title
CN108279932B (en) Method and device for dynamically configuring user interface of mobile terminal
CN117032668A (en) Processing method, device, system and platform of visual rule engine
WO2018126964A1 (en) Task execution method and apparatus and server
CN105243159A (en) Visual script editor-based distributed web crawler system
CN104484216A (en) Method and device for generating service interface document and on-line test tool
CN111427561A (en) Service code generation method and device, computer equipment and storage medium
CN109669976B (en) ETL-based data service method and device
CN113986241B (en) Configuration method and device of business rules based on knowledge graph
CN111818175B (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
US20210334149A1 (en) Api adapter creation device, api adapter creation method, and api adapter creation program
CN112287114A (en) Knowledge graph service processing method and device
CN114265680A (en) Mass data processing method and device, electronic equipment and storage medium
CN115017182A (en) Visual data analysis method and equipment
KR20150136734A (en) Data parallel inference method and apparatus thereof
Kim et al. Comprehensive Knowledge Archive Network harvester improvement for efficient open‐data collection and management
CN112861059A (en) Visual component generation method and device, computer equipment and readable storage medium
Baldassari et al. PROTOB a hierarchical object-oriented CASE tool for distributed systems
Cao et al. Constraint-based multi-tenant SaaS deployment using feature modeling and XML filtering techniques
CN111159142A (en) Data processing method and device
CN115756433A (en) Code platform migration method and device, electronic equipment and readable storage medium
CN111124386B (en) Animation event processing method, device, equipment and storage medium based on Unity
US10452592B1 (en) Message bus-based streaming rules engine
JP6802109B2 (en) Software specification analyzer and software specification analysis method
CN117032650A (en) Processing method and device of rule engine file, service equipment and storage medium
CN106469086B (en) Event processing method and device

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