CN115840765A - Data processing method and device based on rule engine - Google Patents

Data processing method and device based on rule engine Download PDF

Info

Publication number
CN115840765A
CN115840765A CN202211467417.XA CN202211467417A CN115840765A CN 115840765 A CN115840765 A CN 115840765A CN 202211467417 A CN202211467417 A CN 202211467417A CN 115840765 A CN115840765 A CN 115840765A
Authority
CN
China
Prior art keywords
audited
data
rule
auditing
business
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
CN202211467417.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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN202211467417.XA priority Critical patent/CN115840765A/en
Publication of CN115840765A publication Critical patent/CN115840765A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a data processing method and a device based on a rule engine, wherein the data processing method based on the rule engine is applied to a strategy decision platform and comprises the following steps: responding to a material auditing request of a target service, and receiving a material to be audited sent by a service party; analyzing the material to be audited, and extracting data to be audited corresponding to the material to be audited; inputting the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited; determining a business processing strategy of the material to be audited based on the data auditing result; the mode can be uniformly maintained by auditing operation, and the business party only needs to send the material to be audited to the strategy decision platform without paying attention to the auditing strategy, so that the operation and maintenance pressure of the business party is reduced, the flexibility of the business party is improved, the response speed of the business party is improved, the business risk is reduced, and the like.

Description

