CN110348669A - Intelligent rules generation method, device, computer equipment and storage medium - Google Patents
Intelligent rules generation method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110348669A CN110348669A CN201910433971.8A CN201910433971A CN110348669A CN 110348669 A CN110348669 A CN 110348669A CN 201910433971 A CN201910433971 A CN 201910433971A CN 110348669 A CN110348669 A CN 110348669A
- Authority
- CN
- China
- Prior art keywords
- factor
- rule
- field
- candidate factors
- preset
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2457—Query processing with adaptation to user needs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/252—Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0639—Performance analysis of employees; Performance analysis of enterprise or organisation operations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/10—Office automation; Time management
- G06Q10/103—Workflow collaboration or project management
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Strategic Management (AREA)
- Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- General Physics & Mathematics (AREA)
- Economics (AREA)
- Data Mining & Analysis (AREA)
- Educational Administration (AREA)
- Tourism & Hospitality (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Operations Research (AREA)
- Quality & Reliability (AREA)
- Development Economics (AREA)
- General Engineering & Computer Science (AREA)
- Game Theory and Decision Science (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The embodiment of the present application belongs to big data technical field, it is related to a kind of intelligent rules generation method, including carrying out field slicing treatment to collected business datum to extract slice field, the slice field meets the field definition in the Field Inquiry library of the corresponding procedure links of the business datum;Candidate factors are constructed according to the value of the slice field of extraction, and ratio characteristics library is written into the candidate factors;The candidate factors in the ratio characteristics library are evaluated according to preset evaluation function, and acailable factor is selected from the candidate factors according to evaluation result;The newborn rule of generation is combined to the acailable factor selected according to preset combinational algorithm.The application also provides a kind of intelligent rules generating means, computer equipment and storage medium.The application realizes automatically generating for business rule, reduces workload, improves work efficiency, and does not depend on the experience of people, improves the accuracy of rule.
Description
Technical field
This application involves big data technical field more particularly to a kind of intelligent rules generation methods, device, computer equipment
And storage medium.
Background technique
With the raising of IT application in enterprises degree, many business rules generated in the operation of enterprise can pass through rule
Then engine is regular to execute these, to meet enterprise's flexibly quick commercial requirements.Therefore rule factor is write, manages and is answered
With becoming enterprise's issues that need special attention.
In the prior art, the production method of rule factor is first by business personnel to propose business rule mostly, then by technology
Personnel's redaction rule is then introduced into regulation engine executing rule.With the continuous development of business, business rule also constantly variation,
Increase, since in the prior art, business rule relies on the experience of people, and not only subjectivity is higher, risk adaptability is poor, Er Qiegong
Work amount is big, low efficiency.
Summary of the invention
The purpose of the embodiment of the present application is to propose a kind of intelligent rules generation method, device, computer equipment and storage
Medium, to solve in the prior art excessively to rely on business rule the experience of people, not only subjectivity is higher, risk adaptability compared with
Difference, and the problem of heavy workload, low efficiency.
In order to solve the above-mentioned technical problem, the embodiment of the present application provides a kind of intelligent rules generation method, including following steps
It is rapid:
Field slicing treatment is carried out to collected business datum to extract slice field, the slice field meets described
The field definition in the Field Inquiry library of the corresponding procedure links of business datum;
Candidate factors are constructed according to the value of the slice field of extraction, and ratio characteristics library is written into the candidate factors;
The candidate factors in the ratio characteristics library are evaluated according to preset evaluation function, and according to evaluation result
Acailable factor is selected from the candidate factors;
The newborn rule of generation is combined to the acailable factor selected according to preset combinational algorithm.
Further, the value of the slice field according to extraction constructs candidate factors, and the candidate factors are written
The step of ratio characteristics library includes:
The value of the slice field is stored in specified data platform as the initial factor;
The initial factor in the data platform is pre-processed according to preset preprocessing rule;
The pretreated initial factor calculate according to setting factor beforehand developing algorithm and obtains candidate factors;
Ratio characteristics library is written into according to preset character format in the candidate factors.
It is further, described that the candidate factors in the ratio characteristics library are evaluated according to preset evaluation function,
And the step of selecting acailable factor from the candidate factors according to evaluation result, includes:
The initial factor is evaluated using default evaluation function, formula is as follows:
It selects evaluation score and reaches the candidate factors of preset value as acailable factor;
Wherein, Q is evaluation score, and p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor,
The positive number of cases of covering of the entire sample of P, N are the negative number of cases of covering of entire sample, and W is covering weight, and value is the default of 0 < W < 1
Value.
Further, which is characterized in that it is described according to preset evaluation function in the ratio characteristics library it is candidate because
Son is evaluated, and according to evaluation result after the step of selecting acailable factor in the candidate factors, the method is also wrapped
It includes:
Judge whether to have selected the acailable factor that evaluation score reaches the preset value;
If so, described be combined according to preset combinational algorithm to the acailable factor selected of triggering generates newborn rule
Otherwise step reduces sample or is evaluated the positive number of cases of covering of the factor;
Judge whether the positive number of cases of covering after reducing is lower than preset threshold, if so, determining this regular failed regeneration, exits
The process that this rule generates, otherwise triggers the step for selecting acailable factor from the candidate factors according to evaluation result
Suddenly.
Further, the step for generating newborn rule is combined to the acailable factor selected according to preset combinational algorithm
Include:
The acailable factor selected is formed into acailable factor list;
The acailable factor in the acailable factor list is combined using preset greedy search and distributed algorithm
Obtain multiple rules;
Beta pruning is carried out to the multiple rule using beta pruning function, and extracts the maximum rule of beta pruning functional value as newborn
Rule.
Further, described the step of carrying out beta pruning to the multiple rule using beta pruning function, includes:
The beta pruning letter of rule after being deleted using beta pruning function F=(p-n)/(p+n) calculating meta-rule and each factor
Number;
Wherein, p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor.
Further, described the step of field slicing treatment is carried out to extract slice field to collected business datum,
Include:
Obtain business datum;
Create the asynchronous slice task of the business datum;
The asynchronous slice task is transferred, service link locating for the business datum being related to according to the asynchronous slice task
It determines and inquires corresponding Field Inquiry library;
Meet the field in the Field Inquiry library from extraction logic in the business datum using Java reflection mechanism to determine
The slice field of justice.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of intelligent rules generating means, uses such as
The lower technical solution:
The intelligent rules generating means include:
Feature library module, the value for the slice field according to extraction constructs candidate factors, and the candidate factors are write
Enter ratio characteristics library;
Selecting predictors module, for being commented according to preset evaluation function the candidate factors in the ratio characteristics library
Valence, and acailable factor is selected from the candidate factors according to evaluation result;
Rule generation module, for being combined create-rule to the acailable factor selected.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of computer equipment, uses as described below
Technical solution:
Including memory and processor, computer program is stored in the memory, the processor executes the meter
The step of realizing foregoing intelligent rules generation method when calculation machine program.
In order to solve the above-mentioned technical problem, the embodiment of the present application also provides a kind of computer readable storage medium, uses
Technical solution as described below:
Computer program is stored on the computer readable storage medium, when the computer program is executed by processor
The step of realizing intelligent rules generation method as described above.
Compared with prior art, the embodiment of the present application mainly have it is following the utility model has the advantages that
Automatically generating for business rule is realized, workload is reduced, is improved work efficiency, and does not depend on the warp of people
It tests, improves the accuracy of rule.And the self study that can be realized rule is adaptive, is capable of the valve of accurate prediction rule setting
Value reduces artificial investment and trial and error cost.
Detailed description of the invention
It, below will be to needed in the embodiment of the present application description in order to illustrate more clearly of the scheme in the application
Attached drawing makees a simple introduction, it should be apparent that, the accompanying drawings in the following description is some embodiments of the present application, for this field
For those of ordinary skill, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is according to the flow chart of one embodiment of the intelligent rules generation method of the application;
Fig. 3 is a kind of flow chart of specific embodiment of step 201 in Fig. 2;
Fig. 4 is a kind of flow chart of specific embodiment of step 203 in Fig. 2;
Fig. 5 is the structural schematic diagram according to one embodiment of the intelligent rules generating means of the application;
Fig. 6 is the structural schematic diagram according to one embodiment of the computer equipment of the application.
Specific embodiment
Unless otherwise defined, all technical and scientific terms used herein and the technical field for belonging to the application
The normally understood meaning of technical staff is identical;It is specific that description is intended merely in the term used in the description of application herein
Embodiment purpose, it is not intended that in limitation the application;The description and claims of this application and above-mentioned Detailed description of the invention
In term " includes " and " having " and their any deformation, it is intended that cover and non-exclusive include.The application's says
Bright book and claims or term " first " in above-mentioned attached drawing, " second " etc. rather than are used for distinguishing different objects
In description particular order.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments
It is contained at least one embodiment of the application.Each position in the description occur the phrase might not each mean it is identical
Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and
Implicitly understand, embodiment described herein can be combined with other embodiments.
In order to make those skilled in the art more fully understand application scheme, below in conjunction with attached drawing, to the application reality
The technical solution applied in example is clearly and completely described.
As shown in Figure 1, system architecture 100 may include terminal device 101,102,103, network 104 and server 105.
Network 104 between terminal device 101,102,103 and server 105 to provide the medium of communication link.Network 104 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 101,102,103 and be interacted by network 104 with server 105, to receive or send out
Send message etc..Various telecommunication customer end applications can be installed, such as web browser is answered on terminal device 101,102,103
With, shopping class application, searching class application, instant messaging tools, mailbox client, social platform software etc..
Terminal device 101,102,103 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, E-book reader, MP3 player (Moving Picture Experts
Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture
Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) it is player, on knee portable
Computer and desktop computer etc..
Server 105 can be to provide the server of various services, such as to showing on terminal device 101,102,103
The page provides the background server supported.
It should be noted that intelligent rules generation method provided by the embodiment of the present application is generally executed by terminal device,
Correspondingly, intelligent rules generating means are generally positioned in terminal device.
It should be understood that the number of terminal device, network and server in Fig. 1 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
With continued reference to Fig. 2, the flow chart of one embodiment of the method generated according to the intelligent rules of the application is shown.
The intelligent rules generation method, comprising the following steps:
Step 201, field slicing treatment is carried out to extract slice field, the slice field to collected business datum
Meet the field definition in the Field Inquiry library of the corresponding procedure links of the business datum.
In the present embodiment, (such as terminal shown in FIG. 1 is set the electronic equipment of intelligent rules generation method operation thereon
It is standby) data interaction can be carried out by wired connection mode or radio connection and server.It should be pointed out that above-mentioned
Radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection,
UWB (ultra wideband) connection and other currently known or exploitation in the future radio connections.
In practical application, by taking settlement of insurance claim as an example, it includes: link of reporting a case to the security authorities that operation flow, which relates to, surveys link, setting loss link,
Link is adjusted, a series of flow processing, each process such as payment link are directed to the interaction of the data of bottom, in order to which handle is worked as
When each link data field store, need to business datum carry out slicing treatment.
In the present embodiment, referring to Fig. 3, step 201 specifically comprises the following steps:
Step 2011 obtains business datum.
In practical application, specific business datum includes the business datum of the new creation business of business personnel's input, may be used also
To include the business datum of intelligent engine return being finished.
The asynchronous slice task of step 2012, the creation business datum.
In practical application, in order to avoid short time a large amount of database manipulation, asynchronous task can establish, asynchronous task can
With with caching mechanism, message queue in this way is first placed data into message queue, then slowly processing write-in database again.This
Kind of task processing mode all operations such as does not have to and all finishes, so that it may respond user's request, better user experience.
In the present embodiment, the processing of asynchronous slice task can be realized based on the producer consumer mode of oracle.This
In asynchronous slice task refer to a slice task established to each business datum, then send the slice task to
In message queue, each slice task in the message queue is an asynchronous slice task.
Specifically, the step 2012 specifically includes:
Create the field slice task of the business datum;
It sends field slice task in the message queue of kafka;
It sends the message queue in the kafka in HDFS file.
Step 2013 transfers the asynchronous slice task, locating for the business datum being related to according to the asynchronous slice task
Service link determine and inquire corresponding Field Inquiry library.
In the present embodiment, a complete operation flow includes different processing links, the business datum that each link is related to
Difference, corresponding Field Inquiry library are also different.It such as reports a case to the security authorities link, business datum includes: time of reporting a case to the security authorities, place of reporting a case to the security authorities, reporter
Deng;The business datum of prospecting link includes: prospecting personnel, prospecting object, prospecting time, surveys etc., therefore two business
The field stored in the Field Inquiry library of link is not also identical.
In practical application, which is usually located in underlying database.
Step 2014 is met in the Field Inquiry library using Java reflection mechanism from extraction logic in the business datum
Field definition slice field.
In the present embodiment, can use Java reflection mechanism realize data extraction, the mechanism in operating status, for
Any one class can know all properties and method of this class;And class defines all data of the object of the category
The operation that can be completed, therefore for any one object of the category, its arbitrary data and attribute can be called.
In the present embodiment, the step 2014 includes:
The field slice task is read from HDFS file;
Meet the field in the Field Inquiry library from extraction logic in the business datum using Java reflection mechanism to determine
The slice field of justice.
Step 202, candidate factors are constructed according to the value of the slice field of extraction, and the candidate factors write-in factor is special
Levy library.
In the present embodiment, referring to Fig. 4, step 202 includes:
The value of the slice field of extraction is stored in specified data platform by step 2021.
In the present embodiment, the value of the field of extraction can be stored in MongoDB distributed data base.
Step 2022 pre-processes the initial factor in the data platform according to preset preprocessing rule.
In practical application, when establishing ratio characteristics library, first the initial factor for searching for data platform can be located in advance
Reason.
In the present embodiment, preprocessing rule includes:
Filling missing values: refer to the Missing Data Filling in the initial factor, to avoid there are various mistakes.Commonly
Method has filling default value, mean value, mode, KNN filling etc.;
Replace extremum: extremum includes maximum value and minimum value, can be replaced with average or forward and backward value;
Data branch mailbox: referring to and the initial factor classified according to certain rule, can be according to the initial factor in the present embodiment
Type and business meaning carry out complicated and simple branch mailbox two ways.
Step 2023, the pretreated initial factor calculate according to setting factor beforehand developing algorithm obtain it is candidate because
Son.
In practical application, which can be to dominate to be designed with expertise, such as calculate time difference, gold
Volume ratio and judge whether certificate number and cell-phone number are consistent etc.;
Ratio characteristics library is written according to preset character format in the candidate factors by step 2024.
In practical application, this step can by the factor constructed according to preset character format (including factor names, because
Subsymbol and factor values) write-in ratio characteristics library.
Step 203 evaluates the candidate factors in the ratio characteristics library according to preset evaluation function, and according to
Evaluation result selects acailable factor from the candidate factors.
In the present embodiment, it can use evaluation function then candidate factors evaluated, select evaluation score and reach pre-
If the candidate factors of value are as acailable factor.
Wherein, the formula of preset evaluation function is as follows:
Wherein, Q is evaluation score, and p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor,
The positive number of cases of covering of the entire sample of P, N are the negative number of cases of covering of entire sample, and W is covering weight, and value is the default of 0 < W < 1
Value, W value is bigger, and coverage is bigger, and precision is smaller.
In the present embodiment, after step 203 before step 204, following steps can be increased newly:
E1, judge whether to have selected the acailable factor that evaluation score reaches the preset value, it is no if executing step 204
Then follow the steps E2;
E2, it reduces sample or is evaluated the positive number of cases of covering of the factor;
In practical application, covered when the reduced ratio for covering positive number of cases can be set, such as reducing last calculate every time
Cover the 10% of positive number of cases.
E3, judge whether the positive number of cases of covering after reducing is lower than preset threshold, if so, determine this regular failed regeneration,
The process that this rule generates is exited, it is no to then follow the steps 203.
Step 204 is combined the newborn rule of generation to the acailable factor selected according to preset combinational algorithm.
Specifically, this step includes:
The acailable factor selected is formed into acailable factor list;
The factor in the acailable factor list is combined to obtain using preset greedy search and distributed algorithm
Multiple rules;
Beta pruning is carried out to the multiple rule using beta pruning function, and extracts the maximum rule of beta pruning functional value as newborn
Rule.
In practical application, processing create-rule directly can be carried out to the factor using greedy search and distributed algorithm,
Specified factor first can be searched for using beam search within the specified range, then using greedy search and distributed algorithm to because
Son carries out processing create-rule.
Wherein, greedy search refers to when to problem solving, always makes and is currently appearing to be best selection, that is,
All taken in the selection of each step preferably or the selection of optimal (i.e. most advantageous), thus want to cause the result is that preferably or
The optimal algorithm of person.It should be noted that greedy search is there is no fixed algorithm solution framework, the key of algorithm is greedy strategy
Selection, in practical application, need to select different strategies according to different problems.
Distributed algorithm then refers to that a mass computing task is divided into many parts gives other calculating respectively
Machine/server process, and all calculated result is merged into former solution to the problem.
Greedy search and distributed algorithm are used in combination the present embodiment, and it is excessive caused to can be very good solution calculation amount
The problem of computational efficiency is low, should not safeguard.
Beam search can be to pushed and perform rule beam search, by search obtain it is related because
Son.Such as the beam search to drunk driving rule, obtain drunk driving rule 1 (including the factor: the time of being in danger, whether high speed) ... wine
Regular n (including the factor: whether hitting tree, whether warrantee drives) driven, can therefrom extract to obtain the drunk driving of each drunk driving rule because
Son include: be in danger the time, whether high speed ... whether hit tree, whether warrantee driving.
In practical application, the rule of generation can be counted, the stopping rule after reaching the preset threshold values of rule
It generates and preferentially selects rule according to precision or coverage, that is, select optimal rule.
In the present embodiment, it can use beta pruning function F=(p-n)/(p+n) and calculate after meta-rule and each factor be deleted
Rule beta pruning function, and extract the maximum rule of beta pruning functional value as newborn rule.
Pruning strategy belongs to algorithm optimization scope, can determine which rule combination should be given up by pruning algorithms, which
A little rule combinations should retain.
For example, to a rule G is obtained after acailable factor combination, it comprises the factor Y1, Y2, Y3, Y4, then just needing
The beta pruning function of computation rule G, it is also necessary to calculate the beta pruning function that rule is obtained after deleting each factor respectively, comprising: G1 (packet
Y2 containing the factor, Y3, Y4), G2 (include Y3, Y4), G3 (including Y4), G4 (including Y1, Y3, Y4), G5 include (Y1, Y4) ....
Retain G1 if obtaining the beta pruning function maximum of G1 so, other rules are cast out.
In the present embodiment, after step 204, following steps can also be performed:
Every preset interval time, the rule of generation is once updated.
In practical application, the factor in the data platform can be continuously increased with the time, and one side is more polyfactorial can
The rule of more high accurancy and precision and coverage can be calculated, on the other hand pervious rule may be no longer applicable in, therefore be also required to
Using the data platform the current factor (including the pervious factor and increased factor) according to preset combinational algorithm from
Acailable factor is selected in the data platform and the acailable factor selected is combined and generates new rule, by the optimal of generation
Rule before rule coverage, and the relevant information of the rule is exported, such as rule name, factor for being replaced etc., and
Title, factor of its Substitution Rules etc..
In the present embodiment, after step 204, following steps can also be performed:
The rule of generation is pushed to intelligent engine to execute;
Receive the business datum that intelligent engine returns.
In the present embodiment, after step 204, following steps can also be performed:
The rule of generation is verified, and exports and collects the upper higher rule of precision in verifying.
The intelligent rules generation method of the present embodiment, realizes automatically generating for business rule, reduces workload, improves
Working efficiency, and do not depend on the experience of people, improve the accuracy of rule.And the self study that can be realized rule is adaptive
Threshold values, the artificial investment of reduction and the trial and error cost answered, be capable of accurate prediction rule setting.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, which can be stored in a computer-readable storage and be situated between
In matter, the program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, storage medium above-mentioned can be
The non-volatile memory mediums such as magnetic disk, CD, read-only memory (Read-Only Memory, ROM) or random storage note
Recall body (Random Access Memory, RAM) etc..
It should be understood that although each step in the flow chart of attached drawing is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, can execute in the other order.Moreover, at least one in the flow chart of attached drawing
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, execution sequence, which is also not necessarily, successively to be carried out, but can be with other
At least part of the sub-step or stage of step or other steps executes in turn or alternately.
With further reference to Fig. 5, as the realization to method shown in above-mentioned Fig. 2, it is raw that this application provides a kind of intelligent rules
At one embodiment of device, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, which can specifically apply
In various electronic equipments.
As shown in figure 5, intelligent rules generating means 500 described in the present embodiment include: slicing treatment module 501, feature
Library module 502, selecting predictors module 503 and rule generation module 504.Wherein:
Slicing treatment module 501, for collected business datum carry out field slicing treatment to extract slice field,
The slice field meets the field definition in the Field Inquiry library of the corresponding procedure links of the business datum;
Feature library module 502 constructs candidate factors for the value according to the slice field of extraction, and by the candidate factors
Ratio characteristics library is written;
Selecting predictors module 503, for according to preset evaluation function to the candidate factors in the ratio characteristics library into
Row evaluation, and acailable factor is selected from the candidate factors according to evaluation result;
Rule generation module 504 is new for being combined generation to the acailable factor selected according to preset combinational algorithm
Raw rule.
In the present embodiment, slicing treatment module 501 includes:
Business acquisition submodule, for obtaining business datum;
Task creation submodule, for creating the asynchronous slice task of the business datum;
Inquiry library determines submodule, for transferring the asynchronous slice task, is related to according to the asynchronous slice task
Service link locating for business datum, which determines, inquires corresponding Field Inquiry library;
It is sliced submodule, for extraction logic to meet the field from the business datum using preset access algorithm
Inquire the slice field of the field definition in library.
In practical application, slice submodule can use the extraction that Java reflection mechanism realizes data, which is running
In state, for any one class, all properties and method of this class can be known;And class defines the object of the category
The operation that can complete of all data, therefore for any one object of the category, can call it arbitrary data and
Attribute, the specific method is as follows:
The field slice task is read from HDFS file;
Meet the field in the Field Inquiry library from extraction logic in the business datum using Java reflection mechanism to determine
The slice field of justice.
In the present embodiment, feature library module 502 includes:
Sub-module stored, for the value of the slice field to be stored in specified data platform as the initial factor;
Submodule is pre-processed, it is pre- for being carried out according to preset preprocessing rule to the initial factor in the data platform
Processing;
The factor constructs submodule, obtains for calculate to the pretreated initial factor according to setting factor beforehand developing algorithm
Obtain candidate factors;
Submodule is written in the factor, for ratio characteristics library to be written according to preset character format in the candidate factors.
In the present embodiment, selecting predictors module 503 includes:
Submodule is evaluated, for evaluating using default evaluation function the initial factor, formula is as follows:
Submodule is selected, reaches the candidate factors of preset value as acailable factor for selecting evaluation score.
Wherein, Q is evaluation score, and p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor,
The positive number of cases of covering of the entire sample of P, N are the negative number of cases of covering of entire sample, and W is covering weight, and value is the default of 0 < W < 1
Value.
In the present embodiment, selecting predictors module 503 can also be sentenced including the first judging submodule, adjusting submodule, second
Disconnected submodule:
First judging submodule, the acailable factor for reaching the preset value for judging whether to have selected evaluation score;
When adjusting submodule for the judging result in the first judging submodule is no, reduces sample or be evaluated the factor
The positive number of cases of covering;
Second judgment submodule, for judging whether the positive number of cases of covering after reducing is lower than preset threshold;
The selection submodule is also used to that it is pre- to trigger the basis when the judging result of second judgment submodule is no
If combinational algorithm the step for generating newborn rule is combined to the acailable factor selected;
At this point, the rule generation module, is also used to when the judging result of the first judging submodule is to be, described in triggering
The step for generating newborn rule is combined to the acailable factor selected according to preset combinational algorithm, alternatively, being also used to the
The judging result of two judging submodules is to determine this regular failed regeneration when being, exits the process that this rule generates.
In the present embodiment, rule generation module 504 includes:
List generates submodule, for the acailable factor selected to be formed acailable factor list;
Combinations of factors submodule, for utilizing preset greedy search and distributed algorithm in the acailable factor list
Acailable factor be combined to obtain multiple rules;
Beta pruning submodule for carrying out beta pruning to the multiple rule using beta pruning function, and extracts beta pruning functional value most
Big rule is as newborn rule.
In practical application, the beta pruning submodule carries out beta pruning to the multiple rule using beta pruning function and includes:
The beta pruning letter of rule after being deleted using beta pruning function F=(p-n)/(p+n) calculating meta-rule and each factor
Number;
Wherein, p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor.
In practical application, rule generation module 503 can also include that the factor pre-processes submodule, for establishing factor spy
When levying library, the factor of search data platform is pre-processed in advance.
In the present embodiment, the pretreatment to the factor includes:
Filling missing values: refer to the Missing Data Filling in the factor, to avoid there are various mistakes.Common method
There are filling default value, mean value, mode, KNN filling etc.;
Replace extremum: extremum includes maximum value and minimum value, can be replaced with average or forward and backward value;
Data branch mailbox: referring to and the factor classified according to certain rule, can be according to factor pattern and industry in the present embodiment
Business meaning, carries out complicated and simple branch mailbox two ways.
In practical application, the intelligent rules generating means 500 can also include:
Update module, for triggering the rule of 500 pairs of intelligent rules generating means generations every preset interval time
Then once updated.
In practical application, the intelligent rules generating means 500 can also include:
Pushing module is executed for the rule of generation to be pushed to intelligent engine;
Receiving module, for receiving the business datum of intelligent engine return.
In practical application, the intelligent rules generating means 500 can also include:
Authentication module for verifying to the rule of generation, and exports and collects the upper higher rule of precision in verifying.
The intelligent rules generation method of the present embodiment, realizes automatically generating for business rule, reduces workload, improves
Working efficiency, and do not depend on the experience of people, improve the accuracy of rule.And the self study that can be realized rule is adaptive
Threshold values, the artificial investment of reduction and the trial and error cost answered, be capable of accurate prediction rule setting.
In order to solve the above technical problems, the embodiment of the present application also provides computer equipment.It is this referring specifically to Fig. 6, Fig. 6
Embodiment computer equipment basic structure block diagram.
The computer equipment 6 includes that connection memory 61, processor 62, network interface are in communication with each other by system bus
63.It should be pointed out that the computer equipment 6 with component 61-63 is illustrated only in figure, it should be understood that simultaneously should not
Realistic to apply all components shown, the implementation that can be substituted is more or less component.Wherein, those skilled in the art of the present technique
It is appreciated that computer equipment here is that one kind can be automatic to carry out numerical value calculating according to the instruction for being previously set or storing
And/or the equipment of information processing, hardware include but is not limited to microprocessor, specific integrated circuit (Application
Specific Integrated Circuit, ASIC), programmable gate array (Field-Programmable Gate
Array, FPGA), digital processing unit (Digital Signal Processor, DSP), embedded device etc..
The computer equipment can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The computer equipment can carry out people by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user
Machine interaction.
The memory 61 include at least a type of readable storage medium storing program for executing, the readable storage medium storing program for executing include flash memory,
Hard disk, multimedia card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random are visited
It asks memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed read-only deposit
Reservoir (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 61 can be the computer
The internal storage unit of equipment 6, such as the hard disk or memory of the computer equipment 6.In further embodiments, the memory
61 are also possible to the plug-in type hard disk being equipped on the External memory equipment of the computer equipment 6, such as the computer equipment 6,
Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash
Card) etc..Certainly, the memory 61 can also both including the computer equipment 6 internal storage unit and also including outside it
Portion stores equipment.In the present embodiment, the memory 61 is installed on the operating system of the computer equipment 6 commonly used in storage
With types of applications software, such as the program code of intelligent rules generation method etc..In addition, the memory 61 can be also used for temporarily
When store the Various types of data that has exported or will export.
The processor 62 can be in some embodiments central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 62 is commonly used in the control meter
Calculate the overall operation of machine equipment 6.In the present embodiment, the processor 62 is for running the program generation stored in the memory 61
Code or processing data, such as run the program code of the intelligent rules generation method.
The network interface 63 may include radio network interface or wired network interface, which is commonly used in
Communication connection is established between the computer equipment 6 and other electronic equipments.
Present invention also provides another embodiments, that is, provide a kind of computer readable storage medium, the computer
Readable storage medium storing program for executing is stored with intelligent rules generation method program, and the intelligent rules generation method program can be by least one
It manages device to execute, so that at least one described processor is executed such as the step of above-mentioned intelligent rules generation method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, the technical solution of the application substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes
Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the application.
Obviously, embodiments described above is merely a part but not all of the embodiments of the present application, attached
The preferred embodiment of the application is given in figure, but is not intended to limit the scope of the patents of the application.The application can be with many differences
Form realize, on the contrary, purpose of providing these embodiments is keeps the understanding to disclosure of this application more thorough
Comprehensively.Although the application is described in detail with reference to the foregoing embodiments, for coming for those skilled in the art,
Can still modify to technical solution documented by aforementioned each specific embodiment, or to part of technical characteristic into
Row equivalence replacement.All equivalent structures done using present specification and accompanying drawing content, are directly or indirectly used in other
Relevant technical field, similarly within the application scope of patent protection.
Claims (10)
1. a kind of intelligent rules generation method, which is characterized in that include the following steps:
Field slicing treatment is carried out to extract slice field to collected business datum, the slice field meets the business
The field definition in the Field Inquiry library of the corresponding procedure links of data;
Candidate factors are constructed according to the value of the slice field of extraction, and ratio characteristics library is written into the candidate factors;
The candidate factors in the ratio characteristics library are evaluated according to preset evaluation function, and according to evaluation result from institute
It states and selects acailable factor in candidate factors;
The newborn rule of generation is combined to the acailable factor selected according to preset combinational algorithm.
2. intelligent rules generation method according to claim 1, which is characterized in that the slice field according to extraction
Value building candidate factors, and the step of ratio characteristics library is written in the candidate factors includes:
The value of the slice field is stored in specified data platform as the initial factor;
The initial factor in the data platform is pre-processed according to preset preprocessing rule;
The pretreated initial factor calculate according to setting factor beforehand developing algorithm and obtains candidate factors;
Ratio characteristics library is written into according to preset character format in the candidate factors.
3. intelligent rules generation method according to claim 1, which is characterized in that described according to preset evaluation function pair
Candidate factors in the ratio characteristics library are evaluated, and select acailable factor from the candidate factors according to evaluation result
The step of include:
The initial factor is evaluated using default evaluation function, formula is as follows:
It selects evaluation score and reaches the candidate factors of preset value as acailable factor;
Wherein, Q is evaluation score, and p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor, and P is whole
The positive number of cases of the covering of a sample, N are the negative number of cases of covering of entire sample, and W is covering weight, and value is the preset value of 0 < W < 1.
4. intelligent rules generation method according to claim 3, which is characterized in that described according to preset evaluation function pair
Candidate factors in the ratio characteristics library are evaluated, and select acailable factor from the candidate factors according to evaluation result
The step of after, the method also includes:
Judge whether to have selected the acailable factor that evaluation score reaches the preset value;
If so, triggering is described to be combined the step for generating newborn rule according to preset combinational algorithm to the acailable factor selected
Suddenly, it otherwise reduces sample or is evaluated the positive number of cases of covering of the factor;
Judge whether the positive number of cases of covering after reducing is lower than preset threshold, if so, determining this regular failed regeneration, exits this
The process that rule generates, otherwise triggers described the step of selecting acailable factor from the candidate factors according to evaluation result.
5. intelligent rules generation method according to claim 1, which is characterized in that according to preset combinational algorithm to selecting
Acailable factor be combined and generate the step of newborn rule and include:
The acailable factor selected is formed into acailable factor list;
The acailable factor in the acailable factor list is combined to obtain using preset greedy search and distributed algorithm
Multiple rules;
Beta pruning is carried out to the multiple rule using beta pruning function, and extracts the maximum rule of beta pruning functional value as newborn rule
Then.
6. intelligent rules generation method according to claim 5, which is characterized in that described to utilize beta pruning function to described more
It is a rule carry out beta pruning the step of include:
The beta pruning function of rule after being deleted using beta pruning function F=(p-n)/(p+n) calculating meta-rule and each factor;
Wherein, p is the positive number of cases of covering for being evaluated the factor, and n is the negative number of cases of covering for being evaluated the factor.
7. intelligent rules generation method according to claim 1, which is characterized in that it is described to collected business datum into
The step of row field slicing treatment is to extract slice field, comprising:
Obtain business datum;
Create the asynchronous slice task of the business datum;
The asynchronous slice task is transferred, service link locating for the business datum being related to according to the asynchronous slice task determines
Inquire corresponding Field Inquiry library;
Meet from extraction logic in the business datum field definition in the Field Inquiry library using Java reflection mechanism
It is sliced field.
8. a kind of intelligent rules generating means characterized by comprising
Slicing treatment module, for collected business datum carry out field slicing treatment to extract slice field, it is described to cut
Piece field meets the field definition in the Field Inquiry library of the corresponding procedure links of the business datum;
Feature library module constructs candidate factors for the value according to the slice field of extraction, and by candidate factors write-in because
Subcharacter library;
Selecting predictors module, for being evaluated according to preset evaluation function the candidate factors in the ratio characteristics library,
And acailable factor is selected from the candidate factors according to evaluation result;
Rule generation module, for being combined the newborn rule of generation to the acailable factor selected according to preset combinational algorithm.
9. a kind of computer equipment, including memory and processor, computer program, the processing are stored in the memory
The step of device realizes the intelligent rules generation method as described in any one of claims 1 to 5 when executing the computer program.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program realizes that the intelligent rules as described in any one of claims 1 to 5 generate when the computer program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433971.8A CN110348669B (en) | 2019-05-23 | 2019-05-23 | Intelligent rule generation method, intelligent rule generation device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433971.8A CN110348669B (en) | 2019-05-23 | 2019-05-23 | Intelligent rule generation method, intelligent rule generation device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110348669A true CN110348669A (en) | 2019-10-18 |
CN110348669B CN110348669B (en) | 2023-08-22 |
Family
ID=68174260
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910433971.8A Active CN110348669B (en) | 2019-05-23 | 2019-05-23 | Intelligent rule generation method, intelligent rule generation device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110348669B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100250A (en) * | 2020-11-23 | 2020-12-18 | 支付宝(杭州)信息技术有限公司 | Data processing method and device |
CN113705859A (en) * | 2021-08-05 | 2021-11-26 | 深圳集智数字科技有限公司 | Method and device for predicting influence value of deviation cause, electronic device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003076937A (en) * | 2001-09-06 | 2003-03-14 | Shinichi Morishita | Method and system for extracting association rule and association rule extraction program |
CN108182515A (en) * | 2017-12-13 | 2018-06-19 | 中国平安财产保险股份有限公司 | Intelligent rules engine rule output method, equipment and computer readable storage medium |
CN109409648A (en) * | 2018-09-10 | 2019-03-01 | 平安科技(深圳)有限公司 | Claims Resolution air control method, apparatus, computer equipment and storage medium |
-
2019
- 2019-05-23 CN CN201910433971.8A patent/CN110348669B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003076937A (en) * | 2001-09-06 | 2003-03-14 | Shinichi Morishita | Method and system for extracting association rule and association rule extraction program |
CN108182515A (en) * | 2017-12-13 | 2018-06-19 | 中国平安财产保险股份有限公司 | Intelligent rules engine rule output method, equipment and computer readable storage medium |
CN109409648A (en) * | 2018-09-10 | 2019-03-01 | 平安科技(深圳)有限公司 | Claims Resolution air control method, apparatus, computer equipment and storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112100250A (en) * | 2020-11-23 | 2020-12-18 | 支付宝(杭州)信息技术有限公司 | Data processing method and device |
CN113705859A (en) * | 2021-08-05 | 2021-11-26 | 深圳集智数字科技有限公司 | Method and device for predicting influence value of deviation cause, electronic device and storage medium |
CN113705859B (en) * | 2021-08-05 | 2024-04-19 | 深圳须弥云图空间科技有限公司 | Method and device for predicting influence value of deviation cause, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN110348669B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107967539B (en) | Method for predicting fuel limit of transaction on ether house based on machine learning and block chain technology | |
CN105279535B (en) | A kind of identification code intellectual analysis processing system and its processing method | |
CN109543925A (en) | Risk Forecast Method, device, computer equipment and storage medium based on machine learning | |
CN110532084A (en) | Dispatching method, device, equipment and the storage medium of platform task | |
CN113157947A (en) | Knowledge graph construction method, tool, device and server | |
CN109214730A (en) | Information-pushing method and device | |
CN110288350A (en) | User's Value Prediction Methods, device, equipment and storage medium | |
US11790380B2 (en) | Systems and methods for finding an interaction subset within a set of interactions | |
CN111124917A (en) | Public test case management and control method, device, equipment and storage medium | |
CN109543891A (en) | Method for building up, equipment and the computer readable storage medium of capacity prediction model | |
CN112529477A (en) | Credit evaluation variable screening method, device, computer equipment and storage medium | |
CN110309099A (en) | Interface managerial method, device, equipment and computer readable storage medium | |
CN106897123A (en) | Database operation method and device | |
CN107807935B (en) | Using recommended method and device | |
CN110348669A (en) | Intelligent rules generation method, device, computer equipment and storage medium | |
CN110262975A (en) | Test data management method, device, equipment and computer readable storage medium | |
CN109947811A (en) | Generic features library generating method and device, storage medium, electronic equipment | |
CN116127899A (en) | Chip design system, method, electronic device, and storage medium | |
CN111210332A (en) | Method and device for generating post-loan management strategy and electronic equipment | |
CN114186693B (en) | Scheduling method, system and device of quantum operating system and computer medium | |
CN115794341A (en) | Task scheduling method, device, equipment and storage medium based on artificial intelligence | |
CN110532448B (en) | Document classification method, device, equipment and storage medium based on neural network | |
CN110046636A (en) | Prediction technique of classifying and device, prediction model training method and device | |
CN109241103A (en) | Data expansion querying method, electronic device and computer readable storage medium | |
CN115544146A (en) | Service platform suitable for rapidly adjusting service node interface and service data acquisition method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |