CN101727648B - Overtime control method in service system and service system - Google Patents

Overtime control method in service system and service system Download PDF

Info

Publication number
CN101727648B
CN101727648B CN2009102045576A CN200910204557A CN101727648B CN 101727648 B CN101727648 B CN 101727648B CN 2009102045576 A CN2009102045576 A CN 2009102045576A CN 200910204557 A CN200910204557 A CN 200910204557A CN 101727648 B CN101727648 B CN 101727648B
Authority
CN
China
Prior art keywords
overtime
control link
standard
time control
time
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.)
Active
Application number
CN2009102045576A
Other languages
Chinese (zh)
Other versions
CN101727648A (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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN2009102045576A priority Critical patent/CN101727648B/en
Publication of CN101727648A publication Critical patent/CN101727648A/en
Application granted granted Critical
Publication of CN101727648B publication Critical patent/CN101727648B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses an overtime control method in a service system. The method is implemented by setting agent modules of each time control link for processing access service at the core platform of the service system to register the overtime control information corresponding to each time control link in an overtime management module, calculating the actual overtime standard corresponding to each time control link according to the current service system time when the communication leading-out is carried out on the processed access service by the overtime control method information and the service system, and finally carrying out overtime control on the communication leading-out according to the selected transaction overtime standard. Correspondingly, the invention discloses a service system applying the overtime control method, the overtime control is extended to the application layer of the system to realize overtime control of fine grain, thus satisfying the time control requirement of the service system on access services of different application contexts, protecting the service system and the front end system resource, and improving the user experience of the service system.

Description

Manufacture timeout control method in the service system and service system
Technical field
The present invention relates to the bank data process field, more particularly, the present invention relates to manufacture timeout control method and service system in a kind of service system.
Background technology
The processing of concurrent in a large number online transaction in the service system load of industries such as finance, telecommunications, and the quantity of information of every business of these Transaction Processing is less, and has certain real-time, and is very strict to the requirement of time.Therefore, need carry out overtime control with requirement of real time to service system.For example: on the link of relatively growing blocking time, implement overtime control; These blocking times, relatively long link possibly be and being connected of remote data base, and also possibly be network download, after these links are overtime; Often need carry out certain operations; Such as: the overtime control abnormity of dishing out, perhaps carry out again, reach the effect that client responds fast, server end is reliable and stable.
The overtime control function that existing overtime control uses communications protocol and middleware to provide is provided with overtime standard; Utilize set overtime standard that communication access and/or communication are picked out and carry out overtime control: communication is normal in set overtime standard inserts and/or communication normally picks out; Then carry out the subsequent treatment that normal access of communication and/or communication normally pick out; If communication access and/or communication pick out the overtime overtime control abnormity processing of then carrying out in set overtime standard, such as the overtime control abnormity of dishing out.For example; The overtime control that communication at present inserts mainly is at TUXEDO (Transaction for UNIX has been Extendedfor Distributed Operation; UNIX transaction system after the distributed operation expansion) AM access module realizes; The function of TUXEDO AM access module is that the message that TUXEDO inserts is passed through transmission control protocol (Transmission Control Protocol; TCP) be transmitted to the service system product platform, the overtime control that communication is inserted is with solving the timeout issue that the TCP communication is transmitted.In the existing overtime control technology, because bottom communications protocol and middleware do not relate to concrete application, can not carry out overtime control in each link, it is thicker to control size ratio, makes that service quality and user's the experience of service system is poor.
Summary of the invention
The invention provides manufacture timeout control method and a kind of service system in a kind of service system, can carry out overtime control according to the overtime configuration standard corresponding to each time control link of application layer, is a kind of fine-grained overtime control.
According to a first aspect of the invention, the invention provides the manufacture timeout control method in a kind of service system, said method comprises:
A. the corresponding overtime control information of each time control link with service system product platform processing access service is registered in respectively in the overtime administration module;
B. handle access service when the service system product platform, when communication picked out, said overtime administration module calculated the corresponding actual overtime standard of said each time control link according to said overtime control information and current service system time;
C. said overtime administration module is chosen one of overtime standard of said reality as the overtime standard of transaction according to the overtime control strategy of configuration;
D. according to the overtime standard of said transaction the communication of said access service is picked out and carry out overtime control.
According to a second aspect of the invention, the invention provides a kind of service system, said system comprises:
The service access module is used to insert pending business, and said business is called access service;
The service system product platform, the access service that the AM access module that is used to manage business inserts;
One or more proxy modules, said proxy module is corresponding one by one with each time control link that the service system product platform is handled access service, is used for the overtime control information that each time control link is corresponding and registers to overtime administration module;
Overtime administration module; Current service system time when being used for overtime control information according to the registration of said proxy module and picking out with communication calculates the corresponding actual overtime standard of each time control link, and chooses one of overtime standard of said reality as the overtime standard of concluding the business according to the overtime control strategy of configuration;
Business picks out module, is used for the access service communication of handling through the service system product platform is picked out, and according to the overtime standard of said transaction said communication is picked out and to carry out overtime control.
Manufacture timeout control method in a kind of service system that embodiment of the present invention provides and a kind of service system; Through registering the corresponding overtime control information of each time control link, calculating actual overtime standard, from the overtime standard of said reality, choose the overtime standard of transaction and communication is picked out according to overtime control strategy and carry out overtime control according to the overtime standard of said transaction according to said overtime control information; Overtime control is refined to each time control link of application layer, has realized in the fine-grained overtime control of service system application layer.The granularity refinement of overtime control has improved the precision of overtime control, can satisfy the time control demand of service system to different application scene access service; Fine-grained overtime control has avoided that transaction is overtime has protected the service system resource to the taking for a long time of system resource (comprising communication resources, memory source and thread resources etc.), has prevented other transaction can't carry out even delay generation of catastrophic failures such as machine; Simultaneously, front end system also need not the response of wait as long for service system, thus indirect protection the front end system resource; Fine-grained overtime control can improve the professional speed of service system process user on the whole, improve the service quality of service system and user's experience.
Description of drawings
Fig. 1 is the process flow diagram of the manufacture timeout control method in a kind of service system of the present invention;
Fig. 2 is the process flow diagram of step S400 among Fig. 1;
Fig. 3 is the process flow diagram of step S100 among Fig. 1;
Fig. 4 is the schematic flow sheet that carries out overtime control when inserting newsletter access service system product platform;
Fig. 5 is the synoptic diagram of a kind of service system of the present invention;
Fig. 6 is the composition synoptic diagram of the proxy module among Fig. 5;
Fig. 7 is the composition synoptic diagram of the overtime administration module 530 among Fig. 5.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, the present invention is described in detail further below in conjunction with accompanying drawing.
Before specifically describing; Need to prove; In embodiments of the present invention; The service system product platform comprises some processing links to the processing of access service; System dispatches other business modules through the top control module (for example, schedule process module) of whole service treatment scheme access service is handled in each processing links successively, for example; Service system need be handled in channel processing links, transaction processing link, service processing link, service system processing links and infrastructure service processing links access service successively, and schedule process module will be called channel processing module, transaction processing module, service processing module, service system processing module and infrastructure service processing module successively access service is handled so.These processing links can be divided into non-time control link and time control link: in non-time control link, not to access service in the described overtime control of the processing embodiment of the present invention of this processing links, promptly do not carry out the actions such as registration of overtime control information in non-time control link yet; The time control link is as required to the processing links of access service in the described overtime control of processing embodiment of the present invention of this processing links.Simultaneously, in each above-mentioned processing links, some processing links may be fairly simple, and only can be performed once a transaction processing process; Some processing links may more complicated; These processing links support process definition; Can order, circulation, branch, nested and carry out a plurality of processing, for example, described service processing link can achieve a butt joint into the professional higher core processing of complexity of accomplishing.
Fig. 1 is the process flow diagram of the manufacture timeout control method in a kind of service system of the present invention.Can know that by Fig. 1 said method comprises at least:
S100, the corresponding overtime control information of each time control link of the service system product platform being handled access service is registered in respectively in the overtime administration module.Particularly, when the main thread of service system product platform processing access service implements each time control link, all can the overtime control information that this time control link is corresponding be registered in the overtime administration module.
Said overtime control information comprises: the start time of current thread sign, said time control link processing access service, the overtime configuration standard of said time control link correspondence, access service are at the corresponding overtime configuration standard index information of said time control link.Wherein, access service can be handled the application element information that access service is carried out the track correspondence at said time control link corresponding application element information or service system product platform in said time control link for access service again at the corresponding overtime configuration standard index information of said time control link.
Wherein, current thread is represented a transaction of carrying out, and the current thread sign is then as the unique identification of carrying out transaction; The current thread sign can be the current thread name; For example, can pass through API (the Application ProgrammingInterface that JDK (Java Development Kit, Java development kit) provides; Application programming interfaces) obtain current thread, from current thread, can obtain the current thread name;
The start time that said time control link is handled access service is the service system time of said time control link when beginning to handle access service;
The corresponding application element information of said time control link is kept in the thread context in advance, can from thread context, obtain; The service system product platform is handled the corresponding application element information of access service execution track in said time control link and can be obtained from current transaction routing information;
Said overtime configuration standard is defined in the configuration file, and service system can be assembled into object with configuration file through loading bin (for example overtime standard load unit) and obtain overtime configuration standard for service system.
S200, when the service system product platform is handled access service according to each link, when communication picked out, said overtime administration module calculated the corresponding actual overtime standard of said each time control link according to said overtime control information and current service system time.
S300, said overtime administration module is chosen one of overtime standard of said reality as the overtime control criterion of transaction according to the overtime control strategy of configuration.
Overtime control strategy is configured in the overtime administration module, and overtime control strategy also can be expanded through code interface simultaneously.Through the overtime standard of one of overtime standard of the said reality of the algorithm picks of carrying out overtime control strategy conduct transaction.For example, the overtime control strategy of acquiescence is minimum overtime strategy, that is: the actual overtime standard of choosing time value minimum in the actual overtime standard of each link is as the overtime standard of the transaction of this transaction.
S400 picks out the communication of said access service according to the overtime standard of said transaction and to carry out overtime control.After choosing the overtime standard of transaction, business picks out module and from overtime administration module, gets the overtime standard of said transaction, picks out that adapter carries out that communication picks out and communication picked out according to the overtime standard calls communication of said transaction and carry out overtime control.
Particularly, as shown in Figure 2, step S400 specifically comprises:
S4001, the main thread record communication that communication picks out picks out initial time stamp;
S4002, communication picks out module promoter thread to be carried out communication and picks out, and simultaneously said main thread gets into to be waited for;
S4003, sub-thread return and wake main thread up, and the main thread record current time stabs;
S4004 judges that the current time stabs whether to deduct time that communication picks out initial time stamp less than the overtime standard of said transaction,
When being judged as be execution in step S4005 then, otherwise execution in step S4006:
S4005, the processing links after the main thread entry communication picks out is such as processing of accepting background service system etc.;
S4006, service system is carried out communication and is picked out timeout treatment.For example, the service system overtime control abnormity of dishing out can think that overtime in the overtime control also belongs to a kind of abnormal conditions, and the exception class (Exception) that utilizes " unusually " this a kind of JAVA to provide carries out communication and picks out timeout treatment.After the overtime control abnormity of dishing out, subsequent treatment can be given the abnormality processing module and carried out unified abnormality processing, such as: revise service state for failure, organize error message to return to canalization etc.The abnormality processing module can be carried out general abnormality processing, can handle that all are unusual (all comprise unusually: overtime unusual, beat unpack unusually, communication abnormality and encryption and decryption are unusual etc.).
In an embodiment provided by the invention, step S100 realizes that through the agency service that each proxy module that is separately positioned on said time control link provides each time control link is corresponding one by one with each proxy module respectively.The corresponding functional module of each processing links all is an assembly, by the container unified management, during system start-up, need load and be registered in the container all component, and wherein, component loader is in charge of the loading process of concrete assembly.In the realization of proxy module; The component loader that can utilize name to be called " overtime loading bin " is responsible for the assembly that each time control link is loaded the overtime control of needs when system start-up; And for these assemblies add overtime agency; And used the decorative mode in the Design Mode (Decorator), and through proxy module the original function module is decorated, add the function of overtime registration for the original function module.Owing to used the decorative mode in the Design Mode (Decorator), thereby need not make amendment, make concrete business function and other manage control function (such as overtime control etc.) and separate original application module.The concrete steps that the overtime control information of the time control link that proxy module is will be with it corresponding registers in the overtime administration module describe with reference to Fig. 3.
Fig. 3 is the process flow diagram of step S100 among Fig. 1.As shown in Figure 3, step S100 specifically comprises:
S1001 obtains the start time that current thread identifies, said time control link is handled access service (also being the service system time of this moment) and access service at the corresponding overtime configuration standard index information of said time control link;
S1002 obtains access service at the corresponding overtime configuration standard of said time control link according to said access service at the corresponding overtime configuration standard index information of said time control link;
S1003, start time, access service that said proxy module is handled access service with current thread sign, said time control link register in the said overtime administration module at the overtime configuration standard of said time control link correspondence with as a record at said time control link corresponding overtime configuration standard index information and access service.
Wherein, In this record, start time, access service that said time control link is handled access service are all corresponding with the current thread sign at the corresponding overtime configuration standard of said time control link at said time control link corresponding overtime configuration standard index information and access service.
In an embodiment provided by the invention, also comprise the step of carrying out overtime control when newsletter inserts said service system product platform before the step S100 to inserting, specify below in conjunction with Fig. 4.
As shown in Figure 4, to inserting comprising of the step of carrying out overtime control when newsletter inserts said service system product platform:
S5001, the communication that configuration is obtained in AM access module inserts overtime standard;
S5002, the timestamp that the communication of AM access module start-of-record inserts also call the communication access that the communication couple in adapter carries out access service, and the communication access feedback that said service system product platform returns is monitored in AM access module simultaneously;
S5003 monitors in said communication inserts overtime standard, whether to listen to said feedback,
When in said communication inserts overtime standard, listening to said feedback, execution in step S5004, otherwise execution in step S5005,
S5004 carries out communication and normally inserts aftertreatment, for example dispatches etc.;
S5005, the service system overtime control abnormity of dishing out.
Overtime control size ratio to inserting the step of carrying out overtime control when newsletter inserts said service system product platform is thicker, mainly is to realize overtime control at Communication Layer, and its fundamental purpose is in order to solve the timeout issue that the TCP communication is transmitted.
Calculate among the step S200 of the corresponding actual overtime standard of said each time control link in the present invention; Access service can be that the overtime standard of time control link also can comprise overtime standard of time control link and professional overtime standard at the corresponding overtime configuration standard of said time control link in the said overtime control information; Wherein, In same time control link, the overtime standard of the corresponding same time control link of the access service under the different application scene; And in same time control link, the access service under the different application scenes is according to the overtime standard of the corresponding different service of application type information of different access service.
The service system product platform is handled access service; When communication picks out; Overtime administration module obtains the current service system time; And, comprise the difference of information according to overtime configuration standard according to the said corresponding overtime control information of said each time control link of in overtime administration module, registering, handle as follows respectively:
According to one embodiment of the present invention; When the overtime configuration standard index information corresponding overtime configuration standard corresponding with said time control link is the overtime standard of time control link, then the overtime standard of said time control link is deducted said time control link and handle the actual overtime standard that the executed time of access service obtains said time control link correspondence.Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
According to another embodiment of the invention; When the overtime configuration standard index information corresponding overtime configuration standard corresponding with said time control link comprises overtime standard of time control link and professional overtime standard, the calculating of the actual overtime standard that then said time control link is corresponding is undertaken by following mode:
The size of overtime standard of more said time control link and professional overtime standard; When the overtime standard of said business greater than the overtime standard of said time control link, then the overtime standard of said time control link is deducted said time control link and handles the executed time of access service and obtain the corresponding actual overtime standard of said time control link;
When the overtime standard of said business less than the overtime standard of said time control link, then the overtime standard of said business is deducted said time control link and handles the executed time of access service and obtain the corresponding actual overtime standard of said time control link.
Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
About step S300; In an embodiment provided by the invention; Carry out minimum overtime strategy; Choosing the minimum actual overtime standard of the actual overtime standard time value of each link is to obtain through comparing each actual overtime standard that calculates successively as the overtime standard of the transaction of this transaction, specifies below:
According to the overtime control information of time control link 1 correspondence, calculate the actual overtime standard TO1 of time control link 1 correspondence, TO1 is stored as the overtime standard of transaction;
According to the overtime control information of time control link 2 correspondences, calculate the actual overtime standard TO2 of time control link 2 correspondences, relatively the size of TO1 and TO2:
If TO2 less than TO1, then replaces TO1 with TO2 and is stored as the overtime standard of transaction; Otherwise, keep TO1 be stored as the transaction overtime standard state constant.
By above-mentioned rule; Calculate successively all residue time control links (time control link 3 ..., time control link n, n represent the maximum numbering of time control link) corresponding actual overtime standard, up to the actual overtime standard TOn of time control link time control link n correspondence to the end; Whenever calculate a new actual overtime standard; All will this new actual overtime standard and previous time control link in be stored as the overtime standard of transaction time value size relatively, according to comparative result, determine whether the actual overtime standard mark that newly calculates is saved as the overtime standard of transaction; The actual overtime standard of storage is the overtime standard of transaction of access service so, at last.
Need to prove, be configured in the overtime control strategy support expanded of said overtime control module, can customize by the developer and realize other different overtime control strategies.For example, can adopt the max-timeout strategy according to business demand, that is: the actual overtime standard of choosing time value maximum in the actual overtime standard of each link is as the overtime standard of the transaction of this transaction; Equally, can also adopt average overtime strategy, that is: the mean value of choosing the actual overtime standard time value of each link is as the overtime standard of the transaction of this transaction.
In above-mentioned any embodiment of the manufacture timeout control method of a kind of service system of the present invention; In the service system operational process, can revise the overtime configuration standard of configuration through administration order, amended overtime configuration take-effective becomes new overtime configuration standard.
Overtime configuration standard among the present invention is defined in the overtime configuration file, is the overtime configuration file sample among the present invention below:
<?xml?version=″1.0″encoding=″GB2312″?>
!--overtime configuration, wherein switch is as the master switch of overtime control, and on opens, and off closes, and timeout representes the default value when not having configuration, unit is second--
<timeout-config?switch=″on″timeout=″60″>
!--following timeout is for must attaching troops to a unit property, and unit be second to represent the max-timeout time.If promptly block transaction for " 0 " or " " expression is overtime all the time-->
!--overtime configuration of channel and transaction-->
<channel?name=″AAAAAA″timeout=″60″>
<tran?name=″BBBBBB″timeout=″70″/>
</channel>
!--overtime configuration of service and atomic service-->
<service?name=″CCCCCC″timeout=″20″/>
!--overtime configuration of service system and infrastructure service-->
<server?name=″DDDDDD″timeout=″60″>
<base-service?name=″EEEEEEE″timeout=″40″/-->
</server>
</timeout-config>
Wherein each configuration field; Can revise through administration order at the service system run duration like " channel name ", " tran name ", " service name " and " timeout ", amended configuration file comes into force through carrying out profile instance.Also can see, overtime control master switch (switch) and state thereof can be set in overtime configuration file, if overtime control master switch for opening (on), just representes that overtime control comes into force, all configurations and control are all worked; If master switch just representes that for closing (off) overtime control does not come into force, promptly do not carry out overtime control.
Manufacture timeout control method in a kind of service system that provides through embodiment of the present invention; Through registering the corresponding overtime control information of each time control link, calculating actual overtime standard, choose the overtime standard of transaction and communication is picked out according to overtime control strategy and carry out overtime control, realized in the fine-grained overtime control of service system application layer according to the overtime standard of said transaction according to said overtime control information.Ability overtime control strategy of flexible configuration and overtime configuration standard have satisfied the time control demand of service system to different application scene access service simultaneously, have improved service system user's experience.
According to a further aspect in the invention, the invention provides a kind of service system of using said overtime control technology, this is specified below in conjunction with Fig. 5 to Fig. 7.
Fig. 5 is the synoptic diagram of a kind of service system of the present invention; As shown in Figure 5; Said service system comprises: service access module 510, service system product platform 520, one or more proxy module (proxy module 1-proxy module n as shown in the figure); Overtime administration module 530 picks out module 540 with business, particularly:
Service access module 510 is used to insert pending business, and said business is called access service.For example, service access module 510 receives TUXEDO and inserts request, and through Transmission Control Protocol request message is transmitted to 520 processing of service system product platform.Said service access module 510 can insert the business under the miscellaneous service scene;
Service system product platform 520; The access service that the AM access module 510 that is used to manage business inserts; Access service is handled through some processing links in service system product platform 520, and these processing links comprise channel processing links, transaction processing link, service processing link, service system processing links, infrastructure service processing links etc.It should be noted that; In the present invention; Can carry out overtime control to the part or all of processing links in each processing links of said service system product platform 520 processing access service as required; The processing links that said needs carry out overtime control be called the time control link (as shown in Figure 5, comprise time control link 1, time control link 2 ..., time control link n, n is the maximum numbering of time control link);
One or more proxy modules; Each proxy module is corresponding one by one (as shown in Figure 5 with each time control link that service system product platform 520 is handled access service; The corresponding time control link of the corresponding time control link of proxy module 11, proxy module 22 ..., the corresponding time control link of proxy module n n), each proxy module is used for the overtime control information of corresponding with it time control link is registered in overtime administration module 530;
Overtime administration module 530; Be used for according to the overtime control information of said proxy module registration and the corresponding actual overtime standard of each time control link of service system Time Calculation will pass through access service communication that service system product platform 520 handles and pick out the time, and choose one of overtime standard of said reality as the overtime standard of transaction according to the overtime control strategy of configuration;
Business picks out module 540, is used for the access service communication of handling through service system product platform 520 is picked out, and according to the overtime standard of said transaction said communication is picked out and to carry out overtime control.
Wherein, business picks out that module 540 will pass through that access service communication that service system product platform 520 handles picks out and communication is picked out and carries out overtime control and be specially:
Business picks out module 540 and from overtime administration module 530, obtains the overtime standard of said transaction;
The communication of main thread record picks out initial time stamp;
Business picks out module promoter thread dispatching communication and picks out adapter and carry out communication and pick out, and main thread gets into and waits for simultaneously;
Sub-thread returns and wakes main thread up, and the main thread record current time stabs;
Judge that whether communication picks out (current time is stabbed the time that communication picks out initial time stamp that deducts) consuming time less than the overtime standard of said transaction; If be judged as be; Represent that then communication normally picks out, the processing links after the main thread entry communication picks out is such as the processing of accepting background service system; Otherwise it is overtime that the expression communication picks out, the service system overtime control abnormity of dishing out.
Fig. 6 is the composition synoptic diagram of the proxy module among Fig. 5.As shown in Figure 6, said proxy module comprises overtime control information acquiring unit 610 and overtime control information registration unit 620, and wherein, overtime control information acquiring unit 610 is used to obtain the overtime control information of the time control link corresponding with proxy module; Overtime control information registration unit 620 is used for said overtime control information is registered to said overtime administration module.
Said overtime control information comprises: the start time of current thread sign, said time control link processing access service, the overtime configuration standard of said time control link correspondence, access service are at the corresponding overtime configuration standard index information of said time control link.Access service can be handled the application element information that access service is carried out the track correspondence at said time control link corresponding application element information or service system product platform in said time control link for access service again at the corresponding overtime configuration standard index information of said time control link.
Wherein, current thread is represented a transaction of carrying out, and the current thread sign is then as the unique identification of carrying out transaction; The current thread sign can be the current thread name; For example, can pass through API (the Application ProgrammingInterface that JDK (Java Development Kit, Java development kit) provides; Application programming interfaces) obtain current thread, from current thread, can obtain the current thread name.
The start time that said time control link is handled access service is the service system time of said time control link when beginning to handle access service;
The corresponding application element information of said time control link is kept in the thread context in advance, can from thread context, obtain; The service system product platform is handled the corresponding application element information of access service execution track in said time control link and can be obtained from current transaction routing information;
Said overtime configuration standard is defined in the configuration file, and service system can be assembled into object with configuration file through loading bin (for example overtime standard load unit) and obtain overtime configuration standard for service system.
It should be noted that overtime control information acquiring unit 610 is to obtain corresponding overtime configuration standard according to access service at the corresponding overtime configuration standard index information of said time control link (access service is handled the application element information that access service is carried out the track correspondence at said time control link corresponding application element information or service system product platform in said time control link).
Access service comprises the type of using key element and title etc. at the corresponding application element information of said time control link.The type of using key element is meant following classification can be arranged: channel type, type of transaction, COS, service system type, infrastructure service type etc. by the attribute of application.Using key element with channel type is example, specifically comprises again: cabinet face channel type, branch's characteristic channel type, electronic channel type, unified channel type etc.Using the title of key element representes with ID in internal system.Title is many, and in constantly increasing, illustrates below: the title that channel is used key element comprises 000100 (cabinet face channel), 999900 (unified channel), gdpxt (individual loan p channel), gjjxt (common reserve fund channel) etc.; The title of transaction application key element comprises YTH915000 (integrated signatory transaction), GJJ960001 (common reserve fund transaction) etc.; The title that key element is used in service comprises CR0500500 (card inquiry service) etc.; The title that service system is used key element comprises host (host services system), eaih (eaih service system) etc.; The title that key element is used in infrastructure service comprises 500500 (card inquiry infrastructure services) etc.Use element information and time control link and have corresponding relation, such as: channel is used the corresponding channel of element information and is handled (time control) link.The service system product platform is handled access service in said time control link and is carried out the corresponding application element information of track and write down service processing that the service system product platform carries out the service processing link that complex services handles to access service and carry out the corresponding service of track and use element information, can from the current thread context, obtain current transaction routing information and can obtain the said service corresponding with service execution track application element information from current transaction routing information from current.
The corresponding overtime configuration standard index information of said time control link (is example at the corresponding application element information of said time control link with access service), the concrete steps that each proxy module obtains corresponding overtime control criterion are according to access service:
Overtime control information acquiring unit 610 obtains access service at the corresponding application element information of said time control link from thread context.For example, < channel type, 000100 (cabinet face channel) >;
Overtime control information acquiring unit 610 obtains overtime configuration standard according to said access service at the corresponding application element information of said time control link.For example, in overtime configuration file, search acquisition and < channel type, 000100 (cabinet face channel)>corresponding overtime configuration standard.
Fig. 7 is the composition synoptic diagram of the overtime administration module 530 among Fig. 5.As shown in Figure 7, said overtime administration module 530 comprises:
Service system time acquisition unit 531, the current service system time when being used to obtain said communication and picking out;
Information memory cell 532 is used to store the overtime control information of said registration.The overtime control information of said registration is stored in the information memory cell with the mode of itemize, the overtime control information corresponding to a time control link of a corresponding proxy module registration of record;
Actual overtime criterion calculation unit 533 is used for the corresponding actual overtime standard of each time control link of service system Time Calculation when picking out according to said overtime control information and said communication;
One of said each actual overtime standard is chosen as the overtime standard of transaction according to the overtime control strategy of configuration in overtime strategy execution unit 534.
According to an embodiment provided by the invention, overtime strategy execution unit compares the corresponding actual overtime standard of each time control link successively and obtains the overtime standard of final transaction, particularly:
According to the overtime control information of time control link 1 correspondence, calculate the actual overtime standard TO1 of time control link 1 correspondence, TO1 is stored as the overtime standard of transaction;
According to the overtime control information of time control link 2 correspondences, calculate the actual overtime standard TO2 of time control link 2 correspondences, relatively the size of TO1 and TO2:
If TO2 less than TO1, then replaces TO1 with TO2 and is stored as the overtime standard of transaction; Otherwise, keep TO1 be stored as the transaction overtime standard state constant.
By above-mentioned rule; Calculate successively all residue time control links (time control link 3 ..., time control link n, n represent the maximum numbering of time control link) corresponding actual overtime standard, up to the actual overtime standard TOn of time control link time control link n correspondence to the end; Whenever calculate a new actual overtime standard; All that the time value that is stored as the overtime standard of transaction in this actual overtime standard that newly calculates and the previous time control link is relatively big or small, according to comparative result, determine whether the actual overtime standard mark that newly calculates is saved as the overtime standard of transaction; The actual overtime standard of storage is the overtime standard of transaction of access service so, at last.
Need to prove, be configured in the overtime control strategy support expanded of said overtime control module, can customize by the developer and realize other different overtime control strategies.For example, can adopt the max-timeout strategy according to business demand, that is: the actual overtime standard of choosing time value maximum in the actual overtime standard of each link is as the overtime standard of the transaction of this transaction; Equally, can also adopt average overtime strategy, that is: the mean value of choosing the actual overtime standard time value of each link is as the overtime standard of the transaction of this transaction.
In said overtime administration module 530, actual overtime criterion calculation unit 533 for every said record, calculates by following mode when calculating the corresponding actual overtime standard of each time control link:
In a kind of embodiment provided by the invention; When access service is the overtime standard of time control link at the corresponding overtime configuration standard of said time control link, then the overtime standard of said time control link is deducted said time control link and handle the actual overtime standard that the executed time of access service obtains said time control link correspondence.Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
In another kind of embodiment provided by the invention, the overtime criterion calculation of said reality unit 533 also comprises comparer.When access service comprises overtime standard of time control link and professional overtime standard at the corresponding overtime configuration standard of said time control link, the calculating of the actual overtime standard that then said link is corresponding is undertaken by following mode:
The size of said comparer overtime standard of more said time control link and professional overtime standard; When the overtime standard of said business greater than the overtime standard of said time control link, then the overtime standard of said time control link is deducted said time control link and handles the executed time of access service and obtain the corresponding actual overtime standard of said time control link; Otherwise, the overtime standard of said business is deducted said time control link handles the actual overtime standard that the executed time of access service obtains said time control link correspondence.Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
In any embodiment of a kind of service system of the invention described above; Said service access module also can comprise the overtime control module of service access; The overtime control module of said service access carries out overtime control when being used for the service access module the said service system product platform of service access; Particularly, when the service access module inserted the access service communication, the communication of obtaining configuration through middleware and communication protocol inserted overtime standard; The timestamp that the communication of the overtime control module start-of-record of said service access inserts also calls the communication access that the communication couple in adapter carries out access service; The communication access feedback that said service system product platform returns is monitored in AM access module simultaneously, if in said communication inserts the overtime standard time, listen to said feedback, then access service normally inserts; Otherwise, the service system overtime control abnormity of dishing out.
In any embodiment of a kind of service system of the invention described above; Said overtime administration module can also comprise overtime dispensing unit; Said overtime standard configuration unit is used for configuration and revises overtime configuration file; Wherein, said access service is defined in the said overtime configuration file at the corresponding overtime configuration standard of said time control link.Correspondingly, said system comprises overtime standard load unit, and said overtime standard load unit is used for said overtime configuration file is assembled into object.Overtime configuration file is defined in overtime dispensing unit, through said overtime configuration load units overtime standard configuration file is assembled into object (for example JAVA object), is called by said overtime loading bin in the system start-up phase.In the service system operational process, also can new overtime configuration information be write through administration order and revise overtime configuration information in the overtime configuration file, amended overtime configuration information comes into force becomes new overtime configuration information.Overtime configuration information among the present invention is defined in the overtime configuration file, is the overtime configuration file sample among the present invention below:
<?xml?version=″1.0″encoding=″GB2312″?>
!--overtime configuration, wherein switch is as the master switch of overtime control, and on opens, and off closes, and timeout representes the default value when not having configuration, unit is second--
<timeout-config?switch=″on″timeout=″60″>
!--following timeout is for must attaching troops to a unit property, and unit be second to represent the max-timeout time.If promptly block transaction for " 0 " or " " expression is overtime all the time-->
!--overtime configuration of channel and transaction-->
<channel?name=″AAAAAA″timeout=″60″>
<tran?name=″BBBBBB″timeout=″70″/>
</channel>
!--overtime configuration of service and atomic service-->
<service?name=″CCCCCC″timeout=″20″/>
!--overtime configuration of service system and infrastructure service-->
<server?name=″DDDDDD″timeout=″60″>
<base-service?name=″EEEEEEE″timeout=″40″/-->
</server>
</timeout-config>
Wherein each configuration field; Can revise through administration order at the service system run duration like " channel name ", " tran name ", " service name " and " timeout ", amended configuration file comes into force through carrying out profile instance.Also can see, overtime control master switch (switch) and state thereof can be set in overtime configuration file, if overtime control master switch for opening (on), just representes that overtime control comes into force, all configurations and control are all worked; If master switch just representes that for closing (off) overtime control does not come into force, promptly do not carry out overtime control.
In sum; The method of the overtime control in a kind of service system that embodiment of the present invention provides and a kind of service system; Through registering the corresponding overtime control information of each time control link, calculating actual overtime standard, choose the overtime standard of transaction and communication is picked out according to overtime control strategy and carry out overtime control, realized in the fine-grained overtime control of service system application layer according to the overtime standard of said transaction according to said overtime control information.Ability overtime control strategy of flexible configuration and overtime configuration standard have satisfied the time control demand of service system to different application scene access service simultaneously, have improved service system user's experience.
Through the description of above embodiment, those skilled in the art can be well understood to the present invention and can realize by the mode of software combined with hardware platform, can certainly all implement through hardware.Based on such understanding; All or part of can the coming out that technical scheme of the present invention contributes to background technology with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Above disclosedly be merely preferred embodiment of the present invention, can not limit the present invention's interest field certainly with this, the equivalent variations of therefore doing according to claim of the present invention still belongs to the scope that the present invention is contained.

Claims (17)

1. the manufacture timeout control method in the service system is characterized in that said method comprises:
A. the corresponding overtime control information of each time control link with service system product platform processing access service is registered in respectively in the overtime administration module;
B. handle access service when the service system product platform, when communication picked out, said overtime administration module calculated the corresponding actual overtime standard of said each time control link according to said overtime control information and current service system time;
C. said overtime administration module is chosen one of overtime standard of said reality as the overtime standard of transaction according to the overtime control strategy of configuration;
D. according to the overtime standard of said transaction the communication of said access service is picked out and carry out overtime control.
2. method according to claim 1 is characterized in that, in step a, does following the processing for each the time control link in said each time control link:
In said time control link proxy module is set;
Overtime control information said time control link is corresponding through said proxy module registers in the overtime administration module.
3. method according to claim 2; It is characterized in that said overtime control information comprises: overtime configuration standard that start time, the said time control link of current thread sign, said time control link processing access service is corresponding and access service are at the corresponding overtime configuration standard index information of said time control link.
4. method according to claim 3; It is characterized in that access service is that access service is handled the application element information that access service is carried out the track correspondence at said time control link corresponding application element information or service system product platform in said time control link at the corresponding overtime configuration standard index information of said time control link.
5. method according to claim 4 is characterized in that, registers in the overtime administration module through the overtime control information that said time control link is corresponding of said proxy module to comprise:
Obtain start time and access service that current thread sign, said time control link handle access service at the corresponding overtime configuration standard index information of said time control link;
Obtain access service at the corresponding overtime configuration standard of said time control link according to access service at the corresponding overtime configuration standard index information of said time control link;
Start time, access service that said proxy module is handled access service with current thread sign, said time control link are registered in the said overtime administration module as a record at the corresponding overtime configuration standard of said time control link at said time control link corresponding overtime configuration standard index information and access service.
6. according to any described method in the claim 3 to 5, it is characterized in that said access service is the overtime standard of time control link at the corresponding overtime configuration standard of said time control link.
7. method according to claim 6 is characterized in that step b is specially:
Obtain said current service system time;
Do following the processing for each the time control link in said each time control link:
The executed time that the corresponding overtime standard of time control link of overtime configuration standard index information that will be corresponding with said time control link deducts said time control link processing access service obtains the corresponding actual overtime standard of said time control link,
Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
8. according to any described method in the claim 3 to 5, it is characterized in that said access service comprises overtime standard of time control link and professional overtime standard at the corresponding overtime configuration standard of said time control link,
Wherein, in same time control link, the overtime standard of the corresponding same time control link of different access service; And in same time control link, the overtime standard of the corresponding different service of different access service.
9. method according to claim 8 is characterized in that step b is specially:
Obtain said current service system time;
Do following the processing for each the time control link in said each time control link:
Whether judge the overtime standard of said business less than the overtime standard of said time control link,
When being judged as when being, the overtime standard of said business is deducted said time control link handle the executed time of access service and obtain the corresponding actual overtime standard of said time control link,
When being judged as not, the overtime standard of said time control link is deducted said time control link handle the actual overtime standard that the executed time of access service obtains said time control link correspondence,
Wherein, the executed time of said time control link processing access service equals the start time that said current service system time deducts said time control link processing access service.
10. method according to claim 1 is characterized in that steps d is specially:
From said overtime administration module, obtain the overtime standard of said transaction;
Main thread writes down the initial time stamp that said communication picks out;
The promoter thread carries out said communication and picks out, and main thread gets into and waits for simultaneously;
Sub-thread returns and wakes main thread up, and the main thread record current time stabs;
Judge the current time stab deduct initial time stamp time value whether less than the overtime standard of said transaction, when being judged as when being, the expression communication normally picks out the processing links after the main thread entry communication picks out; When being judged as not, it is overtime to represent that then communication picks out, and carries out communication and picks out timeout treatment.
11. a service system is characterized in that, said service system comprises:
The service access module is used to insert pending business, and said business is called access service;
The service system product platform, the access service that the AM access module that is used to manage business inserts;
One or more proxy modules, said proxy module is corresponding one by one with each time control link that the service system product platform is handled access service, is used for the overtime control information that each time control link is corresponding and registers to overtime administration module;
Overtime administration module; Current service system time when being used for overtime control information according to the registration of said proxy module and picking out with communication calculates the corresponding actual overtime standard of each time control link, and chooses one of overtime standard of said reality as the overtime standard of concluding the business according to the overtime control strategy of configuration;
Business picks out module, is used for the access service communication of handling through the service system product platform is picked out, and according to the overtime standard of said transaction said communication is picked out and to carry out overtime control.
12. system according to claim 11 is characterized in that, said proxy module comprises:
Overtime control information acquiring unit, the overtime control information that is used to obtain the time control link corresponding with proxy module;
Overtime control information registration unit is used for said overtime control information is registered to said overtime administration module.
13., it is characterized in that said overtime administration module comprises according to claim 11 or 12 described systems:
The service system time acquisition unit, the current service system time when being used to obtain said communication and picking out;
Information memory cell is used to store the overtime control information of said registration;
Actual overtime criterion calculation unit, the current service system time that is used for when picking out according to said overtime control information and said communication calculates the corresponding respectively actual overtime standard of each time control link;
One of said each actual overtime standard is chosen as the overtime standard of transaction according to the overtime control strategy of configuration in overtime strategy execution unit.
14. system according to claim 13; It is characterized in that said overtime control information comprises: the start time of current thread sign, said time control link processing access service, the overtime configuration standard of said time control link correspondence, access service are at the corresponding overtime configuration standard index information of said time control link.
15. system according to claim 14; It is characterized in that access service is that access service is handled the application element information that access service is carried out the track correspondence at said time control link corresponding application element information or service system product platform in said time control link at the corresponding overtime configuration standard index information of said time control link.
16. according to claim 14 or 15 described systems; It is characterized in that; Said service system also comprises overtime standard configuration unit; Said overtime standard configuration unit is used for configuration and revises overtime configuration file, and wherein, said access service is defined in the said overtime configuration file at the corresponding overtime configuration standard of said time control link.
17. system according to claim 16 is characterized in that, said service system also comprises overtime standard load unit, and said overtime standard load unit is used for said overtime configuration file is assembled into object.
CN2009102045576A 2009-12-01 2009-12-01 Overtime control method in service system and service system Active CN101727648B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009102045576A CN101727648B (en) 2009-12-01 2009-12-01 Overtime control method in service system and service system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009102045576A CN101727648B (en) 2009-12-01 2009-12-01 Overtime control method in service system and service system

Publications (2)

Publication Number Publication Date
CN101727648A CN101727648A (en) 2010-06-09
CN101727648B true CN101727648B (en) 2012-07-25

Family

ID=42448506

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009102045576A Active CN101727648B (en) 2009-12-01 2009-12-01 Overtime control method in service system and service system

Country Status (1)

Country Link
CN (1) CN101727648B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9292039B2 (en) 2012-09-18 2016-03-22 Amazon Technologies, Inc. Adaptive service timeouts
CN103678020A (en) * 2012-09-18 2014-03-26 中国银联股份有限公司 Timeout processing method and timeout processing device for database operation during transaction processing
CN103618590B (en) * 2013-11-20 2017-03-29 北京先进数通信息技术股份公司 A kind of manufacture timeout control method and device of transaction process
CN104616197B (en) * 2015-02-16 2017-11-14 中国工商银行股份有限公司 A kind of dispatching method and device of separable inquiry transaction data
CN106970851A (en) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 Method and apparatus for disk detection process in distributed file system
CN108958959B (en) * 2017-05-18 2022-04-12 北京京东尚科信息技术有限公司 Method and device for detecting hive data table
US20210200724A1 (en) * 2017-10-23 2021-07-01 Siemens Aktiengesellschaft Method and control system for controlling and/or monitoring devices
CN107958414B (en) * 2017-11-07 2021-09-21 中国银行股份有限公司 Method and system for eliminating long transactions of CICS (common integrated circuit chip) system
CN108829546B (en) * 2018-06-21 2021-06-18 中国人民解放军战略支援部队信息工程大学 Timeout mechanism control method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363496B1 (en) * 1999-01-29 2002-03-26 The United States Of America As Represented By The Secretary Of The Air Force Apparatus and method for reducing duration of timeout periods in fault-tolerant distributed computer systems
US6526433B1 (en) * 1999-12-15 2003-02-25 International Business Machines Corporation Adaptive timeout value setting for distributed computing environment (DCE) applications
US20080062863A1 (en) * 2006-09-12 2008-03-13 Qualcomm Incorporated Transaction timeout handling in communication session management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6363496B1 (en) * 1999-01-29 2002-03-26 The United States Of America As Represented By The Secretary Of The Air Force Apparatus and method for reducing duration of timeout periods in fault-tolerant distributed computer systems
US6526433B1 (en) * 1999-12-15 2003-02-25 International Business Machines Corporation Adaptive timeout value setting for distributed computing environment (DCE) applications
US20080062863A1 (en) * 2006-09-12 2008-03-13 Qualcomm Incorporated Transaction timeout handling in communication session management

Also Published As

Publication number Publication date
CN101727648A (en) 2010-06-09

Similar Documents

Publication Publication Date Title
CN101727648B (en) Overtime control method in service system and service system
CN109597853B (en) Business scene element serial number generation method, device, medium and computer equipment
Mietzner et al. Variability modeling to support customization and deployment of multi-tenant-aware software as a service applications
US7130901B2 (en) Network service provider platform for supporting usage sensitive billing and operation services
CN102456185B (en) Distributed workflow processing method and distributed workflow engine system
US7971145B2 (en) Systems and methods for adapting service interface behaviors
US20130104150A1 (en) Service based information technology platform
US20080086557A1 (en) Network service provider platform for supporting usage sensitive billing and operation services
US8656354B2 (en) Compound versioning and identification scheme for composite application development
EA003744B1 (en) Extensible distributed enterprise application integration system
EP1782185A1 (en) Application splitting for network edge computing
CN105589715A (en) Information processing device, library loading method, and computer readable medium
CN101115180B (en) Electronic program menu system and functional module dynamic load operating method
KR20080064587A (en) Open framework system for heterogeneous computing and service integration
CN104660435A (en) Transactional network management engine for intelligent pipeline and network management transaction processing method of transactional network management engine
US8874798B2 (en) Aspect oriented application of a mediator in an enterprise service bus (ESB) of a service oriented architected data processing system
CN110737425A (en) billing platform system application program establishing method and device
CN111324645B (en) Block chain data processing method and device
US10007547B2 (en) Specifying an invocation order of a plurality of resources in a transaction according to resource distance
CN101021791A (en) Method and apparatus for realizing distributed object persistence and compiling unit
CN100543720C (en) Utilize the method and system of discrete unit quick establishing business processing flow
KR101888131B1 (en) Method for Performing Real-Time Changed Data Publish Service of DDS-DBMS Integration Tool
CN112416980B (en) Data service processing method, device and equipment
Beard Cloud Computing Best Practices for Managing and Measuring Processes for On-Demand Computing, Applications and Data Centers in the Cloud with SLAs
CN107911442A (en) Receive response interface exchange method, device, computer equipment and 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