CN108509478A - Fractionation call method, electronic device and the storage medium of regulation engine file - Google Patents

Fractionation call method, electronic device and the storage medium of regulation engine file Download PDF

Info

Publication number
CN108509478A
CN108509478A CN201711186783.7A CN201711186783A CN108509478A CN 108509478 A CN108509478 A CN 108509478A CN 201711186783 A CN201711186783 A CN 201711186783A CN 108509478 A CN108509478 A CN 108509478A
Authority
CN
China
Prior art keywords
rule
keyword
judgment
file
sequence
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
Application number
CN201711186783.7A
Other languages
Chinese (zh)
Other versions
CN108509478B (en
Inventor
刘开华
郑志华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201711186783.7A priority Critical patent/CN108509478B/en
Priority to PCT/CN2018/083085 priority patent/WO2019100646A1/en
Publication of CN108509478A publication Critical patent/CN108509478A/en
Application granted granted Critical
Publication of CN108509478B publication Critical patent/CN108509478B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Abstract

The invention discloses a kind of fractionation call methods of regulation engine file, belong to network technique field.A kind of fractionation call method of regulation engine file, includes the following steps:S1, rules engine service device receive the information to be determined that client is sent;Keyword in S2, extraction information to be determined;S3, corresponding rule file collection is called from default rule library according to the keyword, it includes several Rule of judgment and result for having and being directed toward sexual intercourse that the rule file, which is concentrated,;S4, according to preset loading sequence, the Rule of judgment for including in loading rule file set successively is compared with the keyword;Result corresponding to the rule file for the Rule of judgment composition that S5, output are consistent with the keyword.The present invention is by will rule file classification and sequentially the queue mechanism that loads, guarantee system, only there are one load publication is being carried out compared with small documents, to effectively reduce cpu load, achieve the purpose that system stable operation in sometime point.

Description

Fractionation call method, electronic device and the storage medium of regulation engine file
Technical field
The present invention relates to network technique field, be related to a kind of fractionation call method of regulation engine file, electronic device and Computer readable storage medium.
Background technology
Regulation engine be in response to the core technology component that handles business rule complicated and changeable and design, rule draws The usage scenario held up includes but not limited to following two scenes:1) large batch of flex logic condition judgment;2) it often changes Data calculation.By introducing regulation engine, by part complicated and changeable, dynamic definition and tune by way of flexible configuration It is whole, to ensure that the variation that supporting business needs in time of IT system energy.
But when rule file is excessive (more than 10M), it can cause to lead when supporting rule file load in regulation engine Machine CPU rises violently, and influences the stabilization of system operation.
Found through analysis, the frequency that the consumption of CPU is loaded with rule file fits like a glove, thus now there is an urgent need for be poised for battle under Medicine reduces the consumption of CPU, ensures system stable operation.
Invention content
The technical problem to be solved by the present invention is in order to overcome in the prior art regulation engine supporting big rule file to add The problem of host CPU rises violently when load, it is proposed that a kind of fractionation call method, electronic device and the computer of regulation engine file can Storage medium is read, is reached with Asynchronous loading mode, reduction cpu load by by different business scene split rule file To the purpose of system stable operation.
The present invention is to solve above-mentioned technical problem by following technical proposals:
A kind of fractionation call method of regulation engine file, includes the following steps:
S1, rules engine service device receive the information to be determined that client is sent;
Keyword in S2, extraction information to be determined;
S3, corresponding rule file collection, the rule text are called from default rule library according to the keyword It includes several Rule of judgment and result for having and being directed toward sexual intercourse that part, which is concentrated,;
S4, according to preset loading sequence, the Rule of judgment for including in loading rule file set successively and the keyword It is compared;
Result corresponding to the rule file for the Rule of judgment composition that S5, output are consistent with the keyword.
Preferably, further include before step S1:
S0, preset rules library:Classification is saved into rule file collection after rule file is split as several Rule of judgment In, and loading sequence of the Rule of judgment matching with directive property is given, and to the rule being made of several Rule of judgment File is associated with corresponding result.
Preferably, step S0 specifically include it is following step by step:
S01, the combination that rule file is split as to several Rule of judgment according to semanteme, and refer to the matching of each Rule of judgment The loading sequence of tropism;
S02, to each Rule of judgment label is matched in one or more dimensions;
S03, the Rule of judgment of all tape labels is divided by preset classification dimension and is saved into corresponding rule In file set, the entitled Rule of judgment of the rule file collection is in matched label in dimension of classifying;
S04, the Rule of judgment duplicate removal for concentrating rule file, at the same the matched load of institute on the Rule of judgment of duplicate removal is suitable The end of sequence is directed toward and starts to be directed toward and is matched on the same Rule of judgment;
S05, the rule file being made of several Rule of judgment is associated with corresponding result.
Preferably, step S2 specifically include it is following step by step:
S21, the word sequence that use of information to be determined participle tool is split as to several word compositions;
S22, by removing the stop words in word sequence, generate and only include the keyword sequence of keyword;
S23, it extracts keyword corresponding with the classification dimension in keyword sequence and comes the keyword sequence First place;
Keyword sequence after S24, output sequence.
Preferably, step S3 specifically include it is following step by step:
First keyword in S31, extraction keyword sequence;
S32, the first keyword is compared with the title of the rule file collection successively;
S33, judge whether the first keyword matches with the title of the rule file collection, if executing step S34 executes step S32 if not;
S34, the rule file collection for calling title and the first keyword to match, and by first keyword from the pass It is deleted in keyword sequence.
Preferably, step S4 specifically include it is following step by step:
S41, several Rule of judgment arranged side by side in the first level that the rule file called is concentrated are obtained as current level;
First Rule of judgment is as current Rule of judgment in S42, the current level of load;
S43, judge whether current Rule of judgment matches with any one keyword in keyword sequence, if executing step Rapid S45 executes step S44 if not;
S44, the current Rule of judgment is kept in, then Rule of judgment of the load after current Rule of judgment is as new Current Rule of judgment, execute step S43;
S45, the keyword to match is deleted from the keyword sequence, current level is reset into described work as Corresponding Rule of judgment is directed toward in the end of the loading sequence of preceding Rule of judgment;
S46, judge whether also have keyword in keyword sequence, if executing step S42, execute step S47 if not;
If S47, to judge whether the rule file being made of temporary several Rule of judgment has corresponding as a result, output If described as a result, otherwise directly terminating.
Preferably, S43 specifically includes following sub-step step by step:
S431, the first keyword obtained in keyword sequence compare keyword as current;
S432, judge current Rule of judgment whether with it is described it is current compare keyword and match, if executing step S435, Step S433 is executed if not;
S433, judge it is current compare whether keyword is the last one keyword in keyword sequence, if executing step Rapid S435 executes step S434 if not;
S434, the keyword obtained after being located at current comparison keyword in keyword sequence are closed as new current comparison Keyword executes step S432;
S435, end.
A kind of electronic device, including memory and processor are stored with and can be executed by the processor on the memory Regulation engine file fractionation calling system, the fractionation calling system of the regulation engine file includes:
Rule file library, for storing rule file collection, the rule file concentration includes several with directive property pass The Rule of judgment and result of system;
Receiving module, the information to be determined for receiving client transmission;
Extraction module, for extracting the keyword in information to be determined;
Calling module, for calling corresponding rule file collection from default rule library according to keyword;
Comparing module is loaded, is used for according to preset loading sequence, the judgement item for including in loading rule file set successively Part is compared with the keyword;
Output module, for exporting the knot corresponding to the rule file of the Rule of judgment being consistent with keyword composition Fruit.
Preferably, the fractionation calling system of the regulation engine file further includes:
Rule file splits module, and rule file is saved into for classification after rule file is split as several Rule of judgment It concentrates, and gives loading sequence of the Rule of judgment matching with directive property, and to the rule being made of several Rule of judgment Then file is associated with corresponding result.
A kind of computer readable storage medium is stored with tearing open for regulation engine file in the computer readable storage medium Point calling system, the fractionation calling system of the regulation engine file can performed by least one processor so that it is described extremely A few processor executes the step of fractionation call method of the regulation engine file as described in any one of aforementioned.
The positive effect of the present invention is that:The present invention is by will rule file classification and the sequentially queue machine that loads System, guarantee system, only there are one load publication is being carried out compared with small documents, to effectively reduce cpu load, are reached in sometime point To the purpose of system stable operation.
Description of the drawings
Fig. 1 shows the hardware structure schematic diagram of one embodiment of electronic device of the present invention;
Fig. 2 shows the program moulds of the fractionation calling system first embodiment of regulation engine file in electronic device of the present invention Block schematic diagram;
Fig. 3 shows the program mould of the fractionation calling system second embodiment of regulation engine file in electronic device of the present invention Block schematic diagram;
Fig. 4 shows the flow chart for splitting call method embodiment one of regulation engine file of the present invention;
Fig. 5 shows the flow chart for splitting call method embodiment two of regulation engine file of the present invention;
Fig. 6 shows the stream for splitting structure rule file library in call method embodiment three of regulation engine file of the present invention Cheng Tu;
Fig. 7 shows in the fractionation call method example IV of regulation engine file of the present invention keyword in information to be determined The flow chart of extraction;
Fig. 8 shows the matched stream of rule file collection in the fractionation call method embodiment five of regulation engine file of the present invention Cheng Tu;
Fig. 9 shows the matched flow chart of result in the fractionation call method embodiment six of regulation engine file of the present invention;
Figure 10 shows the flow for splitting keyword comparison in call method embodiment seven of regulation engine file of the present invention Figure.
Specific implementation mode
It is further illustrated the present invention below by the mode of embodiment, but does not therefore limit the present invention to the reality It applies among a range.
First, the present invention proposes a kind of electronic device.
As shown in fig.1, being the hardware structure schematic diagram of one embodiment of electronic device of the present invention.It is described in the present embodiment Electronic device 2 be it is a kind of can be automatic to carry out numerical computations and/or information processing according to the instruction for being previously set or storing Equipment.For example, it may be smart mobile phone, tablet computer, laptop, desktop computer, rack-mount server, blade type take It is engaged in device, tower server or Cabinet-type server (including the server set that independent server or multiple servers are formed Group) etc..As shown, the electronic device 2 includes at least, but it is not limited to, connection storage can be in communication with each other by system bus The fractionation calling system 20 of device 21, processor 22, network interface 23 and regulation engine file.Wherein:
The memory 21 includes at least a type of computer readable storage medium, and the readable storage medium storing program for executing includes Flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memories etc.), random access storage device (RAM), it is static with Machine accesses memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), may be programmed only Read memory (PROM), magnetic storage, disk, CD etc..In some embodiments, the memory 21 can be the electricity The internal storage unit of sub-device 2, for example, the electronic device 2 hard disk or memory.In further embodiments, the memory 21 can also be the External memory equipment of the electronic device 2, such as the plug-in type hard disk being equipped on the electronic device 2, intelligence Storage card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) Deng.Certainly, the memory 21 can also both include the internal storage unit of the electronic device 2 or be set including its external storage It is standby.In the present embodiment, the memory 21 is installed on the operating system and types of applications of the electronic device 2 commonly used in storage Software, for example, the regulation engine file fractionation calling system 20 program code etc..In addition, the memory 21 can be with For temporarily storing the Various types of data that has exported or will export.
The processor 22 can be in some embodiments central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips.The processor 22 is commonly used in the control electricity The overall operation of sub-device 2, such as execute and carry out data interaction with the electronic device 2 or communicate relevant control and processing Deng.In the present embodiment, the processor 22 is for running the program code stored in the memory 21 or processing data, example The fractionation calling system 20 of regulation engine file as described in running.
The network interface 23 may include radio network interface or wired network interface, which is commonly used in Communication connection is established between the electronic device 2 and other electronic devices.For example, the network interface 23 is used to incite somebody to action by network The electronic device 2 is connected with exterior terminal, between the electronic device 2 and exterior terminal establish data transmission channel and Communication connection etc..The network can be intranet (Intranet), internet (Internet), global system for mobile telecommunications system Unite (Global System of Mobile communication, GSM), wideband code division multiple access (Wideband Code Division Multiple Access, WCDMA), 4G networks, 5G networks, bluetooth (Bluetooth), Wi-Fi etc. is wireless or has Gauze network.
It should be pointed out that Fig. 1 illustrates only the electronic device 2 with component 21-23, it should be understood that not It is required that implement all components shown, the implementation that can be substituted is more or less component.
In the present embodiment, the fractionation calling system 20 for being stored in the regulation engine file in memory 21 can be by It is divided into one or more program module, one or more of program modules are stored in memory 21, and can be by One or more processors (the present embodiment is processor 22) are performed, to complete the present invention.
For example, Fig. 2 shows the program modules of fractionation 20 first embodiment of calling system of the regulation engine file to show It is intended to, in the embodiment, the fractionation calling system 20 of the regulation engine file can be divided into rule file library 201, connect Receive module 202, extraction module 203, calling module 204, load comparing module 205 and output module 206.Wherein, institute of the present invention The program module of title is the series of computation machine program instruction section for referring to complete specific function, than program more suitable for describing institute State implementation procedure of the fractionation calling system 20 of regulation engine file in the electronic device 2.Being described below specifically to introduce The concrete function of described program module 201-206.
The rule file library 201, for storing rule file collection, the rule file concentration includes several with finger To the Rule of judgment and result of sexual intercourse;
The receiving module 202, the information to be determined for receiving client transmission;
The extraction module 203, for extracting the keyword in information to be determined;
The calling module 204, for calling corresponding rule file from default rule library according to keyword Collection;
The load comparing module 205, for according to preset loading sequence, including in loading rule file set successively Rule of judgment is compared with the keyword;
The output module 206, the rule file institute for exporting the Rule of judgment being consistent with keyword composition are right The result answered.
Judge that certain client buys for which activity is vehicle insurance meet by this system by sales force below to do specifically It is bright:
1, the sales agreement that sales force will reach according to it with client, by the visitor of the data input of the client to this system In the end of family, it is assumed that the information of typing be " client belongs to Foshan, and last year is not in danger, the business risk declaration form amount of money be 5682 yuan, Can by being paid on line, ", this information is sent to rules engine service device to initiate to ask by client;
2, rules engine service device extract the crucial phrase in this information at keyword sequence be " Foshan business risk 5682 last year of the amount of money, which is not in danger on line, to be paid ";
3, according to the first keyword " Foshan " in the keyword sequence, the rule file collection in entitled Foshan is recalled;
4, according to preset loading sequence, the Rule of judgment in first level is loaded successively, is obtained the client and is met first Rule of judgment " the business risk declaration form amount of money reaches 5000 " then loads several Rule of judgment of first Rule of judgment direction, It obtains the client and meets the second Rule of judgment " last year is not in danger ", several for reloading pointed by second Rule of judgment are sentenced Broken strip part obtains the client and meets third Rule of judgment " being paid on line ", finally obtains and meet corresponding to these three Rule of judgment As a result, i.e. " giving 100 yuan of telephone charges ";
It should be noted that level described here is divided according to the loading sequence of Rule of judgment;Specifically, first The Rule of judgment of level refers to all set with the first Rule of judgment being directed toward in the Rule of judgment of sexual intercourse, and these are first Second Rule of judgment pointed by a Rule of judgment is then listed as the Rule of judgment of second level, and so on.
5, system exports result " giving 100 yuan of telephone charges " automatically, available by buying vehicle insurance as the client Gift.
In another example Fig. 3 shows the program module of fractionation 20 second embodiment of calling system of the regulation engine file Schematic diagram, in the embodiment, the fractionation calling system 20 of the regulation engine file can also be divided into rule file library 201, receiving module 202, extraction module 203, calling module 204, load comparing module 205, output module 206 and rule file Split module 207.
Wherein, the same aforementioned first embodiments of module 201-206, details are not described herein again.
The rule file splits module 207, is saved into for rule file to be split as classifying after several Rule of judgment Rule file is concentrated, and gives loading sequence of the Rule of judgment matching with directive property, and to by several Rule of judgment institutes The rule file of composition is associated with corresponding result.
Example is connected, the activity that system can participate in client judges, and is to be based on prestoring in rules engine service device Rule file library, several rule file collection are stored in the rule file library, if each rule file concentration include The Rule of judgment that dry rule file obtains after splitting, and the load of the directive property between Rule of judgment is set according to rule file Sequentially, while result corresponding with the rule file that several Rule of judgment are formed is given.
Secondly, the present invention proposes a kind of fractionation call method of regulation engine file.
In embodiment one, as shown in figure 4, the fractionation call method of the regulation engine file includes the following steps:
S1, rules engine service device receive the information to be determined that client is sent;
Keyword in S2, extraction information to be determined;
S3, corresponding rule file collection, the rule text are called from default rule library according to the keyword It includes several Rule of judgment and result for having and being directed toward sexual intercourse that part, which is concentrated,;
S4, according to preset loading sequence, the Rule of judgment for including in loading rule file set successively and the keyword It is compared;The comparison judges whether the Rule of judgment is consistent with the keyword;
Result corresponding to the rule file for the Rule of judgment composition that S5, output are consistent with the keyword;It is described here As a result it is exactly the handling result corresponding to the information to be determined.
It is illustrated for judging the getable gift of client institute after Foshan client buys vehicle insurance below:
Assuming that:
One, client's purchase vehicle insurance meets the following conditions:It is the customer ownership Foshan, last year is not in danger, this purchase Vehicle insurance in the business risk declaration form amount of money be 5682 yuan, by being paid on line.
Two, there is the rule file collection in one entitled " Foshan " in rule file library, the rule file, which is concentrated with, several to be sentenced Broken strip part is ranked sequentially by directive property to be formed for " the business risk declaration form amount of money reaches 5000, and last year is not in danger, and is paid on line " Rule file, and the relevant result of the rule file " giving 100 yuan of telephone charges ".
1, above-mentioned customer information is input to client by sales force, is then sent to aforementioned customer information by client Rules engine service device;
2, rules engine service device extracts the keyword in aforementioned customer information, specially " Foshan business risk amount of money 5682 Last year, which is not in danger on line, to be paid ";
3, according to first keyword Foshan, the rule file collection in entitled " Foshan " is recalled;
4, according to preset loading sequence, the Rule of judgment for including in loading rule file set successively and the keyword into Row compares, and loads the Rule of judgment in first level first, obtains the client and meet the first Rule of judgment " business risk declaration form amount of money Reach 5000 ", then loads several Rule of judgment of first Rule of judgment direction, obtain the client and meet the second judgement item Part " last year is not in danger " reloads several Rule of judgment pointed by second Rule of judgment, obtains the client and meets Three Rule of judgment " are paid " on line, are finally obtained and are met corresponding to these three Rule of judgment as a result, " giving 100 yuan of phones Take ";
5, output result " giving 100 yuan of telephone charges ".
In embodiment two, it is based on the basis of embodiment one, as shown in figure 5, the fractionation of the regulation engine file Call method includes the following steps:
S0, preset rules library:Classification is saved into rule file collection after rule file is split as several Rule of judgment In, and loading sequence of the Rule of judgment matching with directive property is given, and to the rule being made of several Rule of judgment File is associated with corresponding result.
It should be noted that:Fractionation rule file described here only builds in rule file library and subsequently has new rule for the first time It just needs to run when then file is added.
S1-S5 is not as in the first embodiment, repeating herein.
In embodiment three, it is based on the basis of embodiment two, as shown in fig. 6, disclosing the specific structure in rule file library Build process, including it is following step by step:
S01, the combination that rule file is split as to several Rule of judgment according to semanteme, and refer to the matching of each Rule of judgment The loading sequence of tropism;
S02, to each Rule of judgment label is matched in one or more dimensions;
S03, the Rule of judgment of all tape labels is divided by preset classification dimension and is saved into corresponding rule In file set, the entitled Rule of judgment of the rule file collection is in matched label in dimension of classifying;
S04, the Rule of judgment duplicate removal for concentrating rule file, at the same the matched load of institute on the Rule of judgment of duplicate removal is suitable The end of sequence is directed toward and starts to be directed toward and is matched on the same Rule of judgment;The same Rule of judgment described here refers to owning That Rule of judgment remained after identical Rule of judgment duplicate removal;
S05, the rule file being made of several Rule of judgment is associated with corresponding result.
Connect example, it is assumed that there are three rule files as described below, illustrated to the structure in the rule file library:
Rule file one:When Foshan client is when buying vehicle insurance, if the business risk declaration form amount of money of client reaches 5000, go Year is not in danger, and using the mode paid on line, so that it may to give 100 yuan of telephone charges;
Rule file two:When Foshan client is when buying vehicle insurance, if the business risk declaration form amount of money of client reaches 5000, go Year went out nearly, and using the mode paid on line, so that it may to give 2 carwash certificates;
Rule file three:When Shanghai client is when buying vehicle insurance, if the business risk declaration form amount of money of client reaches 5000, go Year is not in danger, and using the mode paid on line, so that it may to give 100 yuan of transportation cards;
1, three rule files are split as to the combination of several Rule of judgment respectively according to semantic rules:" business risk is protected Single amount of money reaches 5000, and last year is not in danger, and is paid on line ", " the business risk declaration form amount of money reaches 5000, and last year went out nearly, on line Payment ", " the business risk declaration form amount of money reaches 5000, and last year is not in danger, and is paid on line ";The load of the directive property each combined is suitable Sequence such as aforementioned sequence;
2, give three groups of Rule of judgment tagged in ownership place dimension respectively:First group and second group of label are all Buddhist Mountain, third group label are Shanghai;
3, all Rule of judgment are divided by ownership place dimension, wherein first group and second group of Rule of judgment all preserve The rule file for entering entitled " Foshan " is concentrated, and third group Rule of judgment is all saved into the rule file collection in entitled " Shanghai " In;
4, the Rule of judgment concentrated to the rule file in entitled " Foshan " carries out duplicate removal, only retains Rule of judgment " business The dangerous declaration form amount of money reaches 5000, and last year is not in danger, and is paid on line, and last year went out nearly ", wherein Rule of judgment " business risk declaration form The amount of money reaches there are two the end directions of 5000 " loading sequences, respectively " last year is not in danger " and " last year went out nearly ", and sentences Broken strip part " paid on line " loading sequence start to be directed toward also there are two, respectively " last year is not in danger " and " last year went out Danger ";The rule file in entitled " Shanghai " concentrates an only rule file, is not necessarily to duplicate removal;
5, the rule that condition " the business risk declaration form amount of money reaches 5000, and last year is not in danger, and is paid on line " is formed be will determine that Then file is associated with result " giving 100 yuan of telephone charges ";It will determine that " the business risk declaration form amount of money reaches 5000 to condition, and last year goes out Cross dangerous, paid on line " rule file that is formed is associated with result " giving 2 carwash certificates ";Will determine that condition, " business risk is protected Single amount of money reaches 5000, and last year is not in danger, and is paid on line " rule file that is formed and result " giving 100 yuan of transportation cards " It is associated.
In example IV, based on the basis of embodiment three, as shown in fig. 7, step S2 specifically include it is following step by step:
S21, the word sequence that use of information to be determined participle tool is split as to several word compositions;
S22, by removing the stop words in word sequence, generate and only include the keyword sequence of keyword;
The stop words refers to the word for not being related to concrete meaning, such as I, thinks equal words.
S23, it extracts keyword corresponding with the classification dimension in keyword sequence and comes the keyword sequence First place;
Keyword sequence after S24, output sequence.
Example is connected, the extraction process of keyword in information to be determined is illustrated:
1, " it is the customer ownership Foshan, last year is not in danger, business risk in the vehicle insurance of this purchase by information to be determined The declaration form amount of money is 5682 yuan, by being paid on line " it is split, composition word sequence " did not had for Foshan last year the customer ownership The business risk declaration form amount of money in the vehicle insurance of this purchase that is in danger is 5682 yuan by being paid on line ";
2, the stop words in word sequence is removed, it is that " Foshan last year is not in danger business risk declaration form gold to generate keyword sequence It is paid on 5682 yuan of lines of volume ";
3, the first place that keyword " Foshan " corresponding with ownership place dimension is discharged to keyword sequence is extracted;(the hypothesis Middle Foshan originally ranks the first, it is assumed that when Foshan comes non-first place originally, needs to be advanced to first place);
4, " Foshan last year is not in danger on 5682 yuan of lines of the business risk declaration form amount of money props up the keyword sequence after output sequence It pays ".
In embodiment five, based on the basis of example IV, as shown in figure 8, step S3 specifically include it is following step by step:
First keyword in S31, extraction keyword sequence;
S32, the first keyword is compared with the title of the rule file collection successively;
S33, judge whether the first keyword matches with the title of the rule file collection, if executing step S34 executes step S32 if not;
S34, the rule file collection for calling title and the first keyword to match, and by first keyword from the pass It is deleted in keyword sequence.
Example is connected, the matching process of rule file collection is illustrated:
1, the head in keyword sequence " Foshan last year be not in danger 5682 yuan of lines of the business risk declaration form amount of money on pay " is extracted A keyword " Foshan ";
2, keyword " Foshan " and the title of rule file collection are compared one by one;
3, the rule file collection in entitled " Foshan " is recalled, and keyword " Foshan " is deleted from aforementioned keyword sequence It removes, i.e., the described keyword sequence becomes " last year be not in danger 5682 yuan of lines of the business risk declaration form amount of money on pay ".
In embodiment six, based on the basis of embodiment five, as shown in figure 9, step S4 specifically include it is following step by step:
S41, several Rule of judgment arranged side by side in the first level that the rule file called is concentrated are obtained as current level;
First Rule of judgment is as current Rule of judgment in S42, the current level of load;
S43, judge whether current Rule of judgment matches with any one keyword in keyword sequence, if executing step Rapid S45 executes step S44 if not;
S44, the current Rule of judgment is kept in, then Rule of judgment of the load after current Rule of judgment is as new Current Rule of judgment, execute step S43;
S45, the keyword to match is deleted from the keyword sequence, current level is reset into described work as Corresponding Rule of judgment is directed toward in the end of the loading sequence of preceding Rule of judgment;
S46, judge whether also have keyword in keyword sequence, if executing step S42, execute step S47 if not;
If S47, to judge whether the rule file being made of temporary several Rule of judgment has corresponding as a result, output If described as a result, otherwise directly terminating.
Example is connected, the matching process of result is illustrated:
1, the first Rule of judgment for including in the first level of the rule file concentration in entitled " Foshan " is obtained, herein only One Rule of judgment " the business risk declaration form amount of money reaches 5000 ";
2, will determine that condition " the business risk declaration form amount of money reaches 5000 " and keyword sequence, " last year is not in danger business risk guarantor Paid on 5682 yuan of lines of single amount of money " in each keyword be compared, the keyword to be matched be " the business risk declaration form amount of money 5682 yuan ";
3, keyword " 5682 yuan of the business risk declaration form amount of money " is deleted from keyword sequence, obtains new keyword sequence " last year be not in danger line on pay ", while the rule file for obtaining entitled " Foshan " concentrates first Rule of judgment " business risk The declaration form amount of money reaches second Rule of judgment pointed by 5000 ", and second Rule of judgment described here has arranged side by side two, Respectively " last year is not in danger " and " last year went out nearly ";
4, the preceding Rule of judgment of ranking " last year is not in danger " and key in second Rule of judgment arranged side by side are obtained Each keyword is compared in word sequence " last year be not in danger line on pay ", and the keyword to be matched is that " last year does not have It is in danger ";(it no longer needs to obtain the posterior Rule of judgment of ranking " last year went out nearly " in second Rule of judgment arranged side by side, it is assumed that Keyword in the preceding Rule of judgment of arranged side by side ranking and keyword sequence all mismatches, and just needs to obtain ranking arranged side by side and exists Rule of judgment afterwards is matched);
5, keyword " last year is not in danger " is deleted from keyword sequence, obtains new keyword sequence and " is propped up on line Pay ", at the same the rule file for obtaining entitled " Foshan " concentrate pointed by second Rule of judgment " last year is not in danger " the Three Rule of judgment " being paid on line ";
6, by the last one pass remaining in third Rule of judgment " being paid on line " and keyword sequence " being paid on line " Keyword is compared, the judgement to be matched;
7, according to aforementioned matching result, it is " business risk declaration form gold to obtain several Rule of judgment by the loading sequence of directive property Volume reaches 5000, and last year is not in danger, and is paid on line " composition rule file corresponding to as a result, " giving 100 yuan of phones Take ";
8, output result " giving 100 yuan of telephone charges ", indicates the prize of 100 yuan of telephone charges of customer acquisition.
In embodiment seven, based on the basis of embodiment six, as shown in Figure 10, S43 specifically includes following son step by step Step:
S431, the first keyword obtained in keyword sequence compare keyword as current;
S432, judge current Rule of judgment whether with it is described it is current compare keyword and match, if executing step S435, Step S433 is executed if not;
S433, judge it is current compare whether keyword is the last one keyword in keyword sequence, if executing step Rapid S435 executes step S434 if not;
S434, the keyword obtained after being located at current comparison keyword in keyword sequence are closed as new current comparison Keyword executes step S432;
S435, end.
Rule is stored in addition, a kind of computer readable storage medium of the present invention, in the computer readable storage medium to draw The fractionation calling system 20 of file is held up, the fractionation calling system 20 of the regulation engine file can be executed by one or more processors When, realize the operation for splitting call method or electronic device of above-mentioned regulation engine file.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that this is only For example, protection scope of the present invention is to be defined by the appended claims.Those skilled in the art without departing substantially from Under the premise of the principle and substance of the present invention, many changes and modifications may be made, but these change and Modification each falls within protection scope of the present invention.

