CN104679493A - Improved method for process event handling mechanism - Google Patents

Improved method for process event handling mechanism Download PDF

Info

Publication number
CN104679493A
CN104679493A CN201310631410.1A CN201310631410A CN104679493A CN 104679493 A CN104679493 A CN 104679493A CN 201310631410 A CN201310631410 A CN 201310631410A CN 104679493 A CN104679493 A CN 104679493A
Authority
CN
China
Prior art keywords
event
procedure
handling
sniffer
improving
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201310631410.1A
Other languages
Chinese (zh)
Other versions
CN104679493B (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.)
BEIJING TIANDI SUPERCLOUD Co Ltd
Original Assignee
BEIJING TIANDI SUPERCLOUD 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 BEIJING TIANDI SUPERCLOUD Co Ltd filed Critical BEIJING TIANDI SUPERCLOUD Co Ltd
Priority to CN201310631410.1A priority Critical patent/CN104679493B/en
Publication of CN104679493A publication Critical patent/CN104679493A/en
Application granted granted Critical
Publication of CN104679493B publication Critical patent/CN104679493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of computer software programs, and specifically discloses an improved method for a process event handling mechanism. The method comprises the steps of pre-defining an occurred event by an event producer; producing an event at the key service process through the even producer; providing an event transmission interface by the event producer through a process event processing frame to transmit the produced event to an event handling thread; monitoring the produced event by an event monitoring person through an event monitor; registering into an event monitor cache through the registration mode provided by the event handling frame; embedding the event processing process of the process event handling frame to a transfer part of the event transmission interface in the key service process; operating the event according to the information in the event monitor cache when a new event is produced and pushed each time. With the adoption of the method, the problem of coordinating work to the third party can be solved; the handling capacity of the event processing mechanism can be enriched; a powerful tool is provided for enabling flexible program development.

Description

Improving one's methods of a kind of event processing mechanism of procedure
Technical field
The present invention relates to computer software programs technical field, especially relate to improving one's methods of a kind of event processing mechanism of procedure.
Background technology
Now a lot of company is when development, in order to the life cycle continuity that ensures product and the exploitation sooner of accelerating product with release, all can wherein reusable extracting section out as basic storehouse or platform feature use.Event processing mechanism is one of them.So-called event processing mechanism refers in program normal flow process, and some key points provide generation event, and carries out the mechanism of interaction by the mode of activation event and third party.Data event treatment mechanism is more specialized on event processing mechanism, its focused data object, and for data object renewal rewards theory (before comprising interpolation, add after, before amendment, after amendment, delete before, delete after) produce data event and provide interactive with third party.
Can have multiple for the third party of response events in existing event processing mechanism, in most of implementation, multiple response events registers order order to perform.Now event processing mechanism does not consider the logical relation between third party, causes multiple third party to carry out cooperative work, as shown in Figure 1.
Effective scheme is not also had to solve the problems referred to above at present.
Summary of the invention
Technical matters solved by the invention is to provide the flexible framework that a kind of program realizes, and the event handler procedure of procedure combines with event processing mechanism by the present invention, solves the problem of work coordination between third party.The present invention can enrich the processing power of event processing mechanism, for program development provides powerful more flexibly.
In order to solve the problems of the technologies described above, the invention provides improving one's methods of a kind of event processing mechanism of procedure, comprising:
S1: the event that event producer's predefine produces;
S2: described event producer produces described event at key business process place;
S3: described event producer uses procedure event handling framework to provide event transfer interface by the described event transfer of production to event handling thread;
S4: action listener person is monitored by event sniffer the described event of producing, and is registered in described event sniffer buffer memory by the logon mode that described event handling framework provides;
S5: the event handling flow process of described procedure event handling framework is embedded into the event transfer interface interchange place in key business process; Produce new event when each and when pushing, carry out event operation according to the information in event sniffer buffer memory.
Preferably, in described step S1, described event is made up of event identifier and event detail information two parts; Described event identifier be one can presentation of events meaning but overall unique character string again, ensure its uniqueness at system scope; Described event detail information is for storing the data message relevant to event, and described data message will pass to event consumer, event detail information structurally variable, but the requirement of demand fulfillment procedure event handling framework.
Be more preferably, in described step S2, described key business process is crucial program behavior; Described key business process comprises data object to be increased front/rear, and data object upgrades front/rear and data object deletion is front/rear.
Be more preferably, described procedure event handling framework comprises: procedure event buffer, procedure event registration, procedure event handling flow process and event transfer interface.
Be more preferably, described procedure event buffer refers to: modification list event sniffer buffer memory is procedure event sniffer buffer memory, and buffer memory adopts the data structure that can store multiple flow logic.
Be more preferably, described procedure event registration refers to: the logon mode of described procedure event handling framework when initialization in meeting scan event registration memory block, and described logon mode comprises: program code, Spring configuration file, Properties configuration file and database event information storage list; Aforesaid way supports that one or more modes are used in combination; By described logon mode, read all event sniffer descriptors, be combined into the event sniffer data structure of procedure, and be stored in described procedure event sniffer buffer memory.
Be more preferably, described procedure event handling flow process refers to: based on the event operation frame of procedure event sniffer buffer memory, supports the mode that sequential affair performs, conditional event performs, recurrence event performs and condition recurrence event performs; The mode that above-mentioned event performs is combined by link, nested mode, and formation has the procedure event flow process improving logic and performs.
Be more preferably, described event transfer interface refers to: described procedure event handling framework is supplied to event producer, is processed by the event transfer of generation by event transfer interface to the described procedure event handling flow process of framework.
Be more preferably, the detailed process of described step S5 is:
A event that () obtains procedure event handling framework built-in runs initial flow process, starts event handling, and sets up operation implementation according to the content of event sniffer buffer memory;
B () runs first event handling flow process;
C () checks whether downstream audiomonitor pointer exists after running,
If existed, return step b for downstream;
If there is no steps d below is then continued;
D () performs the built-in event of procedure event handling framework and to run abort flow process, reclaim and perform resource, return execution result.
Wherein, described data event treatment mechanism a kind ofly provides the framework providing extra embedded operation in data object renewal process with event mode, such as, can carry out extra operation by case mechanism before data object increases, and even cancelling data increases.
The present invention compared with prior art, has following beneficial effect:
The invention provides the flexible framework that a kind of program realizes, the event handler procedure of procedure is combined with event processing mechanism, solves the problem of work coordination between third party.The present invention can enrich the processing power of event processing mechanism, for program development provides powerful more flexibly.
Accompanying drawing explanation
The schematic flow sheet of what Fig. 1 was exemplary show existing event processing mechanism;
What Fig. 2 was exemplary shows schematic flow sheet of the present invention.
Embodiment
Technical matters solved for a better understanding of the present invention, the technical scheme provided, below in conjunction with drawings and Examples, be further elaborated to the present invention.Specific embodiment described herein only in order to explain enforcement of the present invention, but is not intended to limit the present invention.
In a preferred embodiment, contrast with Fig. 1, what Fig. 2 was exemplary shows the event processing mechanism schematic flow sheet of the present invention after improving; Comprise:
Step one: the event that event producer's predefine produces;
Step 2: described event producer is in key business process place production event;
Step 3: described event producer uses procedure event handling framework to provide event transfer interface by the event transfer of production to event handling thread;
Step 4: the event of action listener person to described production is monitored by event sniffer, and be registered in described event sniffer buffer memory by the logon mode that described event handling framework provides;
Step 5: the event handling flow process of described procedure event handling framework is embedded into the event transfer interface interchange place in key business process; Produce new event when each and when pushing, carry out event operation according to the information in event sniffer buffer memory.
In the embodiment be more preferably, in described step one, described event is made up of event identifier and event detail information two parts; Described event identifier be one can presentation of events meaning but overall unique character string again, ensure its uniqueness at system scope; Described event detail information is for storing the data message relevant to event, and described data message will pass to event consumer, event detail information structurally variable, but the requirement of demand fulfillment procedure event handling framework.
In the embodiment be more preferably, in described step 2, described key business process is crucial program behavior; Described key business process comprises data object to be increased front/rear, and data object upgrades front/rear and data object deletion is front/rear.
In the embodiment be more preferably, described procedure event handling framework comprises: procedure event buffer, procedure event registration, procedure event handling flow process and event transfer interface;
A) procedure event buffer: modification list event sniffer buffer memory is procedure event sniffer buffer memory, buffer memory adopts the data structure that can store multiple flow logic;
B) procedure event registration: the logon mode of described procedure event handling framework when initialization in meeting scan event registration memory block, described logon mode comprises: program code, Spring configuration file, Properties configuration file and database event information storage list; Aforesaid way supports that one or more modes are used in combination; By described logon mode, read all event sniffer descriptors, be combined into the event sniffer data structure of procedure, and be stored in described procedure event sniffer buffer memory;
C) procedure event handling flow process: based on the event operation frame of procedure event sniffer buffer memory, supports the mode that sequential affair performs, conditional event performs, recurrence event performs and condition recurrence event performs;
The mode that above-mentioned event performs is combined by link, nested mode, and formation has the procedure event flow process improving logic and performs;
D) event transfer interface: described procedure event handling framework is supplied to event producer, is processed the event transfer of generation to the described procedure event handling flow process of framework by event transfer interface.
In the embodiment be more preferably, the detailed process of described step 5 is:
A event that () obtains procedure event handling framework built-in runs initial flow process, starts event handling, and sets up operation implementation according to the content of event sniffer buffer memory;
B () runs first event handling flow process;
C () checks whether downstream audiomonitor pointer exists after running,
If existed, return step b for downstream;
If there is no steps d below is then continued;
D () performs the built-in event of procedure event handling framework and to run abort flow process, reclaim and perform resource, return execution result.
In specific embodiment:
1. event producer's (operation flow) defines mark (such as EventA) and the event detail information of generation event, and in key business process place production event, then the event transfer interface that provides of use case process framework;
2. event consumer (action listener person) realization event audiomonitor, and be registered in event sniffer buffer memory by the logon mode that event handling framework provides; In order to realization flow event handling, framework provides multiple event sniffer interface:
3. procedure event handling framework is embedded in operation flow, produces new event when each and when pushing, carry out event operation, concrete steps according to the information in event sniffer buffer memory:
A) acquisition event runs initial flow process (framework is built-in),
Start event handling, and set up operation implementation according to the content of event sniffer buffer memory;
B) first event handling flow process is run;
C) check whether downstream audiomonitor pointer exists after running,
If existed, perform step b for downstream;
If there is no steps d below is then continued;
D) execution event runs abort flow process (framework is built-in),
Reclaim and perform resource, return execution result.
The present invention is described in detail in preferred embodiment above by concrete; but those skilled in the art should be understood that; the present invention is not limited to the above embodiment; all within ultimate principle of the present invention; any amendment of doing, combination and equivalent replacement etc., be all included within protection scope of the present invention.

