CN101727648A - 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
CN101727648A
CN101727648A CN200910204557A CN200910204557A CN101727648A CN 101727648 A CN101727648 A CN 101727648A CN 200910204557 A CN200910204557 A CN 200910204557A CN 200910204557 A CN200910204557 A CN 200910204557A CN 101727648 A CN101727648 A CN 101727648A
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.)
Granted
Application number
CN200910204557A
Other languages
Chinese (zh)
Other versions
CN101727648B (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

Landscapes

  • Computer And Data Communications (AREA)

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 specifically, 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 may be and being connected of remote data base, it also may be network download, after these links are overtime, often need to carry out certain operations, such as: the overtime control abnormity of dishing out, perhaps re-execute, 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) access module realizes, the function of TUXEDO 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, the control size ratio is thicker, makes that the service quality of service system and user's experience 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, described method comprises:
A. the overtime control information of the service system product platform being handled each time control link correspondence of 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, described overtime administration module calculated the actual overtime standard of described each time control link correspondence according to described overtime control information and current service system time;
C. described overtime administration module is chosen one of overtime standard of described reality as the overtime standard of transaction according to the overtime control strategy of configuration;
D. according to the overtime standard of described transaction the communication of described 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, described system comprises:
The service access module is used to insert pending business, and described business is called access service;
The service system product platform, the access service that the access module that is used to manage business inserts;
One or more proxy modules, described 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 of each time control link correspondence is registered to overtime administration module;
Overtime administration module, be used for the actual overtime standard that current service system time when picking out according to the overtime control information of described proxy module registration and communication calculates each time control link correspondence, and choose one of overtime standard of described reality as the overtime standard of transaction according to the overtime control strategy of configuration;
Business picks out module, is used for picking out through the access service communication that the service system product platform is handled, and according to the overtime standard of described transaction described communication is picked out and to carry out overtime control.
Implement manufacture timeout control method and a kind of service system in a kind of service system provided by the invention, overtime control information by registering each time control link correspondence, calculate actual overtime standard, from the overtime standard of described 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 described transaction according to described 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 to wait as long for the response of service system, thus indirect protection the front end system resource; Fine-grained overtime control can improve on the whole service system process user business speed, improved 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 purpose, technical solutions and advantages of the present invention 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, the top control module of system by the whole service treatment scheme (for example, schedule process module) dispatching other business modules handles in each processing links successively to access service, for example, service system need be to access service successively in the channel processing links, the transaction processing link, the service processing link, service system processing links and infrastructure service processing links are handled, and schedule process module will be called the channel processing module successively so, the transaction processing module, service processing module, service system processing module and infrastructure service processing module are handled access service.These processing links can be divided into non-time control link and time control link: in non-time control link, access service is not implemented overtime control of the present invention in the processing of this processing links, also promptly do not carry out the actions such as registration of overtime control information in non-time control link; The time control link is as required access service to be implemented the processing links of overtime control of the present invention in the processing 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 and finish the higher core processing of complexity into business.
Fig. 1 is the process flow diagram of the manufacture timeout control method in a kind of service system of the present invention.As shown in Figure 1, described method comprises at least:
S100, the overtime control information of the service system product platform being handled each time control link correspondence of access service is registered in respectively in the overtime administration module.Particularly, when the main thread of service system product platform processing access service is carried out each time control link, all the overtime control information of this time control link correspondence can be registered in the overtime administration module.
Described overtime control information comprises: current thread sign, described time control link are handled the overtime configuration standard, access service of the start time of access service, the described time control link correspondence overtime configuration standard index information in described time control link correspondence.Wherein, access service can be handled the application element information that access service is carried out the track correspondence at the application element information or the service system product platform of described time control link correspondence in described time control link for access service again at the overtime configuration standard index information of described time control link correspondence.
Wherein, current thread is represented a transaction of carrying out, 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 described time control link is handled access service is the service system time of described time control link when beginning to handle access service;
The application element information of described time control link correspondence is kept in the thread context in advance, can obtain from thread context; The application element information that the service system product platform is handled access service execution track correspondence in described time control link can obtain from current transaction routing information;
Described overtime configuration standard is defined in the configuration file, and service system can be assembled into object with configuration file by 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, described overtime administration module calculated the actual overtime standard of described each time control link correspondence according to described overtime control information and current service system time.
S300, described overtime administration module is chosen one of overtime standard of described 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 by code interface simultaneously.By the overtime standard of one of overtime standard of the described 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 described access service according to the overtime standard of described transaction and to carry out overtime control.After choosing the overtime standard of transaction, business picks out module and get the overtime standard of described transaction from overtime administration module, picks out that adapter carries out that communication picks out and communication picked out according to the overtime standard calls communication of described 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 described main thread enters wait simultaneously;
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 described 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 be 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 by the agency service that each proxy module that is separately positioned on described time control link provides each time control link is corresponding one by one with each proxy module respectively.The functional module of each processing links correspondence 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), by 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 do not need original application module is made amendment, make concrete business function and other manage control function (such as overtime control etc.) and separate.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, described time control link is handled access service (also being the service system time of this moment) and the access service overtime configuration standard index information in described time control link correspondence;
S1002 obtains the overtime configuration standard of access service in described time control link correspondence according to described access service at the overtime configuration standard index information of described time control link correspondence;
S1003, start time, access service that described proxy module is handled access service with current thread sign, described time control link register in the described overtime administration module at the overtime configuration standard of described time control link correspondence with as a record at the overtime configuration standard index information and the access service of described time control link correspondence.
Wherein, in this record, start time, access service that described time control link is handled access service are all corresponding with the current thread sign at the overtime configuration standard of described time control link correspondence at the overtime configuration standard index information and the access service of described time control link correspondence.
In an embodiment provided by the invention, also comprise the step of carrying out overtime control when newsletter inserts described service system product platform before the step S100 to inserting, describe in detail 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 described service system product platform:
S5001, the communication that access module is obtained configuration inserts overtime standard;
S5002, the timestamp that the communication of access module start-of-record inserts also call the communication access that the communication couple in adapter carries out access service, and access module is monitored the communication access feedback that described service system product platform returns simultaneously;
S5003 monitors whether listen to described feedback in described communication inserts overtime standard,
When in described communication inserts overtime standard, listening to described 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.
Thicker to the overtime control size ratio that inserts the step of carrying out overtime control when newsletter inserts described service system product platform, mainly be to realize overtime control at Communication Layer, its fundamental purpose is in order to solve the timeout issue that the TCP communication is transmitted.
Calculate among the step S200 of actual overtime standard of described each time control link correspondence 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 overtime configuration standard of described time control link correspondence in the described 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 professional overtime standard that the access service under the different application scenarioss is corresponding different according to the 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 according to the overtime control information of described described each time control link correspondence of in overtime administration module, registering, comprise the difference of information according to overtime configuration standard, handle as follows respectively:
According to one embodiment of the present invention, when the corresponding overtime configuration standard of the overtime configuration standard index information corresponding with described time control link is the overtime standard of time control link, then the overtime standard of described time control link is deducted described time control link and handle the actual overtime standard that the executed time of access service obtains described time control link correspondence.Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described time control link processing access service.
According to another embodiment of the invention, when the corresponding overtime configuration standard of the overtime configuration standard index information corresponding with described time control link comprises overtime standard of time control link and professional overtime standard, the calculating of the actual overtime standard of then described time control link correspondence is undertaken by following mode:
The size of overtime standard of more described time control link and professional overtime standard, when the overtime standard of described business greater than the overtime standard of described time control link, then the overtime standard of described time control link is deducted described time control link and handles the actual overtime standard that the executed time of access service obtains described time control link correspondence;
When the overtime standard of described business less than the overtime standard of described time control link, then the overtime standard of described business is deducted described time control link and handles the actual overtime standard that the executed time of access service obtains described time control link correspondence.
Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described 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 by 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, then replaces TO2 TO1 less than TO1 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 all residue time control link (time control links 3 successively, ..., time control link n, n represents the maximum numbering of time control link) corresponding actual overtime standard, up to the actual overtime standard TOn that gets 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 that the actual overtime standard mark that will newly calculate saves as the overtime standard of transaction, Cun Chu actual overtime standard is the overtime standard of transaction of access service so, at last.
Need to prove, be configured in the overtime control strategy support expansion of described 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 one embodiment of the manufacture timeout control method of a kind of service system of the present invention, can revise the overtime configuration standard of configuration in the service system operational process by 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 represents 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 by administration order at the service system run duration as " channel name ", " tran name ", " service name " and " timeout ", amended configuration file comes into force by 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 represents that overtime control comes into force, all configurations and control are all worked; If master switch just represents that for closing (off) overtime control does not come into force, promptly do not carry out overtime control.
By implementing the manufacture timeout control method in a kind of service system provided by the invention, overtime control information by registering each time control link correspondence, calculate 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 described transaction according to described overtime control information.Energy 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 described overtime control technology, this is described in detail 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, described 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 and business pick out module 540, particularly:
Service access module 510 is used to insert pending business, and described business is called access service.For example, service access module 510 receives TUXEDO and inserts request, and by Transmission Control Protocol request message is transmitted to 520 processing of service system product platform.Described service access module 510 can insert the business under the miscellaneous service scene;
Service system product platform 520, the access service that the access module 510 that is used to manage business inserts, access service is handled by 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 described service system product platform 520 processing access service as required, the processing links that described needs carry out overtime control is 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, proxy module 1 corresponding time control link 1, proxy module 2 corresponding time control links 2 ..., 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 described proxy module registration and the actual overtime standard of each time control link correspondence of service system Time Calculation will pick out through the access service communication that service system product platform 520 is handled the time, and choose one of overtime standard of described reality as the overtime standard of concluding the business according to the overtime control strategy of configuration;
Business picks out module 540, is used for picking out through the access service communication that service system product platform 520 is handled, and according to the overtime standard of described transaction described communication is picked out and to carry out overtime control.
Wherein, business picks out that module 540 will pick out through the access service communication that service system product platform 520 is handled and communication is picked out and carries out overtime control and be specially:
Business picks out module 540 and obtain the overtime standard of described transaction from overtime administration module 530;
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 enters wait 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 described 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, described 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 described overtime control information is registered to described overtime administration module.
Described overtime control information comprises: current thread sign, described time control link are handled the overtime configuration standard, access service of the start time of access service, the described time control link correspondence overtime configuration standard index information in described time control link correspondence.Access service can be handled the application element information that access service is carried out the track correspondence at the application element information or the service system product platform of described time control link correspondence in described time control link for access service again at the overtime configuration standard index information of described time control link correspondence.
Wherein, current thread is represented a transaction of carrying out, 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 described time control link is handled access service is the service system time of described time control link when beginning to handle access service;
The application element information of described time control link correspondence is kept in the thread context in advance, can obtain from thread context; The application element information that the service system product platform is handled access service execution track correspondence in described time control link can obtain from current transaction routing information;
Described overtime configuration standard is defined in the configuration file, and service system can be assembled into object with configuration file by 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 overtime configuration standard index information (access service is handled the application element information that access service is carried out the track correspondence at the application element information or the service system product platform of described time control link correspondence in described time control link) of described time control link correspondence.
Access service comprises the type of using key element and title etc. at the application element information of described time control link correspondence.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 represents 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 described time control link and is carried out the application element information of track correspondence 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 service of track correspondence and use element information, can obtain current transaction routing information and can obtain the described service corresponding with service execution track application element information from current transaction routing information from current from the current thread context.
According to the overtime configuration standard index information (with access service at the application element information of described time control link correspondence is example) of access service in described time control link correspondence, the concrete steps that each proxy module obtains corresponding overtime control criterion are:
Overtime control information acquiring unit 610 obtains the application element information of access service in described time control link correspondence from thread context.For example,<channel type, 000100 (cabinet face channel) 〉;
Overtime control information acquiring unit 610 obtains overtime configuration standard according to described access service at the application element information of described time control link correspondence.For example, in overtime configuration file, search obtain 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, described overtime administration module 530 comprises:
Service system time acquisition unit 531, the current service system time when being used to obtain described communication and picking out;
Information memory cell 532 is used to store the overtime control information of described registration.The overtime control information of described registration is stored in the information memory cell in 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 actual overtime standard of each time control link correspondence of service system Time Calculation when picking out according to described overtime control information and described communication;
One of described 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, the actual overtime standard that overtime strategy execution unit compares each time control link correspondence successively 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, then replaces TO2 TO1 less than TO1 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 all residue time control link (time control links 3 successively, ..., time control link n, n represents the maximum numbering of time control link) corresponding actual overtime standard, up to the actual overtime standard TOn that gets time control link time control link n correspondence to the end, whenever calculate a new actual overtime standard, the time value that all is stored as the overtime standard of transaction in actual overtime standard that this is newly calculated and the previous time control link is relatively big or small, according to comparative result, determine whether that the actual overtime standard mark that will newly calculate saves as the overtime standard of transaction, Cun Chu actual overtime standard is the overtime standard of transaction of access service so, at last.
Need to prove, be configured in the overtime control strategy support expansion of described 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 described overtime administration module 530, actual overtime criterion calculation unit 533 for every described record, calculates by following mode when calculating the actual overtime standard of each time control link correspondence:
In a kind of embodiment provided by the invention, when access service is the overtime standard of time control link at the overtime configuration standard of described time control link correspondence, then the overtime standard of described time control link is deducted described time control link and handle the actual overtime standard that the executed time of access service obtains described time control link correspondence.Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described time control link processing access service.
In another kind of embodiment provided by the invention, the overtime criterion calculation of described reality unit 533 also comprises comparer.When access service comprises overtime standard of time control link and professional overtime standard at the overtime configuration standard of described time control link correspondence, the calculating of the actual overtime standard of then described link correspondence is undertaken by following mode:
The size of described comparer overtime standard of more described time control link and professional overtime standard, when the overtime standard of described business greater than the overtime standard of described time control link, then the overtime standard of described time control link is deducted described time control link and handles the actual overtime standard that the executed time of access service obtains described time control link correspondence; Otherwise, the overtime standard of described business is deducted described time control link handles the actual overtime standard that the executed time of access service obtains described time control link correspondence.Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described time control link processing access service.
In any one embodiment of a kind of service system of the invention described above, described service access module also can comprise the overtime control module of service access, the overtime control module of described service access carries out overtime control when being used for the service access module the described service system product platform of service access, particularly, when the service access module inserts the access service communication, the communication of obtaining configuration by middleware and communication protocol inserts overtime standard, the timestamp that the communication of the overtime control module start-of-record of described service access inserts also calls the communication access that the communication couple in adapter carries out access service, access module is monitored the communication access feedback that described service system product platform returns simultaneously, if in described communication inserts the overtime standard time, listen to described feedback, then access service normally inserts, otherwise, the service system overtime control abnormity of dishing out.
In any one embodiment of a kind of service system of the invention described above, described overtime administration module can also comprise overtime dispensing unit, described overtime standard configuration unit is used for configuration and revises overtime configuration file, wherein, described access service is defined in the described overtime configuration file at the overtime configuration standard of described time control link correspondence.Correspondingly, described system comprises overtime standard load unit, and described overtime standard load unit is used for described overtime configuration file is assembled into object.Overtime configuration file is defined in overtime dispensing unit, by described overtime configuration load units overtime standard configuration file is assembled into object (for example JAVA object), is called by described overtime loading bin in the system start-up phase.Also can new overtime configuration information be write by administration order in the service system operational process 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 represents 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 by administration order at the service system run duration as " channel name ", " tran name ", " service name " and " timeout ", amended configuration file comes into force by 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 represents that overtime control comes into force, all configurations and control are all worked; If master switch just represents that for closing (off) overtime control does not come into force, promptly do not carry out overtime control.
In sum, implement method and a kind of service system of the overtime control in a kind of service system provided by the invention, overtime control information by registering each time control link correspondence, calculate 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 described transaction according to described overtime control information.Energy 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 above description of the embodiments, 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 by hardware.Based on such understanding, all or part of can the embodying that technical scheme of the present invention contributes to background technology with the form of software product, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise 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 disclosed only is preferred embodiment of the present invention, can not limit the present invention's interest field certainly with this, and therefore the equivalent variations of 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 described method comprises:
A. the overtime control information of the service system product platform being handled each time control link correspondence of 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, described overtime administration module calculated the actual overtime standard of described each time control link correspondence according to described overtime control information and current service system time;
C. described overtime administration module is chosen one of overtime standard of described reality as the overtime standard of transaction according to the overtime control strategy of configuration;
D. according to the overtime standard of described transaction the communication of described 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 processing for each the time control link in described each time control link:
In described time control link proxy module is set;
Register in the overtime administration module by of the overtime control information of described proxy module described time control link correspondence.
3. method according to claim 2, it is characterized in that described overtime control information comprises: the overtime configuration standard of current thread sign, the start time of described time control link processing access service, described time control link correspondence and access service are at the overtime configuration standard index information of described time control link correspondence.
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 the application element information or the service system product platform of described time control link correspondence in described time control link at the overtime configuration standard index information of described time control link correspondence.
5. method according to claim 4 is characterized in that, by described proxy module the overtime control information of described time control link correspondence is registered in the overtime administration module to comprise:
Obtain current thread sign, described time control link and handle start time of access service and access service overtime configuration standard index information in described time control link correspondence;
Obtain the overtime configuration standard of access service according to access service at the overtime configuration standard index information of described time control link correspondence in described time control link correspondence;
Start time, access service that described proxy module is handled access service with current thread sign, described time control link are registered in the described overtime administration module as a record at the overtime configuration standard of described time control link correspondence at the overtime configuration standard index information and the access service of described time control link correspondence.
6. according to any described method in the claim 3 to 5, it is characterized in that described access service is the overtime standard of time control link at the overtime configuration standard of described time control link correspondence.
7. method according to claim 6 is characterized in that step b is specially:
Obtain described current service system time;
Do following processing for each the time control link in described 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 described time control link deducts described time control link processing access service obtains the corresponding actual overtime standard of described time control link,
Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described time control link processing access service.
8. according to any described method in the claim 3 to 5, it is characterized in that described access service comprises overtime standard of time control link and professional overtime standard at the overtime configuration standard of described time control link correspondence,
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 professional overtime standard that different access service is corresponding different.
9. method according to claim 8 is characterized in that step b is specially:
Obtain described current service system time;
Do following processing for each the time control link in described each time control link:
Whether judge the overtime standard of described business less than the overtime standard of described time control link,
When being judged as when being, the overtime standard of described business is deducted described time control link handle the actual overtime standard that the executed time of access service obtains described time control link correspondence,
When being judged as not, the overtime standard of described time control link is deducted described time control link handle the actual overtime standard that the executed time of access service obtains described time control link correspondence,
Wherein, the executed time of described time control link processing access service equals the start time that described current service system time deducts described time control link processing access service.
10. method according to claim 1 is characterized in that steps d is specially:
From described overtime administration module, obtain the overtime standard of described transaction;
Main thread writes down the initial time stamp that described communication picks out;
The promoter thread carries out described communication and picks out, and main thread enters wait 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 described 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, described service system comprises:
The service access module is used to insert pending business, and described business is called access service;
The service system product platform, the access service that the access module that is used to manage business inserts;
One or more proxy modules, described 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 of each time control link correspondence is registered to overtime administration module;
Overtime administration module, be used for the actual overtime standard that current service system time when picking out according to the overtime control information of described proxy module registration and communication calculates each time control link correspondence, and choose one of overtime standard of described reality as the overtime standard of transaction according to the overtime control strategy of configuration;
Business picks out module, is used for picking out through the access service communication that the service system product platform is handled, and according to the overtime standard of described transaction described communication is picked out and to carry out overtime control.
12. system according to claim 11 is characterized in that, described 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 described overtime control information is registered to described overtime administration module.
13., it is characterized in that described 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 described communication and picking out;
Information memory cell is used to store the overtime control information of described registration;
Actual overtime criterion calculation unit, the current service system time that is used for when picking out according to described overtime control information and described communication calculates the corresponding respectively actual overtime standard of each time control link;
One of described 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 described overtime control information comprises: current thread sign, described time control link are handled the overtime configuration standard, access service of the start time of access service, the described time control link correspondence overtime configuration standard index information in described time control link correspondence.
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 the application element information or the service system product platform of described time control link correspondence in described time control link at the overtime configuration standard index information of described time control link correspondence.
16. according to claim 14 or 15 described systems, it is characterized in that, described service system also comprises overtime standard configuration unit, described overtime standard configuration unit is used for configuration and revises overtime configuration file, wherein, described access service is defined in the described overtime configuration file at the overtime configuration standard of described time control link correspondence.
17. system according to claim 16 is characterized in that, described service system also comprises overtime standard load unit, and described overtime standard load unit is used for described 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 true CN101727648A (en) 2010-06-09
CN101727648B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103618590A (en) * 2013-11-20 2014-03-05 北京先进数通信息技术股份公司 Overtime control method and device of business processing process
CN103678020A (en) * 2012-09-18 2014-03-26 中国银联股份有限公司 Timeout processing method and timeout processing device for database operation during transaction processing
CN104616197A (en) * 2015-02-16 2015-05-13 中国工商银行股份有限公司 Separable query transaction data scheduling method and apparatus
CN104641355A (en) * 2012-09-18 2015-05-20 亚马逊科技公司 Adaptive service timeouts
CN106970851A (en) * 2016-01-14 2017-07-21 阿里巴巴集团控股有限公司 Method and apparatus for disk detection process in distributed file system
CN107958414A (en) * 2017-11-07 2018-04-24 中国银行股份有限公司 A kind of method and system of removing CICS systems length transaction
CN108829546A (en) * 2018-06-21 2018-11-16 中国人民解放军战略支援部队信息工程大学 timeout mechanism control method and device
CN108958959A (en) * 2017-05-18 2018-12-07 北京京东尚科信息技术有限公司 The method and apparatus for detecting hive tables of data
KR20200076714A (en) * 2017-10-23 2020-06-29 지멘스 악티엔게젤샤프트 Method and control system for controlling and/or monitoring devices