Claims (10)

1. a kind of fractionation call method of regulation engine file, which is characterized in that include the following steps:
S1, rules engine service device receive the information to be determined that client is sent;
Keyword in S2, extraction information to be determined;
S3, corresponding rule file collection, the rule file collection are called from default rule library according to the keyword In include it is several have be directed toward sexual intercourse Rule of judgment and result;
S4, according to preset loading sequence, the Rule of judgment for including in loading rule file set successively and the keyword carry out It compares;
Result corresponding to the rule file for the Rule of judgment composition that S5, output are consistent with the keyword.
2. the fractionation call method of regulation engine file according to claim 1, which is characterized in that also wrapped before step S1 It includes:
S0, preset rules library:Classification is saved into rule file concentration after rule file is split as several Rule of judgment, and Give loading sequence of the Rule of judgment matching with directive property, and to the rule file that is made of several Rule of judgment with Corresponding result is associated.
3. the fractionation call method of regulation engine file according to claim 2, which is characterized in that step S0 is specifically included Below step by step:
S01, the combination that rule file is split as to several Rule of judgment according to semanteme, and match directive property to each Rule of judgment Loading sequence;
S02, to each Rule of judgment label is matched in one or more dimensions;
S03, the Rule of judgment of all tape labels is divided by preset classification dimension and is saved into corresponding rule file It concentrates, the entitled Rule of judgment of the rule file collection is in matched label in dimension of classifying;
S04, the Rule of judgment duplicate removal for concentrating rule file, at the same by the Rule of judgment of duplicate removal matched loading sequence Terminate to be directed toward and start to be directed toward to be matched on the same Rule of judgment;
S05, the rule file being made of several Rule of judgment is associated with corresponding result.
4. the fractionation call method of regulation engine file according to claim 3, which is characterized in that step S2 is specifically included Below step by step:
S21, the word sequence that use of information to be determined participle tool is split as to several word compositions;
S22, by removing the stop words in word sequence, generate and only include the keyword sequence of keyword;
S23, the head that keyword corresponding with the classification dimension in keyword sequence comes the keyword sequence is extracted Position;
Keyword sequence after S24, output sequence.
5. the fractionation call method of regulation engine file according to claim 4, which is characterized in that step S3 is specifically included Below step by step:
First keyword in S31, extraction keyword sequence;
S32, the first keyword is compared with the title of the rule file collection successively;
S33, judge whether the first keyword matches with the title of the rule file collection, if executing step S34, if No execution step S32;
S34, the rule file collection for calling title and the first keyword to match, and by first keyword from the keyword It is deleted in sequence.
6. the fractionation call method of regulation engine file according to claim 5, which is characterized in that step S4 is specifically included Below step by step:
S41, several Rule of judgment arranged side by side in the first level that the rule file called is concentrated are obtained as current level;
First Rule of judgment is as current Rule of judgment in S42, the current level of load;
S43, judge whether current Rule of judgment matches with any one keyword in keyword sequence, if executing step S45 executes step S44 if not;
S44, the current Rule of judgment is kept in, then Rule of judgment of the load after current Rule of judgment is worked as new Preceding Rule of judgment executes step S43;
S45, the keyword to match is deleted from the keyword sequence, current level is reset to and described is currently sentenced Corresponding Rule of judgment is directed toward in the end of the loading sequence of broken strip part;
S46, judge whether also have keyword in keyword sequence, if executing step S42, execute step S47 if not;
If S47, to judge whether the rule file being made of temporary several Rule of judgment has corresponding as a result, described in output If as a result, otherwise directly terminating.
7. the fractionation call method of regulation engine file according to claim 6, which is characterized in that S43 is specific step by step Including following sub-step:
S431, the first keyword obtained in keyword sequence compare keyword as current;
S432, judge current Rule of judgment whether with it is described it is current compare keyword and match, if executing step S435, if not Execute step S433;
S433, judge it is current compare whether keyword is the last one keyword in keyword sequence, if executing step S435 executes step S434 if not;
S434, the keyword obtained after being located at current comparison keyword in keyword sequence are crucial as new current comparison Word executes step S432;
S435, end.
8. a kind of electronic device, including memory and processor, which is characterized in that being stored on the memory can be by the place The fractionation calling system for the regulation engine file that device executes is managed, the fractionation calling system of the regulation engine file includes:
Rule file library, for storing rule file collection, the rule file concentration includes several with direction sexual intercourse Rule of judgment and result;
Receiving module, the information to be determined for receiving client transmission;
Extraction module, for extracting the keyword in information to be determined;
Calling module, for calling corresponding rule file collection from default rule library according to keyword;
Load comparing module, for according to preset loading sequence, the Rule of judgment for including in loading rule file set successively with The keyword is compared;
Output module, for exporting the result corresponding to the rule file of the Rule of judgment being consistent with keyword composition.
9. electronic device according to claim 8, which is characterized in that the fractionation calling system of the regulation engine file is also Including:
Rule file splits module, and rule file collection is saved into for classification after rule file is split as several Rule of judgment In, and loading sequence of the Rule of judgment matching with directive property is given, and to the rule being made of several Rule of judgment File is associated with corresponding result.
10. a kind of computer readable storage medium, which is characterized in that be stored with rule in the computer readable storage medium and draw Hold up the fractionation calling system of file, the fractionation calling system of the regulation engine file can performed by least one processor, So that at least one processor executes the fractionation called side of the regulation engine file as described in any one of claim 1-7 The step of method.
CN201711186783.7A 2017-11-23 2017-11-23 Splitting and calling method of rule engine file, electronic device and storage medium Active CN108509478B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711186783.7A CN108509478B (en) 2017-11-23 2017-11-23 Splitting and calling method of rule engine file, electronic device and storage medium
PCT/CN2018/083085 WO2019100646A1 (en) 2017-11-23 2018-04-13 Method, electronic device, and storage medium for splitting and calling rule engine file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711186783.7A CN108509478B (en) 2017-11-23 2017-11-23 Splitting and calling method of rule engine file, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN108509478A true CN108509478A (en) 2018-09-07
CN108509478B CN108509478B (en) 2021-04-27

Family

ID=63374724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711186783.7A Active CN108509478B (en) 2017-11-23 2017-11-23 Splitting and calling method of rule engine file, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN108509478B (en)
WO (1) WO2019100646A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737439A (en) * 2019-10-18 2020-01-31 四川长虹电器股份有限公司 Equipment control system and method based on rule file

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073721A (en) * 2000-09-05 2002-03-12 Nec Microsystems Ltd Device and method for parallel processiang for layout verification, and recording medium
CN101582064A (en) * 2008-05-15 2009-11-18 阿里巴巴集团控股有限公司 Method and system for processing enormous data
CN102236664A (en) * 2010-04-28 2011-11-09 百度在线网络技术(北京)有限公司 Retrieval system, retrieval method and information processing method based on semantic normalization
CN103473696A (en) * 2013-09-03 2013-12-25 周吉 Method and system for collecting, analyzing and distributing internet business information
US8799448B2 (en) * 2006-12-20 2014-08-05 Microsoft Corporation Generating rule packs for monitoring computer systems
CN105447166A (en) * 2015-12-03 2016-03-30 沈文策 Keyword based information search method and system
US20160162564A1 (en) * 2014-12-09 2016-06-09 International Business Machines Corporation Intelligent xml file fragmentation
CN105786950A (en) * 2015-12-30 2016-07-20 北京锐安科技有限公司 Method and device for processing data
CN106980636A (en) * 2016-07-22 2017-07-25 平安科技(深圳)有限公司 Declaration form data processing method and device
US20170270184A1 (en) * 2016-03-17 2017-09-21 EMC IP Holding Company LLC Methods and devices for processing objects to be searched
CN107346312A (en) * 2016-05-05 2017-11-14 中国移动通信集团内蒙古有限公司 A kind of big data processing method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016170745A (en) * 2015-03-16 2016-09-23 株式会社リコー Terminal device, program, output system, and output method
CN105630617A (en) * 2015-12-28 2016-06-01 山东中创软件工程股份有限公司 Business processing method and system based on rule engine
CN106445626B (en) * 2016-09-30 2020-03-06 北京奇虎科技有限公司 Data analysis method and device
CN106547896A (en) * 2016-11-04 2017-03-29 广州唯品会信息科技有限公司 Rules engine service processing system and method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002073721A (en) * 2000-09-05 2002-03-12 Nec Microsystems Ltd Device and method for parallel processiang for layout verification, and recording medium
US8799448B2 (en) * 2006-12-20 2014-08-05 Microsoft Corporation Generating rule packs for monitoring computer systems
CN101582064A (en) * 2008-05-15 2009-11-18 阿里巴巴集团控股有限公司 Method and system for processing enormous data
CN102236664A (en) * 2010-04-28 2011-11-09 百度在线网络技术(北京)有限公司 Retrieval system, retrieval method and information processing method based on semantic normalization
CN103473696A (en) * 2013-09-03 2013-12-25 周吉 Method and system for collecting, analyzing and distributing internet business information
US20160162564A1 (en) * 2014-12-09 2016-06-09 International Business Machines Corporation Intelligent xml file fragmentation
CN105447166A (en) * 2015-12-03 2016-03-30 沈文策 Keyword based information search method and system
CN105786950A (en) * 2015-12-30 2016-07-20 北京锐安科技有限公司 Method and device for processing data
US20170270184A1 (en) * 2016-03-17 2017-09-21 EMC IP Holding Company LLC Methods and devices for processing objects to be searched
CN107346312A (en) * 2016-05-05 2017-11-14 中国移动通信集团内蒙古有限公司 A kind of big data processing method and system
CN106980636A (en) * 2016-07-22 2017-07-25 平安科技(深圳)有限公司 Declaration form data processing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王信元: "无线Mesh网络入侵检测方法研究", 《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110737439A (en) * 2019-10-18 2020-01-31 四川长虹电器股份有限公司 Equipment control system and method based on rule file

