CN107291733A - A kind of method and device for rule matching - Google Patents

A kind of method and device for rule matching Download PDF

Info

Publication number
CN107291733A
CN107291733A CN201610197446.7A CN201610197446A CN107291733A CN 107291733 A CN107291733 A CN 107291733A CN 201610197446 A CN201610197446 A CN 201610197446A CN 107291733 A CN107291733 A CN 107291733A
Authority
CN
China
Prior art keywords
rule
undetermined
weighted value
service request
rules
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
CN201610197446.7A
Other languages
Chinese (zh)
Other versions
CN107291733B (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610197446.7A priority Critical patent/CN107291733B/en
Publication of CN107291733A publication Critical patent/CN107291733A/en
Application granted granted Critical
Publication of CN107291733B publication Critical patent/CN107291733B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs

Abstract

The embodiment of the present application provides a kind of method and device for rule matching, this method is when receiving service request, according to the corresponding dimension mark of some pending data information carried in the service request, and the rule set pre-saved, it is determined that some rules undetermined of all dimensions mark carried comprising the service request, finally in each rule undetermined, it is determined that the most rule undetermined of the dimension mark included, as the rule matched with the service request, rule match process is completed.By the above method, it can be identified without manually pre-setting each regular priority according to the dimension included in each rule undetermined, it is determined that the rule matched with the service request.

Description

A kind of method and device for rule matching
Technical field
The application is related to areas of information technology, more particularly to a kind of method and device for rule matching.
Background technology
With the development of informationized society, people are increasingly dependent on various in network processes work and life Affairs, this is allowed for, and enterprise is more to carry out miscellaneous service by network, and a usual business can be according to right The rule execution answered, i.e. according to the initial data of input, after being calculated by rule, exports corresponding knot Really (e.g., insurance premium rate calculates business, according to the data of input:Vehicle color is that red, automobile discharge capacity is big It is that male, automotive vehicle owner's traffic accident incidence are 2 times/year in 3.0L, automotive vehicle owner, then pass through rule Then calculate, it can be deduced that insurance premium improves 100% result).
It can be seen that, under the prospect that the big data epoch arrive, the business that future is carried out by network only can be increasingly Many, just the corresponding quantity for causing rule also can be more and more for this, and renewal also can be more and more frequent.Then, In order to improve business execution efficiency, reduction processing business and updates cost, the fast-changing demand of adaptation business, existing Have in technology, the matching problem between a large amount of rules and business is solved using rule engine technique.
Specifically, in the prior art, the regulation engine receives the corresponding data message of service request to be analyzed (that is, the data message of input), and determine dimension (e.g., the automobile of the corresponding each data of the data message Color, automobile discharge capacity, car owner's sex, data incidence are all the data of different dimensions), according to advance guarantor The rule set and the dimension of each data deposited, the rule for determining to need to use by rule matching method so that The corresponding business of the service request to be analyzed can be performed according to the rule.
For example, for input data A=x, B=y, C=z, there is dimension A, B, C of 3 data, Assuming that there is rule set, as shown in table 1.
Table 1
It can be seen that, the dimension of data is matched with input data in only Rule1, it is possible to it is determined that using Rule1 Handle the corresponding business of the input data.
But, regular it is continuously increased due to foregoing so that the corresponding data letter of the service request to be analyzed Breath may match multiple rules.
Continue to use the example above, it is assumed that now also include Rule6, and the number that Rule6 is included in the rule set According to dimension be (A, B, C, D), then now Rule1 and Rule6 are matched with the input data.
Then, when matching multiple regular, in the prior art, general use passes through work people Member is manually the method for each rule setting priority so that when matching multiple regular, can pass through each rule Priority then determines the rule finally used.Also, due to the rapid growth of regular quantity, this case The probability of appearance also can more and more higher.But, due to manually be each rule setting priority accuracy simultaneously It is not high, it is easily caused the regular accuracy matched and declines.
It can be seen that, in the prior art, when using regulation engine method, due to the priority manually set, Its accuracy is not high, it is possible that the regular accuracy for causing regulation engine to match declines.Based on upper State reason, the problem of rule matching method of prior art has inefficiency, matching precision is low.
The content of the invention
The embodiment of the present application provides a kind of method and device for rule matching, is entering to solve existing regulation engine When line discipline is matched, it can only be led by manually setting each regular priority to determine the rule matched in advance The problem of cause regulation engine is with using cumbersome, operational efficiency, matching precision is low.
A kind of rule matching method that the embodiment of the present application is provided, including:
Service request is received, wherein, the corresponding dimension of some pending data information is carried in the service request Scale is known;
According to the rule set pre-saved, if it is determined that what all dimensions comprising service request carrying were identified Dry rule, is used as rule undetermined;
In each rule undetermined, it is determined that the most rules undetermined of the dimension mark included, as with the business Ask the rule of matching.
A kind of rule match device that the embodiment of the present application is provided, including:
Receiving module, for receiving service request, wherein, some pending numbers are carried in the service request It is believed that ceasing corresponding dimension mark;
Module is investigated, for according to the rule set pre-saved, it is determined that the institute carried comprising the service request Some rules for having dimension to identify, are used as rule undetermined;
Matching module, in each rule undetermined, it is determined that the most rules undetermined of the dimension mark included, It is used as the rule matched with the service request.
The embodiment of the present application provides a kind of method and device for rule matching, this method when receiving service request, According to the corresponding dimension mark of some pending data information carried in the service request, and pre-save Rule set, it is determined that comprising the service request carry all dimensions mark some rules undetermined, finally exist In each rule undetermined, it is determined that the most rule undetermined of the dimension mark included, is matched as with the service request Rule, complete rule match process., can be each regular without manually pre-setting by the above method Priority, is identified according to the dimension included in each rule undetermined, it is determined that the rule matched with the service request.
Brief description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, constitutes one of the application Point, the schematic description and description of the application is used to explain the application, does not constitute to the application not Work as restriction.In the accompanying drawings:
The rule match process that Fig. 1 provides for the embodiment of the present application;
Fig. 2 is that the embodiment of the present application provides a kind of structural representation of rule match device.
Embodiment
In the embodiment of the present application, when receiving service request, it can first determine what is carried in the service request The corresponding dimension mark of each pending data information, afterwards can be according to the rule set pre-saved, it is determined that including Each rule of all dimension marks of the service request, finally just can be according to each rule undetermined as rule undetermined Corresponding dimension mark, it is determined that the most regular rule to be matched with the service request undetermined of correspondence dimension mark Then.It can be seen that, regulation engine, can be without artificial to rule when carrying out rule match using the present processes The each rule concentrated carries out priority setting, and choice accuracy highest rule match gives the service request, The operational efficiency of regulation engine is improved, while also improving matching precision.
It is specifically real below in conjunction with the application to make the purpose, technical scheme and advantage of the application clearer Apply example and technical scheme is clearly and completely described corresponding accompanying drawing.Obviously, it is described Embodiment is only some embodiments of the present application, rather than whole embodiments.Based on the implementation in the application Example, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of the application protection.
The rule match process that Fig. 1 provides for the embodiment of the present application, specifically includes following steps:
S101:Receive service request.
In the embodiment of the present application, matching between service request and rule is generally carried out by regulation engine, and When typically only service request quantity, regular quantity are a lot (that is, when reaching the quantity of enterprise-level), just need Will be using the request of rule engine technique finishing service and matching between rule.So, in this application, can The service request is received by the server of operation rule engine, and can be specifically somebody's turn to do by regulation engine reception Service request.
Further, since the effect of the service request is the regulation engine is determined that one matches with the service request Rule, so carry some pending data messages in the service request, also, due to each data Information is probably the data of different dimensions, so can also be identified by the data message pre-saved with dimension Mapping table, determines the corresponding dimension mark of each data message that the service request is carried.
Wherein, the data message in dimension mark mapping table with that can include mark, the data of data message Coding, dimension mark, span of data message of information etc., the data message is corresponding with dimension mark Relation table can be by manually pre-establishing and being stored in the regulation engine, so that the regulation engine can be distinguished not The data message of same latitude.
For example, it is assumed that the regulation engine A of e-commerce platform have received service request α, wherein, the industry Business request α carries 3 data messages:Seller's identity (identification, id), cashier production Product code, cashier service identification.It is further assumed that the data message in the regulation engine is corresponding with dimension mark Relation table, as shown in table 1.
Data message is identified Data message is encoded Dimension is identified
Seller id sellerId 1
Partner id partnered 2
Platform Type platformtyp 3
Cashier product code product 4
Cashier service identification bizIdentity 5
Table 1
It can be seen that, mapping table is identified by the data message and dimension, regulation engine A can determine this The corresponding dimension of data message that service request α is carried, which is identified, is respectively, and 1,3,5.
It should be noted that the regulation engine can be located in a single equipment, many can also be located at In the system of equipment composition.
S102:According to the rule set pre-saved, it is determined that all dimension marks carried comprising the service request Some rules known, are used as rule undetermined.
In the embodiment of the present application, after it have received the service request, the regulation engine just can be according to advance The rule set of preservation, it is determined that the rule matched with the service request, as rule undetermined, also, with this The rule of service request matching need to include all dimensions mark carried in the service request.
In addition, the rule set is the intersection of strictly all rules in the regulation engine, also, determine for convenience each The data area that the precision and each rule of rule are related to, each rule preserved in the rule set, except Record outside the regular mark and the regular logical operation expression formula, also preserve the rule corresponding The corresponding dimension mark of each data message being related in logical operation expression formula, i.e. the rule includes dimension mark Know.
Specifically, the regulation engine is identified according to all dimensions carried in the service request, the rule is traveled through The strictly all rules of concentration, and the rule comprising all dimensions mark carried in the service request is defined as treating Set pattern then, after the strictly all rules in the rule set is traveled through, determines some rules undetermined.
Continue to use the example above, it is assumed that it is as shown in table 2 to there is rule set in regulation engine A.
Table 2
It can be seen that, regulation engine A can determine each regular corresponding dimension mark by the rule set. Also, because regulation engine A has determined that each dimension that service request α is carried in step S101 Scale is known:1st, 3,5, so regulation engine A can travel through strictly all rules in the rule set, and It is determined that the rule of all dimensions mark comprising the service request is rule undetermined.Then, due to Rule3 and The dimension included in Rule4 identifies 1,3,5 and 1,3,4,5 and includes owning in service request α Dimension is identified, so regulation engine A can determine that Rule3 and Rule4 is rule undetermined.
S103:In each rule undetermined, it is determined that the most rules undetermined of the dimension mark included, as with institute State the rule of service request matching.
In the embodiment of the present application, because the regular quantity preserved in the rule set of the regulation engine can be very It is many, so after regulation engine traversal should press rule set, some rules undetermined may be can determine whether, and by In for each rule undetermined, the rule undetermined is all that all dimensions comprising the service request are identified , it is possible to think that the rule undetermined is matched with service request, i.e. service request can with it is many Individual rule match undetermined.But, due to typically the corresponding industry of the service request can only be performed using a rule Business, so now also needing to determine most accurate rule, and gives the service request by the rule match.
Then, in this application after each rule undetermined is determined, in addition it is also necessary to further determine that each rule undetermined Middle precision highest rule undetermined, and precision highest rule undetermined is matched as with the service request Rule.Think in this application:For each rule, if the dimension mark that the rule is included is more, Illustrate that the limitation that the rule is used is more, then can determine that the regular precision is higher.Then, it is Can be by the service request and the high rule match of precision, therefore in this application, by each rule undetermined Most rules undetermined are identified comprising dimension, as precision highest rule undetermined in each rule undetermined, with this Service request is matched.
Specifically, the application provide it is a kind of determine that dimension mark is most regular method undetermined (that is, it is determined that Precision highest regular method undetermined), first, the regulation engine is every for what is determined in step s 102 Individual rule undetermined, is identified according to the corresponding dimension of strictly all rules in the rule set, determines the rule correspondence undetermined Vector.Wherein, each element in each regular vector undetermined is corresponding with strictly all rules in the rule set Dimension mark is corresponded, also, for each element in each regular vector undetermined, if the element Corresponding dimension mark corresponds to the rule undetermined, then the value of the element is set into 1 (that is, when in the rule When being identified in the presence of the dimension, then determine that the value that the dimension identifies corresponding element is in the vector of the rule 1), if the corresponding dimension mark of the element is not corresponded to and the rule undetermined, the value of the element is set to 0 (that is, when dimension mark is not present in the rule, then determine that the dimension is identified in the vector of the rule 0) value of corresponding element is.By the above method, the regulation engine just can determine that in each regular vector The value of each element, has also determined that each regular vectorial value undetermined.
Secondly, the element of correspondence position enters in the vector that the regulation engine will can be determined for each rule undetermined Row logic or computing, it is determined that final vector, i.e. by comprising all regular all dimensions marks undetermined to Amount, is used as final vector.
Finally, rule undetermined corresponding with the final vector can be defined as corresponding dimension by the regulation engine The most rule undetermined of mark and will it is corresponding with the final vector it is undetermined it is regular as with the service request The rule matched somebody with somebody.
Continue to use the example above, regulation engine A can determine the rule set according to the rule set in table 2 first The corresponding dimension of middle strictly all rules is designated:1st, 2,3,4,5, then, for each rule undetermined, The regulation engine can determine the regular vector undetermined.Specifically, for Rule3, because this waits to establish rules The dimension included in then is designated 1,3,5, it is possible to which the vector for determining Rule3 is (1,0,1,0,1), i.e. For first element in Rule3 vector, because the corresponding dimension of the element is designated 1, and Rule3 In comprising the dimension mark, so the value of first element is set into 1.Similarly, it may be determined that Rule3 Second element, third element, fourth element, the value of The Fifth Element in vector are respectively 0,1,0,1. Rule4 is then directed to, the vector that can similarly determine Rule4 is (1,0,1,1,1).
Further, regulation engine A can for the Rule3 and the Rule4 vector (1,0,1,0,1) determined and The element of correspondence position in (1,0,1,1,1) carries out logic or computing, i.e. the first element in Rule3 vector The second element in logic or computing, Rule3 vector is carried out with first element in Rule4 vector Logical operation ... etc. is carried out with second element in Rule4 vector, then regulation engine A can Using determine final vector asWherein | | represent correspondence The element of position carries out logic or computing.
Finally, due to which Rule4 vector is consistent with the final vector, so regulation engine A can be determined Rule4 is that corresponding dimension identifies most rules undetermined, and using Rule4 as with service request α The rule matched somebody with somebody.
Pass through rule matching method as shown in Figure 1, it is seen then that receiving service request in the regulation engine During the rule of matching, it is no longer necessary to priority setting is carried out to rule, it need to only be carried according to the service request All dimensions mark determine after each rule undetermined, identified further according to each regular corresponding dimension undetermined, it is determined that Comprising the most rules undetermined of dimension mark, be used as the rule matched with the service request.So that passing through this The described method of application, can be without carrying out priority level initializing to each rule in the rule set, it is to avoid people The error for the matching precision that work setting priority is brought, can match the higher rule of precision for the service request Then, the operational efficiency of regulation engine is improved, matching precision is improved.
Certainly, except above by each regular vector undetermined, it is determined that final vector, and most at last with this most The corresponding rule undetermined of vector, is defined as beyond the most regular method undetermined of corresponding dimension mark eventually, Other method can also be used to determine precision highest rule undetermined in each rule undetermined in this application, as long as The most rule undetermined of dimension mark can be found, just within the protection domain of the application.
In addition, in step s 103, after the regulation engine determines final vector, due to there may be not Have regular situation undetermined corresponding with the final vector, so in this application, when not with this it is final to Measure Ying Yu it is undetermined regular when, the number of dimension that the regulation engine can also be included according to each rule undetermined mark Amount, determines each the first regular weighted value undetermined, and the undetermined rule maximum by the first weighted value is determined, makees For the rule matched with the service request.Wherein, think in this application:For each rule, the rule Comprising dimension mark quantity it is more, then the first weighted value of the rule is bigger.Specifically, the rule is drawn The quantity for the dimension mark that directly can be included each rule undetermined is held up, each the first regular weight undetermined is used as Value.
For example, it is assumed that for service request β, regulation engine determines 3 rules undetermined:Rule7、 Rule8, Rule9, and this 3 rules undetermined include dimension mark be respectively:1st, 3,5,6 and 1, 4th, 6 and 1,3,6, then Rule7, Rule8, Rule9 vector be respectively (1,0,1,0,1,1,0,0,0), (1,0,0,1,0,1,0,0,0), (1,0,1,0,0,1,0,0,0), and assume that the final vector determined is (1,0,1,0,1,1,0,0,1), so Rule7, Rule8, Rule9 not with the final vectorial corresponding rule, then the regulation engine can determine that Rule7, Rule8, Rule9 dimension mark quantity be respectively:4th, 3,3, and the regulation engine can also be true The first weighted value for determining Rule7, Rule8, Rule9 is respectively:4、3、3.Then, the regulation engine is most It can determine that Rule7 the first weighted value is maximum eventually, i.e. determine that Rule7 precision is higher, and by Rule7 It is used as the rule matched with service request β.
Further, due to based on above-mentioned situation, so being deposited there is also the maximum rule undetermined of the first weighted value In more than two situations.Then now, the data message corresponding to each dimension is identified equally exists important Property difference (it is exactly a relatively unessential data letter that e.g., user id, which is compared to for account amount of money, Breath), it is possible to corresponding second weighted value is determined for each dimension mark, to represent that the dimension is identified The significance level of corresponding data information, then in this application, the second weighted value that can be identified according to each dimension, It is determined that the rule finally matched with the service request.
Specifically, in this application, should when the maximum rule undetermined of the first weighted value has two or more Regulation engine can also be for the maximum rule undetermined of each first weighted value, according to each dimension pre-saved Second weighted value of mark, determine all dimensions that the rule undetermined includes identify corresponding second weighted value it With, as the 3rd regular weighted value undetermined, finally in the maximum each rule undetermined of the first weighted value, The maximum rule undetermined of 3rd weighted value is defined as the most rule undetermined of corresponding dimension mark.
Continue to use the example above, it is assumed that for service request β, the regulation engine further defines Rule10, also, The dimension that Rule10 is included is designated 1,3,4,6, and the vector of the Rule10 is (1,0,1,1,0,1,0,0,0), can See, Rule10 and Rule7 the first weighted value are all 4, so now the regulation engine can also be according to Rule10 Second weighted value sum of all dimensions mark included with Rule7, determines the 3rd of Rule10 and Rule7 Weighted value, it is further assumed that the weight of each dimension mark is as shown in table 3.
Dimension is identified Second weight
1 10
2 20
3 30
4 30
5 40
6 60
7 10
8 50
9 90
Table 3
It can be seen that, the second weighted value sum of all dimensions mark that Rule10 and Rule7 is included is respectively:130 With 140.Then the regulation engine can determine that Rule7 the 3rd weighted value is maximum, and using Rule7 as The rule matched with service request β.
Further, by dimension identifies all dimensions mark that the maximum rule undetermined of quantity is included Weighted value sum, it is not necessarily maximum in each rule undetermined, so in this application, when not with When the final vector is corresponding undetermined regular, i.e. the most rule undetermined of the dimension mark that includes has two During the above, the regulation engine can yet determine the institute included in the rule undetermined first for each rule undetermined There is the second weighted value sum that dimension is identified, as the 3rd regular weighted value undetermined, then by the 3rd weight The rule that the maximum rule undetermined of value is matched as the service request, without considering further that each regular dimension undetermined The quantity that scale is known, i.e. the not only maximum rule undetermined of the weighted value of consideration rate first, but for each Rule undetermined determine each the 3rd regular weight undetermined it.
Based on the rule match process shown in Fig. 1, the embodiment of the present application also provides a kind of rule match device, As shown in Figure 2.
Fig. 2 is that the embodiment of the present application provides a kind of structural representation of rule match device, is specifically included:
Receiving module 201, for receiving service request, wherein, carried in the service request and some wait to locate Manage the corresponding dimension mark of data message;
Module 202 is investigated, for according to the rule set pre-saved, it is determined that being carried comprising the service request All dimensions mark some rules, be used as rule undetermined;
Matching module 203, in each rule undetermined, it is determined that the dimension mark included it is most wait establish rules Then, as the rule matched with the service request.
The matching module 203 according in the rule set specifically for for each rule undetermined, owning The corresponding dimension mark of rule, determines the regular corresponding vector undetermined, wherein, it is each in the vector Element dimension mark corresponding with strictly all rules in the rule set is corresponded, for each element, if The corresponding dimension mark of the element corresponds to the rule undetermined, then the value of the element is set into 1, if this yuan The corresponding dimension mark of element is not corresponded to and the rule undetermined, then the value of the element is set into 0, will be for each The element of correspondence position carries out logic or computing in the vector that rule undetermined is determined, it is determined that final vector, will be with The corresponding rule undetermined of the final vector, is defined as the most rules undetermined of corresponding dimension mark.
First weight matching module 204, for when in the absence of it is corresponding undetermined regular with the final vector when, For each rule undetermined, the number of elements that the value of element in the corresponding vector of the rule undetermined is 1 is determined, As the first regular weighted value undetermined, in each rule undetermined, by the first weighted value it is maximum wait establish rules Then it is defined as the most rule undetermined of corresponding dimension mark.
Second weight matching module 205, for there is two or more when the maximum rule undetermined of the first weighted value When, it is corresponding according to each dimension mark pre-saved for the rule undetermined that each first weighted value is maximum Second weighted value, determines that all dimensions that the rule undetermined is included identify corresponding second weighted value sum, makees For the 3rd regular weighted value undetermined, in the maximum each rule undetermined of the first weighted value, by the 3rd weight The maximum rule undetermined of value is defined as the most rule undetermined of corresponding dimension mark.
The second weight matching module 205 is additionally operable to, when comprising the most rules undetermined of dimension mark deposit In two or more, for the rule undetermined that each first weighted value is maximum, according to each dimension pre-saved Corresponding second weighted value is identified, determines that all dimensions that the rule undetermined is included identify corresponding second weight It is worth sum, it is in each rule undetermined, the 3rd weighted value is maximum as the 3rd regular weighted value undetermined Rule undetermined, be used as the rule matched with the service request.
Specifically, above-mentioned rule match device as shown in Figure 2 can be located in server, specifically can position In the regulation engine of server, the server can be a single equipment or multiple devices The system of composition.
In a typical configuration, computing device includes one or more processors (CPU), input/defeated Outgoing interface, network interface and internal memory.
Internal memory potentially includes the volatile memory in computer-readable medium, random access memory And/or the form, such as read-only storage (ROM) or flash memory (flash RAM) such as Nonvolatile memory (RAM). Internal memory is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by appointing What method or technique realizes that information is stored.Information can be computer-readable instruction, data structure, program Module or other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), its Random access memory (RAM), read-only storage (ROM), the electrically erasable of his type are read-only Memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic cassette tape, tape magnetic Disk storage or other magnetic storage apparatus or any other non-transmission medium, can be calculated available for storage The information that equipment is accessed.Defined according to herein, computer-readable medium does not include temporary computer-readable matchmaker The data-signal and carrier wave of body (transitory media), such as modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to non-row His property is included, so that process, method, commodity or equipment including a series of key elements not only include Those key elements, but also other key elements including being not expressly set out, or also include for this process, Method, commodity or the intrinsic key element of equipment.In the absence of more restrictions, by sentence " including One ... " key element that limits, it is not excluded that in the process including the key element, method, commodity or set Also there is other identical element in standby.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer journey Sequence product.Therefore, the application can using complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the application can be used wherein includes calculating one or more Machine usable program code computer-usable storage medium (include but is not limited to magnetic disk storage, CD-ROM, Optical memory etc.) on the form of computer program product implemented.
Embodiments herein is the foregoing is only, the application is not limited to.For this area skill For art personnel, the application can have various modifications and variations.All institutes within spirit herein and principle Any modification, equivalent substitution and improvements of work etc., should be included within the scope of claims hereof.

Claims (10)

1. a kind of rule matching method, it is characterised in that methods described includes:
Service request is received, wherein, the corresponding dimension of some pending data information is carried in the service request Scale is known;
According to the rule set pre-saved, if it is determined that what all dimensions comprising service request carrying were identified Dry rule, is used as rule undetermined;
In each rule undetermined, it is determined that the most rules undetermined of the dimension mark included, as with the business Ask the rule of matching.
2. the method as described in claim 1, it is characterised in that in each rule undetermined, it is determined that including The most rules undetermined of dimension mark, specifically include:
For each rule undetermined, identified according to the corresponding dimension of strictly all rules in the rule set, it is determined that should Regular corresponding vector undetermined, wherein, each element in the vector and strictly all rules in the rule set Corresponding dimension mark is corresponded, for each element, if the corresponding dimension mark of the element corresponds to The rule undetermined, then be set to 1 by the value of the element, if the corresponding dimension mark of the element is not corresponded to being somebody's turn to do Rule undetermined, then be set to 0 by the value of the element;
The element of correspondence position carries out logic or computing in the vector that will be determined for each rule undetermined, it is determined that Final vector;
Will rule undetermined corresponding with the final vector, be defined as corresponding dimension mark it is most wait establish rules Then.
3. method as claimed in claim 2, it is characterised in that when in the absence of right with the final vector Answer it is undetermined regular when, methods described also includes:
For each rule undetermined, the element that the value of element in the corresponding vector of the rule undetermined is 1 is determined Quantity, is used as the first regular weighted value undetermined;
In each rule undetermined, the maximum rule undetermined of the first weighted value is defined as corresponding dimension mark most Many rules undetermined.
4. method as claimed in claim 3, it is characterised in that methods described also includes:
It is maximum for each first weighted value when the maximum rule undetermined of the first weighted value has two or more Rule undetermined, corresponding second weighted value is identified according to each dimension for pre-saving, the rule undetermined is determined Comprising all dimensions identify corresponding second weighted value sum, be used as the 3rd regular weighted value undetermined;
In the maximum each rule undetermined of the first weighted value, the maximum rule undetermined of the 3rd weighted value is defined as The most rule undetermined of corresponding dimension mark.
5. the method as described in claim 1, it is characterised in that methods described also includes:
When comprising the most rules undetermined of dimension mark there is two or more when, for each first weighted value Maximum rule undetermined, identifies corresponding second weighted value according to each dimension pre-saved, determines that this is undetermined All dimensions that rule is included identify corresponding second weighted value sum, are used as the 3rd regular weight undetermined Value;
In each rule undetermined, by the rule undetermined that the 3rd weighted value is maximum, as with the service request The rule matched somebody with somebody.
6. a kind of rule match device, it is characterised in that including:
Receiving module, for receiving service request, wherein, some pending numbers are carried in the service request It is believed that ceasing corresponding dimension mark;
Module is investigated, for according to the rule set pre-saved, it is determined that the institute carried comprising the service request Some rules for having dimension to identify, are used as rule undetermined;
Matching module, in each rule undetermined, it is determined that the most rules undetermined of the dimension mark included, It is used as the rule matched with the service request.
7. device as claimed in claim 6, it is characterised in that the matching module is specifically for pin To each rule undetermined, identified according to the corresponding dimension of strictly all rules in the rule set, it is determined that this waits to establish rules Then corresponding vector, wherein, each element in the vector is corresponding with strictly all rules in the rule set Dimension mark is corresponded, for each element, if the corresponding dimension mark of the element is undetermined corresponding to this Rule, then be set to 1 by the value of the element, waits to establish rules with this if the corresponding dimension mark of the element is not corresponded to Then, then the value of the element is set to 0, the member of correspondence position in the vector that will be determined for each rule undetermined Element carries out logic or computing, it is determined that final vector, will rule undetermined corresponding with the final vector, it is determined that Most rules undetermined are identified for corresponding dimension.
8. device as claimed in claim 7, it is characterised in that when in the absence of right with the final vector Answer it is undetermined regular when, described device also includes:
First weight matching module, for for each rule undetermined, determine the rule undetermined it is corresponding to The value of element is 1 number of elements in amount, as the first regular weighted value undetermined, in each rule undetermined In, the maximum rule undetermined of the first weighted value is defined as corresponding dimension and identifies most rules undetermined.
9. device as claimed in claim 8, it is characterised in that described device also includes:
Second weight matching module, for when there is two or more in the maximum rule undetermined of the first weighted value, For the rule undetermined that each first weighted value is maximum, according to each dimension mark corresponding second pre-saved Weighted value, determines that all dimensions that the rule undetermined is included identify corresponding second weighted value sum, is used as this The 3rd regular weighted value undetermined, in the maximum each rule undetermined of the first weighted value, by the 3rd weighted value most Big rule undetermined is defined as the most rule undetermined of corresponding dimension mark.
10. device as claimed in claim 6, it is characterised in that the second weight matching module is also used In, when comprising the most rules undetermined of dimension mark there is two or more when, for each first weighted value Maximum rule undetermined, identifies corresponding second weighted value according to each dimension pre-saved, determines that this is undetermined All dimensions that rule is included identify corresponding second weighted value sum, are used as the 3rd regular weight undetermined Value, in each rule undetermined, by the rule undetermined that the 3rd weighted value is maximum, as with the service request The rule matched somebody with somebody.
CN201610197446.7A 2016-03-31 2016-03-31 Rule matching method and device Active CN107291733B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610197446.7A CN107291733B (en) 2016-03-31 2016-03-31 Rule matching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610197446.7A CN107291733B (en) 2016-03-31 2016-03-31 Rule matching method and device

Publications (2)

Publication Number Publication Date
CN107291733A true CN107291733A (en) 2017-10-24
CN107291733B CN107291733B (en) 2020-09-11

Family

ID=60086880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610197446.7A Active CN107291733B (en) 2016-03-31 2016-03-31 Rule matching method and device

Country Status (1)

Country Link
CN (1) CN107291733B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943878A (en) * 2017-11-14 2018-04-20 北京思特奇信息技术股份有限公司 A kind of Business Rule Engine method and system
CN109344117A (en) * 2018-10-10 2019-02-15 四川新网银行股份有限公司 A kind of risk detecting system based on concurrent
CN109376988A (en) * 2018-09-11 2019-02-22 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of business datum
CN109523133A (en) * 2018-10-26 2019-03-26 浙江工企信息技术股份有限公司 A kind of control method and system towards business administration dimension
CN109903034A (en) * 2019-02-28 2019-06-18 腾讯科技(深圳)有限公司 Rule matching method, device, computer readable storage medium and computer equipment
CN112685611A (en) * 2020-12-31 2021-04-20 恒安嘉新(北京)科技股份公司 Data filtering method and device, storage medium and electronic equipment
CN115374366A (en) * 2022-09-15 2022-11-22 中航信移动科技有限公司 Matching information generation method, storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106639A1 (en) * 2001-06-18 2007-05-10 Pavitra Subramaniam Method, apparatus, and system for searching based on search visibility rules
US20130185306A1 (en) * 2012-01-13 2013-07-18 Business Objects Software Ltd. Entity Matching Using Machine Learning
CN105306475A (en) * 2015-11-05 2016-02-03 天津理工大学 Network intrusion detection method based on association rule classification
CN105323099A (en) * 2014-07-31 2016-02-10 中国移动通信集团公司 Business network traffic modeling method, network resource scheduling method and network element

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070106639A1 (en) * 2001-06-18 2007-05-10 Pavitra Subramaniam Method, apparatus, and system for searching based on search visibility rules
US20130185306A1 (en) * 2012-01-13 2013-07-18 Business Objects Software Ltd. Entity Matching Using Machine Learning
CN105323099A (en) * 2014-07-31 2016-02-10 中国移动通信集团公司 Business network traffic modeling method, network resource scheduling method and network element
CN105306475A (en) * 2015-11-05 2016-02-03 天津理工大学 Network intrusion detection method based on association rule classification

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107943878A (en) * 2017-11-14 2018-04-20 北京思特奇信息技术股份有限公司 A kind of Business Rule Engine method and system
CN107943878B (en) * 2017-11-14 2022-03-15 北京思特奇信息技术股份有限公司 Business rule engine implementation method and system
CN109376988A (en) * 2018-09-11 2019-02-22 阿里巴巴集团控股有限公司 A kind for the treatment of method and apparatus of business datum
CN109344117A (en) * 2018-10-10 2019-02-15 四川新网银行股份有限公司 A kind of risk detecting system based on concurrent
CN109523133A (en) * 2018-10-26 2019-03-26 浙江工企信息技术股份有限公司 A kind of control method and system towards business administration dimension
CN109903034A (en) * 2019-02-28 2019-06-18 腾讯科技(深圳)有限公司 Rule matching method, device, computer readable storage medium and computer equipment
CN109903034B (en) * 2019-02-28 2021-06-08 腾讯科技(深圳)有限公司 Rule matching method and device, computer readable storage medium and computer equipment
CN112685611A (en) * 2020-12-31 2021-04-20 恒安嘉新(北京)科技股份公司 Data filtering method and device, storage medium and electronic equipment
CN115374366A (en) * 2022-09-15 2022-11-22 中航信移动科技有限公司 Matching information generation method, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN107291733B (en) 2020-09-11

Similar Documents

Publication Publication Date Title
CN107291733A (en) A kind of method and device for rule matching
Ballance et al. Collapse and survival: industry strategies in a changing world
Greve Positional rigidity: Low performance and resource acquisition in large and small firms
CN110060144B (en) Method for training credit model, method, device, equipment and medium for evaluating credit
Sommer Jr Who's in Control-SEC
Purkayastha Diversification strategy and firm performance: Evidence from Indian manufacturing firms
Park et al. Explainability of machine learning models for bankruptcy prediction
US20230071328A1 (en) Mapping consumer ownership of financial assets to geographic localities and computer-implemented methods and computer systems thereof
CN107742217A (en) Service control method and device based on businessman
Karemera et al. A gravity model analysis of the benefits of economic integration in the Pacific Rim
CN107657357B (en) Data processing method and device
CN107665463A (en) Method for processing resource, device, storage medium and the computer equipment of investment product
WO2023071120A1 (en) Method for recognizing proportion of green assets in digital assets and related product
CN106817390A (en) A kind of shared method and apparatus of user data
Kandel On the exclusion of assets from tests of the mean variance efficiency of the market portfolio
CN110796539A (en) Credit investigation evaluation method and device
CN110992111B (en) User portrait mining method of applicant based on big data
CN110704620B (en) Method and device for identifying same entity based on knowledge graph
CN106610865A (en) Data locking and unlocking method and apparatus
CN116821759A (en) Identification prediction method and device for category labels, processor and electronic equipment
Situm Inability of gearing-ratio as predictor for early warning systems
Rady Foreign direct investment and growth: Theory, evidence and lessons for Egypt
CN107092919A (en) A kind of user's sample characteristics optimized treatment method and device
CN107203545A (en) A kind of data processing method and device
Opie et al. Commodity-specific disaggregation of 2002 freight analysis framework data to county level in New Jersey

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20201014

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Patentee after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Ltd.