Family Cites Families (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
US8213295B2 (en) * 2006-09-12 2012-07-03 Qualcomm Incorporated Transaction timeout handling in communication session management

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103678020A (en) * 2012-09-18 2014-03-26 中国银联股份有限公司 Timeout processing method and timeout processing device for database operation during transaction processing
CN104641355A (en) * 2012-09-18 2015-05-20 亚马逊科技公司 Adaptive service timeouts
CN104641355B (en) * 2012-09-18 2017-08-25 亚马逊科技公司 Adaptive service time-out
US10263876B2 (en) 2012-09-18 2019-04-16 Amazon Technologies, Inc. Adaptive service timeouts
CN103618590A (en) * 2013-11-20 2014-03-05 北京先进数通信息技术股份公司 Overtime control method and device of business processing process
CN103618590B (en) * 2013-11-20 2017-03-29 北京先进数通信息技术股份公司 A kind of manufacture timeout control method and device of transaction process
CN104616197A (en) * 2015-02-16 2015-05-13 中国工商银行股份有限公司 Separable query transaction data scheduling method and apparatus
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
CN108958959A (en) * 2017-05-18 2018-12-07 北京京东尚科信息技术有限公司 The method and apparatus for detecting hive tables of data
CN108958959B (en) * 2017-05-18 2022-04-12 北京京东尚科信息技术有限公司 Method and device for detecting hive data table
KR20200076714A (en) * 2017-10-23 2020-06-29 지멘스 악티엔게젤샤프트 Method and control system for controlling and/or monitoring devices
CN111543031A (en) * 2017-10-23 2020-08-14 西门子股份公司 Method and control system for controlling and/or monitoring a device
CN111543031B (en) * 2017-10-23 2022-09-20 西门子股份公司 Method and control system for controlling and/or monitoring a device
US11665015B2 (en) 2017-10-23 2023-05-30 Siemens Aktiengesellschaft Method and control system for controlling and/or monitoring devices
KR102545178B1 (en) 2017-10-23 2023-06-16 지멘스 악티엔게젤샤프트 Method and control system for controlling and/or monitoring devices
CN107958414A (en) * 2017-11-07 2018-04-24 中国银行股份有限公司 A kind of method and system of removing CICS systems length transaction
CN107958414B (en) * 2017-11-07 2021-09-21 中国银行股份有限公司 Method and system for eliminating long transactions of CICS (common integrated circuit chip) system
CN108829546A (en) * 2018-06-21 2018-11-16 中国人民解放军战略支援部队信息工程大学 timeout mechanism control method and device
CN108829546B (en) * 2018-06-21 2021-06-18 中国人民解放军战略支援部队信息工程大学 Timeout mechanism control method and device

Also Published As

Publication number Publication date
CN101727648B (en) 2012-07-25

Similar Documents

Publication Publication Date Title
CN101727648B (en) Overtime control method in service system and service system
US20170337095A1 (en) Service based information technology platform
Barga et al. Scientific versus business workflows
US7685604B2 (en) Business process execution language (BPEL) application generator for legacy interfaces
CN102456185B (en) Distributed workflow processing method and distributed workflow engine system
AU2015331025A1 (en) Emulating manual system of filing using electronic document and electronic file
US20080065994A1 (en) Systems and methods for adapting service interface behaviors
US8656354B2 (en) Compound versioning and identification scheme for composite application development
EA003744B1 (en) Extensible distributed enterprise application integration system
CN104615489B (en) A kind of implementation method of multinode data interaction
KR100880536B1 (en) Open framework system for heterogeneous computing and service integration
CN103019874A (en) Method and device for realizing exception handling based on data synchronization
CN101577718A (en) Multi-ebanking adaptive system
CN101115180B (en) Electronic program menu system and functional module dynamic load operating method
CN111208992A (en) System scheduling workflow generation method and system
Buffam E-business and IS solutions: an architectural approach to business problems and opportunities
Charfi et al. An aspect-based process container for BPEL
CN110737425A (en) billing platform system application program establishing method and device
US7634755B2 (en) Application splitting for network edge computing
Abreu et al. Specifying and composing interaction protocols for service-oriented system modelling
CN102945264A (en) Method for intelligently starting distributed transaction
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

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