CN1318969C - High-efficient processing method of working-fluid engine - Google Patents

High-efficient processing method of working-fluid engine Download PDF

Info

Publication number
CN1318969C
CN1318969C CNB200410021268XA CN200410021268A CN1318969C CN 1318969 C CN1318969 C CN 1318969C CN B200410021268X A CNB200410021268X A CN B200410021268XA CN 200410021268 A CN200410021268 A CN 200410021268A CN 1318969 C CN1318969 C CN 1318969C
Authority
CN
China
Prior art keywords
engine
definition
flow definition
processing
handling
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.)
Expired - Fee Related
Application number
CNB200410021268XA
Other languages
Chinese (zh)
Other versions
CN1680923A (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.)
Neusoft Corp
Original Assignee
DONGRUAN GROUP Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by DONGRUAN GROUP Co Ltd filed Critical DONGRUAN GROUP Co Ltd
Priority to CNB200410021268XA priority Critical patent/CN1318969C/en
Publication of CN1680923A publication Critical patent/CN1680923A/en
Application granted granted Critical
Publication of CN1318969C publication Critical patent/CN1318969C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention belongs to the technology of a work flow system, particularly to a method for processing a work flow engine with high efficiency. The work flow engine is run in an application program way. The procedure of a processing request of the engine is divided into an external resource visit part, an object logical conversion part and an object persistence part, wherein the external resource visit uses memory for finding operation; errors which probably occur during an implementation course are all examined in the object logical conversion stage; object persistence operation is executed after a user's request is returned. The engine uses the method of the present invention so as to realize effective separation of processing stages. Through the combination of memory buffering, concurrent processing and buffer queues, an effect which is the same as the effect of memory processing is reached. Because the response time of an engine processing request is in a memory operation level, a user can obtain a higher response speed. The processing efficiency can be linearly increased when the number of engines is increased.

Description

The efficient method of handling of a kind of workflow engine
Technical field
The invention belongs to the Workflow system technology, the efficient method of handling of specifically a kind of workflow engine.
Technical background
When workflow engine was being handled, the internal logic conversion of the stream of will dealing with the work usually comprised Object Creation, state exchange, data transfer and condition parsing etc. in the prior art; To visit external resource information in the logical process process; After relevant object logics is finished dealing with, need carry out persistence to referent and handle, so that the user can visit and handle subsequently.Be that the user asks and need be carried out synchronously, may need simultaneously by various means visit persistence object.Its implementation as shown in Figure 1.Because when user's synchronization request, mistake appears in any one link, all should the feedback user error result.Therefore, need each stage of wait all to finish, just return user's request.Wherein external information visit and Object Persistence are handled, and will expend long time, thereby cause user's response delay in time.
In order to solve the problem of efficient processing, people generally will consider many engines and work simultaneously, but under classic method, when disposing many engines, because each stage of processing of request is that linearity is finished, user's request responding time is the time that all processes finish.Like this, when many engines are handled request simultaneously, can cause occupying and fight in the data persistence phase resource, and the delay of persistence operation will be directly reflected on the subscriber response time, promptly, along with the increase of engine, the time of single engine process user request will be progressively elongated, and whole engine cluster can be handled the quantity of request and can not reach effective growth in the unit interval.
Summary of the invention
For solving long problem of response time, the purpose of this invention is to provide the efficient method of handling of a kind of workflow engine, adopt the present invention to significantly reduce the response time.
Technical solution of the present invention is to achieve these goals: the mode with application program is moved workflow engine, the process of engine being handled request is divided into external information visit, object logics conversion and Object Persistence three parts, and wherein: described external information visit uses internal memory to search; Contingent mistake is all checked at the object logics translate phase in the implementation; Object Persistence operates in to be returned the user and asks the back to be carried out; Specifically: carry out working procedure, at first carry out the external information visit, search by internal memory and obtain external resource; Carry out logical operation after obtaining external resource, resolve the external resource content, contingent mistake in the whole process was checked in this stage; Make persistence at last and handle, deposit analysis result in database, and ask the back to be carried out returning the user.
External information visit of the present invention is the process that obtains handling the required resource of request, means the visit to ' flow definition ' information; Described ' flow definition ' is the directed tree of band ' node ', and this directed tree is to allow to use the loop on standard directed tree definition basis, that is: except that root node, other node indegree can be greater than 1; Start node is a tree root, and end node is a leaf, and other node is a take-off point; In internal memory, each ' flow definition ' corresponding one ' tree ', all ' trees ' constitutes ' forest '; The one-to-one relationship of position in the sign of definition ' tree ' and its place ' forest ' outside ' forest ', and outside ' forest ', define the mapping relations of described node and flow process;
Described working procedure flow process is: at first obtain flow definition, engine obtains according to the parameter that message comprises, to obtain the sign of flow definition after a piece of news, obtains the flow definition object according to this sign from internal memory; Then the flow definition object is carried out validity checking,, be back to and send the processing failed message if condition does not satisfy; Condition satisfies, and circulates downwards to process of analysis to define; Browsing process definition information in the process of analysis definition procedure, and create new object or revise the object that has existed with the operation of the correspondence form with SQL statement, is cached to the SQL formation in the internal memory; Resolving the logical gate of having finished current message when finishing when flow definition handles; If flow definition is resolved and do not finished, will continue the process of analysis definition; When the logical gate of message is finished dealing with, send the processing success message, otherwise send the processing failed message; Logical gate is handled under the correct situation, calls persistence and handle after user's request is returned, and from the SQL statement of acquisition of SQL buffer queue and execution buffer memory, the execution of SQL statement is carried out in the mode of thread;
When engine-operated, flow definition is in internal memory, and searching of flow definition is to carry out in internal memory.
The present invention has following advantage:
1. significantly reduced the response time.Compare with the prior art scheme, the present invention has reduced the time that flow definition is searched by the flow definition memorization; At the object logics translate phase, check all contingent mistakes, guarantee that the Object Persistence operation can ask the back to be carried out returning the user; The persistence operation is handled in the mode of thread and has been strengthened concurrency.Thereby the message response time is accelerated (speed of processing messages can reach 30~50 of per seconds) significantly; And during the concurrent working of many engines, avoided the influence to efficient that causes owing to fighting for of resource, efficient can reach linear growth.
2. method is simple.The engine that uses this method to realize is a simple application program, is different from the solution of EJB framework, and deployment request is low, and is easy to be flexible.
Description of drawings
Under Fig. 1 prior art, the implementation of traditional workflow engine disposal route.
Implementation under Fig. 2 the inventive method.
Fig. 3 is a working procedure process flow diagram of the present invention.
Embodiment
Mode with application program is moved workflow engine, takes the mode of each stage decomposition, and the entire process process is divided into three phases: external information visit, object logics conversion, Object Persistence are handled, and described external information visit use internal memory is searched; Contingent mistake is all checked at the object logics translate phase in the implementation; Object Persistence operates in to be returned the user and asks the back to be carried out.Its implementation as shown in Figure 2.With this realize responding efficient; Be specially:
Described external information visit is the process that obtains handling the required resource of request, mainly refer to visit to ' flow definition ' information, ' flow definition ' essence is that the directed tree of ' node ' is represented, but this directed tree allows to use the loop on standard directed tree definition basis, that is: except that root node, other node indegree can be greater than 1; Start node is a tree root, and end node is a leaf, and other node is a take-off point.During engine start, all flow definition information of disposable loading; In internal memory, each ' flow definition ' corresponding one ' tree ', all ' trees ' constitutes ' forest '.For in ' forest ', searching a certain ' tree ' apace, outside ' forest ', safeguard the mapping relations of position in the sign of ' tree ' and its place ' forest '.Engine in message processing procedure, also need to begin visit ' forest ' from node, promptly find corresponding ' tree ' according to ' take-off point ' sign, for reaching fast access, outside ' forest ', the mapping relations of defined node and flow process, the i.e. mapping relations of ' take-off point ' sign and ' tree ' under it; Like this, any ' tree ' and ' take-off point ' searching in whole ' forest ' by ' forest ' outer mapping relations, can be finished in millisecond; Flow definition in the internal memory needs checking process definition status information in use, if the external memory flow definition is revised, needs the flow definition in the updating memory.
Described object logics conversion mainly refers to finish the caused object logics of request and handles.The user is after the request of sending, in case object logics is finished dealing with, engine returns user's request immediately, and notice is finished.In the object logics conversion process, all contingent logic errors of verification,, flow definition mistake unusual such as Obj State etc. are finished dealing with in case guarantee object logics, and any logicality mistake relevant with this request can not take place again.This method is different from the asynchronous request of traditional approach, and during asynchronous request, the user can't know whether processing is correctly finished.
Described Object Persistence is handled and is begun to carry out when the engine object logical process finishes, and in the time of client side wait-for-response, does not comprise the time of persistence.When many requests were handled simultaneously, engine passed through the concurrent execution of database connection pool with buffer memory persistence operation requests in buffer queue.
If a plurality of engines are worked simultaneously, to reach the effect of efficient linear growth, because under many engines, the persistence operation will be carried out the efficient step-down because resource fights for, but because user's request responding time of the present invention does not comprise the time of persistence operation, thereby single engine is handled request efficiency and can not descended because of the reduction of persistence efficient, and the ability of the request of can handling in the unit interval of whole engine cluster can effectively improve.
Fig. 3 has described the situation (step among the figure is numbered with arabic numeral) when the present invention moves.Specific as follows:
Step 1 is for obtaining flow definition, and engine obtains a piece of news, and (with ' flow definition instantiation ' is example.The flow definition instantiation be meant flow definition produce should be new flow instance, and produce pending task) after, the parameter that comprises according to message at first obtains the sign of flow definition, obtains the flow definition object according to this sign from internal memory.
Whether step 2 is validity checking, obtains after the flow definition, carries out verification operation, but satisfy such as the authority of inspection process definition instantiation, and whether this flow definition of authority instantiation is promptly arranged.If each condition satisfies, circulation downwards, otherwise return the processing failed message.
Step 3,4 is the process of analysis definition, may create new object (for example, charg`e d'affaires's task) during this or revise the object that has existed, but corresponding database manipulation is not directly carried out, and, be cached to the SQL formation in the internal memory just with the operation of correspondence form with SQL statement; In the resolving, need browsing process definition information; Generally, to the processing of a piece of news, be not to resolve complete flow definition, but reach some condition (such as the new Pending tasks of generation, and charg`e d'affaires's task need be waited for people's participation); When reaching such condition, the caused flow definition of this message is resolved and is finished, and promptly finishes the logical gate of current message and handles; Otherwise, will return step 3 and continue downward process of analysis definition; Resolve (the process logic result is correct) when finishing when flow definition, send the processing success message,, handle successfully, otherwise send the processing failed message to step 6 with notice request person.
Step 5 is searched for flow definition, promptly obtains flow definition from internal memory; The flow definition access portion of the corresponding whole workflow implementation of this step in the object logics processing procedure, can call this step.
Step 6 is for sending the processing failed message, and when making a mistake in the logical process, interrupt message is carried out, and notice request person handles failure, and the requestor can obtain error reason from return messages.
Step 7 is called when logical process correctly finishes for sending the processing success message.
Step 8 is handled for persistence, and persistence operates in to be called after user's request is returned, and from the SQL statement of acquisition of SQL buffer queue and execution buffer memory, the execution of SQL statement should be carried out in the mode of thread, not influence the processing of a piece of news down.Owing to there is not the problem of logic, the relevant mistake of workflow can not take place in the execution of database side in SQL, unless hardware problem or first floor system problem; The Object Persistence part of the corresponding whole workflow implementation of this step.
The described step 1 of present embodiment~step 4 is the object logics conversion portion of whole workflow implementation.The logic of whole procedure realizes that with the java statement database manipulation uses JDBC.
The inventive method is moved workflow engine in the mode of application program, and response user synchronization request is finished the persistence operation simultaneously when being handled by engine.Traditional method is when handling, and engine wants completion logic conversion simultaneously and persistence to operate, if logic complexity, the persistence operation amount that relates to are big, needs the very long processing time so.Engine uses the inventive method, and the effective separation with realize each processing stage by the combination of memory cache, concurrent processing and buffer queue, reaches with internal memory and handles identical effect.Because engine is handled the request responding time all in the internal memory operation level, the user can obtain high response speed.General other workflow engine is when the response synchronization request, and speed is between 0.5~5 of per second, and engine is when this method of use, and speed can reach 30~50 of per seconds.And the efficient of handling can be linear growth when increasing the engine number.
Technique effect: engine processing request responding is the object logics processing time around, and the speed of processing messages can reach 30~50 of per seconds.

Claims (7)

1. the efficient method of handling of a workflow engine, it is characterized in that: the mode with application program is moved workflow engine, the process of engine being handled request is divided into external information visit, object logics conversion and Object Persistence three parts, and wherein: described external information visit uses internal memory to search; Contingent mistake is all checked at the object logics translate phase in the implementation; Object Persistence operates in to be returned the user and asks the back to be carried out; Specifically: carry out working procedure, at first carry out the external information visit, search by internal memory and obtain external resource; Carry out logical operation after obtaining external resource, resolve the external resource content, contingent mistake in the whole process was checked in this stage; Make persistence at last and handle, deposit analysis result in database, and ask the back to be carried out returning the user.
2. according to the efficient method of handling of the described workflow engine of claim 1, it is characterized in that: described external information visit is the process that obtains handling the required resource of request, means the visit to ' flow definition ' information.
3. according to the efficient method of handling of the described workflow engine of claim 2, it is characterized in that: described ' flow definition ' is the directed tree of band ' node ', this directed tree is to allow to use the loop on standard directed tree definition basis, that is: except that root node, other node indegree can be greater than 1; Start node is a tree root, and end node is a leaf, and other node is a take-off point.
4. according to claim 1 or the efficient method of handling of 2 described workflow engines, it is characterized in that: in internal memory, each ' flow definition ' corresponding one ' tree ', all ' trees ' constitutes ' forest '.
5. according to the efficient method of handling of the described workflow engine of claim 4, it is characterized in that: the one-to-one relationship of position in the sign of definition ' tree ' and its place ' forest ' outside ' forest '; And outside ' forest ', define the mapping relations of described node and flow process.
6. according to the efficient method of handling of the described workflow engine of claim 1, it is characterized in that: described working procedure flow process is: at first obtain flow definition, engine obtains after a piece of news, the parameter that comprises according to message, obtain the sign of flow definition, from internal memory, obtain the flow definition object according to this sign; Then the flow definition object is carried out validity checking,, be back to and send the processing failed message if condition does not satisfy; Condition satisfies, and circulates downwards to process of analysis to define; Browsing process definition information in the process of analysis definition procedure, and create new object or revise the object that has existed with the operation of the correspondence form with SQL statement, is cached to the SQL formation in the internal memory; Resolving the logical gate of having finished current message when finishing when flow definition handles; If flow definition is resolved and do not finished, will continue the process of analysis definition; When the logical gate of message is finished dealing with, send the processing success message, otherwise send the processing failed message; Logical gate is handled under the correct situation, calls persistence and handle after user's request is returned, and from the SQL statement of acquisition of SQL buffer queue and execution buffer memory, the execution of SQL statement is carried out in the mode of thread.
7. state the efficient method of handling of workflow engine according to claim 1 or 2, it is characterized in that: when engine-operated, flow definition is in internal memory, and searching of flow definition is to carry out in internal memory.
CNB200410021268XA 2004-04-09 2004-04-09 High-efficient processing method of working-fluid engine Expired - Fee Related CN1318969C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200410021268XA CN1318969C (en) 2004-04-09 2004-04-09 High-efficient processing method of working-fluid engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200410021268XA CN1318969C (en) 2004-04-09 2004-04-09 High-efficient processing method of working-fluid engine

Publications (2)

Publication Number Publication Date
CN1680923A CN1680923A (en) 2005-10-12
CN1318969C true CN1318969C (en) 2007-05-30

Family

ID=35067522

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200410021268XA Expired - Fee Related CN1318969C (en) 2004-04-09 2004-04-09 High-efficient processing method of working-fluid engine

Country Status (1)

Country Link
CN (1) CN1318969C (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100367204C (en) * 2006-06-27 2008-02-06 中国科学院软件研究所 Mode conversion method and system from software process to workflow
CN102236679A (en) * 2010-04-27 2011-11-09 杭州德昌隆信息技术有限公司 Method and device for outputting workflow based on browser page
CN102479354B (en) * 2010-11-29 2015-10-07 平安科技(深圳)有限公司 A kind of data processing method based on workflow and system
CN102419833A (en) * 2011-09-23 2012-04-18 方欣科技有限公司 Workflow engine system and workflow processing method
CN102521712B (en) * 2011-12-27 2015-09-23 东软集团股份有限公司 A kind of process instance data processing method and device
CN105550319B (en) * 2015-12-12 2019-06-25 天津南大通用数据技术股份有限公司 The optimization method of persistence under a kind of cluster Consistency service high concurrent
CN110135696A (en) * 2019-04-12 2019-08-16 平安普惠企业管理有限公司 System call method and device
CN110348818B (en) * 2019-07-17 2024-01-19 博仕瀚道(上海)信息科技有限公司 Intelligent process processing method and system for process engine

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001025906A1 (en) * 1999-10-01 2001-04-12 Global Graphics Software Limited Method and system for arranging a workflow using graphical user interface
US20020174002A1 (en) * 2001-05-18 2002-11-21 Huba Horompoly Method for parameter management for business process workflows
US6640299B1 (en) * 2000-04-21 2003-10-28 Ati International Srl Method and apparatus for arbitrating access to a computational engine for use in a video graphics controller

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001025906A1 (en) * 1999-10-01 2001-04-12 Global Graphics Software Limited Method and system for arranging a workflow using graphical user interface
US6640299B1 (en) * 2000-04-21 2003-10-28 Ati International Srl Method and apparatus for arbitrating access to a computational engine for use in a video graphics controller
US20020174002A1 (en) * 2001-05-18 2002-11-21 Huba Horompoly Method for parameter management for business process workflows

Also Published As

Publication number Publication date
CN1680923A (en) 2005-10-12

Similar Documents

Publication Publication Date Title
CN101021874B (en) Method and apparatus for optimizing request to poll SQL
Yuan et al. Spark-GPU: An accelerated in-memory data processing engine on clusters
US7451136B2 (en) System and method for searching multiple disparate search engines
US7324985B2 (en) Methods and systems for database statement execution plan optimization
CN103136364B (en) Clustered database system and data query processing method thereof
US11169994B2 (en) Query method and query device
CN107451220A (en) A kind of distributed NewSQL Database Systems
CN1897025A (en) Parallel ETL technology of multi-thread working pack in mass data process
CN111061788A (en) Multi-source heterogeneous data conversion integration system based on cloud architecture and implementation method thereof
Sivaramakrishnan et al. MultiMLton: A multicore-aware runtime for standard ML
CN113032423B (en) Query method and system based on dynamic loading of multiple data engines
CN1318969C (en) High-efficient processing method of working-fluid engine
CN109063017A (en) A kind of data persistence location mode of cloud computing platform
US20090144528A1 (en) Method for running native code across single or multi-core hybrid processor achitecture
US8473954B2 (en) Executing operations via asynchronous programming model
CN112328410A (en) Method, device, equipment and storage medium for realizing remote procedure call
CN111221841A (en) Real-time processing method and device based on big data
Pantilimonov et al. Machine code caching in postgresql query jit-compiler
CN109117198B (en) Ultra-high-speed parallel self-optimization service calling method based on cost evaluation
Lin et al. Enhancing external consistency in real-time transactions
CN110908641B (en) Visualization-based stream computing platform, method, device and storage medium
CN114489579B (en) Implementation method of non-perception big data computing middleware
US11526496B2 (en) Distributed database architecture based on shared memory and multi-process and implementation method thereof
CN117472335A (en) Job development architecture, job processing method, storage medium, and electronic device
CN117891827A (en) Data processing method, data processing apparatus, and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: SHENYANG NEUSOFT SOFTWARE CO., LTD.

Free format text: FORMER OWNER: DONGRUAN GROUP CO., LTD.

Effective date: 20080620

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20080620

Address after: Lane 3, Lane 11, Wenhua Road, Heping District, Shenyang

Patentee after: Shenyang Dongruan Software Co., Ltd.

Address before: Liaoning city of Shenyang Province Hunnan hi tech Industrial Development Zone, East Software Park

Patentee before: Dongruan Group Co., Ltd.

C56 Change in the name or address of the patentee

Owner name: NEUSOFT GROUP CO., LTD.

Free format text: FORMER NAME OR ADDRESS: SHENYANG NEUSOFT SOFTWARE CO., LTD.

CP03 Change of name, title or address

Address after: Hunnan rookie street Shenyang city Liaoning province 2 No.

Patentee after: Neusoft Group Corporation

Address before: Lane 3, Lane 11, Wenhua Road, Heping District, Shenyang

Patentee before: Shenyang Dongruan Software Co., Ltd.

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070530

Termination date: 20170409

CF01 Termination of patent right due to non-payment of annual fee