Claims (9)

1. the improving one's methods of event processing mechanism of a procedure, is characterized in that, comprising:
S1: the event that event producer's predefine produces;
S2: described event producer produces described event at key business process place;
S3: described event producer uses procedure event handling framework to provide event transfer interface by the described event transfer of production to event handling thread;
S4: action listener person is monitored by event sniffer the described event of producing, and is registered in described event sniffer buffer memory by the logon mode that described event handling framework provides;
S5: the event handling flow process of described procedure event handling framework is embedded into the event transfer interface interchange place in key business process; Produce new event when each and when pushing, carry out event operation according to the information in event sniffer buffer memory.
2. the improving one's methods of event processing mechanism of procedure according to claim 1, it is characterized in that, in described step S1, described event is made up of event identifier and event detail information two parts; Described event identifier be one can presentation of events meaning but overall unique character string again, ensure its uniqueness at system scope; Described event detail information is for storing the data message relevant to event, and described data message will pass to event consumer, event detail information structurally variable, but the requirement of demand fulfillment procedure event handling framework.
3. the improving one's methods of event processing mechanism of procedure according to claim 1, is characterized in that, in described step S2, described key business process is crucial program behavior; Described key business process comprises data object to be increased front/rear, and data object upgrades front/rear and data object deletion is front/rear.
4. the improving one's methods of event processing mechanism of procedure according to claim 1, it is characterized in that, described procedure event handling framework comprises: procedure event buffer, procedure event registration, procedure event handling flow process and event transfer interface.
5. the improving one's methods of event processing mechanism of procedure according to claim 4, it is characterized in that, described procedure event buffer refers to: modification list event sniffer buffer memory is procedure event sniffer buffer memory, and buffer memory adopts the data structure that can store multiple flow logic.
6. the improving one's methods of event processing mechanism of procedure according to claim 4, it is characterized in that, described procedure event registration refers to: the logon mode of described procedure event handling framework when initialization in meeting scan event registration memory block, and described logon mode comprises: program code, Spring configuration file, Properties configuration file and database event information storage list; Aforesaid way supports that one or more modes are used in combination; By described logon mode, read all event sniffer descriptors, be combined into the event sniffer data structure of procedure, and be stored in described procedure event sniffer buffer memory.
7. the improving one's methods of event processing mechanism of procedure according to claim 4, it is characterized in that, described procedure event handling flow process refers to: based on the event operation frame of procedure event sniffer buffer memory, supports the mode that sequential affair performs, conditional event performs, recurrence event performs and condition recurrence event performs; The mode that above-mentioned event performs is combined by link, nested mode, and formation has the procedure event flow process improving logic and performs.
8. the improving one's methods of event processing mechanism of procedure according to claim 4, it is characterized in that, described event transfer interface refers to: described procedure event handling framework is supplied to event producer, is processed by the event transfer of generation by event transfer interface to the described procedure event handling flow process of framework.
9. the improving one's methods of event processing mechanism of procedure according to claim 1, it is characterized in that, the detailed process of described step S5 is:
A event that () obtains procedure event handling framework built-in runs initial flow process, starts event handling, and sets up operation implementation according to the content of event sniffer buffer memory;
B () runs first event handling flow process;
C () checks whether downstream audiomonitor pointer exists after running,
If existed, return step b for downstream;
If there is no steps d below is then continued;
D () performs the built-in event of procedure event handling framework and to run abort flow process, reclaim and perform resource, return execution result.
CN201310631410.1A 2013-12-02 2013-12-02 A kind of improved method of the event processing mechanism of procedure Active CN104679493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310631410.1A CN104679493B (en) 2013-12-02 2013-12-02 A kind of improved method of the event processing mechanism of procedure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310631410.1A CN104679493B (en) 2013-12-02 2013-12-02 A kind of improved method of the event processing mechanism of procedure