Data processing method and device based on rule engine
Technical Field
The application relates to the technical field of computers, in particular to a data processing method based on a rule engine. The application also relates to a data processing apparatus based on the rule engine, a computing device, and a computer-readable storage medium.
Background
With the development of computer technology, business systems are widely applied, a large number of business condition judgments are involved in a business system due to the complexity of business, at least one business condition judgment forms a business rule, and if the business rule needs to be changed, for example, the business rule needs to be added, modified, deleted, and the like, the business rule is often implemented in a code mode.
When the business rule is a rule for judging whether the data content in the business system needs to be further audited, a developer can adjust the business rule in the business system according to different data contents, so that the business system needs to judge whether the data content needs to be further audited again according to a new business rule; therefore, a large calculation pressure is brought to the business system, and the business system has the problems of poor flexibility, slow response, high risk and the like.
Disclosure of Invention
In view of this, the embodiments of the present application provide a data processing method based on a rule engine. The application also relates to a data processing device based on the rule engine, a computing device and a computer readable storage medium, which are used for solving the problem that the business system has higher computing pressure in the prior art.
According to a first aspect of the embodiments of the present application, there is provided a data processing method based on a rule engine, applied to a policy decision platform, including:
responding to a material auditing request of a target service, and receiving a material to be audited sent by a service party;
analyzing the material to be audited, and extracting data to be audited corresponding to the material to be audited;
inputting the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited;
and determining a business processing strategy of the material to be audited based on the data auditing result.
According to a second aspect of the embodiments of the present application, there is provided a data processing apparatus based on a rule engine, applied to a policy decision platform, including:
the material receiving module is configured to respond to a material auditing request of the target service and receive a material to be audited sent by a service party;
the data extraction module is configured to analyze the material to be audited and extract the data to be audited corresponding to the material to be audited;
the data auditing module is configured to input the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited;
and the strategy determining module is configured to determine a business processing strategy of the material to be audited based on the data auditing result.
According to a third aspect of embodiments herein, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the rule engine based data processing method when executing the computer instructions.
According to a fourth aspect of embodiments herein, there is provided a computer readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the rule engine based data processing method.
The data processing method based on the rule engine is applied to a strategy decision platform and comprises the following steps: responding to a material auditing request of a target service, and receiving a material to be audited sent by a service party; analyzing the material to be audited, and extracting data to be audited corresponding to the material to be audited; inputting the data to be audited into a preset rule engine to obtain a data audit result of the data to be audited; and determining a business processing strategy of the material to be audited based on the data auditing result.
In the method provided by the embodiment of the application, the policy decision platform is used for performing rule matching on the material to be audited sent by the business party to obtain the data audit result of the data to be audited in the material to be audited, and further performing subsequent decision processing on the material to be audited; the mode can be uniformly maintained by auditing operation, and the business party only needs to send the material to be audited to the strategy decision platform without paying attention to the auditing strategy, so that the operation and maintenance pressure of the business party is reduced, the flexibility of the business party is improved, the response speed of the business party is improved, the business risk is reduced, and the like.
Drawings
Fig. 1 is a schematic view of an application scenario of a data processing method based on a rule engine according to an embodiment of the present application;
FIG. 2 is a flow chart of a method for processing data based on a rules engine according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating rule engine parsing rule conditions of a data processing method based on a rule engine according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a rule configuration platform configuration interface of a data processing method based on a rule engine according to an embodiment of the present application;
FIG. 5 is a schematic processing procedure diagram of a data processing method based on a rule engine according to an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a data processing apparatus based on a rule engine according to an embodiment of the present application;
fig. 7 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at" \8230; "or" when 8230; \8230; "or" in response to a determination ", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
A rule engine: an embedded component in an application program that enables separation of business decisions from the application program, and uses predefined semantic modules to compile business decisions, receive data input, interpret business rules, and make business decisions based on the business rules.
AST (abstract syntax tree): is a tree representation of the abstract syntax structure of the source code.
Rule conditions are as follows: the rule condition is composed of factors and is a Boolean expression.
Factor (d): the factors are basic components of the rule conditions and are divided into basic factors and third-party factors according to different sources, wherein the basic factors are from current data input, and the third-party factors are from third-party services.
And (4) an approval strategy: a set of rule conditions that determine whether a resource is to be reviewed.
An auditing platform: and the background system is used for auditing the content resources by auditors.
In the process of continuously accepting services by the auditing platform, it is found that a plurality of service parties are similar to distinguish whether to send or examine first according to certain conditions or judge whether to need to examine according to certain conditions, and two common schemes for solving the requirements are as follows: 1. the business side hard-codes the auditing process of the content resource into an application program code; 2. the service background customizes respective configuration pages for content resource auditing, and generally only can modify numerical values so as to judge whether the content resources need to be audited. The problem of the above scheme is that, along with the adjustment of the auditing operation strategy, a business party needs to change a program code or a configuration file, and needs to re-release an application system to make a decision take effect, and the problems of poor flexibility, slow response, high risk and the like exist.
Based on this, the embodiment of the application decouples the business rules and the business side through the policy center service (policy decision platform), the business side's approval strategies are uniformly maintained on the policy decision platform, the policy decision platform is used as the middle layer of the business side and the auditing platform and takes on the capabilities of data conversion, rule matching, final response and the like, and the business side only needs to push resources to the policy decision platform without brain. Meanwhile, the strategy decision platform is realized based on a rule engine, the analysis and judgment are realized by converting rule conditions into AST, in addition, a fool rule configuration background can be provided, a complex rule expression can be configured, the examination and operation are convenient, the configuration and the approval strategy are flexibly adjusted and configured, a service party does not need to restart or issue, and the second-level change is realized.
In the present application, a data processing method based on a rule engine is provided, and the present application relates to a data processing device based on a rule engine, a computing device, and a computer readable storage medium, which are detailed individually in the following embodiments.
Fig. 1 is a schematic diagram illustrating an application scenario of a rule engine-based data processing method according to an embodiment of the present application.
It should be noted that, the data processing method based on the rule engine provided in the embodiment of the present application takes an example of deciding whether a content resource sent by a business party needs to be sent to an auditing platform for auditing, and introduces an application scenario; however, the method does not limit the specific application scenario at all, and can make decisions on various service events in the service system, and make decisions on processing strategies of the events, and the like.
FIG. 1 includes a business party 102, a policy decision platform 104, and an audit platform 106; the service party 102 may be understood as a service system that needs to release or upload content resources, the policy decision platform 104 may be understood as a decision platform that determines whether content resources need to be reviewed, and the auditing platform 106 may be understood as an auditing platform that reviews content resources.
In practical application, after the material to be audited (content resource) in the business party 102 needs to be subjected to compliance audit, the material to be audited can be issued to the public in the business party to avoid the material to be audited from being inconsistent with corresponding rule conditions, and the like, further, the business party 102 sends the material to be audited to the policy decision platform 104 to judge whether the material to be audited needs to be further audited, the policy decision platform 104 analyzes the material to be audited, extracts the nuclear data to be audited corresponding to the material to be audited, and performs rule matching on the data to be audited by using a rule engine to obtain a data audit result corresponding to the nuclear data to be audited; under the condition that the audit of the data to be audited is determined to be passed, the material to be audited can be directly issued to the business party 102, and under the condition that the audit of the data to be audited is determined not to be passed, the material to be audited is sent to the audit platform 106 for subsequent audit, wherein the audit mode comprises but is not limited to manual audit, model audit and the like; furthermore, the auditing platform 106 determines that the material to be audited is to be reviewed, and the material to be audited can only be uploaded to the business party 102 after the review is passed.
In summary, the business rules and the business side are decoupled through the strategy decision platform, the business party's audit strategy is uniformly maintained on the strategy decision platform, the strategy decision platform is used as the intermediate layer of the business party and the audit platform and takes on the capabilities of data conversion, rule matching, final response and the like, and the business party only needs to send resources to the strategy decision platform without brain.
Fig. 2 is a flowchart illustrating a data processing method based on a rule engine according to an embodiment of the present application, which specifically includes the following steps:
it should be noted that the data processing method provided in the embodiment of the present application is applied to a policy decision platform, and a rule engine is used in the platform to implement a rule matching process for a material to be audited.
Step 202: and responding to the material auditing request of the target service, and receiving the material to be audited sent by the service party.
The target service may be understood as various services provided by a service party, such as a content sharing service provided by a content sharing platform, a content commendable service provided by a content browsing platform, and the like, and the attribute of the target service is not limited in this embodiment.
The material to be audited can be understood as the material which is determined by the business party and needs to be issued, including but not limited to the material such as text, picture, video, audio and the like which needs to be issued.
In practical application, after responding to a material auditing request aiming at a target service, the strategy decision platform can receive a material to be audited sent by a service party, so that the subsequent determination of auditing strategies for the material to be audited is facilitated; it should be noted that the determination process of the policy is originally implemented in the service side, but in order to decouple the service rule and the service side of the service side, the process may be transferred to the policy decision platform for processing, so that the service side can greatly reduce the service processing pressure, and improve the response speed of the service side.
Step 204: and analyzing the material to be audited, and extracting the data to be audited corresponding to the material to be audited.
The to-be-audited data can be understood as data content extracted from the to-be-audited material and having material representativeness, including but not limited to text content of the material itself, an account number of a material publisher, a nickname of the material publisher, basic attribute information of a third party related to the material publisher, and the like.
In practical application, in order to accurately determine whether a material to be reviewed needs to be reviewed, a policy decision platform needs to acquire representative data to be reviewed from the material to be reviewed, for example, in a text material to be reviewed, attribute information such as a keyword, an account ID of a publisher, a nickname of the publisher, and the like of the text material needs to be acquired; whether the subsequent matching data to be audited meet the preset rule condition is facilitated, and then the determination of the audit strategy of the material to be audited is completed.
In specific implementation, the strategy decision platform determines different data extraction rules according to different target services so as to be suitable for matching of the to-be-checked data corresponding to various target services; specifically, the analyzing the material to be audited and extracting the data to be audited corresponding to the material to be audited includes:
determining a data extraction rule of the target service, wherein the data extraction rule comprises at least one of a service party attribute information extraction rule, a material data extraction rule and a third-party data extraction rule associated with a service party;
and extracting the data to be audited corresponding to the material to be audited based on the data extraction rule.
In practical application, the policy decision platform may determine a data extraction rule corresponding to a target service, where the data extraction rule may be understood as an extraction rule of data to be audited corresponding to a material to be audited, for example, an extraction rule for a text material, an extraction rule for a video material, and an extraction rule for an audio material; in addition, it may also be determined which aspect of the to-be-audited data needs to be extracted from the to-be-audited material according to the service type of the target service, and this is not limited in this embodiment.
Further, the data extraction rules in the policy decision platform may include at least one of business party attribute information extraction rules, material data extraction rules, third party data extraction rules associated with business parties; the business party attribute information extraction rule can be understood as personal attribute information such as a publisher account ID, a publisher nickname and the like, the material data extraction rule can be understood as extraction of text of a material and the like, and the third party data extraction rule related to a business party can be understood as attribute information such as a third party account ID, a nickname and the like; the policy decision platform may extract the to-be-audited data corresponding to the to-be-audited material according to the data extraction rule, where the to-be-audited data may be one, two, or more, and the data size of the to-be-audited data extracted from a certain to-be-audited material is not limited in this embodiment.
Step 206: and inputting the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited.
It should be noted that, in the embodiment of the present application, the process of rule matching for data to be audited may be implemented by using a pre-configured rule engine, where the rule engine is a component embedded in an application program, and is implemented to separate a business decision from the application program, write a business decision by using a predefined semantic module, receive data input, interpret a business rule, and make a business decision according to the business rule. In addition, in this embodiment, the rule conditions in the rule engine may be adjusted in real time according to the rule configuration control platform, and then loaded into the memory in real time to reapply the rule engine, so as to modify the policy conditions and change the second level.
Further, the inputting the data to be audited into a pre-configured rule engine to obtain a data audit result of the data to be audited includes:
determining at least one service auditing rule corresponding to the target service;
and obtaining a data auditing result of the to-be-audited data based on the to-be-audited data and the at least one business auditing rule.
The service audit rule can be understood as a rule condition for rule matching of data to be audited, such as a rule condition for a keyword of a text, a rule condition for a nickname of a publisher, and a rule condition for the number of fans of the publisher.
In practical application, the policy decision platform determines at least one service audit rule corresponding to a target service, the service audit rules for the data to be audited are different in different service scenarios, and the number of the service audit rules is not limited in this embodiment; for example, the data to be audited is extracted from the text material of the content comment, and the corresponding business audit rules can be preset to two, one is to audit the keywords of the comment text, and the other is to audit the number of fans of the publisher; further, the strategy decision platform determines a data auditing result of the to-be-audited data according to the to-be-audited data and the determined multiple service auditing rules, wherein the data auditing result can be understood as a result of whether the to-be-audited data and the service auditing rules are matched or not, including matching or mismatching, so as to determine whether the to-be-audited data passes preliminary auditing, and further, the strategy decision platform can decide a next-step processing strategy of the to-be-audited material.
In specific implementation, the service auditing rule comprises a service decision factor; the business decision factor can be understood as a basic component of the rule condition, and is divided into a basic factor and a third-party factor according to different sources, wherein the basic factor is from the current data input, and the third-party factor is from a third-party service; wherein, the basic factor: the data input by the business party can be used as basic factors for condition judgment, besides the basic factors, other data such as fan numbers, nicknames and the like are usually required in rule conditions, the data inquired through external services is called as third-party factors, the common third-party factors such as fan numbers acquired according to user IDs (identities) and account registration time acquired according to user IDs (identities) are supported, the expansion can be conveniently carried out, and the requirement of checking and operating complex and various advanced auditing strategies is met, for example, the third-party factors are characterized in that the variables such as _ fans and _ time are beginning with underlines. In addition, the third-party factors can be cached, a certain third-party factor can be used in multiple conditions in the audit-entering rule, in order to avoid frequent calling of the third-party service, the third-party factors can be cached at the request level to achieve multiplexing, the overall performance is improved, and the pressure of the third-party service is reduced.
Further, the obtaining a data auditing result of the to-be-audited data based on the to-be-audited data and the at least one business auditing rule includes:
determining a target business audit rule in the at least one business audit rule;
determining elements to be checked in the data to be checked based on business decision factors corresponding to the target business checking rules;
determining a data auditing sub-result corresponding to the target service auditing rule based on the target service auditing rule and the element to be audited;
and obtaining a data auditing result of the to-be-audited data based on the data auditing sub-result corresponding to each target service auditing rule.
It should be noted that, since the policy decision platform determines that there are multiple service auditing rules corresponding to the target service, when rule matching is performed on the data to be audited, the data matching process can be performed in sequence according to the preset sequence of the service auditing rules, and the final data auditing result of the data to be audited is comprehensively determined according to each matching result.
In practical application, the policy decision platform may select one of the plurality of service auditing rules corresponding to the target service as a target service auditing rule, and determine, according to a service decision factor carried in the target service auditing rule, an element to be audited that needs to be selected in the data to be audited, for example, when the service decision factor is determined to be "fan number", the data to be audited corresponding to the "fan number" needs to be selected in the data to be audited, which is "100 ten thousand"; further, the policy decision platform determines whether 100 ten thousand meets the condition that is greater than or equal to 80 ten thousand according to the rule condition of the number of fans preset in the target service auditing rule, such as the number of fans ' > =80 ten thousand, so as to obtain the matching result of the first service auditing rule, wherein the condition that is met can be recorded as ' true ', and the condition that is not met can be recorded as ' false '. The specific matching method is not limited to this, and may be set by itself according to different target service scenarios.
And finally, the strategy decision platform obtains a data auditing result corresponding to the to-be-audited data according to the data auditing sub-result corresponding to each service auditing rule. The process may be understood as a process of comprehensively judging multiple matching results, and the judgment rule herein may also be preset, for example, a plurality of matching results are subjected to logical judgment, intersection or union, etc., so as to determine whether a final data auditing result should be "true" or "false".
Furthermore, in the service audit rule provided in the embodiment of the present application, the service decision factor in the service audit rule may not be limited to one, and may also be configured with a plurality of service decision factors, so that operations may be supported between the factors, for example, four operations, such as (a + b) × c/d, if the factor is a character string type, the factor may be forcibly converted into a numerical value type for further calculation, and the operation process may be preset based on the service requirement of the target service, which is not limited in this embodiment; specifically, the determining a data audit sub-result corresponding to the target service audit rule based on the target service audit rule and the element to be audited includes:
under the condition that the target service auditing rule comprises at least two service decision factors, processing the at least two service decision factors based on the preset operation rule to obtain a reference decision factor expression;
determining a data auditing sub-result corresponding to the target service auditing rule based on the reference decision factor expression and the element to be audited;
the preset operation rule comprises a logic operation rule and/or a four-rule operation rule.
In practical application, the target service auditing rule determined by the policy decision platform may be composed of a rule condition composed of at least two service decision factors, for this reason, the at least two service decision factors may be processed according to a preset operation rule in advance according to a service requirement of the target service to obtain a reference decision factor expression, for example, the target service auditing rule includes a service decision factor a and a service decision factor B, the determined reference decision factor expression may be a + B, a-B, or the like, the expression may be understood as matching the preset rule in the target service, in addition, the target service auditing rule is composed according to a set condition, for example, when the condition is set to be greater than 18, the reference decision factor expression a-B >18.
Further, after the policy decision platform determines the reference decision factor expression, the policy decision platform may determine a matching result corresponding to the target service auditing rule according to the element to be audited and the reference decision factor expression; for example, when the business decision factor a is determined to be the number of words corresponding to the nickname, and the business decision factor B is determined to be a fixed constant, the meaning of a-B >5 can be understood as that the number of words of the nickname minus a constant, and if the number of words is greater than 5, the target business audit rule can be satisfied.
It should be noted that, the reference decision factor expressions corresponding to the multiple service decision factors may include a logic operation rule and/or a four-rule operation rule, which is not limited in this embodiment.
Based on this, in the method provided by the embodiment of the application, the rule engine is used for realizing one-to-one matching of the data to be audited and the rule conditions, wherein the rule engine can convert the predefined expression DSL into the tree-shaped code structure AST through the golang language basic library AST package, and then the calculation evaluation is carried out through traversing the AST, so that the most core rule engine component of the policy decision platform is realized. In this regard, an example of analyzing a certain rule condition as AST may be described in the embodiment of the present application, referring to fig. 3, fig. 3 is a schematic diagram of analyzing a rule condition by a rule engine of a data processing method based on a rule engine according to an embodiment of the present application.
In fig. 3, the defined rule conditions are: for example, the quality >10& & uid >30 is provided, some functions provided by the AST packet can be analyzed into the AST as shown in fig. 3, wherein the expression DSL is a set of DSL protocols defined by the policy decision platform, and since the rule engine is implemented by using the GO-AST packet, the set of DSL protocols is based on the conditional judgment statement of the GO syntax standard, and meanwhile, the factors, the custom functions and the like are named, and the keywords predefined by the GO language such as type, func and the like cannot be used; the custom function is to make some reusable function functions to implement the policy extension capability, for example, the customizable function is: 1. in: in the list eq: in (name, "zhang san, wang wu"), nickname is zhang san or wang wu; 2. and (4) between beta: within the interval eq: between (quality, "5, 10"), the quality is in the interval of 5-10; 3. a contact: comprises the key words eq: content ("this day"), which contains the keyword "this day"; 4. interpectect: whether the arrays intersect eq: intersectact (set 1, set 2), and the set1 and the set2 intersect; this embodiment is not particularly limited thereto.
In practical application, in the analysis structure in fig. 3, traversal may be performed, if the traversal is performed without a leaf node, that is, a binary expression node, there must be X, Y, and OP, the X and Y are recursively traversed, if the traversal is performed with a leaf node, factor evaluation comparison operation is performed until the traversal is completed, and finally, a result of the whole rule is output to determine whether the material to be reviewed needs to be reviewed.
In addition, in some embodiments, when rule matching is performed on the business decision factors in the target business audit rule, the rule engine may further record the hit condition of each business decision factor, so as to facilitate subsequent tracing and troubleshooting work, which is not limited herein.
Step 208: and determining a business processing strategy of the material to be audited based on the data auditing result.
In practical application, the policy decision platform may determine a data auditing result according to a matching result of the to-be-audited data, and further determine a next service processing policy of the to-be-audited material, including a re-auditing policy of the to-be-audited material, a direct issuing policy of the to-be-audited material, and the like.
The first business processing strategy is to determine that the data to be audited does not pass auditing, and to issue the material to be audited to a professional auditing platform for reauthoring, so that the business processing strategy can be set as a material reauthoring strategy; specifically, the determining a business processing policy of the material to be audited based on the data audit result includes:
under the condition that the data auditing result is determined to be that the auditing is not passed, determining the business processing strategy of the material to be audited as a material re-auditing strategy;
correspondingly, after determining the business processing policy of the material to be audited based on the data auditing result, the method further includes:
and sending the material to be audited to a target auditing platform based on the material re-auditing strategy.
In practical application, the strategy decision platform only outputs corresponding business processing strategies to the material to be audited so as to determine the processing process to be executed in the next step of the material to be audited, and under the condition that the audit of the data to be audited is determined not to pass, the material to be audited can be sent to the target audit platform for the process of manual audit according to the determined material audit strategies.
It should be noted that, the process of determining that the data to be audited does not pass may be set according to the business requirement, and the rule engine may output, according to the output form of the preconfigured result, whether the data to be audited corresponds to "pass" or "fail", where the policy determines that the rule is preconfigured, and is not limited to that. In addition, the target auditing platform may be an auditing platform associated with a business party, a manual auditing platform, or an automated model processing platform, which is not limited in any way.
The second business processing strategy is to determine that the audit data to be audited passes, and directly release the material to be audited to the platform of the business party without performing the next manual audit, wherein the business processing strategy is a material release strategy; specifically, the determining a business processing policy of the material to be audited based on the data audit result includes:
under the condition that the data auditing result is approved, determining the service processing strategy of the material to be audited as a material issuing strategy;
correspondingly, after determining the business processing policy of the material to be audited based on the data auditing result, the method further includes:
and issuing the material to be audited to the service platform of the service party based on the material issuing strategy.
In practical application, under the condition that the strategy decision platform determines that the to-be-audited data is matched and passed, the strategy decision platform can determine that the service processing strategy of the to-be-audited material is a material issuing strategy, and further, the to-be-audited material can be issued to the service platform of a service party, so that the content of the material of an issuer meets the compliance condition, and the material can be directly issued.
Based on the method, under the whole service scene, whether the materials to be audited need to be audited again or not can be determined by the method for the materials to be audited in the service side platform, pressure caused by the fact that all the material contents are audited again is avoided, cost is saved, and application of computing resources is reduced.
In addition, in this embodiment of the present application, it is further described that the rule condition in the rule engine may be configured visually through the rule configuration control platform, and specifically, the method further includes:
responding to an adjusting instruction of a user in a rule configuration platform aiming at the business auditing rule;
adjusting a target service decision factor in the service auditing rule based on factor attribute information carried in the adjustment instruction to obtain a target service auditing rule of the target service;
and displaying the target service auditing rule on the rule configuration platform.
In practical application, the policy decision platform can provide a user-oriented rule configuration platform, can receive an adjustment instruction of a user for a service audit rule, and mainly adjusts a service decision factor in the service audit rule, wherein specific adjustment content can be obtained by selecting a corresponding target service decision factor according to factor attribute information carried in the adjustment instruction, and after adjustment, a target service audit rule corresponding to a target service can be obtained, and the target service audit rule is updated to the rule configuration platform.
It should be noted that, the rule condition is converted into the ATS, and then the AST is converted into the json data structure agreed with the front end, so that the configuration of the front end display rule condition is facilitated to implement page configuration, specifically, refer to fig. 4, where fig. 4 is a schematic diagram of a rule configuration platform configuration interface of a rule engine-based data processing method provided in an embodiment of the present application.
Fig. 4 includes a presentation of conditions, as illustrated in fig. 4, the conditions include a condition 1 and a condition 2, the condition 1 is a rule condition in which a keyword includes zhang san and wang wu, and the condition is extensible; condition 2 is the number of vermicelli > =10000, and this condition is expandable; it should be noted that, when the condition 1 and the condition 2 are in a positive relationship, it can be stated that if the condition 1 and the condition 2 are simultaneously satisfied, true may be executed and a policy issued after examination may be executed, and if the condition 1 and the condition 2 cannot be simultaneously satisfied, false may be executed and a policy directly responding may be executed, where the policy may be changed. Finally, the output result of the rule engine can be pre-configured in the configuration interface, on the basis, the auditing operation can conveniently adjust the configuration or add other auditing strategies, the strategy change can be realized on the business side and research and development without intervention, the response is rapid, and the flexibility is high.
Based on the above, the background thread of the policy decision platform can continuously poll the change of the monitoring rule condition according to the preset time interval, if the change occurs, the change is loaded into the memory in real time to enable the rule engine to reapply, and the policy condition modification and the second-level change are realized.
In summary, the data processing method based on the rule engine provided by the embodiment of the application converges the audit policy through the policy decision platform realized based on the rule engine, and is uniformly maintained by audit operation, so that a business party does not need to pay attention to the audit policy; meanwhile, the rule engine has rich and expandable strategy capability, supports functions such as a user-defined function, a third-party factor and the like, changes rule conditions in real time and realizes second-level issuing of advanced audit strategy modification; in the aspect of business, the rule condition realizes page configuration, and the complex rule expression can be configured, so that the auditing operation is low in learning cost.
Fig. 5, which is described below with reference to fig. 5, illustrates a processing procedure diagram of a data processing method based on a rule engine according to an embodiment of the present application.
In fig. 5, a policy decision platform may be set between a service party and an audit platform as an intermediate layer to implement a process of making a decision on an event of the service party, in a specific implementation, a grpc interface and an MQ message protocol are provided externally, the service party selects an audit resource to report a grpc or an asynchronous message synchronously to implement a policy service, a scene of the event may be judged by calling a service route, the event is judged according to rule conditions, policy judgment is performed according to event factors, each rule condition is responded, the event factors change due to condition results, further, according to process control, a new event after policy judgment may be continuously returned, and further, judgment may be continuously controlled according to event rules.
In addition, the event rules can be configured in real time, so that the configuration is loaded into the event rules in a hot mode, and finally the type of the event is judged so as to be pushed to an auditing platform for further auditing. The event rule may be based on a custom function, an expression DSL, a third-party factor, factor calculation, a basic factor, and third-party factor caching, and may have processing timeliness, and may record details of a hit factor, which is specifically described in the foregoing embodiment.
Corresponding to the above method embodiment, the present application further provides an embodiment of a data processing apparatus based on a rule engine, and fig. 6 shows a schematic structural diagram of a data processing apparatus based on a rule engine provided in an embodiment of the present application. As shown in fig. 6, the apparatus is applied to a policy decision platform, and includes:
the material receiving module 602 is configured to respond to a material auditing request of a target service and receive a material to be audited sent by a service party;
a data extraction module 604, configured to analyze the material to be audited, and extract data to be audited corresponding to the material to be audited;
a data auditing module 606 configured to input the data to be audited into a pre-configured rule engine to obtain a data auditing result of the data to be audited;
and a policy determination module 608 configured to determine a business processing policy of the material to be audited based on the data audit result.
Optionally, the policy determination module 608 is further configured to:
under the condition that the data auditing result is determined to be that the auditing is not passed, determining the business processing strategy of the material to be audited as a material re-auditing strategy;
optionally, the apparatus further comprises:
and the material sending module is configured to send the material to be audited to a target auditing platform based on the material reviewing strategy.
Optionally, the policy determination module 608 is further configured to:
under the condition that the data auditing result is approved, determining the service processing strategy of the material to be audited as a material issuing strategy;
optionally, the apparatus further comprises:
and the material issuing module is configured to issue the material to be audited to the service platform of the service party based on the material issuing strategy.
Optionally, the data extracting module 604 is further configured to:
determining a data extraction rule of the target service, wherein the data extraction rule comprises at least one of a service party attribute information extraction rule, a material data extraction rule and a third-party data extraction rule associated with a service party;
and extracting the data to be audited corresponding to the material to be audited based on the data extraction rule.
Optionally, the data auditing module 606 is further configured to:
determining at least one service auditing rule corresponding to the target service;
and obtaining a data auditing result of the to-be-audited data based on the to-be-audited data and the at least one business auditing rule.
Optionally, the business audit rule includes a business decision factor;
optionally, the data auditing module 606 is further configured to:
determining a target business audit rule in the at least one business audit rule;
determining an element to be audited in the data to be audited based on a business decision factor corresponding to the target business audit rule;
determining a data auditing sub-result corresponding to the target service auditing rule based on the target service auditing rule and the element to be audited;
and obtaining a data auditing result of the to-be-audited data based on the data auditing sub-result corresponding to each target service auditing rule.
Optionally, the data auditing module 606 is further configured to:
under the condition that the target service auditing rule comprises at least two service decision factors, processing the at least two service decision factors based on the preset operation rule to obtain a reference decision factor expression;
determining a data auditing sub-result corresponding to the target service auditing rule based on the reference decision factor expression and the element to be audited;
the preset operation rule comprises a logic operation rule and/or a four-rule operation rule.
Optionally, the apparatus further comprises:
the rule configuration module is configured to respond to an adjusting instruction of a user in a rule configuration platform aiming at the business auditing rule;
adjusting a target service decision factor in the service auditing rule based on factor attribute information carried in the adjustment instruction to obtain a target service auditing rule of the target service;
and displaying the target service auditing rule on the rule configuration platform.
According to the data processing device based on the rule engine, the audit strategy is converged through the policy decision platform realized based on the rule engine and is uniformly maintained by audit operation, and a business party does not need to pay attention to the audit strategy; meanwhile, the rule engine has rich and expandable strategy capability, supports functions such as a self-defined function, a third-party factor and the like, changes the rule conditions in real time, and realizes the second-level issuing of the advanced audit strategy modification; in the aspect of business, the rule condition realizes page configuration, and the complex rule expression can be configured, so that the auditing operation is low in learning cost.
The above is an illustrative scheme of a data processing apparatus based on a rule engine according to the embodiment. It should be noted that the technical solution of the data processing device based on the rule engine belongs to the same concept as the technical solution of the data processing method based on the rule engine, and details of the technical solution of the data processing device based on the rule engine, which are not described in detail, can be referred to the description of the technical solution of the data processing method based on the rule engine.
Fig. 7 illustrates a block diagram of a computing device 700 provided according to an embodiment of the present application. The components of the computing device 700 include, but are not limited to, memory 710 and a processor 720. Processor 720 is coupled to memory 710 via bus 730, and database 750 is used to store data.
Computing device 700 also includes access device 740, access device 740 enabling computing device 700 to communicate via one or more networks 760. Examples of such networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The Access device 740 may include one or more of any type of network interface (e.g., a network interface controller) that may be wired or Wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) Wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a bluetooth interface, a Near Field Communication (NFC) interface, and so forth.
In one embodiment of the application, the above-described components of the computing device 700 and other components not shown in fig. 7 may also be connected to each other, for example, by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 7 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 700 may be any type of stationary or mobile computing device, including a mobile Computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop Computer or Personal Computer (PC). Computing device 700 may also be a mobile or stationary server.
Wherein processor 720, when executing the computer instructions, performs the steps of the rule engine-based data processing method.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the data processing method based on the rule engine belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the data processing method based on the rule engine.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and the computer instructions, when executed by a processor, implement the steps of the rule engine-based data processing method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the data processing method based on the rule engine, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the data processing method based on the rule engine.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.

Claims (11)

1. A data processing method based on a rule engine is applied to a policy decision platform and comprises the following steps:
responding to a material auditing request of a target service, and receiving a material to be audited sent by a service party;
analyzing the material to be audited, and extracting data to be audited corresponding to the material to be audited;
inputting the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited;
and determining a business processing strategy of the material to be audited based on the data auditing result.
2. The method according to claim 1, wherein the determining a business processing policy for the material to be audited based on the data audit result comprises:
determining that the service processing strategy of the material to be audited is a material re-auditing strategy under the condition that the data auditing result is determined to be that the auditing is not passed;
correspondingly, after determining the business processing policy of the material to be audited based on the data auditing result, the method further includes:
and sending the material to be audited to a target auditing platform based on the material re-auditing strategy.
3. The method according to claim 1, wherein the determining a business processing policy of the material to be audited based on the data audit result comprises:
under the condition that the data auditing result is approved, determining the service processing strategy of the material to be audited as a material issuing strategy;
correspondingly, after determining the business processing policy of the material to be audited based on the data auditing result, the method further includes:
and issuing the material to be audited to the service platform of the service party based on the material issuing strategy.
4. The method according to any one of claims 1 to 3, wherein the analyzing the material to be audited and extracting the data to be audited corresponding to the material to be audited includes:
determining a data extraction rule of the target service, wherein the data extraction rule comprises at least one of a service party attribute information extraction rule, a material data extraction rule and a third-party data extraction rule associated with a service party;
and extracting the data to be audited corresponding to the material to be audited based on the data extraction rule.
5. The method according to claim 1, wherein the inputting the data to be audited into a pre-configured rule engine to obtain a data audit result of the data to be audited includes:
determining at least one service auditing rule corresponding to the target service;
and obtaining a data auditing result of the to-be-audited data based on the to-be-audited data and the at least one business auditing rule.
6. The method of claim 5, wherein the business audit rule comprises a business decision factor;
the obtaining a data auditing result of the to-be-audited data based on the to-be-audited data and the at least one business auditing rule includes:
determining a target business audit rule in the at least one business audit rule;
determining elements to be checked in the data to be checked based on business decision factors corresponding to the target business checking rules;
determining a data auditing sub-result corresponding to the target service auditing rule based on the target service auditing rule and the element to be audited;
and obtaining a data auditing result of the to-be-audited data based on the data auditing sub-result corresponding to each target business auditing rule.
7. The method according to claim 6, wherein the determining, based on the target service audit rule and the element to be audited, a data audit sub-result corresponding to the target service audit rule includes:
under the condition that the target service auditing rule comprises at least two service decision factors, processing the at least two service decision factors based on the preset operation rule to obtain a reference decision factor expression;
determining a data auditing sub-result corresponding to the target service auditing rule based on the reference decision factor expression and the element to be audited;
the preset operation rule comprises a logic operation rule and/or a four-rule operation rule.
8. The method of claim 5, further comprising:
responding to an adjusting instruction of a user in a rule configuration platform aiming at the business auditing rule;
adjusting a target service decision factor in the service auditing rule based on factor attribute information carried in the adjustment instruction to obtain a target service auditing rule of the target service;
and displaying the target service auditing rule on the rule configuration platform.
9. A data processing device based on a rule engine is applied to a policy decision platform and comprises the following components:
the material receiving module is configured to respond to a material auditing request of the target service and receive a material to be audited sent by a service party;
the data extraction module is configured to analyze the material to be audited and extract the data to be audited corresponding to the material to be audited;
the data auditing module is configured to input the data to be audited into a preset rule engine to obtain a data auditing result of the data to be audited;
and the strategy determining module is configured to determine a business processing strategy of the material to be audited based on the data auditing result.
10. A computing device comprising a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-8 when executing the computer instructions.
11. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 8.
CN202211467417.XA 2022-11-22 2022-11-22 Data processing method and device based on rule engine Pending CN115840765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211467417.XA CN115840765A (en) 2022-11-22 2022-11-22 Data processing method and device based on rule engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211467417.XA CN115840765A (en) 2022-11-22 2022-11-22 Data processing method and device based on rule engine

Publications (1)

Publication Number Publication Date
CN115840765A true CN115840765A (en) 2023-03-24

Family

ID=85576301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211467417.XA Pending CN115840765A (en) 2022-11-22 2022-11-22 Data processing method and device based on rule engine

Country Status (1)

Country Link
CN (1) CN115840765A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116861198A (en) * 2023-09-01 2023-10-10 北京瑞莱智慧科技有限公司 Data processing method, device and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116861198A (en) * 2023-09-01 2023-10-10 北京瑞莱智慧科技有限公司 Data processing method, device and storage medium

Similar Documents

Publication Publication Date Title
CN104735468B (en) A kind of method and system that image is synthesized to new video based on semantic analysis
US10078843B2 (en) Systems and methods for analyzing consumer sentiment with social perspective insight
KR20220041704A (en) Multi-model training method and device based on feature extraction, an electronic device, and a medium
CN112749326B (en) Information processing method, information processing device, computer equipment and storage medium
JP7112537B2 (en) Information processing method and device, electronic device, computer-readable storage medium and program
US20190050376A1 (en) Automatic value formatting based on intrinsic structural semantics
US20200067860A1 (en) File sending in instant messaging application
AU2014400621A1 (en) System and method for providing contextual analytics data
CN109753424B (en) AB test method and device
CN113408208A (en) Model training method, information extraction method, related device and storage medium
CN113535749A (en) Query statement generation method and device
CN115840765A (en) Data processing method and device based on rule engine
CN114416926A (en) Keyword matching method and device, computing equipment and computer readable storage medium
US20220121665A1 (en) Computerized Methods and Systems for Selecting a View of Query Results
US20210124752A1 (en) System for Data Collection, Aggregation, Storage, Verification and Analytics with User Interface
CN108153745B (en) Application data calling method and application development system
CN112883088B (en) Data processing method, device, equipment and storage medium
WO2022206307A1 (en) Method for electronic messaging using image based noisy content
CN115242787A (en) Message processing system and method
CN114153547A (en) Management page display method and device
CN114185915A (en) Service processing method and device
US20200389334A1 (en) Web meeting bookmarking system based on level of relevancy and importance
KR101862178B1 (en) Method for customized posting and server implementing the same
CN113297306B (en) Data processing method and device
CN114706960B (en) File information checking method based on cloud computing and file checking terminal

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