Also Published As

Publication number Publication date
WO2019100646A1 (en) 2019-05-31
CN108509478B (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN107688667A (en) Intelligent robot client service method, electronic installation and computer-readable recording medium
CN109388965B (en) Desensitization method and system for mixed data
CN108509477A (en) Method for recognizing semantics, electronic device and computer readable storage medium
CN108509476A (en) Problem associates method for pushing, electronic device and computer readable storage medium
CN102870116A (en) Method and apparatus for content matching
CN110609908A (en) Case serial-parallel method and device
CN110377651A (en) Processing method, device, equipment and the storage medium of batch data
CN112232070A (en) Natural language processing model construction method, system, electronic device and storage medium
CN109446515A (en) Group information analysis method, electronic device and computer readable storage medium
CN108509478A (en) Fractionation call method, electronic device and the storage medium of regulation engine file
CN106326258B (en) URL matching method and device
US20140032582A1 (en) Matching regular expressions including word boundary symbols
CN111176924A (en) GPU card dropping simulation method, system, terminal and storage medium
CN116302328A (en) Intelligent contract data processing method and system
CN110705258A (en) Text entity identification method and device
CN110390083A (en) Method for pushing, device, computer equipment and the storage medium of approximate case
CN114595047A (en) Batch task processing method and device
CN108256818A (en) Wages computational methods, application server and computer readable storage medium
CN111475488B (en) Data processing method, device, terminal equipment and readable storage medium
CN113961725A (en) Automatic label labeling method, system, equipment and storage medium
CN106102036A (en) A kind of unlocking method and terminal
CN114070791A (en) Data flow rate limiting processing method and device
CN111966755A (en) Block chain-based APP application method, device and system
CN116755805B (en) Resource optimization method and device applied to C++, and resource optimization device applied to C++
CN109062702A (en) A kind of computational resource allocation method, relevant apparatus and readable storage medium storing program for executing

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