Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment andTechnical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application oneSection Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doingEvery other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
As shown in Figure 1, in the related art, local service assembly container 11, local service group are deployed in the first computer room 1Local service component is carried in part container 11, the local service component that local service assembly container 11 carries is relied on multipleRemote service (such as remote service A, remote service B and remote service C) concentration is deployed in the second computer room 2.Wherein, the first computer room1 is service provider (such as enterprise, specific as provided the enterprise of Third-party payment service) to realize transnational or trans-regional industryIt is engaged in the computer room of strange land deployment, the second computer room 2 is the central machine room that service provider concentrates deployment, and the second computer room 2 is used to depositIt stores up core data and kernel service is provided.First computer room 1 and the second computer room 2 pass through the network equipment that is deployed in respective computer room12 (the first firewall 121 and the first interchanger 122 in such as the first computer room 1 and the second firewalls 211 in the second computer room 2With second switch 212) it is connected to the network via www, or pass through enterprise's private line access.
Under this deployment framework of the relevant technologies, if the local service component in the first computer room 1 in processing business,Need finishing service process 01, operation flow 02 and operation flow 03, then need repeatedly to call disposed in the second computer room 2 it is long-rangeService, such as need respectively by step 1., step 2., step 3. successively call remote service A in the second computer room 2, long-range clothesBe engaged in B and remote service C, this make complete above three operation flow time-consuming be complete step 1., step 2. with step 3.Time-consuming summation (can be expressed as 1.+2.+3.).Local service component in first computer room 1 completes these three operation flowsProcessing after, it is unified that service processing result is returned to service call side by the first computer room 1.
It is not difficult to find out that business processing framework in the related technology, more far call is needed, and more far callThe time-consuming of business procession certainly will be will lead to increase.Also, more far call can also cause at business because of network failureThe probability of reason failure increases.In addition, the time-consuming of business procession increases, the service request capacity of the first computer room 1 is also resulted inIt does not reach requirement, as shown in Fig. 2, the quantity for causing active service to be requested is horizontal much higher than design capacity.
At least one of to solve the above-mentioned problems, this specification embodiment provide a kind of method for processing business, system,Computer room and framework.First Fig. 3 to Fig. 4 is combined to be illustrated the business processing framework that this specification embodiment provides below.
Increase since multiple far call will lead to the time-consuming of business procession, that will try every possible means to reduce far callNumber, applicant obtains remote service and exists by carrying out shadow deployment to the remote service called of needs in the first computer room 1Proximal end service in first computer room 1, so, the local tune that original far call can be converted in the first computer room 1With or with regard near call, so as to reduce the time-consuming of business procession, and the probability that business is successfully processed is promoted.
As shown in figure 3, the business processing framework that this specification embodiment provides, comprising: the first computer room 1 and the second computer room 2.It is deployed at least one remote service in second computer room 1, such as remote service A, remote service B and remote service C.First computer room 1In be deployed with local service assembly container 11 and at least one proximal end service, as proximal end service a ', proximal end service b ' and proximal end clothesBe engaged in c ', wherein it is to the remote service disposed in the second computer room 2 respectively that proximal end, which services a ', proximal end service b ' and proximal end service c ',A, remote service B and remote service C executes the service obtained after shadow deployment.In framework shown in Fig. 3, proximal end service a ',Proximal end service b ' and proximal end service c ' can be based respectively on the local data being deployed in the first computer room 1 and mention to local service componentFor service.
Under business processing framework shown in Fig. 3, when the local service component in the first computer room 1 needs finishing service process01, operation flow 02 and when operation flow 03, can respectively by step 1., step 2. 3. called with step proximal end service a ',Proximal end service b ' and proximal end service c ' to realize;In addition, proximal end service a ', proximal end service b ' and proximal end service c ' can also will be adjustedIt is saved with the service invocation request of itself into the 4th local data base 15, and remembered in corresponding local data base respectivelyThe log of record processing corresponding service process, if proximal end service a ' can be recorded in the first local data 131, proximal end services b ' can beIt is recorded in second local data 132, proximal end service c ' can be recorded in third local data 133;Subsequent asynchronous schedule module 16Can be according to the log of record, by step, 1. 2. 3. asynchronization calls concentration to be deployed in the second machine to ' respectively for ' and step for ', stepCorresponding remote service in room 2, realize corresponding service process final process, by the execution state of business be advanced into it is final atFunction state.
On the basis of Fig. 3, as shown in figure 4, this specification embodiment provides a kind of more detailed business processing frameStructure.
As shown in figure 4, the business processing framework that this specification embodiment provides, comprising: the first computer room 1 and the second computer room 2.Request queue to be handled and at least one remote service are disposed in second computer room 1, is such as deployed with remote service A, remote service BWith remote service C.Local service assembly container 11, integrated treatment module 17, asynchronous schedule module are deployed in first computer room 116 service at least one proximal end, are such as deployed with proximal end service a ', proximal end service b ' and proximal end service c ', wherein proximal end servicesA ', proximal end service b ' and proximal end service c ' are to remote service A, the remote service B disposed in the second computer room 2 and long-range clothes respectivelyBusiness C executes the service obtained after shadow deployment.In framework shown in Fig. 3, integrated treatment module 17 is encapsulated in local serviceIn assembly container 11.Certainly, similar with asynchronous schedule module 16, integrated treatment module 17 can not also be encapsulated in local serviceIn assembly container 11, but it is arranged except local service assembly container 11.
Fig. 5 shows interaction timing signal of each executing subject in processing business in business processing framework shown in Fig. 4Figure.The interactive process in business processing framework shown in Fig. 4 when each executing subject processing business is said below with reference to Fig. 5It is bright.As shown in figure 5, the interactive process may include:
The local service component 110 of step 501, service call side 3 into the first computer room 1 is (by local service assembly container11 carry, and are not shown in Fig. 5) it sends for requesting the business processing of processing target business to be requested.
Local service component 110 in step 502, the first computer room 1 carries out preposition processing to business processing request.ItsIn, preposition processing may include: network protocol conversion and unserializing carried out to the business processing request received, and if anyNecessity the processing such as is decrypted to the business processing request received.
Step 503, local service component 110 request the business processing to carry out inter-process, are then forwarded to few oneA service invocation request, the service invocation request is for request call remote service 20 to the Business Stream in the target serviceCheng Jinhang processing.Wherein, inter-process may include: the operation flow in determining target service, and to realize the Business StreamJourney needs the remote service 20 etc. called.
Integrated treatment module 17 in step 504, the first computer room 1 is monitored and is intercepted from local service component 110At least one service invocation request.
Step 505, when the target service meets the first preset trigger condition, integrated treatment module 17 is by the clothesBusiness call request is sent to the corresponding proximal end of remote service 20 service 13 disposed in the first computer room, to call the proximal end to serviceThe operation flow of 13 pairs of target services is handled.
The service invocation request is saved the 4th local into the first computer room 1 by step 506, integrated treatment module 17It (is not shown in Fig. 5) in database, for the calling of asynchronous schedule module 16.
Step 507,13 service invocation request that receives of response of proximal end service, at the request described in the service invocation requestThe operation flow of reason is handled.
Step 508, proximal end service 13 return to the processing of the operation flow for target service to integrated treatment module 17As a result.
The processing result that step 509, integrated treatment module 17 are returned based on proximal end service 13, it is anti-to service call side 3Present the processing result of target service.
Step 510, when meeting the second preset trigger condition, asynchronous schedule module 16 is being set to the service invocation requestIt sets new mark and is sent to remote service 20 later, to call at the request described in the service invocation request of remote service 20The operation flow of reason is handled.
Step 511, remote service 20 are handled the operation flow in response to the service invocation request received.
Step 512, remote service 20 proximally service 13 return be successfully processed the operation flow as a result, making proximal endThe final process state of the operation flow is advanced into success by service 13.
Wherein, the particular content of the first preset trigger condition and the second preset trigger condition will be described herein-after, hereinIt wouldn't illustrate.
When by interactive process processing target business shown in fig. 5, due to being deployed in the second computer room 2 in the first computer room 1The service of remote service corresponding proximal end, therefore can convert original far call in the first computer room 1 local callsOr with regard near call, reduce the number of far call, and then business can be promoted while reducing the consumption of business processionThe probability being successfully processed.
On the basis of business processing framework shown in Fig. 4, as shown in fig. 6, this specification embodiment provides a kind of industryBusiness processing method, can be applied in the first computer room 1 shown in Fig. 4, this method may include:
Step 602 passes through integrated treatment module, monitors and intercepts the local service component in first computer roomAt least one service invocation request, remote service pair of the service invocation request for disposing in the second computer room of request callOperation flow in target service is handled.
As shown in figure 4, monitoring by integrated treatment module 17 and intercepting the local industry in first computer room 1At least one service invocation request of business component.
Wherein, target service is the business that the business processing that receives of local service component requests processing.WithLocal service assembly container 11 carry Service Component be payment services supporting assembly for, then target service can be user toThe payment transaction of trade company's payment consumption amount of money.
Optionally, before following step 604, method shown in fig. 6 can also include: to carry out in first computer roomThe shadow of the remote service is disposed, and proximal end service of the remote service in first computer room is obtained.
Step 604, when the target service meets the first preset trigger condition, by the integrated treatment module,The service invocation request is sent to the corresponding proximal end service of the remote service disposed in the first computer room, described in callingProximal end service handles the operation flow, and the processing result returned based on proximal end service, to service call sideFeed back the processing result of the target service.
As shown in figure 4, the service invocation request of interception is sent to the close of shadow deployment by integrated treatment module 17End service 13, the processing knot for handling to call proximal end to service 13 pairs of operation flows, and being returned based on proximal end service 13Fruit feeds back the processing result of the target service to service call side (user) 4.
Wherein, the first preset trigger condition includes but is not limited to one of following condition or a variety of: the target serviceType be preset kind, the service call side belongs to preset kind, and the generation moment of the target service is in preset timeIn range and the processed cumulative number of the target service is less than preset times.Specifically, being above with target servicePayment transaction for, the first preset trigger condition may include one or more of following condition: the type of target serviceWhether be preset kind, payment amount whether within the scope of preset cost, user whether be preset kind user, time of paymentWhether in preset time range and whether the processed cumulative number of target service is less than preset times, etc..
Optionally, in one example, before executing following step 606, method shown in fig. 6 can also include: logicalThe integrated treatment module is crossed, at least one described service invocation request is locally saved in first computer room, for describedAsynchronous schedule module is called.
Optionally, in another example, method shown in fig. 6 can also include: to be unsatisfactory for institute in the target serviceIt, will when stating proximal end service corresponding without the deployment remote service in the first preset trigger condition and/or first computer roomThe service invocation request is sent to the remote service, to call the remote service to the Business Stream in the target serviceCheng Jinhang processing.
Further, step 604 is specific can include: when the target service meets the first preset trigger condition, passes throughIntegrated treatment module carries out the first subservice in the operation flow of the target service according to the first default process flowProcessing.Wherein, the first subservice is the subservice that can be successfully processed by the corresponding proximal end service of calling.
Equally using local service component as payment services supporting assembly, target service is user to trade company's payment consumption amount of moneyPayment transaction for, the first subservice can be the business withholdd in advance from the local account of user.So, ifThe available amount (the available amount for the consumptive credit that such as user's local account is opened) of the local account of user is greater than user to quotientThe spending amount of family payment then can return to user after withholing successfully from local account and be successfully processed target serviceProcessing result.
It is appreciated that integrated treatment module 17 can be based on the mesh after monitoring simultaneously interception service call requestWhether mark business, which meets deployment in the first preset trigger condition and first computer room, is stated the corresponding proximal end of remote serviceService determines and proximal end service or remote service called to handle the operation flow in target service, can be with after determiningSynchronization call services accordingly handles the operation flow in target service.
Process flow default for first, can be according to the business and target service that local service component is supported notWith being designed in advance, this specification is not specially limited this.
Below with reference to example shown in Fig. 7, to by integrated treatment module synchronization processing target business process andFirst default process flow is illustrated.
As shown in fig. 7, the synchronization process process of target service may include ingress for service 71, pretreatment 72, business processing73 and system handle 74 this four part.
This part of ingress for service 71 may include input step 711 and output step 712.Wherein, input step 711 wrapsThe processing request for reading target service is included, output step 712 includes the processing result of output target service.
Pre-processing 72 this part may include preprocessing steps 721.Preprocessing steps 721 can specifically include pairThe processing request of the target service of reading carries out network protocol conversion and unserializing, and if it is necessary, target to readingThe processing request of business such as is decrypted at the processing.
This step of business processing 73 point may include input processing process (In Chain) 737 and output process flow (OutChain)734.Wherein, input processing process 737 and output process flow 734 are that be considered as above addressing first is presetProcess flow.
Specifically, as shown in fig. 7, input processing process 737 may include verifying regular 731 pairs of target services according to defaultOperation flow in the first subservice carry out regular verification and/or obtain the relevant parameter of first subservice, Yi JiyiFirst subservice is handled etc. according to pre-set business processing logic 732.If be appreciated that defeated in ingress for service 71The operation flow for entering the reading of 711 parts includes N number of first subservice, then may need to be implemented the business processing of n times, and different theThe corresponding business processing logic 732 of one subservice may be different.
Specifically, as shown in fig. 7, output process flow 734 may include based on preset template (such as template 1 to template N)The processing result of first subservice in the operation flow of the target service is assembled, and is exported, and for different theThe template that one subservice uses can be different.
Optionally, business processing part 73 can also include log recording 736 and asynchronous notifications 735.Wherein asynchronous notifications735 can be the first subservice notice that processing terminate into the operation flow that asynchronous schedule module 16 sends target service,The second subservice in the operation flow of target service is started to process in order to asynchronous schedule module 16.Wherein, the second subserviceIt is the subservice that cannot be successfully processed by the corresponding proximal end service of calling.
It may include idempotent processing step 741, interior business processing step 742, buffering note that system, which handles 74 this step point,Record step 747 and timeout treatment step 745, etc..Wherein, timeout treatment step 745 includes according to preparatory for processing target industryThe default time-out time of business setting, judges whether the treatment process of target service is overtime, if it times out, terminating to target serviceProcessing;Idempotent processing step 741, interior business processing step 742 and the buffering content to be realized of recording step 747 please joinAccording to the relevant technologies, this specification is not repeated them here.
It is appreciated that family can be used in the processing request for initiating target service by synchronization process process shown in Fig. 7At the time of from default time-out time in, receive it is that target service is successfully processed as a result, namely can be used family initiate meshAfter the processing request of mark business, almost synchronously receive that target service is successfully processed as a result, therefore can be by the processThe referred to as synchronization process process of target service.
Optionally, in step 604, by the integrated treatment module, the processing returned based on proximal end serviceAs a result, feeding back the processing result of the target service to service call side, may include:
By the integrated treatment module, the processing result and preset template returned is serviced based on the proximal end, toFeed back the processing result of the target service in service call side.
Step 606, when meeting the second preset trigger condition, by asynchronous schedule module, call the remote service pairThe operation flow is handled, so that proximal end service is in the business flow processing result for receiving the remote service returnAfterwards, the final process state of the operation flow is updated.
Wherein, second preset trigger condition includes but is not limited to: reaching default timing and receives default fingerAt least one of enable.It is of course also possible to, immediately by asynchronous schedule module, be called described remote after executing the step 604Journey service handles the operation flow, and this specification embodiment is not particularly limited this.
In the first instance, step 606 is specific can include: when meeting the second preset trigger condition, by described differentScheduler module is walked, new mark is set to the service invocation request;It, will be with new mark by the asynchronous schedule moduleThe service invocation request be sent to the remote service, to call the remote service to the business in the target serviceProcess is handled.That is, as shown in figure 3, by asynchronous schedule module 16 can respectively to remote service A, remote service B andRemote service C sends corresponding service invocation request, to call corresponding remote service to the respective traffic flows in target serviceCheng Jinhang processing.
In second example, step 606 is specific can include: when meeting the second preset trigger condition, by described differentScheduler module is walked, new mark is set at least one described service invocation request;By the asynchronous schedule module, to havingAt least one described service invocation request of new mark is combined, and obtains service invocation request set;By described asynchronousThe service invocation request set is sent to the request queue to be processed in the second computer room by scheduler module, described remote to callJourney service handles the operation flow.
As shown in figure 4, second computer room 2 is the computer room where remote service in above-mentioned second example;Wherein,The remote service, for monitoring the request queue to be processed 21 to obtain the service invocation request set, to the clothesBusiness call request set is disassembled to obtain the service invocation request for needing itself to handle, and in the service to itself processing is neededAfter call request is handled, proximal end service of the Xiang Suoshu remote service in the first computer room returns to processing result.
It is appreciated that in above-mentioned second example, since asynchronous schedule module at least one clothes by described in can be passed throughIt is engaged in after call request combination, the request queue to be processed being disposably sent in the second computer room, rather than be seriatim sent to pairThe remote service answered will also be merged into once the calling of the remote service in the second computer room, therefore can be further reducedThe network called across computer room is time-consuming, to promote business processing efficiency.
More specifically, in step 606, when meeting the second preset trigger condition, can by integrated treatment module,The second subservice in the operation flow of the target service is handled according to the second default process flow.Wherein, secondSubservice is the subservice that cannot be successfully processed by the corresponding proximal end service of calling.
Equally using local service component as payment services supporting assembly, target service is user to trade company's payment consumption amount of moneyPayment transaction for, the first subservice can be the business withholdd in advance from the local account of user, and the second subserviceIt can be the business finally withholdd from the Internetbank account of user.In this way, when meeting the first preset trigger condition, thenIt can finally be withholdd according to the second default process flow from the Internetbank account of user by asynchronous schedule module.
Optionally, asynchronous schedule module 16 can be used for the second subservice in the operation flow to the target serviceProcessing failure and then secondary when meeting the second preset trigger condition, according to the described second default process flow to the targetThe second subservice in the operation flow of business is handled.Optionally, number of processing can also be added up.
Process flow default for second, can be according to the business and target service that local service component is supported notWith being designed in advance, this specification is also not specially limited this.
Below with reference to example shown in Fig. 8, the default process flow of process and second to asynchronous process target service intoRow explanation.
As shown in figure 8, the asynchronous process process of the operation flow in target service may include ingress for service 81, at businessReason 82 and system handle 83 this three parts.
This part of ingress for service 81 may include: clocked flip step 812 and/or trigger step 811 manually.
Wherein, when clocked flip step 812 is included in arrival default timing, the operation flow to target service is triggeredIn the second subservice carry out asynchronous process process.
Wherein, triggering step 811 includes in the finger for receiving specified second subservice of processing that user sends manually manuallyWhen enabling, when such as receiving the instruction of the manual designated treatment of user multiple (such as 100) second subservice, trigger to target serviceThe second subservice in operation flow carries out the process of asynchronous process.
After clocked flip step 812, this part of ingress for service 81 can also include: to split task step 813, shouldStep includes splitting to multiple second subservices to be processed, and the quantity for being divided into the second subservice for including is less than present countMultiple groups of (such as 100) are measured, to be handled as unit of next process is by group.
After splitting task step 813 or manually triggering step 811, this part of ingress for service 81 can also include:Second subservice read step 818, the step include that one group of second subservice to be treated is read from database.
This part of business processing 82 may include: subservice processing step 821.Specifically, subservice processing step 821May include following sub-step: asynchronous mark 8211, subservice processing 8212 and processing result judge 8213.
Asynchronous mark 8211 includes that new mark is arranged to the second subservice of reading based on default mark template 822.It canTo understand, asynchronous mark is carried out to the second subservice, can make external service by the second subservice as a completely new businessIt is handled, the probability for being successfully processed the second subservice can be improved in this way.
Subservice processing 8212 include call corresponding remote service to the second subservice with new mark atReason.
Processing result judges that 8213 include judging based on default verification rule 823 to the second subservice with new markProcessing whether succeed, and be transferred to step 831 and/or step 832.
It may include: step 831 and/or step 832 that system, which handles 83 this part,.Wherein, step 831 includes target industryThe asynchronous mode of business is synchronous (after the second subservice such as in the operation flow of target service is handled successfully, by the target industryThe processing status of the operation flow of business is set as success) and the asynchronous process number record of the second subservice etc.;Step 832Including log recording etc..
It should be noted that in this specification embodiment, so-called synchronization process, refer to integrated treatment module whether toThe processing result for the target service that service call hair returns is strongly dependent upon the Business Stream for the target service that proximal end service returnsThe processing result of journey, after the processing result for needing etc. to proximal end to service the operation flow for returning to processing target business, Cai NengxiangThe processing result that service call hair returns to target service is constantly in wait state if do not waited until, scheduled until reachingTime-out time.And asynchronous process is then on the contrary, the processing for the target service whether integrated treatment module returns to service call hairAs a result, not being strongly dependent upon the processing result of the operation flow of the target service of remote service return, whether remote serviceThe processing result of the operation flow of the target service returned is not important, and whether no matter return, integrated treatment module is allThe processing result of the target service returned can be sent out to service call.
A kind of method for processing business that embodiment shown in fig. 6 provides, due to being deployed in the second computer room in the first computer roomThe service of remote service corresponding proximal end, therefore original far call can be converted in the first computer room it is local call orWith regard near call, reduce the number of remote call service, and then can be promoted while reducing the time-consuming of business processionThe probability that business is successfully processed.Further, since can be when target service meets the first preset trigger condition, automatically by oneThe service of body processing module Selection and call proximal end handles the operation flow of target service, the local service in the first computer roomComponent is proximal end or long-range without aware services calling, therefore has good service adaptation.Further more, meetingWhen the second preset trigger condition, then by asynchronous schedule module to the operation flow progress asynchronous process in target service, thereforeThe optimization of the service request capacity of the first computer room may be implemented.
Optionally, method for processing business shown in fig. 6 can also include: by management module to integrated treatment module andAsynchronous schedule module is managed.Management module can be set in local service assembly container 11, also can be set in localOutside Service Component container 11.
As an example, it can be defined by management module and inject the above-mentioned first default touching into integrated treatment moduleClockwork spring part and the first default process flow define and inject the second default process flow into asynchronous schedule module.
Wherein, the specific example of the first preset trigger condition, the first default process flow and the second default process flow canIt sees above, does not do repeated description herein.
It should be noted that the first default process flow and the second default process flow that are defined by management module can be withIt is any one of processes such as sequence flow, parallel process and branch's process.Fig. 9, Figure 10 and Figure 11 respectively illustrate sequential flowThe schematic diagram of journey, parallel process and branch's process.
As shown in figure 9, sequence flow refers to the process for needing 1. 2. 3. sequentially to execute to step again to step from step.Such asShown in Figure 10, parallel process refer to step 1., the process that 2. 3. can be executed simultaneously, in parallel with step of step.Such as Figure 11 instituteShow, branch's process is the mixing of parallel process and sequence flow, that is to say, that process can part steps (such as step 2. and stepSuddenly it can be executed in parallel 3.), part steps needs sequence executes (such as step 3. with step 4.).
Further, the first default process flow and described second described in preset rules layout can be based on by management moduleAt least one of default process flow.
Wherein, the preset rules include at least one of following rules: synchronous serial executing rule, asynchronous parallel are heldLine discipline, timing executing rule, circulation executing rule, execute abnormality processing rule, transaction operation rule, condition judgment rule,External service calls frequency control rule, the accumulative rule of external service call number and state to keep rule, etc..It can manageSolution, these rules can be with flexible setting, it is not limited to cited by this specification these.
Further, in order to enable the first default process flow and the second default process flow that management module defines are mostWeb layout description language (Web Services Choreography can be used in possible lightweight, management moduleDescription Language, WS-CDL) the first default process flow and the second default process flow described in layout.
Further, in order to make local service assembly container 11 be the container of a lightweight, management module can also be adoptedWith the script of WS-CDL layout synchronization process process shown in Fig. 7 and asynchronous process process shown in Fig. 8.Here is using WS-One example of the script of the synchronization process process shown in Fig. 7 or asynchronous process process shown in Fig. 8 of CDL layout:
The process layout that above-mentioned script is realized is that synchronizing sequence inquires reversed order (reverse Buy Order) process,Query result is specifically assembled into the request of (Place Buy Order) of placing an order, recursive call Service Component, to operating resultUser client is returned to after being assembled, last asynchronous call acknowledgement of orders (Confirm Buy Order) operates and synchronous shapeState.(pass through mark tune from upstream business it is appreciated that transmitting between different Service Component containers by script and execution stateServiced with downstream traffic), it can be with finishing service call request and context transfer.
On the basis of above-mentioned method for processing business, this specification embodiment provides a kind of transaction processing system, belowIt is introduced.
As shown in figure 12, it is (same to can be applied to the first computer room 1 for the transaction processing system 1100 that this specification embodiment providesThe first computer room above) in, in a kind of Software Implementation, system 1100 can include: integrated treatment module 17 and differentWalk scheduler module 16.Wherein, integrated treatment module 17 may be provided in the local service assembly container 11 in the first computer room 1,Local service component 110 is carried in local service assembly container 11.
Integrated treatment module 17, for monitoring and intercepting the local service component in first computer room 1 extremelyA few service invocation request, remote service of the service invocation request for disposing in the second computer room of request call 2 (can be withIt is one of remote service A, remote service B into remote service C) operation flow in target service is handled;AndWhen the target service meets the first preset trigger condition, the service invocation request is sent to the institute disposed in the first computer roomThe corresponding proximal end service of remote service (can be proximal end service a ', proximal end services one of b ' into proximal end service c ') is stated, withThe proximal end service is called to handle the operation flow, and the processing result returned based on proximal end service, toFeed back the processing result of the target service in service call side.
Optionally, integrated treatment module 17 is also used at the calling remote service is to the operation flowBefore reason, at least one described service invocation request is locally saved in first computer room, for the asynchronous schedule module 16It calls.
Asynchronous schedule module 16, for calling the remote service to the industry when meeting the second preset trigger conditionBusiness process is handled, so that the proximal end services after receiving the business flow processing result that the remote service returns, moreThe final process state of the new operation flow.
Optionally, asynchronous schedule module 16, for when meeting the second preset trigger condition, at least one to be serviced to described inNew mark is arranged in call request, is combined, is taken to at least one service invocation request described in new markBusiness call request set, is sent to the request queue to be processed in the second computer room for the service invocation request set, to callThe remote service handles the operation flow.
Wherein, second computer room is the computer room where the remote service;The remote service, for monitor it is described toRequest queue is handled to obtain the service invocation request set, the service invocation request set is disassembled and is neededThe service invocation request of itself processing, and after to needing the service invocation request of itself processing to handle, to described long-rangeThe proximal end service serviced in the first computer room returns to processing result.
Transaction processing system 1100 shown in Figure 12 can pass through integrated treatment during processing target businessModule local called by what original far call was converted into the first computer room or with regard near call, reduces remote call serviceNumber, and then the probability that business is successfully processed can be promoted while reducing the time-consuming of business procession.Further, sinceThe first preset trigger condition can be met in target service, and be deployed with the corresponding proximal end service of remote service in the first computer roomWhen, the operation flow of target service is handled automatically by the service of integrated treatment module Selection and call proximal end, local industryComponent of being engaged in without aware services calling is proximal end or long-range, therefore has good service adaptation.Further more, fullWhen the second preset trigger condition of foot, then passes through asynchronous schedule module and asynchronous process is carried out to the operation flow in target service, becauseThe optimization of the service request capacity of the first computer room may be implemented in this.
Optionally, as shown in figure 12, this specification embodiment also provides the first computer room 1, comprising: local service assembly container11, asynchronous schedule module 16 and at least one proximal end service (such as proximal end service a ', proximal end service b ' to proximal end service c '),In, local service component 110 and integrated treatment module 17 are carried in the local service assembly container 11.
The integrated treatment module 17, for monitoring and intercepting at least one from the local service component 110Service invocation request, remote service of the service invocation request for disposing in the second computer room of request call 2 (can be long-rangeService one of A, remote service B into remote service C) operation flow in target service is handled;And in the meshWhen mark business meets the first preset trigger condition, the service invocation request is sent to disposed in the first computer room it is described long-rangeCorresponding proximal end service (can be proximal end service a ', proximal end services one of b ' into proximal end service c ') is serviced, to callIt states the corresponding proximal end service of remote service to handle the operation flow, and is based on the corresponding proximal end of the remote serviceThe processing result returned is serviced, the processing result of the target service is fed back to service call side.
The asynchronous schedule module 16, for calling the remote service to institute when meeting the second preset trigger conditionOperation flow is stated to be handled.
The corresponding proximal end service of the remote service, the operation flow for being returned based on the remote service receivedProcessing result updates the final process state of the operation flow.
The first computer room 1 that this specification embodiment provides, can obtain skill identical with above-mentioned transaction processing system 1100Art effect, details are not described herein again.
Optionally, as shown in figure 12, this specification embodiment also provides the second computer room 2, comprising: request queue 21 to be processedWith at least one remote service (such as remote service A, remote service B and service C).
Request queue 21 to be processed, for receiving the service invocation request set from the first computer room, the service callIt include at least one service invocation request in request set, the service invocation request is for remote service pair described in request callOperation flow in target service is handled;
Remote service, for monitoring the request queue to be processed to obtain the service invocation request set, to describedService invocation request set is disassembled to obtain the service invocation request for needing itself to handle, and to the clothes for needing itself processingAfter business call request is handled, proximal end service of the Xiang Suoshu remote service in the first computer room returns to processing result.
Optionally, as shown in figure 12, this specification embodiment also provides a kind of business processing framework, including the first computer room 1With the second computer room 2, wherein be deployed in the first computer room 1 local service assembly container 11, asynchronous schedule module 16 and at least oneProximal end services (such as proximal end service a ', proximal end service b ' to proximal end service c '), carries in the local service assembly container 11Local service component 110 and integrated treatment module 17;At least one proximal end service is corresponding with disposing in the second computer room 2Remote service (such as remote service A, remote service B and service C).
The integrated treatment module 17, for monitoring and intercepting at least one clothes from the local service component 11Business call request, the service invocation request carry out the operation flow in target service for remote service described in request callProcessing;And when the target service meets the first preset trigger condition, the service invocation request is sent to described firstThe corresponding proximal end service of the remote service disposed in computer room, to call the corresponding proximal end service of the remote service to describedOperation flow is handled, and the processing result returned based on the corresponding proximal end service of the remote service, to service callFeed back the processing result of the target service in side;
The asynchronous schedule module 16, for calling the remote service when meeting the second preset trigger condition;
The remote service is handled the operation flow for responding the calling of the asynchronous schedule module, andProcessing result is returned to the corresponding proximal end service of the remote service;
The corresponding proximal end service of the remote service, the operation flow for being returned based on the remote service receivedProcessing result updates the final process state of the operation flow.
Likewise, the business processing framework that this specification embodiment provides, can obtain and above-mentioned transaction processing system1100 identical technical effects, details are not described herein again.
The electronic equipment provided below this specification is introduced.
Figure 13 is the structural schematic diagram for the electronic equipment that one embodiment of this specification provides.Figure 13 is please referred to, hardPart level, the electronic equipment include processor, optionally further comprising internal bus, network interface, memory.Wherein, memoryIt may include memory, such as high-speed random access memory (Random-Access Memory, RAM), it is also possible to further include non-Volatile memory (non-volatile memory), for example, at least 1 magnetic disk storage etc..Certainly, which may be used alsoIt can include hardware required for other business.
Processor, network interface and memory can be connected with each other by internal bus, which can be ISA(Industry Standard Architecture, industry standard architecture) bus, PCI (PeripheralComponent Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry StandardArchitecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control alwaysLine etc..Only to be indicated with a four-headed arrow in Figure 13, it is not intended that an only bus or a type of convenient for indicatingBus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculatingMachine operational order.Memory may include memory and nonvolatile memory, and provide instruction and data to processor.
Processor is from the then operation into memory of corresponding computer program is read in nonvolatile memory, in logical layerTransaction processing system is formed on face.Processor executes the program that memory is stored, and is specifically used for executing following operation:
By integrated treatment module, at least one clothes of the local service component in the first computer room are monitored and interceptedBusiness call request, remote service of the service invocation request for disposing in the second computer room of request call is in target serviceOperation flow is handled;
When the target service meets the first preset trigger condition, by the integrated treatment module, by the clothesBusiness call request is sent to the corresponding proximal end service of the remote service disposed in first computer room, to call the proximal endService handles the operation flow, and the processing result returned based on proximal end service, feeds back to service call sideThe processing result of the target service;
When meeting the second preset trigger condition, by asynchronous schedule module, call the remote service to the businessProcess is handled, so that proximal end service updates after receiving the business flow processing result that the remote service returnsThe final process state of the operation flow.
Method for processing business disclosed in the above-mentioned embodiment illustrated in fig. 6 such as this specification can be applied in processor, orIt is realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.During realization, onEach step for stating method can be completed by the integrated logic circuit of the hardware in processor or the instruction of software form.It is above-mentionedProcessor can be general processor, including central processing unit (Central Processing Unit, CPU), network processesDevice (Network Processor, NP) etc.;Can also be digital signal processor (Digital Signal Processor,DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gateArray (Field-Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or crystalline substanceBody pipe logical device, discrete hardware components.It may be implemented or execute and is in this specification one or more embodiment disclosedEach method, step and logic diagram.General processor can be microprocessor or the processor be also possible to it is any conventionalProcessor etc..The step of method in conjunction with disclosed in this specification one or more embodiment, can be embodied directly in hardware decodingProcessor executes completion, or in decoding processor hardware and software module combination execute completion.Software module can positionIn random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable memory, registerIn the storage medium of equal this fields maturation.The storage medium is located at memory, and processor reads the information in memory, in conjunction with itHardware completes the step of above method.
The electronic equipment can also carry out the method for processing business of Fig. 6, and details are not described herein for this specification.
Certainly, other than software realization mode, other implementations are not precluded in the electronic equipment of this specification, such asLogical device or the mode of software and hardware combining etc., that is to say, that the executing subject of following process flow is not limited to eachLogic unit is also possible to hardware or logical device.
This specification embodiment also proposed a kind of computer readable storage medium, the computer-readable recording medium storageOne or more programs, the one or more program include instruction, and the instruction is when by the portable electric including multiple application programsWhen sub- equipment executes, the method that the portable electronic device can be made to execute embodiment illustrated in fig. 6, and be specifically used for executing followingOperation:
By integrated treatment module, at least one clothes of the local service component in the first computer room are monitored and interceptedBusiness call request, remote service of the service invocation request for disposing in the second computer room of request call is in target serviceOperation flow is handled;
When the target service meets the first preset trigger condition, by the integrated treatment module, by the clothesBusiness call request is sent to the corresponding proximal end service of the remote service disposed in first computer room, to call the proximal endService handles the operation flow, and the processing result returned based on proximal end service, feeds back to service call sideThe processing result of the target service;
When meeting the second preset trigger condition, by asynchronous schedule module, call the remote service to the businessProcess is handled, so that proximal end service updates after receiving the business flow processing result that the remote service returnsThe final process state of the operation flow.
Above-mentioned that this specification specific embodiment is described, other embodiments are in the scope of the appended claimsIt is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodimentIt executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitableSequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also canWith or may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodimentDividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device realityFor applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the methodPart explanation.
In short, being not intended to limit the protection of this specification the foregoing is merely the preferred embodiment of this specificationRange.With within principle, made any modification, changes equivalent replacement all spirit in this specification one or more embodimentInto etc., it should be included within the protection scope of this specification one or more embodiment.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,Or it is realized by the product with certain function.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be usedThink personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media playIt is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipmentThe combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any methodOr technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), movesState random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasableProgrammable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devicesOr any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculatesMachine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludabilityIt include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrapInclude other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic wantElement.When not limiting more, the element that is limited by sentence "including a ...", it is not excluded that in the mistake including the elementThere is also other identical elements in journey, method, commodity or equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodimentDividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system realityFor applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the methodPart explanation.