Publications (2)

Publication Number Publication Date
CN104679493A true CN104679493A (en) 2015-06-03
CN104679493B CN104679493B (en) 2017-12-12

Family

ID=53314612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310631410.1A Active CN104679493B (en) 2013-12-02 2013-12-02 A kind of improved method of the event processing mechanism of procedure

Country Status (1)

Country Link
CN (1) CN104679493B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106548327A (en) * 2016-11-09 2017-03-29 国云科技股份有限公司 A kind of Workflow system and the integrated method of other Third party systems
CN107517236A (en) * 2016-06-17 2017-12-26 阿里巴巴集团控股有限公司 A kind of event-handling method, device and equipment for Internet of Things
CN108255594A (en) * 2017-12-22 2018-07-06 东软集团股份有限公司 For the event-handling method of business process designer, device, medium and electronic equipment
CN109460437A (en) * 2018-11-19 2019-03-12 南京苏宁易付宝网络科技有限公司 Event-handling method and processing system under a kind of distributed environment
CN111552581A (en) * 2020-05-07 2020-08-18 网易(杭州)网络有限公司 Event delivery method, device and system and electronic equipment
US11272012B2 (en) 2016-06-17 2022-03-08 Banma Zhixing Network (Hongkong) Co., Limited Action processing associated with a cloud device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963913A (en) * 2010-11-04 2011-02-02 南京大学 Method for online evolution of component based on transactions
CN102662725A (en) * 2012-03-15 2012-09-12 中国科学院软件研究所 Event-driven high concurrent process virtual machine realization method
CN103279840A (en) * 2013-06-08 2013-09-04 北京首钢自动化信息技术有限公司 Workflow engine implement method based on dynamic language and event processing mechanism

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101963913A (en) * 2010-11-04 2011-02-02 南京大学 Method for online evolution of component based on transactions
CN102662725A (en) * 2012-03-15 2012-09-12 中国科学院软件研究所 Event-driven high concurrent process virtual machine realization method
CN103279840A (en) * 2013-06-08 2013-09-04 北京首钢自动化信息技术有限公司 Workflow engine implement method based on dynamic language and event processing mechanism

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107517236A (en) * 2016-06-17 2017-12-26 阿里巴巴集团控股有限公司 A kind of event-handling method, device and equipment for Internet of Things
US10944587B2 (en) 2016-06-17 2021-03-09 Banma Zhixing Network (Hongkong) Co., Limited Event processing associated with a smart device
US11272012B2 (en) 2016-06-17 2022-03-08 Banma Zhixing Network (Hongkong) Co., Limited Action processing associated with a cloud device
CN106548327A (en) * 2016-11-09 2017-03-29 国云科技股份有限公司 A kind of Workflow system and the integrated method of other Third party systems
CN108255594A (en) * 2017-12-22 2018-07-06 东软集团股份有限公司 For the event-handling method of business process designer, device, medium and electronic equipment
CN108255594B (en) * 2017-12-22 2021-03-02 东软集团股份有限公司 Event processing method, device and medium for flow designer and electronic equipment
CN109460437A (en) * 2018-11-19 2019-03-12 南京苏宁易付宝网络科技有限公司 Event-handling method and processing system under a kind of distributed environment
CN109460437B (en) * 2018-11-19 2021-05-28 南京苏宁易付宝网络科技有限公司 Event processing method and system in distributed environment
CN111552581A (en) * 2020-05-07 2020-08-18 网易(杭州)网络有限公司 Event delivery method, device and system and electronic equipment
CN111552581B (en) * 2020-05-07 2023-04-28 网易(杭州)网络有限公司 Event delivery method, device, system and electronic equipment

Also Published As

Publication number Publication date
CN104679493B (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN108536761B (en) Report data query method and server
CN104679493A (en) Improved method for process event handling mechanism
TWI628551B (en) Data library copying method and device based on log parsing
CN102349062B (en) Method and system for synchronizing browser caches across devices and web services
WO2021042515A1 (en) Graph data storage and query method and apparatus, and computer-readable storage medium
CN109919691B (en) Data processing system, method and device
CN102999608A (en) System and method for tree table demonstration of large data
CN112685433B (en) Metadata updating method and device, electronic equipment and computer-readable storage medium
CN103473346A (en) Android re-packed application detection method based on application programming interface
CN103177077B (en) The storage of a kind of APK file and output intent
CN109493043A (en) The blocking method, apparatus of transaction record, electronic equipment and storage medium
CN103902407A (en) Virtual machine recovery method and server
CN113254445B (en) Real-time data storage method, device, computer equipment and storage medium
CN103019874A (en) Method and device for realizing exception handling based on data synchronization
CN103092866A (en) Data monitoring method and monitoring device
CN103235811A (en) Data storage method and device
CN104572781A (en) Method and device for generating transaction log
CN104881454A (en) Updating method and system of parameter
CN109359260B (en) Network page change monitoring method, device, equipment and medium
CN105631019A (en) Metadata extension method and device
CN104408178A (en) Device and method for WEB control loading
CN112256472B (en) Distributed data retrieval method and device, electronic equipment and storage medium
CN114003629A (en) Efficient pre-compiling type cache data management method, device, equipment and medium
CN102523112B (en) Information processing method and equipment
CN104714923A (en) Method and device for achieving equipment sharing

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant