CN109445797A - Handle task executing method and device - Google Patents
Handle task executing method and device Download PDFInfo
- Publication number
- CN109445797A CN109445797A CN201811243211.2A CN201811243211A CN109445797A CN 109445797 A CN109445797 A CN 109445797A CN 201811243211 A CN201811243211 A CN 201811243211A CN 109445797 A CN109445797 A CN 109445797A
- Authority
- CN
- China
- Prior art keywords
- data
- rule
- processing task
- regular
- condition data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 59
- 238000012545 processing Methods 0.000 claims abstract description 201
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 92
- 238000004891 communication Methods 0.000 claims description 22
- 238000012795 verification Methods 0.000 claims description 11
- 238000012423 maintenance Methods 0.000 abstract description 10
- 238000000605 extraction Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000006243 chemical reaction Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 6
- 230000004075 alteration Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000000926 separation method Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 230000000712 assembly Effects 0.000 description 2
- 238000000429 assembly Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000000379 polymerizing effect Effects 0.000 description 2
- 238000012163 sequencing technique Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of processing task executing method and device, the syntagmatic at least one algorithm assembly which is inputted in pel operation interface based on user and create.Method includes: preparatory building rule base, and it includes rule condition data and rules results data corresponding with rule condition data in every regular data that rule base, which is stored at least one regular data,;Processing task data is matched with the rule condition data in the regular data in rule base, determines the goal rule condition data to match with processing task data;According to and the corresponding rules results data of goal rule condition data determine processing result corresponding with task data is handled.This programme is during handling task execution, corresponding processing result is obtained with the matching of the rule in the rule base of building by processing task data, basis is provided to mutually separate for business rule with business execution logic, and then promotes service maintenance efficiency, reduces maintenance cost.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of processing task executing method and device.
Background technique
With the continuous development of science and technology and society, all kinds of number of services are also being constantly increasing.Currently, for realization business
Processing usually needs developer to compile corresponding service code according to demand, and is carried out at business according to the service code of compiling
Reason.
However, the business rule of majority business is usually cured in service code at present, when business rule changes
When, service code need to be modified on a large scale, to increase maintenance cost.
Summary of the invention
In view of the above problems, it proposes on the present invention overcomes the above problem or at least be partially solved in order to provide one kind
State the processing task executing method and device of problem.
According to an aspect of the invention, there is provided a kind of processing task executing method, the processing task is based on user
The syntagmatic of at least one algorithm assembly inputted in pel operation interface and create, which comprises
Building rule base in advance, is stored at least one regular data in the rule base, in every rule data
It include rule condition data and rules results data corresponding with the rule condition data;
Processing task data is obtained, by the rule at least one regular data in the processing task data and rule base
Then condition data matches, the determining goal rule condition data to match with the processing task data;
According to rules results data corresponding with goal rule condition data determination and the processing task data
Corresponding processing result.
According to another aspect of the present invention, a kind of processing task execution device is provided, the processing task is based on user
The syntagmatic of at least one algorithm assembly inputted in pel operation interface and create, described device includes:
Module is constructed, building rule base in advance is suitable for, at least one regular data is stored in the rule base, it is described every
It include rule condition data and rules results data corresponding with the rule condition data in rule data;
Matching module is suitable for obtaining processing task data, by least one in the processing task data and rule base
Rule condition data in regular data match, the determining goal rule conditional number to match with the processing task data
According to;
Determining module, be suitable for according to rules results data corresponding with the goal rule condition data it is determining with it is described
Handle the corresponding processing result of task data.
According to another aspect of the invention, a kind of calculating equipment/terminal/server is provided, comprising: processor, storage
Device, communication interface and communication bus, the processor, the memory and the communication interface are completed by the communication bus
Mutual communication;
For the memory for storing an at least executable instruction, it is above-mentioned that the executable instruction executes the processor
Handle the corresponding operation of task executing method.
In accordance with a further aspect of the present invention, provide a kind of computer storage medium, be stored in the storage medium to
A few executable instruction, the executable instruction make processor execute such as the corresponding operation of above-mentioned processing task executing method.
The processing task executing method and device provided according to the present invention, the processing task are based on user and operate in pelization
The syntagmatic of at least one algorithm assembly inputted in interface and create.Rule base is constructed in the present invention in advance, in rule base
It is stored at least one regular data, includes rule condition data in every rule data and corresponding with rule condition data
Rules results data;Processing task data is obtained, will be handled at least one regular data in task data and rule base
Rule condition data match, determine and the goal rule condition data that matches of processing task data;It is advised according to target
Then the corresponding rules results data of condition data determine processing result corresponding with processing task data.This programme is appointed in processing
In implementation procedure of being engaged in, tied by processing task data with the matching of the rule in the rule base of building to obtain corresponding processing
Fruit provides basis to execute logic for business rule and business and mutually separate, and then promotes service maintenance efficiency, reduce safeguard at
This.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows a kind of flow diagram of the processing task executing method provided according to an embodiment of the present invention;
Fig. 2 shows a kind of signals of the process of the processing task executing method provided according to a further embodiment of the invention
Figure;
Fig. 3 shows a kind of operation interface schematic diagram provided according to a further embodiment of the invention;
Fig. 4 shows a kind of structural schematic diagram of the processing task execution device provided according to an embodiment of the present invention;
Fig. 5 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
Fig. 1 shows a kind of flow diagram of the processing task executing method provided according to an embodiment of the present invention.
Wherein, the processing task in the present embodiment is at least one algorithm assembly inputted in pel operation interface based on user
Syntagmatic and create.As shown in Figure 1, this method comprises:
Step S110, constructs rule base in advance.
The present invention is to realize that business rule and business execute the separation of logic, is provided with rule base for user.The rule base
In be stored at least one regular data.Wherein, every rule data in rule base include rule condition data and with rule
The corresponding rules results data of condition data.The regular data can voluntarily be configured by user according to business rule, when user's industry
When business rule is modified, it is not necessary to modify business to execute the corresponding execution code of logic, and only needs the rule in alteration ruler library
Data can realize the change of business rule.
Step S120 obtains processing task data, will handle at least one regular data in task data and rule base
In rule condition data match, determine and the goal rule condition data that matches of processing task data.
During handling task execution, processing task data is obtained, and will handle in task data and rule base extremely
Few rule data match, the determining regular data to match with the processing task data.Specifically, number of tasks will be handled
Match according to the rule condition data at least one regular data in rule base, determines and match with processing task data
Goal rule condition data.
Step S130 is determined according to rules results data corresponding with goal rule condition data and is handled task data
Corresponding processing result.
It, will be with the goal rule conditional number after determining the goal rule condition data to match with processing task data
Processing result corresponding with processing task data is determined according to corresponding rules results data.
It can be seen that being provided with rule base in the present embodiment for user, user can be stored in the rule base and is advised according to business
The regular data then compiled;During handling task execution, processing task data is obtained, and by the processing task data and advise
Then at least one regular data in library is matched, finally corresponding with the processing task data according to matching result determination
Processing result.To realize that business rule and business execute the separation of logic, when business rule changes, it is not necessary to modify industry
Business executes the corresponding execution code of logic, and the modification of business rule directly can be realized by the rule in alteration ruler library,
To which service maintenance cost be greatly reduced, service maintenance efficiency is promoted.
Fig. 2 shows a kind of flow diagrams of the processing task executing method provided according to an embodiment of the present invention.
Processing task in the present invention is at least one algorithm assembly inputted in pel operation interface based on user
Syntagmatic and create.Specifically, the present invention is that user is provided with pel operation interface, includes in the operation interface
The corresponding algorithm assembly pel of polyalgorithm component, the algorithm assembly pel are corresponding with the algorithm assembly constructed in advance.Wherein,
Algorithm assembly is that the algorithm packaging according to involved in business procession forms, and can be stored in preset algorithm assembly library
In.The algorithm assembly may include fine-grained basic algorithm component, to improve the operation convenience of user, and meet more use
The business processing demand at family.Wherein, which includes extracting class algorithm assembly, conversion class algorithm assembly and/or adding
Carry class algorithm assembly.Extract class algorithm assembly may include MySQL extraction assembly, HDFS extraction assembly and Hive extraction group again
Part;Conversion class algorithm assembly may include filter assemblies, replacement component, sequencing assembly, connection component, polymerizing component, and/or conjunction
And component;Loading classes algorithm assembly includes MySQL charging assembly, HDFS charging assembly and/or Hive charging assembly.Optionally,
The algorithm assembly can also include template algorithm component, which can be the collection of at least one basic algorithm component
It closes, for solving at least one specific business demand.For example, calculating PV (Page in actual business procession
View, page access amount)-UV (Unique Visitor, independent visitor) is usually a common business demand, to avoid user
The repetition compiling of business demand is commonly used to this, it can be based on basic algorithm component needed for calculating PV-UV, Yi Jisuo in the present embodiment
The logical relation between basic algorithm component needed, is encapsulated as PVUV template algorithm component, to be directly realized by by the component
Calculating to PV-UV.Optionally, which can also include custom algorithm component.The custom algorithm component can be by
User voluntarily compiles.Specifically, custom algorithm component can be generated by following steps: firstly, monitoring generates custom algorithm
The trigger action of component obtains user and compiles data according to provided by open system API, generates compiling data packet.Wherein, raw
It can be the clicking operation for default hot-zone, tool of the present invention to the trigger action at the trigger action of custom algorithm component
Body type is without limitation.Also, in compiling data packet generating process, system is provided at least one Compilation Method, the compiling
Method may include initial method, execution method and/or output method etc..The Compilation Method is to the primary of computing engines
The further encapsulation of interface, user can be compiled by least one Compilation Method of open system API to offer, to keep away
Exempt from user and certain unfavorable operations directly are carried out to the native interface of computing engines.So compiling data packet is specifically according to user
It is obtained by compilation operations of the open system API at least one Compilation Method of offer.Further, compiling data are being generated
After packet, by each processor of the compiling packet delivery to cluster, for using the custom algorithm component subsequent
When, call corresponding compiling data packet efficiently to be executed according to the path for the custom algorithm component Configuration.Further
It optionally, can also be the corresponding authority information of custom algorithm component Configuration after generating custom algorithm component, thus
Only in the matched situation of authority information of user identity and custom algorithm component, user is allowed to select custom algorithm component
Pel.
User can be selected by pel operation interface algorithm assembly pel and editing operation, then can be according to user
Selection and editing operation at least one algorithm assembly pel generate corresponding pel layout figure, and according to pel layout figure
Determine at least one corresponding algorithm assembly of pel layout figure and the syntagmatic of at least one algorithm assembly.
User can also input corresponding business scenario configuration information by the default input entrance in pel operation interface.
Wherein, business scenario configuration information includes business description information, data source information and computing engines information.Optionally, business
Scene configuration information can be presented in the form of json etc..
For example, pel operation interface as shown in Figure 3 includes in the 3-1 of region in the pel operation interface
There is polyalgorithm component pel, specifically, multiple algorithm assembly pel includes: basic algorithm component pel, template algorithm group
Part pel and custom algorithm component pel.The algorithm assembly in each component pel and system provided in pel operation interface
It is corresponding.Wherein, basic algorithm component pel includes: to extract class component pel, conversion class component pel and/or load class component
Pel.Extract class algorithm assembly pel may include that MySQL extraction assembly pel, HDFS extraction assembly pel and Hive are extracted again
Component pel;Conversion class algorithm assembly pel may include filter assemblies pel, replacement component pel, sequencing assembly pel, connect
Connected components pel, polymerizing component pel, and/or combining block pel;Loading classes algorithm assembly pel includes MySQL charging assembly
Pel, HDFS charging assembly pel and/or Hive charging assembly pel.Template algorithm in pel operation interface shown in Fig. 3
Component pel is PVUV template component pel.User can drag selection Hive extraction assembly pel, replacement component pel, PVUV mould
Board group part pel and MySQL charging assembly pel into region 3-2, user by Hive extraction assembly pel, replacement component drawings
In member, PVUV template component pel and MySQL charging assembly pel to region 3-2, that is, show that user has selected business processing institute
The algorithm assembly needed, i.e. Hive extraction assembly, replacement component, PVUV template component and MySQL charging assembly.Also, works as and selecting
In a certain selection algorithm assembly pel after, the business scenario configuration information for the algorithm assembly can be inputted, such as chosen
After Hive extraction assembly pel, the business scenario configuration information for Hive extraction assembly pel can be inputted in the 3-3 of region.
Further, since the optimal execution that the syntagmatic of at least one algorithm assembly is not business procession is patrolled
Volume, the execution of each algorithm assembly is directly carried out according to the syntagmatic of at least one algorithm assembly, easily business is caused to execute effect
The reduction of rate.So to further increase business processing efficiency, the present embodiment is closed in the combination for obtaining at least one algorithm assembly
After system, the syntagmatic of at least one algorithm assembly is parsed, obtains the corresponding service logic topology of at least one algorithm assembly
Relationship.Specifically, the syntagmatic for parsing at least one algorithm assembly of the forward direction sing data structure of acquisition, at least one calculation
Method component carries out topological sorting, obtains the corresponding service logic topology of at least one algorithm assembly according to topological sorting result and closes
System.Wherein, forward direction star belongs to one kind in DAG (Directed Acyclic Graph, directed acyclic graph), is one kind to store up
The mode on side is deposited to store the data structure of figure, without being directed toward lower a line with pointer as adjacency list, consequently facilitating mentioning
High business processing efficiency.The present embodiment to specific topological sorting method without limitation, for example, the AOE in DAG can be used
(Activity On Edge Network) algorithm carries out topological sorting.Here, it will be apparent to a skilled person that
The processing result of business processing is carried out according to service logic topological relation and directly according to the combination pass of at least one algorithm assembly
The processing result that system carries out business processing is identical, to promote business processing in the case where guaranteeing the identical situation of service processing result
Efficiency.For example, if the algorithm assembly of user's input has component A, B and C, the syntagmatic of component A, B and C of input are A
The ordinal relation of → B → C, however, by the data dependence relation between resolution component A, B and C and executing sequential dependency
It finding later, component A and component B is simultaneously not present data dependence and executes order dependent, i.e. component A and component B can be executed parallel,
Then service logic topological relation can be A → C ← B, can be had based on this service logic topological relation progress business processing higher
Treatment effeciency.
Further, task is handled according to business scenario configuration information and service logic topological relation creation.Specifically,
It is the execution for being converted at least one processing task by business procession, thus just by the execution of the processing task to creation
The processing to business can be achieved.Specifically, during creating processing task, by the preset kind of user's input in this step
The business scenario configuration information combination service logic topological relation of (such as json type) is created that the processing for engine identification is appointed
Information of being engaged in executes processing task for engine so that the processing mission bit stream is transferred to engine.
Finally, corresponding computing engines is called to execute processing task.Wherein, computing engines can be multiple, as Spark draws
It holds up, Flink engine, and/or Hive engine etc..It optionally, is the treatment effeciency of support mission and the accuracy of processing result,
Before computing engines formally execute processing task, the initialization of running environment can be carried out previously according to business scenario configuration information
Processing.Wherein, the present embodiment to specific init processing method without limitation.
In a kind of optional embodiment, after creating processing task, to keep reason task everywhere in creation orderly
It is effectively carried out, the processing task that can further create is scheduled processing, and corresponding computing engines is called to execute processing task.
Optionally, in scheduling process, place is not scheduled to postposition task when previous task does not complete to save scheduling resource
Reason only carries out the execution of postposition task after previous task processing is completed.
In another optional embodiment, during computing engines execute processing task, it can acquire and store
The engine output data of each algorithm assembly.For example, during computing engines execute processing task, gathering algorithm component A
Engine output data, and the engine output data of algorithm assembly A is stored in default memory space, if computation module B number
According to algorithm assembly A is depended on, then in the processing task of execution computation module B, then the acquisition algorithm group from default memory space
The engine output data of part A executes processing task.It is further alternative, it can also be stored in default memory space defeated with engine
The corresponding source data of data out, to meet the data adaptation demand of different computing engines.Specifically, due to different meters
Data format needed for calculating engine etc. is not quite similar, and when same data circulate in different computing engines, need to be converted to corresponding
Engine data format, so that active data and corresponding engine data need to be carried during computing engines execute processing task
Two class data, thus increase the storage overhead of computing engines, and the present invention is then to be stored in source data and engine output data
In default memory space, is preset when computing engines need to obtain data from this and obtain corresponding data in memory space, to save
Province's system storage overhead.
In another optional embodiment, in another optional embodiment, user can pass through predetermined manner
Into task commissioning mode.In task commissioning mode, monitoring user is directed to the breakpoint insertion operation of any algorithm assembly, for this
Commissioning breakpoint is arranged in algorithm assembly;In the implementation procedure of processing task, capture setting has drawing for the algorithm assembly of commissioning breakpoint
Hold up input data and engine output data;And the engine input data and engine output data are exported, so that user adjusts
It surveys.Optionally, the engine input data and engine output data of output can be presented dimension from least one and be presented.Its
In, it includes: time dimension, test data ratio dimension, and/or commissioning result dimension etc. that dimension, which is presented,.So as to according to
Corresponding test data is presented to the selection that dimension is presented in family.It is further alternative, when engine input data and engine export number
When larger according to data volume, engine input data and engine output data can be stored in a distributed fashion.
After handling task creation, processing task is executed especially by following steps:
Step S210 constructs rule base in advance, and at least one rule condition data in rule base is converted to default
The rule set of tree structure.
Wherein, be stored at least one regular data in rule base, every rule data include rule condition data and with
The corresponding rules results data of rule condition data.The regular data can voluntarily be configured by user according to business rule, when with
When family business rule is modified, it is not necessary to modify business to execute the corresponding execution code of logic, and only needs in alteration ruler library
Regular data can realize the change of business rule.
During constructing rule base, the regular data of user's input can be obtained, and syntactic verification is carried out to regular data;
If regular data syntactic verification is qualified, regular data is stored in rule base, so that the rule stored in rule base
Data are all satisfied default grammer, obtain the corresponding place of processing task data convenient for improving during subsequent processing task execution
Manage the efficiency of result.Wherein, the regular data of user's input is the regular data that user voluntarily compiles according to demand, or
User modify to the general rule data of offer after regular data,
In a kind of optional embodiment, for ensure user input regular data data safety and data-privacy,
Corresponding authority configuration entrance can be also provided for user, so as to operate according to the priority assignation for regular data, for rule
The corresponding permission of data configuration.Wherein, the permission of configuration includes access right and/or modification authority.Access right is to work as user
When identity meets the access right of configuration, allow to match using processing task data with the regular data in the next steps,
Modification authority is to allow user to modify the regular data when user identity meets the modification authority of configuration.
To further increase the efficiency obtained in the next steps with processing task data alignment processing result, the present embodiment
At least one rule condition data in the rule base of building can be also converted to further to the rule set of default tree structure, it should
Default tree structure can be rete tree structure.Wherein, the present embodiment to specific transfer algorithm without limitation, this field skill
Art personnel can self-setting according to actual needs.
Step S220 determines the goal rule to match with processing task data according to the rule set of default tree structure
Condition data.
Processing task data can be matched with the rule set of default tree structure by preset matching rule, thus
It determines the goal rule condition data to match with processing task data, that is, determines the regular number to match with processing task data
According to.
Step S230 determines whether the goal rule condition data to match with processing task data is a plurality of, if so,
Execute step S240.
Step is then further executed when determining that the goal rule condition data to match with processing task data is a plurality of
S240;If it is determined that the goal rule condition data to match with processing task data is single, then by this target rule condition
The corresponding rules results data of data are determined as the corresponding processing result of processing task data.
Step S240 determines processing result corresponding with processing task data using preset conflict resolution algorithm.
When it is a plurality of for determining the goal rule condition data to match with processing task data, preset conflict can be passed through
Annual reporting law is solved, is determined from multiple goal rule condition datas and processing task data goal rule conditional number the most matched
According to, and then the corresponding rules results data of the goal rule condition data are determined as place corresponding with the processing task data
Manage result.
Wherein, preset conflict resolution algorithm can be priority solution annual reporting law, i.e. basis and processing task data phase
The priority for the corresponding regular data of a plurality of goal rule condition data matched, determination are corresponding with goal rule condition data
Processing result.Wherein, which can be agenda conflict resolution algorithm.
It can be seen that being provided with rule base in the present embodiment for user, user can be stored in the rule base and is advised according to business
The regular data then compiled;It, can be by least one conditional plan data conversion in rule base during handling task execution
For the rule set of preset tree structure, to promote the execution efficiency of processing task;And it will processing task data and the rule
Collection is matched, if with the regular data that matches of processing task data be it is a plurality of, further pass through preset Conflict solving
Algorithm determine with processing task data regular data the most matched, thus by the rule in the regular data the most matched
Then result data is determined as the processing result of the processing task data.To realize that business rule and business execute point of logic
From when business rule changes, it is not necessary to modify business to execute the corresponding execution code of logic, and directly passes through alteration ruler
The modification of business rule can be realized in rule in library, so that service maintenance cost be greatly reduced, promotes service maintenance efficiency.
Fig. 4 shows a kind of structural schematic diagram of the processing task execution device provided according to an embodiment of the present invention.
The syntagmatic at least one algorithm assembly that the processing task is inputted in pel operation interface based on user and create.Such as
Shown in Fig. 4, which includes: building module 41, matching module 42 and determining module 43.
Module 41 is constructed, is suitable for building rule base in advance, is stored at least one regular data in the rule base, it is described
It include rule condition data and rules results data corresponding with the rule condition data in every rule data;
Matching module 42 is suitable for obtaining processing task data, by least one in the processing task data and rule base
Rule condition data in rule data match, the determining goal rule conditional number to match with the processing task data
According to;
Determining module 43 is suitable for according to rules results data determination corresponding with the goal rule condition data and institute
State the corresponding processing result of processing task data.
Optionally, matching module 42 is further adapted for: by least one rule condition data conversion in the rule base
For the rule set for presetting tree structure;According to the rule set of the default tree structure, determination and the processing task data phase
Matched goal rule condition data.
Optionally, however, it is determined that the goal rule condition data to match with the processing task data is a plurality of;
Then determining module 43 is further adapted for: using preset conflict resolution algorithm, the determining and goal rule condition
The corresponding processing result of data.
Optionally, determining module 43 is further adapted for: being advised according to a plurality of target to match with the processing task data
The then priority of the corresponding regular data of condition data determines processing result corresponding with the goal rule condition data.
Optionally, device further include: weight setting module (not shown) is suitable for according to for the regular data
Priority assignation operation, configure corresponding permission for the regular data.
Optionally, building module 41 is further adapted for: being obtained regular data, and is carried out grammer school to the regular data
It tests;If the regular data syntactic verification is qualified, the regular data is stored in rule base.
Wherein, the specific implementation process of each module can refer in embodiment of the method shown in Fig. 1 or Fig. 2 accordingly in the present embodiment
Partial description, the present embodiment is it is not limited here.
It can be seen that being provided with rule base in the present embodiment for user, user can be stored in the rule base and is advised according to business
The regular data then compiled;During handling task execution, processing task data is obtained, and by the processing task data and advise
Then at least one regular data in library is matched, finally corresponding with the processing task data according to matching result determination
Processing result.To realize that business rule and business execute the separation of logic, when business rule changes, it is not necessary to modify industry
Business executes the corresponding execution code of logic, and the modification of business rule directly can be realized by the rule in alteration ruler library,
To which service maintenance cost be greatly reduced, service maintenance efficiency is promoted.
A kind of nonvolatile computer storage media is provided according to an embodiment of the present invention, and the computer storage is situated between
Matter is stored with an at least executable instruction, which can be performed the processing in above-mentioned any means embodiment and appoint
Business execution method.
Fig. 5 shows a kind of structural schematic diagram of the calculating equipment provided according to an embodiment of the present invention, present invention tool
Body embodiment does not limit the specific implementation for calculating equipment.
As shown in figure 5, the calculating equipment may include: processor (processor) 502, communication interface
(Communications Interface) 504, memory (memory) 506 and communication bus 508.
Wherein:
Processor 502, communication interface 504 and memory 506 complete mutual communication by communication bus 508.
Communication interface 504, for being communicated with the network element of other equipment such as client or other servers etc..
Processor 502 can specifically execute in above-mentioned processing task executing method embodiment for executing program 510
Correlation step.
Specifically, program 510 may include program code, which includes computer operation instruction.
Processor 502 may be central processor CPU or specific integrated circuit ASIC (Application
Specific Integrated Circuit), or be arranged to implement the integrated electricity of one or more of the embodiment of the present invention
Road.The one or more processors that equipment includes are calculated, can be same type of processor, such as one or more CPU;It can also
To be different types of processor, such as one or more CPU and one or more ASIC.
Memory 506, for storing program 510.Memory 506 may include high speed RAM memory, it is also possible to further include
Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.
Program 510 specifically can be used for so that processor 502 executes following operation:
Building rule base in advance, is stored at least one regular data in the rule base, in every rule data
It include rule condition data and rules results data corresponding with the rule condition data;
Processing task data is obtained, by the rule at least one regular data in the processing task data and rule base
Then condition data matches, the determining goal rule condition data to match with the processing task data;
According to rules results data corresponding with goal rule condition data determination and the processing task data
Corresponding processing result;
The combination at least one algorithm assembly that the processing task is inputted in pel operation interface based on user is closed
It is and creates.
In a kind of optional embodiment, program 510 specifically can be used for so that processor 502 executes following operation:
At least one rule condition data in the rule base are converted to the rule set of default tree structure;
According to the rule set of the default tree structure, the determining goal rule item to match with the processing task data
Number of packages evidence.
In a kind of optional embodiment, however, it is determined that the goal rule conditional number to match with the processing task data
According to being a plurality of;Program 510 specifically can be used for so that processor 502 executes following operation:
Then basis rules results data corresponding with the goal rule condition data are determining appoints with the processing
The corresponding processing result of business data further comprises:
Using preset conflict resolution algorithm, processing result corresponding with the goal rule condition data is determined.
In a kind of optional embodiment, program 510 specifically can be used for so that processor 502 executes following operation:
According to the excellent of regular data corresponding with a plurality of goal rule condition data that matches of processing task data
First grade determines processing result corresponding with the goal rule condition data.
In a kind of optional embodiment, program 510 specifically can be used for so that processor 502 executes following operation:
It is operated according to the priority assignation for the regular data, configures corresponding permission for the regular data.
In a kind of optional embodiment, program 510 specifically can be used for so that processor 502 executes following operation:
Regular data is obtained, and syntactic verification is carried out to the regular data;
If the regular data syntactic verification is qualified, the regular data is stored in rule base.
Algorithm and display are not inherently related to any particular computer, virtual system, or other device provided herein.
Various general-purpose systems can also be used together with teachings based herein.As described above, it constructs required by this kind of system
Structure be obvious.In addition, the present invention is also not directed to any particular programming language.It should be understood that can use various
Programming language realizes summary of the invention described herein, and the description done above to language-specific is to disclose this hair
Bright preferred forms.
In the instructions provided here, numerous specific details are set forth.It is to be appreciated, however, that implementation of the invention
Example can be practiced without these specific details.In some instances, well known method, structure is not been shown in detail
And technology, so as not to obscure the understanding of this specification.
Similarly, it should be understood that in order to simplify the disclosure and help to understand one or more of the various inventive aspects,
Above in the description of exemplary embodiment of the present invention, each feature of the invention is grouped together into single implementation sometimes
In example, figure or descriptions thereof.However, the disclosed method should not be interpreted as reflecting the following intention: i.e. required to protect
Shield the present invention claims features more more than feature expressly recited in each claim.More precisely, as following
Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore,
Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself
All as a separate embodiment of the present invention.
Those skilled in the art will understand that can be carried out adaptively to the module in the equipment in embodiment
Change and they are arranged in one or more devices different from this embodiment.It can be the module or list in embodiment
Member or component are combined into a module or unit or component, and furthermore they can be divided into multiple submodule or subelement or
Sub-component.Other than such feature and/or at least some of process or unit exclude each other, it can use any
Combination is to all features disclosed in this specification (including adjoint claim, abstract and attached drawing) and so disclosed
All process or units of what method or apparatus are combined.Unless expressly stated otherwise, this specification is (including adjoint power
Benefit require, abstract and attached drawing) disclosed in each feature can carry out generation with an alternative feature that provides the same, equivalent, or similar purpose
It replaces.
In addition, it will be appreciated by those of skill in the art that although some embodiments described herein include other embodiments
In included certain features rather than other feature, but the combination of the feature of different embodiments mean it is of the invention
Within the scope of and form different embodiments.For example, in detail in the claims, embodiment claimed it is one of any
Can in any combination mode come using.
Various component embodiments of the invention can be implemented in hardware, or to run on one or more processors
Software module realize, or be implemented in a combination thereof.It will be understood by those of skill in the art that can be used in practice
Microprocessor or digital signal processor (DSP) are realized in the processing task execution device according to embodiments of the present invention
The some or all functions of some or all components.The present invention is also implemented as executing method as described herein
Some or all device or device programs (for example, computer program and computer program product).Such reality
Existing program of the invention can store on a computer-readable medium, or may be in the form of one or more signals.
Such signal can be downloaded from an internet website to obtain, and perhaps be provided on the carrier signal or in any other forms
It provides.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and ability
Field technique personnel can be designed alternative embodiment without departing from the scope of the appended claims.In the claims,
Any reference symbol between parentheses should not be configured to limitations on claims.Word "comprising" does not exclude the presence of not
Element or step listed in the claims.Word "a" or "an" located in front of the element does not exclude the presence of multiple such
Element.The present invention can be by means of including the hardware of several different elements and being come by means of properly programmed computer real
It is existing.In the unit claims listing several devices, several in these devices can be through the same hardware branch
To embody.The use of word first, second, and third does not indicate any sequence.These words can be explained and be run after fame
Claim.
The invention discloses: a kind of processing task executing method of A1., the processing task are based on user and operate in pelization
The syntagmatic of at least one algorithm assembly inputted in interface and create, which comprises
Building rule base in advance, is stored at least one regular data in the rule base, in every rule data
It include rule condition data and rules results data corresponding with the rule condition data;
Processing task data is obtained, by the rule at least one regular data in the processing task data and rule base
Then condition data matches, the determining goal rule condition data to match with the processing task data;
According to rules results data corresponding with goal rule condition data determination and the processing task data
Corresponding processing result.
A2. method according to a1, wherein at least one rule by the processing task data and rule base
Then the rule condition data in data match, the determining goal rule condition data to match with the processing task data into
One step includes:
At least one rule condition data in the rule base are converted to the rule set of default tree structure;
According to the rule set of the default tree structure, the determining goal rule item to match with the processing task data
Number of packages evidence.
A3. the method according to A2, wherein if it is determined that the goal rule condition to match with the processing task data
Data are a plurality of;
Then basis rules results data corresponding with the goal rule condition data are determining appoints with the processing
The corresponding processing result of business data further comprises:
Using preset conflict resolution algorithm, processing result corresponding with the goal rule condition data is determined.
A4. method according to a3, wherein described to use preset conflict resolution algorithm, the determining and target is advised
Then the corresponding processing result of condition data further comprises:
According to the excellent of regular data corresponding with a plurality of goal rule condition data that matches of processing task data
First grade determines processing result corresponding with the goal rule condition data.
A5. the method according to any one of A1-A4, wherein the method also includes:
It is operated according to the priority assignation for the regular data, configures corresponding permission for the regular data.
A6. the method according to any one of A1-A5, wherein the preparatory building rule base further comprises:
Regular data is obtained, and syntactic verification is carried out to the regular data;
If the regular data syntactic verification is qualified, the regular data is stored in rule base.
The invention also discloses: a kind of processing task execution device of B7., the processing task are based on user and grasp in pelization
Make the syntagmatic of at least one algorithm assembly inputted in interface and create, described device includes:
Module is constructed, building rule base in advance is suitable for, at least one regular data is stored in the rule base, it is described every
It include rule condition data and rules results data corresponding with the rule condition data in rule data;
Matching module is suitable for obtaining processing task data, by least one in the processing task data and rule base
Rule condition data in regular data match, the determining goal rule conditional number to match with the processing task data
According to;
Determining module, be suitable for according to rules results data corresponding with the goal rule condition data it is determining with it is described
Handle the corresponding processing result of task data.
B8. the device according to B7, wherein the matching module is further adapted for:
At least one rule condition data in the rule base are converted to the rule set of default tree structure;
According to the rule set of the default tree structure, the determining goal rule item to match with the processing task data
Number of packages evidence.
B9. the device according to B8, wherein if it is determined that the goal rule condition to match with the processing task data
Data are a plurality of;
Then the determining module is further adapted for: using preset conflict resolution algorithm, the determining and goal rule item
Number of packages is according to corresponding processing result.
B10. the device according to B9, wherein the determining module is further adapted for: according to the processing number of tasks
According to the priority of the corresponding regular data of a plurality of goal rule condition data to match, the determining and goal rule conditional number
According to corresponding processing result.
B11. the device according to any one of B7-B10, wherein described device further include:
Weight setting module is matched suitable for being operated according to the priority assignation for the regular data for the regular data
Set corresponding permission.
B12. the device according to any one of B7-B11, wherein the building module is further adapted for:
Regular data is obtained, and syntactic verification is carried out to the regular data;
If the regular data syntactic verification is qualified, the regular data is stored in rule base.
The invention also discloses: a kind of calculating equipment of C13., comprising: processor, memory, communication interface and communication are total
Line, the processor, the memory and the communication interface complete mutual communication by the communication bus;
The memory executes the processor such as storing an at least executable instruction, the executable instruction
The corresponding operation of processing task executing method described in any one of A1-A6.
The invention also discloses a kind of computer storage medium of D14., being stored at least one in the storage medium can be held
Row instruction, the processing task executing method that the executable instruction executes processor as described in any one of A1-A6 are corresponding
Operation.
Claims (10)
1. a kind of processing task executing method, the processing task inputted in pel operation interface based on user at least one
The syntagmatic of a algorithm assembly and create, which comprises
Rule base is constructed in advance, is stored at least one regular data in the rule base, is included in every rule data
Regular condition data and rules results data corresponding with the rule condition data;
Processing task data is obtained, by the regular item at least one regular data in the processing task data and rule base
Number of packages evidence matches, the determining goal rule condition data to match with the processing task data;
It is corresponding with the processing task data according to rules results data corresponding with goal rule condition data determination
Processing result.
2. according to the method described in claim 1, wherein, at least one by the processing task data and rule base
Rule condition data in regular data match, the determining goal rule condition data to match with the processing task data
Further comprise:
At least one rule condition data in the rule base are converted to the rule set of default tree structure;
According to the rule set of the default tree structure, the determining goal rule conditional number to match with the processing task data
According to.
3. according to the method described in claim 2, wherein, however, it is determined that the goal rule item to match with the processing task data
Number of packages evidence is a plurality of;
Then basis rules results data determination corresponding with the goal rule condition data and the processing number of tasks
Further comprise according to corresponding processing result:
Using preset conflict resolution algorithm, processing result corresponding with the goal rule condition data is determined.
4. according to the method described in claim 3, wherein, the preset conflict resolution algorithm of the use determines and the target
The corresponding processing result of rule condition data further comprises:
According to the priority of regular data corresponding with a plurality of goal rule condition data that matches of processing task data,
Determine processing result corresponding with the goal rule condition data.
5. method according to any of claims 1-4, wherein the method also includes:
It is operated according to the priority assignation for the regular data, configures corresponding permission for the regular data.
6. method according to any one of claims 1-5, wherein the preparatory building rule base further comprises:
Regular data is obtained, and syntactic verification is carried out to the regular data;
If the regular data syntactic verification is qualified, the regular data is stored in rule base.
7. a kind of processing task execution device, the processing task inputted in pel operation interface based on user at least one
The syntagmatic of a algorithm assembly and create, described device includes:
Module is constructed, is suitable for building rule base in advance, is stored at least one regular data, every rules and regulations in the rule base
It then include rule condition data and rules results data corresponding with the rule condition data in data;
Matching module is suitable for obtaining processing task data, by least one rule in the processing task data and rule base
Rule condition data in data match, the determining goal rule condition data to match with the processing task data;
Determining module is suitable for according to rules results data corresponding with goal rule condition data determination and the processing
The corresponding processing result of task data.
8. device according to claim 7, wherein the matching module is further adapted for:
At least one rule condition data in the rule base are converted to the rule set of default tree structure;
According to the rule set of the default tree structure, the determining goal rule conditional number to match with the processing task data
According to.
9. a kind of calculating equipment, comprising: processor, memory, communication interface and communication bus, the processor, the storage
Device and the communication interface complete mutual communication by the communication bus;
The memory executes the processor as right is wanted for storing an at least executable instruction, the executable instruction
Ask the corresponding operation of processing task executing method described in any one of 1-6.
10. a kind of computer storage medium, an at least executable instruction, the executable instruction are stored in the storage medium
Processor is set to execute such as the corresponding operation of processing task executing method of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811243211.2A CN109445797A (en) | 2018-10-24 | 2018-10-24 | Handle task executing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811243211.2A CN109445797A (en) | 2018-10-24 | 2018-10-24 | Handle task executing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109445797A true CN109445797A (en) | 2019-03-08 |
Family
ID=65548292
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811243211.2A Pending CN109445797A (en) | 2018-10-24 | 2018-10-24 | Handle task executing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109445797A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110187874A (en) * | 2019-05-13 | 2019-08-30 | 第四范式(北京)技术有限公司 | A kind of regular configuration method executed in computer equipment and device |
CN110515621A (en) * | 2019-08-26 | 2019-11-29 | 沈阳美行科技有限公司 | Method and device for realizing list function attribute and related equipment |
CN110674171A (en) * | 2019-09-12 | 2020-01-10 | 苏州浪潮智能科技有限公司 | Script generation method and device and data processing method and device |
CN110825920A (en) * | 2019-10-22 | 2020-02-21 | 厦门市美亚柏科信息股份有限公司 | Data processing method and device |
CN111400313A (en) * | 2020-02-27 | 2020-07-10 | 中国建设银行股份有限公司 | Method and device for processing request |
CN115250188A (en) * | 2021-04-27 | 2022-10-28 | 中国移动通信集团广东有限公司 | Network security protection method, device and system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040034848A1 (en) * | 2002-08-09 | 2004-02-19 | Eric Moore | Rule engine |
CN105786868A (en) * | 2014-12-23 | 2016-07-20 | 阿里巴巴集团控股有限公司 | Information sorting method and device |
CN106020811A (en) * | 2016-05-13 | 2016-10-12 | 乐视控股(北京)有限公司 | Development method and device of algorithm model |
CN106874255A (en) * | 2015-12-11 | 2017-06-20 | 北京国双科技有限公司 | Method and device for rule matching |
CN107196871A (en) * | 2017-04-14 | 2017-09-22 | 同济大学 | A kind of stream rule conflict detection method and system based on alias stipulations tree |
CN107645403A (en) * | 2016-07-22 | 2018-01-30 | 阿里巴巴集团控股有限公司 | Terminal rule engine apparatus, terminal rule operation method |
CN108365989A (en) * | 2018-01-26 | 2018-08-03 | 北京奇虎科技有限公司 | Event-handling method and device |
-
2018
- 2018-10-24 CN CN201811243211.2A patent/CN109445797A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040034848A1 (en) * | 2002-08-09 | 2004-02-19 | Eric Moore | Rule engine |
CN105786868A (en) * | 2014-12-23 | 2016-07-20 | 阿里巴巴集团控股有限公司 | Information sorting method and device |
CN106874255A (en) * | 2015-12-11 | 2017-06-20 | 北京国双科技有限公司 | Method and device for rule matching |
CN106020811A (en) * | 2016-05-13 | 2016-10-12 | 乐视控股(北京)有限公司 | Development method and device of algorithm model |
CN107645403A (en) * | 2016-07-22 | 2018-01-30 | 阿里巴巴集团控股有限公司 | Terminal rule engine apparatus, terminal rule operation method |
CN107196871A (en) * | 2017-04-14 | 2017-09-22 | 同济大学 | A kind of stream rule conflict detection method and system based on alias stipulations tree |
CN108365989A (en) * | 2018-01-26 | 2018-08-03 | 北京奇虎科技有限公司 | Event-handling method and device |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110187874A (en) * | 2019-05-13 | 2019-08-30 | 第四范式(北京)技术有限公司 | A kind of regular configuration method executed in computer equipment and device |
CN110187874B (en) * | 2019-05-13 | 2023-12-15 | 第四范式(北京)技术有限公司 | Rule configuration method and device executed in computer equipment |
CN110515621A (en) * | 2019-08-26 | 2019-11-29 | 沈阳美行科技有限公司 | Method and device for realizing list function attribute and related equipment |
CN110515621B (en) * | 2019-08-26 | 2022-11-11 | 沈阳美行科技股份有限公司 | Method and device for realizing list function attribute and related equipment |
CN110674171A (en) * | 2019-09-12 | 2020-01-10 | 苏州浪潮智能科技有限公司 | Script generation method and device and data processing method and device |
CN110825920A (en) * | 2019-10-22 | 2020-02-21 | 厦门市美亚柏科信息股份有限公司 | Data processing method and device |
CN110825920B (en) * | 2019-10-22 | 2022-06-10 | 厦门市美亚柏科信息股份有限公司 | Data processing method and device |
CN111400313A (en) * | 2020-02-27 | 2020-07-10 | 中国建设银行股份有限公司 | Method and device for processing request |
CN115250188A (en) * | 2021-04-27 | 2022-10-28 | 中国移动通信集团广东有限公司 | Network security protection method, device and system |
CN115250188B (en) * | 2021-04-27 | 2023-09-19 | 中国移动通信集团广东有限公司 | Network security protection method, device and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109324793A (en) | Support the processing system and method for algorithm assembly | |
CN109445797A (en) | Handle task executing method and device | |
WO2021114530A1 (en) | Hardware platform specific operator fusion in machine learning | |
CN105164639B (en) | Control being executed by computing system for task | |
CN109445774A (en) | Method for processing business and device based on pelization operation | |
US10579349B2 (en) | Verification of a dataflow representation of a program through static type-checking | |
CN108139898B (en) | Data processing graph compilation | |
CN113094164A (en) | Task processing device and method, computer equipment and storage medium | |
CN109343856A (en) | The generation method and device of custom algorithm component | |
US9396095B2 (en) | Software verification | |
CN104407968B (en) | A kind of method that the code command longest run time is calculated by static analysis | |
Kreitz et al. | A proof environment for the development of group communication systems | |
CN106775951A (en) | A kind of operation management method and device of Android application | |
Danelutto et al. | Data stream processing via code annotations | |
CN106648839A (en) | Method and device for processing data | |
CN109634714A (en) | A kind of method and device of intelligent scheduling | |
US10255119B2 (en) | Parallelization method, parallelization tool and vehicle-mounted device | |
CN109117381A (en) | The adjusting, measuring method and device of processing task | |
CN107506623A (en) | Reinforcement means and device, computing device, the computer-readable storage medium of application program | |
Ruschke et al. | A near optimal integrated solution for resource constrained scheduling, binding and routing on CGRAs | |
CN116132139A (en) | Scenario execution method, scenario execution device, scenario execution equipment, scenario execution storage medium and scenario execution program product | |
CN108960455A (en) | Service operation state analysis method, calculates equipment and storage medium at device | |
US8621430B2 (en) | Method for code transformation supporting temporal abstraction of parameters | |
US20150370689A1 (en) | Automated defect positioning based on historical data | |
US11573777B2 (en) | Method and apparatus for enabling autonomous acceleration of dataflow AI applications |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190308 |
|
RJ01 | Rejection of invention patent application after publication |