Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one
Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Every 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, carried in Service Component container 1 Service Component 12, network protocol conversion and
Unserializing module 11, external service is called and serialization module 13.Service Component container 1 is to receive service request (as follows
The processing of target service in text is requested) after, network protocol is carried out first with network protocol conversion and unserializing module 11
Conversion and/or unserializing;Then, local Service Component 12 is called to handle service request;And then utilize outside
Service call and serialization module 13 generate external service call request and serializing 13, external service 2 are then forwarded to, with reality
The calling of existing external service 2;Service finally after the processing status for receiving the return of external service 2, to initiating business request
The processing result of called side (user) feedback traffic.
Service Component container 1 shown in FIG. 1 works as Service Component 12 itself or service groups although stability is preferable
After preset failure occurs in the external service 2 that part 12 relies on, such as there is database (Database, DB) failure, network performance etc. not
After the temporary system failure known, if business procession has timed out, it can return and lose to service call side (user)
The service processing result lost causes the service request of user not to be successfully processed, brings inconvenience to users.As it can be seen that related skill
Service Component container 1 in art goes out in the external system (such as external service 2) that Service Component 12 itself or Service Component 12 rely on
When the existing temporary system failure, lack actively reply and self-reacting ability, it cannot be guaranteed that business is successfully processed, gives user
Cause adverse effect.
To solve the above-mentioned problems, this specification embodiment provides a kind of Service Component container, method for processing business and electricity
Sub- equipment.As shown in fig. 6, the Service Component container 1 that this specification embodiment provides can be deployed in the clothes in micro services framework
It is engaged in device 3.
A kind of Service Component container first provided below this specification embodiment is illustrated.
As shown in Fig. 2, the Service Component container 1 that this specification embodiment provides, in addition to including Service Component 12, network association
View conversion and unserializing module 11 and external service calling and serialization module 13 can also include: monitoring module 14, same
Walk processing module 15 and asynchronous process module 16.
Module 14 is monitored, processing knot of the Service Component 12 carried for monitoring service assembly container 1 to target service
Fruit, and when listening to the processing result and leading to the failure because of preset failure, trigger synchronous processing module 15.
Wherein, target service is the business that the business processing that receives of Service Component container 1 requests processing.With
The Service Component 12 that Service Component container 1 carries is for payment services supporting assembly, then target service can be user to quotient
The payment transaction of the family payment consumption amount of money.
Illustratively, the preset failure may include at least one of following failure: the Service Component itself goes out
The temporary system failure that the external service that the existing temporary system failure and the Service Component rely on occurs.Certainly, it removes
Both temporary system failures, preset failure can also be the other kinds of failure (configuration error of such as business rule
Deng).That is, the Service Component container 1 that this specification embodiment provides actively reply can also remove Service Component 12 itself
And other failures other than the temporary system failure of the external service of the dependence of Service Component 12.
Optionally, module 14 is monitored, can be used in the processing result listened to being failure and target service satisfaction
When the first preset trigger condition, synchronous processing module 15 is triggered.
Namely in this specification embodiment, can only to meet the first preset trigger condition target service mistake processed
When losing, triggering synchronous processing module 15 carries out the spontaneous reply of failure.First preset trigger condition can be understood as being whether to carry out
The entry criteria of the spontaneous reply of failure.
Wherein, first preset trigger condition can include but is not limited to one or more of following condition: described
The type of target service is preset kind, and the service call side belongs to preset kind, and the generation moment of the target service exists
In preset time range and the processed cumulative number of the target service is less than preset times.
Specifically, the first preset trigger condition may include following so that target service is payment transaction above as an example
One or more of condition: the type of target service whether be preset kind, payment amount whether within the scope of preset cost,
User whether be the user of preset kind, time of payment whether in preset time range and target service is processed accumulative
Whether number is less than preset times, etc..
Synchronous processing module 15, for according to the first default process flow to the first subservice in the target service into
Row processing, records the second subservice in the target service, and returns to service call side and be successfully processed the mesh
Mark business as a result, first subservice is the subservice not influenced by the preset failure, second subservice be by
The subservice that the preset failure influences.
For the Service Component 12 equally carried with Service Component container 1 for payment services supporting assembly, target service is user
To for the payment transaction of trade company's payment consumption amount of money, then the first subservice can be withholds from the local account of user
Money, the second subservice can be finally is withholdd from the Internetbank account (external service) of user.So, if user
The available amount (the available amount for the consumptive credit that such as user's local account is opened) of local account is greater than user and pays to trade company
Spending amount, and payment services supporting assembly do not occur it is temporary being capable of failure, then it is assumed that the first subservice not by default therefore
The influence of barrier can return to the processing result for being successfully processed target service to user after withholing successfully from local account;Such as
There is the temporary system failure in the network that the Internetbank of fruit user is relied on, then it is assumed that and the second subservice is influenced by preset failure,
It needs that temporarily the second subservice is recorded in database (Database, DB), asynchronous schedule module is waited to carry out asynchronous schedule
Processing.
It should be understood that the first subservice and the second subservice are also different, and above-mentioned example is only one when target service difference
A possible application example, should not be understood as the limitation to target service, the first subservice and the second subservice.
It is appreciated that synchronous processing module 15 listens to Service Component 12 to the processing knot of target service in monitoring module 14
After fruit is failure, the first subservice that should do not influenced by preset failure in target service is handled immediately, and to service
Called side (user) returns to the business processing mode for being successfully processed the result of the target service, and user can be made to initiate mesh
The knot that target service is successfully processed is received (in default time-out time) in the very short time after the processing request of mark business
Fruit, namely family can be used after initiating the processing request of target service, it almost synchronously receives target service and is successfully located
Reason as a result, therefore the process can be known as to the synchronization process process of target service.And process flow default for first, it can
It is designed in advance with the difference of the business and target service supported according to Service Component 12, this specification is not spy to this
It does not limit.
Below with reference to example shown in Fig. 3, the default process flow of process and first to synchronization process target service into
Row explanation.
As shown in figure 3, the synchronization process process of target service may include ingress for service 31, pretreatment 32, business processing
33 and system handle 34 this four part.
This part of ingress for service 31 may include input step 311 and output step 312.Wherein, input step 311 wraps
The processing request for reading target service is included, output step 312 includes the processing result of output target service.
Pre-processing 32 this part may include preprocessing steps 321.Preprocessing steps 321 can specifically include pair
The processing request of the target service of reading carries out network protocol conversion and unserializing, and if it is necessary, target to reading
The processing request of business such as is decrypted at the processing.
This step of business processing 33 point may include input processing process (In Chain) 333 and output process flow (Out
Chain)334.Wherein, input processing process 333 and output process flow 334 are that be considered as above addressing first is preset
Process flow.
Specifically, as shown in figure 3, input processing process 333 may include verifying regular 331 pair of first sub- industry according to default
Business carries out regular verification and/or obtains the relevant parameter of first subservice, and right according to pre-set business processing logic 332
First subservice is handled etc..If the target service that 311 part of input being appreciated that in ingress for service 31 is read
Including N number of first subservice, then the business processing of n times, and the corresponding business processing of different first subservices may be needed to be implemented
Logic 332 may be different.
Specifically, as shown in figure 3, output process flow 334 may include based on preset template (such as template 1 to template N)
The processing result of first subservice of the target service is assembled and exported, and is used for the first different subservices
Template can be different.
Optionally, business processing part 33 can also include log recording 336 and asynchronous notifications 335.Wherein asynchronous notifications
335 can be the first subservice notice that processing terminate sent in target service to asynchronous process module 16, in order to asynchronous
Processing module 16 starts to process the second subservice in target service.
It may include idempotent processing step 341, interior business processing step 342, buffering note that system, which handles 34 this step point,
Record step 343 and timeout treatment step 345, etc..Wherein, timeout treatment step 345 includes according to preparatory for processing target industry
The default time-out time of business setting, judges whether the treatment process of target service is overtime, if it times out, terminating to target service
Processing;Idempotent processing step 341, interior business processing step 342 and the buffering content to be realized of recording step 343 please join
According 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. 3
At 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 mesh
After the processing request of mark business, almost synchronously receive that target service is successfully processed as a result, therefore can be by the process
The referred to as synchronization process process of target service.
Asynchronous process module 16 is used for after the preset failure restores normal, according to the second default process flow to institute
The second subservice stated in target service is handled, and sets the processing status of the target service to after handling successfully
Success.
Continue to use above for example (Service Component container 1 carry Service Component 12 be payment services supporting assembly,
Target service is user to for the payment transaction of trade company's payment consumption amount of money, then the first subservice can be from the local of user
Account is withholdd in advance, and the second subservice can be finally is withholdd from the Internetbank account of user), then it can be in the net of user
After the temporary system failure recovery that the network that silver is relied on occurs is normal, according to the second default process flow to the target
The second subservice in business is handled, and sets success for the processing status of the target service after handling successfully.
Optionally, asynchronous process module 16 can be used for meeting the second preset trigger condition, and the preset failure restores
When normal, the second subservice in the target service is handled according to the described second default process flow.Wherein, described
Second preset trigger condition may include reaching default timing or receiving default triggering command (it is manual such as to receive user
The instruction of the second subservice of processing of transmission).
Optionally, asynchronous process module 16, can be used for the second subservice processing failure in the target service it
Afterwards, again meet the second preset trigger condition, and the preset failure restore it is normal when, according to the described second default processing stream
Journey handles the second subservice in the target service.Optionally, number of processing can also be added up.
It is appreciated that asynchronous process module 16, is meeting the second preset trigger condition, and the preset failure restores normal
When, then to the mode that the second subservice in target service is handled, it is not subject to processing the limitation of the time-out time of target service,
Therefore the process can be known as to the asynchronous process process of target service.And process flow default for second, it can be according to industry
The difference of business and target service that business component 12 is supported is designed in advance, and this specification does not do special limit to this yet
It is fixed.
Below with reference to example shown in Fig. 4, the default process flow of process and second to asynchronous process target service into
Row explanation.
As shown in figure 4, the asynchronous process process of target service may include at ingress for service 41, business processing 42 and system
Manage 43 this three parts.
This part of ingress for service 41 may include: clocked flip step 412 and/or trigger step 411 manually.
Wherein, it when clocked flip step 412 is included in arrival default timing, triggers to the second son in target service
The process of business progress asynchronous process.
Wherein, triggering step 411 includes in the finger for receiving specified second subservice of processing that user sends manually manually
When enabling, when such as receiving the instruction of the manual designated treatment of user multiple (such as 100) second subservice, trigger in target service
The second subservice carry out asynchronous process process.
After clocked flip step 412, this part of ingress for service 41 can also include: to split task step 413, should
Step 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 count
Multiple groups of (such as 100) are measured, to be handled as unit of next process is by group.
After splitting task step 413 or manually triggering step 411, this part of ingress for service 41 can also include:
Second subservice read step 414, the step include that one group of second subservice to be treated is read from database.
This part of business processing 42 may include: subservice processing step 421.Specifically, subservice processing step 421
May include following sub-step: asynchronous mark 4211, subservice processing 4212 and processing result judge 4213.
Asynchronous mark 4211 includes that new mark is arranged to the second subservice of reading based on default mark template 422.It can
To understand, asynchronous mark is carried out to the second subservice, can make external service by the second subservice as a completely new business
It is handled, the probability for being successfully processed the second subservice can be improved in this way.
Subservice processing 4212 includes handling the second subservice with new mark.
Processing result judges that 4213 include judging based on default verification rule 423 to the second subservice with new mark
Processing whether succeed, and be transferred to step 431 and/or step 432.
It may include: step 431 and/or step 432 that system, which handles 43 this part,.Wherein, step 431 includes target industry
The asynchronous mode of business is synchronous (such as after the second subservice of target service is handled successfully, by the processing status of the target service
It is set as success) and the asynchronous process number record of the second subservice etc.;Step 432 is including log recording etc..
A kind of Service Component container that this specification embodiment provides, due to further including prison in addition to carrying Service Component
Listen module, synchronous processing module and asynchronous process module, wherein monitor module in the processing result for listening to target service because pre-
If failure leads to the failure, automatic trigger synchronous processing module, on what is do not influenced by the preset failure in the target service
First subservice is handled, and is recorded to the second subservice influenced in the target service by the preset failure;
And automatic trigger asynchronous process module, after the preset failure restores normal, to the second subservice in the target service
It is handled, and sets success for the processing status of the target service after handling successfully.Therefore, it can actively cope with simultaneously
Automatic to adapt to the case where preset failure leads to target service processing failure, realization is successfully processed target service, improves target
The probability that business is successfully processed is reduced to adverse effect caused by user security risk.
Optionally, as shown in figure 5, this specification embodiment provide Service Component container 1, in addition to include Service Component
12, module 14, synchronous processing module 15 and asynchronous process module 16 are monitored, can also include management module 17.
Management module 17 can be used for the monitoring module 14, the synchronous processing module 15 and the asynchronous process mould
Block 16 is managed.
As an example, management module 17 can be used for defining and injecting into the monitoring module 14 above-mentioned first pre-
If trigger condition, define and simultaneously inject the described first default process flow into the synchronous processing module 15, and definition and to
The described second default process flow is injected in the asynchronous process module 16.
Wherein, the specific example of the first preset trigger condition, the first default process flow and the second default process flow can
It 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 management module 17 defines can be
Any one of processes such as sequence flow, parallel process and branch's process.Fig. 6 A, Fig. 6 B and Fig. 6 C respectively illustrate sequential flow
The schematic diagram of journey, parallel process and branch's process.
As shown in Figure 6A, sequence flow refers to the process for needing 1. 2. 3. sequentially to execute to step again to step from step.
As shown in Figure 6B, parallel process refer to step 1., the process that 2. 3. can be executed simultaneously, in parallel with step of step.Such as Fig. 6 C institute
Show, 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 step
Suddenly it can be executed in parallel 3.), part steps needs sequence executes (such as step 3. with step 4.).
Further, management module 17, it may also be used for based on the first default process flow and institute described in preset rules layout
State at least one of second default process flow.
Wherein, the preset rules include at least one of following rules: synchronous serial executing rule, asynchronous parallel are held
Line 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 manage
Solution, 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 17 defines
Web layout description language (Web Services Choreography can be used in lightweight as far as possible, management module 17
Description Language, WS-CDL) the first default process flow and the second default process flow described in layout.
Further, in order to make Service Component container 1 be the container of a lightweight, management module 17 be can also be used
The script of WS-CDL layout synchronization process process shown in Fig. 3 and asynchronous process process shown in Fig. 4.Here is using WS-CDL
One example of the script of the synchronization process process shown in Fig. 3 and asynchronous process process shown in Fig. 4 of 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 result
User client is returned to after being assembled, last asynchronous call acknowledgement of orders (Confirm Buy Order) operates and synchronous shape
State.(pass through mark tune from upstream business it is appreciated that transmitting between different Service Component containers by script and execution state
Serviced with downstream traffic), it can be with finishing service call request and context transfer.
Optionally, as shown in fig. 7, this specification embodiment provide Service Component container 1, in addition to include Service Component
12, module 14, synchronous processing module 15, asynchronous process module 16 and management module 17 are monitored, can also include log component 18,
Performance monitoring module 19 and service management module 20.
Wherein, log component 18 can be used for record traffic processing log;Performance monitoring module 19 can be used for monitoring business group
The performance of part container 1, such as stability, business processing success rate etc.;Service management module 20 can be used for propping up Service Component 12
The business held is managed, etc..
In short, a kind of Service Component container 1 of this specification embodiment, it can be by monitoring 14 actively perceive target industry of module
The preset failure that occurs in business treatment process, and after perceiving preset failure actively triggers synchronous processing module 15 and different
It walks processing module 16 and asynchronous process is carried out to target service, therefore the probability that target service is successfully processed can be improved, reduce
Influence to user experience.Further, it is also possible to use the layout industry in the form of script of management module 17 in Service Component container 1
Business process flow, therefore light-weighted self-adapted service processing scheme can be customized out.
It is that a kind of explanation of Service Component container is provided this specification above, this specification is provided below with reference to Fig. 8
The interactive process of method for processing business be introduced.
As shown in figure 8, a kind of method for processing business that this specification embodiment provides, comprising:
Step 801, service call side (user) 4 initiate to request for the processing of target service to Service Component container 1.
Step 802, network protocol conversion and unserializing module 11 carry out preposition processing to the service request received, such as
Carry out the processing such as network protocol conversion and unserializing.
Step 803, Service Component 12 execute interior business processing to for the target service.
Step 804, Service Component 12 call external service 2 to handle the target service.
Step 805, external service 2 lead to the processing failure of the target service because of the temporary system failure.
Step 806, external service 2 return to the result of processing failure to Service Component 12.
It is failure to the processing result of target service that step 807, monitoring module 14, which listen to Service Component 12, and judges mesh
Mark business meets the first preset trigger condition, triggers synchronous processing module 15.
Step 808, synchronous processing module 15 are according to the first default process flow to the first sub- industry in the target service
Business is handled, and the first subservice is the subservice not influenced by the preset failure.
Step 809, synchronous processing module 15 record the processing log of target service.
Step 810, synchronous processing module 15 return to the result for being successfully processed the target service to service call side 4.
Step 811, asynchronous process module 16 according to the second default process flow to the second subservice in target service into
Row processing, and success is set by the processing status of target service.
Step 812, asynchronous process module 16 are handled after the preset failure restores normal to 2 initiation of external service
The request of the second subservice in target service.
Step 813, external service 2 handle the second subservice in target service, and locally will in external service 2
The processing status of target service is set as success.
Step 814, external service 814 return to the second subservice being successfully processed in target service to asynchronous process module
As a result.
In addition, corresponding to the Service Component container 1 that this specification embodiment provides, as shown in figure 9, this specification embodiment
A kind of method for processing business is also provided, can be applied in the Service Component container 1 of this specification embodiment offer, Service Component holds
Device 1 may include monitoring module, synchronous processing module and asynchronous process module, and on this basis, this method may include:
Step 902, by the monitoring module, monitor Service Component that the Service Component container is carried to target industry
The processing result of business, and when listening to the processing result and leading to the failure because of preset failure, trigger the synchronous processing module.
As an example, the preset failure may include at least one of following failure: the Service Component is certainly
The system failure that the external service that the system failure and the Service Component that body occurs rely on occurs.Certainly, in addition to both
The temporary system failure, preset failure can also be other kinds of failure (configuration error of such as business rule).Namely
Say, the method for processing business that this specification embodiment provides can also actively cope with except Service Component itself and Service Component according to
Other failures other than the temporary system failure of bad external service.
Further, as another example, step 902 is specific can include: by the monitoring module, by described
It monitors module and listens to processing result for failure and when the target service meets the first preset trigger condition, trigger the synchronization
Processing module.
Wherein, first preset trigger condition can include but is not limited to one or more of following condition: described
The type of target service is preset kind, and the service call side belongs to preset kind, and the generation moment of the target service exists
In preset time range and the processed cumulative number of the target service is less than preset times.
Step 904, by the synchronous processing module, according to the first default process flow to the in the target service
One subservice is handled, and is recorded to the second subservice in the target service, and return successfully to service call side
Handle the target service as a result, first subservice is the subservice not influenced by the preset failure, described second
Subservice is the subservice influenced by the preset failure.
Step 906, when the preset failure restores normal, by the asynchronous process module, according to the second default place
Reason process handles the second subservice in the target service, and by the processing of the target service after handling successfully
As a result it is set as success.
Optionally, step 906 can include: meeting the second preset trigger condition, and the preset failure restores normal
When, by the asynchronous process module, according to the described second default process flow to the second subservice in the target service
It is handled.Wherein, second preset trigger condition includes reaching default timing or receiving default triggering command.It can
Selection of land can also add up number of processing.
Wherein, the described second default process flow is included: and second subservice is arranged new based on default mark template
Mark;The second subservice with new mark is handled.
A kind of method for processing business that this specification embodiment provides, since target service can be monitored by monitoring module
Processing result, and when the processing result for listening to target service leads to the failure because of preset failure, automatic trigger synchronization process
Module is handled the first subservice not influenced by the preset failure in the target service, to the target service
In the second subservice for being influenced by the preset failure recorded;And after the preset failure restores normal, automatically by
Asynchronous process module handles the second subservice in the target service, and by the target industry after handling successfully
The processing status of business is set as success.Therefore, it can actively cope with and adapting to preset failure automatically causes target service processing to be lost
The case where losing, realization are successfully processed target service, improve the probability that target service is successfully processed, and reduction is caused to user
Adverse effect.
Optionally, Service Component container can also include management module, on this basis, as shown in Figure 10, this specification
Embodiment provide a kind of method for processing business, can also include:
Step 908, by the management module, to the monitoring module, the synchronous processing module and the asynchronous place
Reason module is managed.
As an example, step 908 is specific can include: by the management module, injects into the monitoring module
First preset trigger condition, injects the described first default process flow in Xiang Suoshu synchronous processing module, and to described
The described second default process flow is injected in asynchronous process module.
Further, method shown in Fig. 10 can also include: to be based on preset rules layout institute by the management module
State at least one of the first default process flow and the second default process flow.
It should be noted that the first default process flow and the second default process flow that are defined by management module can be with
It is any one of processes such as sequence flow, parallel process and branch's process.
Wherein, the preset rules include at least one of following rules: synchronous serial executing rule, asynchronous parallel are held
Line 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..
Further, in order to enable the first default process flow and the second default processing that are defined by management module 17
The first default process flow described in WS-CDL layout and the second default processing stream can be used in process lightweight as far as possible
Journey.
In short, a kind of method for processing business of this specification embodiment, it can be by monitoring 14 actively perceive target industry of module
The preset failure that occurs in business treatment process, and after perceiving preset failure actively triggers synchronous processing module 15 and different
It walks processing module 16 and asynchronous process is carried out to target service, therefore the probability that target service is successfully processed can be improved, reduce
Influence to user experience.Further, it is also possible to use the layout industry in the form of script of management module 17 in Service Component container 1
Business process flow, therefore light-weighted self-adapted service processing scheme can be customized out.
It should be noted that since method for processing business can be applied in Fig. 2, Fig. 5 or Service Component container shown in Fig. 7
In 1, therefore this specification embodiment is relatively simple to the description of method for processing business, and related place can refer to above to service groups
The introduction of part container 1, details are not described herein again.
Figure 11 is the structural schematic diagram for the electronic equipment that one embodiment of this specification provides.Figure 11 is please referred to, hard
Part level, the electronic equipment include processor, optionally further comprising internal bus, network interface, memory.Wherein, memory
It 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 also
It 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 (Peripheral
Component Interconnect, Peripheral Component Interconnect standard) bus or EISA (Extended Industry Standard
Architecture, expanding the industrial standard structure) bus etc..The bus can be divided into address bus, data/address bus, control always
Line etc..Only to be indicated with a four-headed arrow in Figure 11, it is not intended that an only bus or a type of convenient for indicating
Bus.
Memory, for storing program.Specifically, program may include program code, and said program code includes calculating
Machine 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 layer
Service Component container is formed on face, the Service Component container includes monitoring module, synchronous processing module and asynchronous process module.
Processor executes the program that memory is stored, and is specifically used for executing following operation:
By monitoring module, Service Component that the Service Component container is carried is monitored to the processing knot of target service
Fruit, and when listening to the processing result and leading to the failure because of preset failure, trigger synchronous processing module;
By the synchronous processing module, according to the first default process flow to the first subservice in the target service
Handled, the second subservice in the target service recorded, and return to service call side be successfully processed it is described
Target service as a result, first subservice is the subservice not influenced by the preset failure, second subservice is
The subservice influenced by the preset failure;
After the preset failure restores normal, by asynchronous process module, according to the second default process flow to described
The second subservice in target service is handled, and sets into the processing result of the target service to after handling successfully
Function.
The above-mentioned method for processing business as disclosed in this specification Fig. 9 or embodiment illustrated in fig. 10 can be applied to processor
In, or realized by processor.Processor may be a kind of IC chip, the processing capacity with signal.It was realizing
Each step of Cheng Zhong, the above method can be complete by the integrated logic circuit of the hardware in processor or the instruction of software form
At.Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU),
Network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processor, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device are divided
Vertical door or transistor logic, discrete hardware components.It may be implemented or execute this specification one or more embodiment
In disclosed each method, step and logic diagram.General processor can be microprocessor or the processor is also possible to
Any conventional processor etc..The step of method in conjunction with disclosed in this specification one or more embodiment, can directly embody
Execute completion for hardware decoding processor, or in decoding processor hardware and software module combination execute completion.Software
Module can be located at random access memory, flash memory, read-only memory, programmable read only memory or electrically erasable programmable storage
In the storage medium of this fields such as device, register maturation.The storage medium is located at memory, and processor reads the letter in memory
Breath, in conjunction with the step of its hardware completion above method.
The electronic equipment can also carry out the method for processing business of Fig. 9 or Figure 10, 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 as
Logical 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 each
Logic 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 storage
One or more programs, the one or more program include instruction, and the instruction is when by the portable electric including multiple application programs
When sub- equipment executes, the method that the portable electronic device can be made to execute embodiment illustrated in fig. 9, and be specifically used for executing following
Operation:
By monitoring module, Service Component that the Service Component container is carried is monitored to the processing knot of target service
Fruit, and when listening to the processing result and leading to the failure because of preset failure, trigger synchronous processing module;
By the synchronous processing module, according to the first default process flow to the first subservice in the target service
Handled, the second subservice in the target service recorded, and return to service call side be successfully processed it is described
Target service as a result, first subservice is the subservice not influenced by the preset failure, second subservice is
The subservice influenced by the preset failure;
After the preset failure restores normal, by asynchronous process module, according to the second default process flow to described
The second subservice in target service is handled, and sets into the processing result of the target service to after handling successfully
Function.
Above-mentioned that this specification specific embodiment is described, other embodiments are in the scope of the appended claims
It 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 embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
In short, being not intended to limit the protection of this specification the foregoing is merely the preferred embodiment of this specification
Range.With within principle, made any modification, changes equivalent replacement all spirit in this specification one or more embodiment
Into 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 used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or 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), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable 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 devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine 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 nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.When not limiting more, the element that is limited by sentence "including a ...", it is not excluded that in the mistake including the element
There 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 embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.