CN111273891A - Business decision method and device based on rule engine and terminal equipment - Google Patents

Business decision method and device based on rule engine and terminal equipment Download PDF

Info

Publication number
CN111273891A
CN111273891A CN202010062272.XA CN202010062272A CN111273891A CN 111273891 A CN111273891 A CN 111273891A CN 202010062272 A CN202010062272 A CN 202010062272A CN 111273891 A CN111273891 A CN 111273891A
Authority
CN
China
Prior art keywords
data
command
decision
priority
rule engine
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
CN202010062272.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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010062272.XA priority Critical patent/CN111273891A/en
Publication of CN111273891A publication Critical patent/CN111273891A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing

Abstract

The application is applicable to the technical field of data processing, and particularly relates to a rule engine-based business decision method and device, a computer-readable storage medium and terminal equipment. The service decision method comprises the following steps: acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided; determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data; analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result; and sending the decision result to the corresponding client to execute the data command according to the priority, so that the dependence on the data command compiling sequence can be reduced, and the service decision efficiency and accuracy are improved.

Description

Business decision method and device based on rule engine and terminal equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for business decision based on a rule engine, a computer-readable storage medium, and a terminal device.
Background
The rule engine is developed by an inference engine, is a component embedded in an application program, realizes the separation of business decisions from application program codes, writes the business decisions by using a predefined semantic module, namely, the business decisions can be made by receiving data input and analyzing execution rules and according to the execution rules and the data. The existing Drools engine supports a command mode, that is, a business decision can be made by receiving a data command, but the command mode has certain defects: the execution sequence of the commands depends heavily on the writing sequence of the commands, and if the writing sequence of the commands is staggered, the accuracy of the decision result is extremely easy to reduce.
Content of application
The embodiment of the application provides a rule engine-based business decision method, a rule engine-based business decision device, a computer-readable storage medium and terminal equipment, which can solve the problem that the execution sequence of commands in the business decision of the existing command mode seriously depends on the writing sequence of the commands, so that the accuracy of decision results is easy to reduce.
In a first aspect, an embodiment of the present application provides a business decision method based on a rule engine, including:
acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided;
determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and sending the decision result to a corresponding client.
In a second aspect, an embodiment of the present application provides a business decision apparatus based on a rule engine, including:
the data command acquisition module is used for acquiring each data command corresponding to the data to be decided and the rule engine corresponding to the data to be decided;
the data command analysis module is used for determining the priority corresponding to each data command and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
the target data decision module is used for analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and the decision result sending module is used for sending the decision result to the corresponding client.
In a third aspect, the present application provides a computer-readable storage medium, which stores computer-readable instructions, and when executed by a processor, the computer-readable instructions implement the rules engine-based business decision method according to any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, where the processor executes the computer readable instructions to implement the following steps:
acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided;
determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and sending the decision result to a corresponding client.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the method for rule engine based business decision as described in any one of the above first aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, the priority can be set for the data command in advance, so that when the rule engine is used for business decision, the data command can be executed according to the priority of the data command, the data command of the next priority can be executed after the data command of the previous priority is completely executed, the dependence on the data command writing sequence is reduced, the business decision efficiency and the accuracy are improved, meanwhile, when the rule engine is used, the writing or inserting sequence of the data command does not need to be noticed, the access threshold of the rule engine is reduced, the application range of the rule engine is greatly expanded, and the user experience is facilitated to be improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a schematic flowchart of a business decision method based on a rule engine according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a business decision method based on a rule engine according to an embodiment of the present application, in which target decision data is obtained in an application scenario;
fig. 3 is a schematic flowchart of a business decision method based on a rule engine according to an embodiment of the present application, in another application scenario, to obtain target decision data;
fig. 4 is a schematic structural diagram of a business decision device based on a rule engine according to an embodiment of the present application;
fig. 5 is a schematic diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, 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 should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Referring to fig. 1, an embodiment of the present application provides a business decision method based on a rule engine. The execution subject of the embodiment of the present application may be a terminal device, where the terminal device includes but is not limited to: desktop computers, notebooks, palm computers, cloud servers, and other computing devices. The business decision method is a business decision method based on a command mode, namely, a data command and a rule engine required by business decision can be obtained firstly, and then business decision can be performed on decision data corresponding to the data command through an execution rule corresponding to the rule engine to obtain a decision result. The service decision method may include:
s101, acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided;
it is understood that, when a user needs to make a business decision, the user may send a decision request (e.g., a policy correctness check request) to the terminal device, and the terminal device may perform data command and rule engine acquisition according to the decision request. For example, the terminal device may obtain the data command through an obtaining path carried in the decision request, or the terminal device may directly obtain the data command from the decision request, that is, the data command may be directly included in the decision request. The rule engine may be determined according to the decision request, for example, the rule engine may be obtained according to a preset correspondence between a preset decision request and the rule engine. The rule engine is stored in a storage device of the terminal device, and the rule engine can be loaded into a cache after the terminal device determines the rule engine corresponding to the current business decision.
Illustratively, the data commands may include data preparation commands, rule execution commands, and result extraction commands. For example, in the application scenario of warranty correctness checking, the data command may be an applicant information data preparation command, an insured person information data preparation command, a beneficiary information data preparation command, a purchase risk A information data preparation command, a purchase risk B information data preparation command, a purchase risk C information data preparation command, a physical examination health book data preparation command, an execution rule command, and a result extraction command, etc. The data command may be obtained by encapsulating data to be decided corresponding to a user (e.g., policyholder information, beneficiary information, purchasing dangerous species, etc.), for example, the data to be decided may be manually encapsulated to obtain a data preparation command corresponding to the data to be decided, that is, before performing a business decision, the data to be decided required for the business decision may be manually encapsulated to obtain a data preparation command corresponding to the data to be decided, and at the same time, a rule execution command and a result extraction command corresponding to the data to be decided may be manually encapsulated to obtain a rule execution command and a result extraction command corresponding to the data to be decided, and the data preparation command, the rule execution command and the result extraction command may be sent to the terminal device or stored in a preset path.
It should be understood that the data command may also be automatically encapsulated by the terminal device, where the automatic encapsulation process performed by the terminal device on the data command may be: acquiring data to be decided, and extracting the data to be decided to obtain each subdata corresponding to the data to be decided; and respectively packaging the subdata to obtain each data command corresponding to the data to be decided. For example, in an application scenario of policy correctness checking, the data to be decided is a specific policy, and each child data is data of policyholder information, beneficiary information, purchasing risk species, and the like included in the policy, so the data command obtained by encapsulating the policy is a policyholder information data preparation command, beneficiary information data preparation command, purchasing risk species information data preparation command, execution rule command, result extraction command, and the like.
S102, determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
in the embodiment of the application, after the terminal device acquires all the data commands, the priority corresponding to each data command can be determined, so that the data commands can be executed according to the priority. Specifically, the priorities corresponding to the data commands may be divided into 3 levels, namely, a first priority, a second priority and a third priority, according to the decision flow, wherein the data command of the first priority is executed first, the data command of the second priority is executed second, and the data command of the third priority is executed last. The data commands of the first priority can be data preparation commands, each data preparation command can correspond to one or more pieces of data in the data to be decided, so that all the data to be decided can be prepared through the data preparation commands of the first priority, and the influence on the accuracy of decision results due to omission of the data to be decided is avoided; the data command of the second priority can be a rule execution command, that is, after all the data to be decided are prepared, all the data to be decided can be uniformly executed through the rule execution command of the second priority, so that a decision result corresponding to the data to be decided is obtained, and the decision efficiency is improved; the data command of the third priority may be a result extraction command, that is, after the rule execution command is executed, the last decision result may be extracted and sent through the result extraction command.
After the data commands of the first priority are determined, that is, after the data preparation commands are determined, the terminal device may analyze each data preparation command through the rule engine to analyze the data to be decided corresponding to each data preparation command into the data format required by the rule engine, so as to obtain analyzed target decision data, that is, the target decision data is data obtained by converting the data to be decided into the data format required by the rule engine. It can be understood that after the objective decision data is obtained, the terminal device may load the objective decision data into a cache where the rule engine is located, so that the rule engine performs a business decision according to the objective decision data, thereby improving the business decision efficiency.
In a possible implementation manner, the determining the priority corresponding to each data command may include:
and acquiring attribute information corresponding to each data command, and determining the priority corresponding to each data command according to the attribute information.
In this embodiment, the attribute information may be name information corresponding to the data command or information representing functions or actions of each data command, and the attribute information may be, for example, description information for performing data insertion, description information for performing rule execution, description information for performing result extraction, and the like. Therefore, when determining the priority corresponding to each data command, the terminal device may first obtain attribute information corresponding to each data command, and then may determine the priority corresponding to each data command by using the attribute information (e.g., name information or other information characterizing functions or actions) corresponding to each data command, for example, when the name information of a certain data command includes "data ready", the priority corresponding to the data command is a first priority, when the name information of a certain data command includes "rule execution", the priority corresponding to the data command is a second priority, and when the attribute information corresponding to a certain data command is description information for performing result extraction, the priority corresponding to the data command is a third priority, and so on.
In a possible implementation manner, as shown in fig. 2, the parsing, by the rule engine, the data command of the first priority to obtain parsed target decision data may include:
s201, determining the command number of the data commands of the first priority, and setting the analysis identification of each data command of the first priority as a first bit value;
s202, randomly selecting a data command from the data commands of the first bit value as a current analysis command, analyzing the current analysis command through the rule engine, and adding a counting unit to a preset counting value after the analysis is finished;
s203, judging whether the count value is equal to the command number or not;
s204, if the count value is smaller than the command number, setting the analysis identifier of the current analysis command as a second bit value, and returning to the step of randomly selecting one data command from the data commands of the first bit value as the current analysis command and the subsequent steps until the count value is equal to the command number;
and S205, if the count value is equal to the number of the commands, obtaining analyzed target decision data according to the analysis result of each data command of the first priority.
For the above S201 to S205, in this embodiment of the application, when there are a plurality of data commands of the first priority, the terminal device may first determine the command number of the data commands of the first priority, and may set the parsing flag of each data command of the first priority as a first bit value, where the first bit value is used to represent that the data command of the first priority has not been parsed yet, and then may sequentially parse the data commands that have not been parsed by a single parsing thread, that is, may sequentially select one data command from the data commands of the first bit value as a current parsing command, and parse the current parsing command by the rule engine. During parsing, the count value may be utilized to count the number of parses corresponding to the data command, where in an initial state, the count value is initialized to 0, and after each data command is parsed, the count value may be increased by one count unit, for example, by 1. Then, whether the analysis of all data commands of the first priority is completed can be determined by judging whether the count value is equal to the command number, for example, if the count value is less than the command number, it indicates that there are still unresolved data commands, at this time, the analysis identifier of the current analysis command can be set to a second bit value, the second bit value is used to represent that the data commands of the first priority have been analyzed, so that when the subsequent data commands are obtained for analysis, these analyzed data commands will not be selected, which helps the terminal device to obtain the next unresolved data command as the current analysis command for analysis, that is, any data command is selected from the remaining data commands of the first bit value as the current analysis command, so as to repeat the above operations until the count value is equal to the command number, it is determined that all data commands of the first priority have been parsed.
In another possible implementation manner, as shown in fig. 3, the parsing, by the rule engine, the data command with the first priority to obtain parsed decision-making targeting data may include:
s301, determining the command number of the data command with the first priority;
s302, the rule engine calls the analysis threads of the command number to respectively analyze the data commands of the first priority, and analyzed target decision data are obtained.
Here, in the embodiment of the present application, all the data commands of the first priority may also be analyzed simultaneously through a plurality of analysis threads, so as to improve the analysis efficiency of the data commands, and thus improve the decision efficiency of the service decision.
S103, analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
it should be noted that, after the terminal device completes the parsing of all the data preparation commands of the first priority and obtains all the target decision data, the terminal device may acquire and execute the data commands of the second priority, the rule execution command with the second priority can be obtained, and the rule engine can be analyzed according to the rule execution command to obtain the specific execution rule corresponding to the rule engine, then the final business decision can be made for all the objective decision data through the specific execution rule corresponding to the rule engine, that is, the final business decision is made by combining all the target decision data to obtain the decision result, so that after all the data preparation commands are analyzed, and executing the rule execution command to avoid omission of data to be decided, reducing the dependence of the business decision on the insertion sequence of the data command and ensuring the accuracy of the business decision. Meanwhile, when the rule engine is used, the writing or inserting sequence of the data commands does not need to be noticed, the access threshold of the rule engine is reduced, the application range of the rule engine is greatly expanded, and the user experience is favorably improved.
It should be understood that, in the application scenario of policy correctness checking, the decision result may be policy non-compliance or policy compliance, or may be user compliance with the purchasing condition of the policy or user non-compliance with the purchasing condition of the policy, and so on.
And S104, sending the decision result to the corresponding client.
Specifically, the sending the decision result to the corresponding client may include:
and extracting the decision result according to the data command of the third priority, and sending the extracted decision result to the corresponding client.
In the embodiment of the present application, the decision result obtained according to the execution rule is often stored in the memory of the rule engine, and if the decision result is to be obtained, the decision result needs to be extracted from the memory of the rule engine through a corresponding result extraction command. Here, the data command for performing the service decision often has a result extraction command, and the priority of the result extraction command is often the lowest, so that after the decision result is obtained according to the execution rule, the terminal device may extract the decision result from the memory of the rule engine according to the result extraction command of the third priority, and may send the extracted decision result to the corresponding client, so as to notify the user corresponding to the client of the decision result of the service decision, for example, notify the user corresponding to the client of whether the policy correctness check of the policy passes, thereby facilitating the user corresponding to the client to determine whether to receive the policy, and the like.
In the embodiment of the application, the priority can be set for the data command in advance, so that when the rule engine is used for business decision, the data command can be executed according to the priority of the data command, the data command of the next priority can be executed after the data command of the previous priority is completely executed, the dependence on the data command writing sequence is reduced, the business decision efficiency and the accuracy are improved, meanwhile, when the rule engine is used, the writing or inserting sequence of the data command does not need to be noticed, the access threshold of the rule engine is reduced, the application range of the rule engine is greatly expanded, and the user experience is facilitated to be improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Corresponding to the business decision method based on the rule engine described in the above embodiment, fig. 4 shows a structural block diagram of a business decision device based on the rule engine provided in the embodiment of the present application, and for convenience of explanation, only the parts related to the embodiment of the present application are shown.
Referring to fig. 4, the rule engine based business decision apparatus may include:
a data command obtaining module 401, configured to obtain each data command corresponding to data to be decided and a rule engine corresponding to the data to be decided;
a data command analysis module 402, configured to determine a priority corresponding to each data command, and analyze each data command with a first priority through the rule engine to obtain analyzed target decision data;
a target data decision module 403, configured to analyze the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and perform a service decision on the target decision data according to the execution rule to obtain a decision result;
a decision result sending module 404, configured to send the decision result to a corresponding client.
In a possible implementation manner, the service decision apparatus may further include:
the subdata extraction module is used for acquiring data to be decided and extracting the data to be decided to obtain subdata corresponding to the data to be decided;
and the subdata packaging module is used for respectively packaging the subdata to obtain each data command corresponding to the data to be decided.
Optionally, the data command parsing module 402 is further configured to obtain attribute information corresponding to each data command, and determine a priority corresponding to each data command according to the attribute information.
In a possible implementation manner, the target data decision module 403 may include:
a first command number determining unit, configured to determine a command number of the data command of the first priority, and set a parsing flag of each data command of the first priority to a first bit value;
a count value increasing unit, configured to randomly select a data command from the data commands of the first bit value as a current parsing command, parse the current parsing command through the rule engine, and increase a preset count value by one count unit after parsing is completed;
a count value judgment unit operable to judge whether the count value is equal to the command number;
the analysis identifier setting unit is used for setting the analysis identifier of the current analysis command as a second bit value if the count value is smaller than the command number, and returning to execute the step of randomly selecting one data command from the data commands of the first bit value as the current analysis command and the subsequent steps until the count value is equal to the command number;
and the first data command analysis unit is used for obtaining analyzed target decision data according to the analysis result of each data command of the first priority if the count value is equal to the command number.
In another possible implementation manner, the target data decision module 403 may further include:
a second command number determination unit configured to determine a command number of the data command of the first priority;
and the second data command analysis unit is used for calling the analysis threads of the command number through the rule engine to respectively analyze the data commands of the first priority to obtain analyzed target decision data.
Optionally, the decision result sending module 404 is further configured to extract the decision result according to the data command of the third priority, and send the extracted decision result to the corresponding client.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one shown in fig. 5), a memory 51, and computer readable instructions 52 stored in the memory 51 and executable on the at least one processor 50, the processor 50 implementing the steps in any of the various rules engine based business decision method embodiments described above when executing the computer readable instructions 52.
The terminal device 5 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 50, a memory 51. Those skilled in the art will appreciate that fig. 5 is only an example of the terminal device 5, and does not constitute a limitation to the terminal device 5, and may include more or less components than those shown, or combine some components, or different components, such as an input-output device, a network access device, and the like.
The Processor 50 may be a Central Processing Unit (CPU), and the Processor 50 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may also be an external storage device of the terminal device 5 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer readable instructions, and the like. The memory 51 may also be used to temporarily store data that has been output or is to be output.
The embodiments of the present application further provide a computer-readable storage medium, where computer-readable instructions are stored, and when executed by a processor, the computer-readable instructions may implement the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. With this understanding, all or part of the flow of the method implemented by the present application may be implemented by hardware related to computer readable instructions, which may be stored in a computer readable storage medium, and when the computer readable instructions are executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer readable instructions comprise computer readable instruction code which may be in source code form, object code form, an executable file or some intermediate form, and the like. The computer readable medium may include at least: any entity or device capable of carrying computer readable instruction code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A business decision method based on a rule engine is characterized by comprising the following steps:
acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided;
determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and sending the decision result to a corresponding client.
2. The business decision method according to claim 1, wherein before the obtaining of each data command corresponding to data to be decided, the method comprises:
acquiring data to be decided, and extracting the data to be decided to obtain each subdata corresponding to the data to be decided;
and respectively packaging the subdata to obtain each data command corresponding to the data to be decided.
3. The traffic decision method according to claim 1, wherein the determining the priority corresponding to each of the data commands comprises:
and acquiring attribute information corresponding to each data command, and determining the priority corresponding to each data command according to the attribute information.
4. The business decision method according to claim 1, wherein the parsing the data command of the first priority by the rule engine to obtain parsed target decision data comprises:
determining the command number of the data commands of the first priority, and setting the analysis identification of each data command of the first priority as a first bit value;
randomly selecting a data command from the data commands of the first bit value as a current analysis command, analyzing the current analysis command through the rule engine, and adding a counting unit to a preset counting value after the analysis is finished;
judging whether the count value is equal to the command number;
if the count value is smaller than the command number, setting the analysis identifier of the current analysis command as a second bit value, and returning to execute the step of randomly selecting one data command from the data commands of the first bit value as the current analysis command and the subsequent steps until the count value is equal to the command number;
and if the count value is equal to the command number, obtaining analyzed target decision data according to the analysis result of each data command of the first priority.
5. The business decision method according to claim 1, wherein the parsing the data command of the first priority by the rule engine to obtain parsed target decision data comprises:
determining the command number of the data commands of the first priority;
and calling the analysis threads of the command number through the rule engine to analyze the data commands of the first priority respectively to obtain analyzed target decision data.
6. The business decision method according to any one of claims 1 to 5, wherein the sending the decision result to the corresponding client comprises:
and extracting the decision result according to the data command of the third priority, and sending the extracted decision result to the corresponding client.
7. A rules engine based business decision device, comprising:
the data command acquisition module is used for acquiring each data command corresponding to the data to be decided and the rule engine corresponding to the data to be decided;
the data command analysis module is used for determining the priority corresponding to each data command and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
the target data decision module is used for analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and the decision result sending module is used for sending the decision result to the corresponding client.
8. A computer readable storage medium storing computer readable instructions, wherein the computer readable instructions, when executed by a processor, implement a rules engine based business decision method according to any of claims 1 to 6.
9. A terminal device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor when executing the computer readable instructions performs the steps of:
acquiring data commands corresponding to data to be decided and a rule engine corresponding to the data to be decided;
determining the priority corresponding to each data command, and analyzing each data command with the first priority through the rule engine to obtain analyzed target decision data;
analyzing the rule engine according to a data command of a second priority to obtain an execution rule corresponding to the rule engine, and performing service decision on the target decision data according to the execution rule to obtain a decision result;
and sending the decision result to a corresponding client.
10. The terminal device of claim 9, wherein parsing the data command of the first priority by the rule engine to obtain parsed decision-making targeting data comprises:
determining the command number of the data commands of the first priority, and setting the analysis identification of each data command of the first priority as a first bit value;
randomly selecting a data command from the data commands of the first bit value as a current analysis command, analyzing the current analysis command through the rule engine, and adding a counting unit to a preset counting value after the analysis is finished;
judging whether the count value is equal to the command number;
if the count value is smaller than the command number, setting the analysis identifier of the current analysis command as a second bit value, and returning to execute the step of randomly selecting one data command from the data commands of the first bit value as the current analysis command and the subsequent steps until the count value is equal to the command number;
and if the count value is equal to the command number, obtaining analyzed target decision data according to the analysis result of each data command of the first priority.
CN202010062272.XA 2020-01-19 2020-01-19 Business decision method and device based on rule engine and terminal equipment Pending CN111273891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010062272.XA CN111273891A (en) 2020-01-19 2020-01-19 Business decision method and device based on rule engine and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010062272.XA CN111273891A (en) 2020-01-19 2020-01-19 Business decision method and device based on rule engine and terminal equipment

Publications (1)

Publication Number Publication Date
CN111273891A true CN111273891A (en) 2020-06-12

Family

ID=70998852

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010062272.XA Pending CN111273891A (en) 2020-01-19 2020-01-19 Business decision method and device based on rule engine and terminal equipment

Country Status (1)

Country Link
CN (1) CN111273891A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782243A (en) * 2020-06-29 2020-10-16 珠海豹趣科技有限公司 Service execution method and device of application program and electronic equipment
CN111897807A (en) * 2020-07-01 2020-11-06 拉扎斯网络科技(上海)有限公司 Data processing method and policy engine system
CN112148343A (en) * 2020-09-02 2020-12-29 广州市双照电子科技有限公司 Rule issuing method and device and terminal equipment
CN112199259A (en) * 2020-10-21 2021-01-08 中国电子科技集团公司第十五研究所 Fault judgment and implementation method and system based on rule engine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782243A (en) * 2020-06-29 2020-10-16 珠海豹趣科技有限公司 Service execution method and device of application program and electronic equipment
CN111897807A (en) * 2020-07-01 2020-11-06 拉扎斯网络科技(上海)有限公司 Data processing method and policy engine system
CN112148343A (en) * 2020-09-02 2020-12-29 广州市双照电子科技有限公司 Rule issuing method and device and terminal equipment
CN112199259A (en) * 2020-10-21 2021-01-08 中国电子科技集团公司第十五研究所 Fault judgment and implementation method and system based on rule engine
CN112199259B (en) * 2020-10-21 2024-03-26 中国电子科技集团公司第十五研究所 Rule engine-based fault judging and implementing method and system

Similar Documents

Publication Publication Date Title
CN111273891A (en) Business decision method and device based on rule engine and terminal equipment
CN108427731B (en) Page code processing method and device, terminal equipment and medium
TWI743773B (en) Method and device for identifying abnormal collection behavior based on privacy data protection
CN107784205B (en) User product auditing method, device, server and storage medium
CN107784063B (en) Algorithm generation method and terminal equipment
CN110263155B (en) Data classification method, and training method and system of data classification model
CN112181804A (en) Parameter checking method, equipment and storage medium
CN112732567B (en) Mock data testing method and device based on ip, electronic equipment and storage medium
CN110851136A (en) Data acquisition method and device, electronic equipment and storage medium
US20190147104A1 (en) Method and apparatus for constructing artificial intelligence application
CN111338716A (en) Data processing method and device based on rule engine and terminal equipment
CN111460098A (en) Text matching method and device and terminal equipment
CN113762303A (en) Image classification method and device, electronic equipment and storage medium
CN111897833A (en) Data processing method and device
CN117093619A (en) Rule engine processing method and device, electronic equipment and storage medium
CN109120509B (en) Information collection method and device
CN110634018A (en) Feature depiction method, recognition method and related device for lost user
CN110598115A (en) Sensitive webpage identification method and system based on artificial intelligence multi-engine
CN113032836B (en) Data desensitization method and apparatus
CN109284268A (en) A kind of method, system and the electronic equipment of fast resolving log
CN112016057B (en) Privacy protection method and device, evaluation method and device of code file and electronic equipment
CN110674491B (en) Method and device for real-time evidence obtaining of android application and electronic equipment
CN112527830A (en) Data query method, device, equipment and storage medium
CN112181539B (en) File processing method, device, equipment and medium
CN114818645B (en) Automatic report generation method, device, equipment and medium based on data body

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