Summary of the invention
This specification one or more embodiment describes a kind of pair of cross-domain service and requests the method and apparatus handled,
And the requesting method and device of a kind of pair of cross-domain service, the two systems being respectively used in cross-domain service, in cross-domain service
The timing confusion being likely to occur is evaded, in the two systems for ensureing cross-domain service generation, the consistency of service condition.
According in a first aspect, providing a kind of method of processing cross-domain service request, the cross-domain service includes occurring
Business between the first system and second system, the method are executed by the first system, comprising: at the first moment, are obtained
It fetches the processing to cross-domain service from the second system to request, wherein comprising to the cross-domain industry in the processing request
The processing time conditions that business is handled;Detect whether first moment meets the processing time conditions;Described first
In the case that moment meets the processing time conditions, the cross-domain service is handled, processing result is obtained;Described
In the case that one moment was unsatisfactory for the processing time conditions, determine to the processing result of the cross-domain service to include that processing is lost
It loses.
According to a possible embodiment, whether detection first moment meets the processing time conditions packet
It includes: determining the latest time for allowing to handle the processing request according to the processing time conditions;By first moment and institute
Latest time is stated to compare;In the case where first moment is earlier than the latest time, determine that first moment full
The foot processing time conditions;Otherwise, it determines first moment is unsatisfactory for the processing time conditions.
According to a kind of possible design, the method also includes: at the second moment, receive from the second system needle
To the inquiry request of the cross-domain service, the inquiry request is issued in the third moment from the second system, when the third
Carve the latest time for allowing to handle the cross-domain service for being later than and limiting by the processing time conditions;It obtains to described cross-domain
The query result of business, and the query result is fed back to the second system.
Further, in one embodiment, described to look into the case where second moment is earlier than first moment
Asking result includes one in following: not receiving corresponding processing request;Processing failure;Etc. to be processed.
In another embodiment, in the case where being later than first moment at second moment, the query result
Including the processing result handled the cross-domain service.
According to second aspect, the requesting method of a kind of pair of cross-domain service is provided, the cross-domain service includes occurring first
Business between system and second system, the method are executed by the second system, which comprises to described first
System sends the processing request of the cross-domain service, when the processing comprising being handled the cross-domain service is requested in the processing
Between condition;Based on the processing time conditions, the inquiry initial time to the cross-domain service is determined, wherein described to inquire
Beginning, it is late handles the cross-domain service the latest in determine by the processing time conditions, the permission the first system
Time;According to the inquiry initial time, inquiry request is sent to the first system, to obtain the first system to described
The query result of cross-domain service disposition.
According to one embodiment, the query result includes at least one of the following:
The processing result to the cross-domain service that the first system is obtained according to the processing time conditions;
The first system does not receive the result of the processing request.
In one embodiment, described according to the inquiry initial time, inquiry request packet is sent to the first system
It includes: since the inquiry initial time, cycling through inquiry request to the first system, until receiving to described cross-domain
The query result of business.
According to the third aspect, a kind of device of processing cross-domain service request is provided, the cross-domain service includes occurring the
Business between one system and second system, described device are set to the first system, and described device includes: acquiring unit, is matched
It is set at the first moment, obtains the processing request to cross-domain service from the second system, wherein in the processing request
Include the processing time conditions handled the cross-domain service;Detection unit is configured to whether detect first moment
Meet the processing time conditions;Processing unit is configured that the case where meeting the processing time conditions at first moment
Under, the cross-domain service is handled, processing result is obtained;The processing time conditions are unsatisfactory at first moment
In the case of, determine the cross-domain service processing failure.
According to fourth aspect, a kind of inquiry unit with to cross-domain service is provided, the cross-domain service includes occurring the
Business between one system and second system, described device are set to the second system, and described device includes: transmission unit, is matched
Be set to the processing request that the cross-domain service is sent to the first system, processing request include to the cross-domain service into
The processing time conditions of row processing;Determination unit is configured to the processing time conditions, determines to the cross-domain service
Inquire initial time, wherein the inquiry initial time be no earlier than it is being determined by the processing time conditions, allow described the
One system handles the latest time of the cross-domain service;The transmission unit, is additionally configured to according to the inquiry initial time, to
The first system sends inquiry request, to obtain the first system to the query result of the cross-domain service disposition.
According to the 5th aspect, a kind of computer readable storage medium is provided, computer program is stored thereon with, when described
When computer program executes in a computer, the method that enables computer execute first aspect or second aspect.
According to the 6th aspect, a kind of calculating equipment, including memory and processor are provided, which is characterized in that described to deposit
It is stored with executable code in reservoir, when the processor executes the executable code, realizes first aspect or second aspect
Method.
By the method and apparatus for the processing cross-domain service request that this specification embodiment provides, and to cross-domain service
Requesting method and device, for cross-domain service between the first system and second system occurs, in second system to the first system
When system sends the processing request to cross-domain service, by the way that the processing time conditions handled cross-domain service are arranged, so that: the
One system first judges whether current time meets processing time conditions before handling cross-domain service, and based on detection
As a result the processing result to processing request is determined;Second system is at least being located after issuing the processing request to cross-domain service
The latest time that the first system that reason time conditions limit handles cross-domain service, sends to the first system to cross-domain service
The inquiry request of disposition.In this way, can evade to the timing confusion being likely to occur in cross-domain service, so as to mention
The validity of high cross-domain service.
Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
This specification embodiment is mainly used in the process that cross-domain service occurs between the first system and second system.Its
In, the first system and second system are two mutually independent systems, such as the first system is online payment platform (such as Alipay
Deng), second system is shopping online platform (such as Taobao), and the possible payment transaction of cross-domain service (is such as by payment platform
Trading activity in shopping online platform is paid) etc..In order to illustrate more clearly of the scheme of this specification embodiment, first
Introduce the application background of this specification embodiment.
Fig. 1 is user business 1 associated with the first system is initiated by second system in the case where, second system and the
Normal interactive timing diagram between one system.As shown in Figure 1, under normal circumstances, second system is first in t moment to the first system
The processing request for transmission business 1 of uniting.The first system receives the processing request of business 1, can directly handle business 1,
It can also first be stored in caching, be arranged according to service priority, processing business 1.The first system is in processing business 1, Ke Yixian
Record traffic 1 handles to business 1, and records processing result.Processing result may include handle successfully, processing failure
Deng.T at the time of having predetermined time interval (such as 30 seconds) with moment t, second system are sent to the first system about business 1
Inquiry request.The processing result of the first system inquiry business 1, and feed back to second system.Wherein, the first system is in processing business
During 1, database may be modified according to disposition, for example, business 1 is to prop up the trading activity in second system
The account balance of consumer can be subtracted correlation values in the database by the payment transaction paid, the first system, can also be by quotient
The proper account remaining sum of family increases correlation values.At this point, second system can be by handling feelings to business 1 to the first system inquiry
Condition, to carry out follow-up process.For example, can then be formed according to the successful query result of processing of return to payment transaction processing
Order.It is worth noting that unreceived inquiry knot can be returned if the first system does not receive the processing request of business 1
Fruit.If the first system is abnormal, busy or just in processing business 1, can also return corresponding as a result, at this point, second system
The inquiry request of business 1 can be cycled through, until receive with handle successfully, processing failure, the corresponding inquiry such as do not receive
As a result information.
Referring to FIG. 2, assuming the place of the business 1 sent due to network or hardware device failure cause, second system t moment
Reason request, does not receive also in T moment the first system.And T moment, second system have sent the inquiry of business 1 to the first system again
Request.The first system return do not receive or there is no etc. query result.Second system is then according to the query result according to business 1
Processing failure continues follow-up process.Such as retransmit the transfer request etc. that number is business 2.Later, the first system receives again
The processing request of business 1, and business 1 is handled, such as the corresponding account balance of user is subtracted into correlation values etc., and
Record processing result.That is, the first system continues follow-up process according to the normal processing to business 1.In this case,
The first system and processing result record of the second system to business 1 are no longer consistent.In practical application, often through in T moment and t
Larger time interval is set between the moment to avoid the generation of such case as far as possible.However, on the one hand, T moment and t moment it
Between larger time interval is set, influence the efficiency of service interaction, on the other hand, under the influence of uncertain factor, be difficult to find
One preferable time interval, it is ensured that the first system will not be obtained after the T moment business 1 processing request, and to business 1 into
Row processing.
In the above context, Fig. 3 shows the implement scene schematic diagram of one embodiment of this specification disclosure.In Fig. 3
In, it, can be in processing request comprising being carried out to processing request when second system is requested to the processing that the first system sends business 1
The processing time conditions of processing.The first system when obtaining processing request, can first detection processing time conditions whether meet.
And according to testing result determine processing request it is whether effective, according to processing request whether effectively come obtain to processing request processing
As a result.In one embodiment, if processing time conditions meet, it is determined that processing request is effective.Processing request effectively, is then located
Reason result is the result that the normal processing business 1 of the first system obtains.In another embodiment, if processing time conditions are discontented
Foot, it is determined that processing request is invalid.Processing request is invalid, then can determine that processing result is processing failure.On the other hand, second
System can send inquiry request to the first system according to above-mentioned processing time conditions.Also that is, meet processing time conditions it
Inquiry request is retransmited at the time of outer.For example, second system has sent the processing request of business 1, place in t moment to the first system
The processing time conditions that reason request includes are t+H, i.e., only within the t+H moment, the first system can determine business 1 effectively, and into
Row processing, otherwise, it determines business 1 is invalid.And second system sends inquiry request to the first system in the rear of t+H moment.In this way,
It can guarantee that the first system again will not be handled the processing request of same cross-domain service after returning to query result.
For the beneficial effect of more clear this specification embodiment in the above scenario, Fig. 3 is please referred to.Assuming that still occurring
Problem shown in Fig. 2, inquiry request reach the first system prior to processing request to.As shown in figure 3, in t moment, second system is to
One system sends the processing request of business 1, and unlike Fig. 1, Fig. 2, the processing request sent in Fig. 3 is contained to business
The 1 processing time conditions handled, the e.g. pre-treatment at t+H moment.Assuming that the first system is not received before the t+H moment
It is requested to the processing.At the T moment, second system has sent the inquiry request of business 1 to the first system again, wherein the T moment is late
In t+H moment (T >=t+H).The first system returns to query result to second system, does not receive processing request e.g..It is false
The sometime T+S (T+S >=t+H) being located at after the T moment, the first system have received the processing request of the business 1, and are intended to locate
Manage the business.Then the first system first judges whether the T+S moment meets above-mentioned processing time conditions according to the processing time, i.e., in t+H
The pre-treatment at the moment business 1.By judgement, the T+S moment is later than the t+H moment, then can determine that processing request is invalid, to obtain
Take the processing result to processing request processing failure.In this way, in the first system and second system, for business 1, processing result
It is consistent.Such as business 1 is above-mentioned payment transaction, the then place that the first system is not paid actually and second system obtains
The result for managing failure is consistent.
In this way, when being requested for second system to the processing that the first system sends cross-domain service, by being requested in the processing
Middle addition handles time conditions: on the one hand, second system manages time conditions according to this and determines whether processing request is effective, to having
The processing of effect is requested, and is handled related cross-domain service and is obtained processing result, to the time range limited beyond processing time conditions
Processing request confirmation is invalid, and obtains the processing result to cross-domain service processing failure;On the other hand, the first system is asked in processing
After asking sending, inquiry initial time is determined according to processing time conditions, avoids requesting to issue inquiry in the effective time in processing
Request, causes situation shown in Fig. 2.It is thus possible to evade to the timing mess being likely to occur in cross-domain service, mention
The validity of high cross-domain service.
As can be seen from the above description, the processing cross-domain service request of this specification embodiment and the requesting party to cross-domain service
Method is particularly suitable for two service systems with standalone feature.Two service systems can by certain agreement and
Determining interface is communicated.It is appreciated that since interface is independently of hardware platform, operating system and the programming of the service of realization
Language, this to construct the service in various systems can be interacted with a kind of unification and general mode.
For example, for service-oriented architecture, the two systems can be two function lists of the same service platform
Financing unit (such as Yuebao) and payment unit (such as transferring accounts) in member, such as a payment platform, are also possible to difference
Under computing unit and bank portfolio management platform under functional unit under the service platform of classification, such as water power management platform
Payment unit etc..It is appreciated that since the first system and second system can provide different services, in a system to another
One system is initiated after the processing request of cross-domain service, it is also necessary to inquire the disposition of the cross-domain service, again to guarantee two
To the consistency of the service condition of cross-domain service record between a system.
The specific implementation procedure of above-mentioned scene is described below.
Fig. 4 shows the method flow diagram of the processing cross-domain service request according to one embodiment.Cross-domain service therein is
Business between two systems occurs, such as payment transaction between shopping at network platform and network payment platform, hair occurs
Raw the deposit or the withdrawal etc. between the front subsystem and account subsystem of some banking system.Here, shopping at network is flat
Platform and network payment platform are exactly two systems, such as are the first system and second system shown in FIG. 1 to FIG. 3 respectively.The party
The executing subject of method can be the first system shown in FIG. 1 to FIG. 3 etc..The first system can be any with calculating, processing
System, unit, platform or the server of ability.
If Fig. 4 shows, this method be may comprise steps of: step 41, at the first moment, obtain pair from second system
The processing of cross-domain service is requested, wherein the processing time conditions in processing request comprising being handled cross-domain service;Step
42, whether the first moment of detection meets processing time conditions;Step 43, the processing knot to cross-domain service is obtained based on testing result
Fruit, in which: in the case where meeting processing time conditions at the first moment, cross-domain service is handled, processing result is obtained;?
In the case that first moment was unsatisfactory for processing time conditions, determination includes processing failure to the processing result of cross-domain service.
Firstly, at the first moment, obtaining the processing to cross-domain service from second system by step 41 and requesting.It can
To understand, the processing request of cross-domain service is sent by second system, and processing request may be dealt with immediately, it is also possible to
It is to be processed to be placed into task sequence of caching etc..Therefore, the first moment here can be the first system and receive the cross-domain industry
At the time of the processing request of business, it is also possible to the first system according to the task order in caching, goes to the processing of cross-domain service
At the time of request.
It wherein, can also be comprising requesting processing the processing timeline handled in the processing request of above-mentioned cross-domain service
Part.The processing time conditions can be used for limiting the effective time limit of processing request.Handle time conditions form can there are many.
For example, in one embodiment, which can be 30 seconds, indicate to handle from second system to the first system initiation
(such as 9 points of 10 seconds 20 minutes 09:20:10 of the morning) start at the time of request, and only (such as 09:20:10 is extremely in 30 seconds after such a time
09:20:40), the first system is allowed normally to handle the cross-domain service.It should be readily apparent to one skilled in the art that for second system
At the time of initiating processing request to the first system, it can be obtained by the timestamp etc. in processing request, details are not described herein.Again
For example, in another embodiment, which can be deadline (such as 09:20:40), for indicating the first system
System can normally handle the latest time of the cross-domain service.In practice, processing time conditions be can also be through various other sides
The condition that formula indicates, no longer enumerates herein.
Then, in step 42, detect whether the first moment met processing time conditions.It is appreciated that due to handling the time
Condition be determined for processing request effective time limit, it is possible to by the first moment whether meet processing time conditions come
Determine whether processing request is effective.
In one embodiment, whether the first moment of detection meets processing time conditions, can be by judging for the first moment
Whether fall into the time range that processing time conditions limit and carries out.For example, being from second system in processing time conditions
It sends in 30 seconds that processing has been requested, in the case where allowing the first system to handle corresponding cross-domain service, is sent out according to from second system
At the time of sending processing to request, such as 09:20:10, and processing time conditions, it can determine the time range for handling the cross-domain service
For 09:20:10 to 09:20:40.At this point it is possible to detect whether the first moment fell into time range 09:20:10 to 09:20:
40.If fallen into, testing result is to meet processing time conditions the first moment, and otherwise, testing result can be to be unsatisfactory for locating
Manage time conditions.
In another embodiment, whether the first moment of detection meets processing time conditions, when can be by judging first
It carves and whether falls into the time of processing the latest for handling time conditions restriction to carry out.At this point it is possible to first true according to processing time conditions
Surely allow handle cross-domain service latest time (such as 09:20:40), then by the first moment (such as 09:20:35) and this latest when
Between compare, also, in the case where first moment is earlier than the latest time, determine that first moment meets the processing time
Condition, otherwise, it determines first moment is unsatisfactory for processing time conditions.
In other embodiments, the first moment of detection whether meet processing time conditions can also be by other reasonable sides
Formula carries out, and details are not described herein.It is worth noting that the moment is calculated by minimum unit of the second in the above specific example,
It is more accurate in order to make to handle time conditions in practice, it can also be calculated by units such as millisecond, microseconds, this specification
Embodiment is not construed as limiting this.
Further, can determine whether processing request is effective according to the above testing result.In general, meeting at the first moment
In the case where handling time conditions, processing request is determined effectively, in the case where being unsatisfactory for processing time conditions at the first moment, really
Fixed processing request is invalid.But according to the different set-up modes of processing time conditions, it is also possible to obtain opposite conclusion.For example, such as
It is " being later than 09:20:40, do not reprocess the cross-domain service " that fruit, which handles time conditions, then meets processing timeline at the first moment
In the case where part " being later than 09:20:40 ", determine that processing request is invalid.
Then, at step 43, the processing result to cross-domain service is obtained according to testing result.If on being appreciated that
State processing request effectively, then the first system can request the processing related cross-domain service normally to handle, and otherwise, no longer locate
Manage the cross-domain service.
On the one hand, in the case where effective situation is requested in processing, the processing result for normally handling cross-domain service appearance may be wrapped
It includes: handling successfully or processing failure.For example, when cross-domain service is payment transaction, the first system needs will be in database
Each corresponding account balance increases or decreases respective value.If normal to database manipulation, processing result can be place
Manage successfully, but can not be accessed if there is such as database, the corresponding account balance of user reduces respective value can become negative
When the case where value etc, then processing result may be processing failure.
On the other hand, in the case where processing request is invalid, the first system can not deal with cross-domain service.At this point,
It can determine that the processing result of cross-domain service include processing failure.It is worth noting that the expression way of processing failure can be with
There are many, for example, withhold unsuccessfully, request it is expired etc..
In this way, the first system can be in the processing request for obtaining cross-domain service, first according to the place for including in processing request
Manage time conditions, judge processing request it is whether effective, and according to processing request whether the processing knot effectively to obtain cross-domain service
The case where fruit avoids processing request caused by network or hardware device reason and receives lag, and indefinite duration is handled.
According to a kind of embodiment, the processing cross-domain service request method can with the following steps are included:
At the second moment, the inquiry request that cross-domain service is directed to from second system is received, inquiry request is when third
Carve from second system issue, the third moment be later than by processing time conditions limit allow handle cross-domain service the latest when
Between;It obtains to the query result of cross-domain service disposition, and to second system feedback query result.
Second system is appreciated that after issuing the processing request to cross-domain service to the first system, by certain time
The third moment behind interval can also issue the inquiry request to cross-domain service, to the first system to determine the place of cross-domain service
Situation is managed, and follow-up data processing is carried out according to the disposition of cross-domain service.Wherein, in order to guarantee that the first system is asked in processing
Cross-domain service is started to process in the effective time limit asked can obtain corresponding processing result for inquiry, and the third moment can be not
A moment in effective time limit.For example, the third moment can be later than by processing time conditions limit allow handle across
The latest time of domain business.
At the second moment, the first system receives the inquiry request that second system is sent, at this point, the first system can be looked into
Ask above-mentioned cross-domain service.Specifically:
On the one hand, if the second moment is earlier than the first moment, that is the first system handles the cross-domain service not yet,
The processing result of cross-domain service is not will record, then the first system can return to such as request timed out to second system, not receive
To related service request, it is untreated or wait to be processed, processing failure etc information as query result;
On the other hand, in the case where being later than for the first moment at the second moment, if processing request is effectively, and the first system
Processing result is handled cross-domain service and is obtained, which may be to handle successfully or processing failure,
Then the first system can return to second system as query result for the processing result of processing request.If processing request has
Effect, but the first system is still handling the cross-domain service, then the query result that the first system can return in such as processing etc.
If processing request is invalid, the first system can also return to the query result of processing failure etc to second system.
Wherein, in some implementations, if query result is determining processing result, such as handle successfully, processing failure, not
Whens receiving equal, second system can terminate inquiry, if query result is when handling medium, second system can continue to the
One system sends inquiry request, until inquiring determining processing result.
Inquiry request is sent after the effective time limit of processing request by second system, can further avoid inquiring
Determine after processing result and receive processing request, cross-domain service is handled, caused by data corruption phenomenon.
Fig. 5 shows the requesting method flow chart to cross-domain service according to one embodiment.Cross-domain service therein is hair
The raw business between two systems, such as payment transaction between shopping at network platform and network payment platform occurs, occurs
The deposit or the withdrawal etc. between the front subsystem and account subsystem of some banking system.Here, shopping at network platform
It is exactly two systems with network payment platform, such as is the first system and second system shown in FIG. 1 to FIG. 3 respectively.This method
Executing subject can be second system shown in FIG. 1 to FIG. 3 etc..The second system can be any with calculating, processing energy
System, unit, platform or the server of power.It should be clear that the process of the inquiry to cross-domain service is suitable for the
Two system is issued to the first system to after the processing of some cross-domain service request, by scheduled time interval (such as 30 seconds),
Whereabouts the first system inquires the process of the processing status of the cross-domain service again.
If Fig. 5 shows, method includes the following steps: step 51, the processing request of cross-domain service, place are sent to the first system
Reason request includes the processing time conditions handled cross-domain service;Step 52, above-mentioned processing time conditions, determination pair are based on
The inquiry initial time of cross-domain service, wherein inquiry initial time is no earlier than determine by processing time conditions, permission first
The latest time of system processing cross-domain service;Step 53, according to inquiry initial time, inquiry request is sent to the first system, with
The first system is obtained to the query result of cross-domain service disposition.
Firstly, sending the processing request of cross-domain service to the first system, processing request is comprising to cross-domain service in step 51
The processing time conditions handled.In this specification embodiment, second system issues the place of cross-domain service to the first system
When reason request, the effective time limit of processing request can be determined for the first system in processing request comprising processing time conditions.
For example, the first system can manage according to this time conditions determine the effective time limit that cross-domain service is handled or the latest when
Between etc..
Second system can first obtain cross-domain service when the processing for sending cross-domain service to the first system is requested, according to
Preset processing time conditions create-rule (such as current time increases by 30 seconds as the processing time the latest), or it is artificial specified
The processing time, determine processing time conditions, and by cross-domain service and processing time conditions generate cross-domain service processing request.
Processing request can be the various request messages for arranging format by determining communication protocol by LA Management Room, such as
HTTP request, android-http Asynchronous Request etc., this specification embodiment is not construed as limiting this.
Then, in step 52, above-mentioned processing time conditions are based on, determine the inquiry initial time to cross-domain service.It can be with
Understand, inquiry initial time is exactly the time started to query.That is, the inquiry of cross-domain service can be once, it can also
To be repeatedly, and inquires initial time and can be the time for initiating inquiry request for the first time.It is appreciated that in order to ensure the first system
System will not receive the inquiry request of second system transmission and then start to process corresponding cross-domain service, and second system can
First to determine that the inquiry initial time for initiating inquiry request is no earlier than the latest time for allowing the first system to handle cross-domain service.
Then, in step 53, according to inquiry initial time, inquiry request is sent to the first system, to obtain the first system
To the query result of cross-domain service disposition.Wherein, which can be used for the development situation of cross-domain service.For example,
In the case where the first system does not receive the processing request of corresponding cross-domain service, query result may be not receive processing to ask
It asks.The first system receive corresponding cross-domain service processing request in the case where, query result can be the first system according to
Handle the processing result to cross-domain service that time conditions obtain.At this point, the processing result may be to handle successfully, it is also possible to
Processing failure.For example, if the first system is in the processing request for obtaining corresponding cross-domain service, and by judgement, this is obtained
It takes and does not meet processing time conditions constantly, then processing request is invalid, and the first system can be by the processing to corresponding cross-domain service
As a result it is determined as processing failure.If the acquisition moment meets processing time conditions by judgement, then processing request is effective,
The first system handles the cross-domain service.The first system to the cross-domain service in the process of processing, if smoothly
It completes, then processing result can be to be processed into function, otherwise (such as database operation failure), and processing result can be lost for processing
It loses.
In one embodiment, inquiry request reach the first system when, the first system be also possible to handling accordingly across
Domain business, at this point, query result can also be the knot of such as " processing ", " data exception ", " server is busy " etc.
Fruit.
According to a kind of embodiment, second system only sends one query request.It can after receiving arbitary inquiry result
To stop inquiry.It, can also be to the first system if receiving the query result that the first system is handling corresponding cross-domain service
System sends the request of termination business.
According to another embodiment, second system can repeatedly send inquiry request.For example, can be from when inquiry starting
Between start, inquiry request is cycled through to the first system, until receiving predetermined queries result to cross-domain service.This makes a reservation for look into
Ask result for example can be handle successfully, processing failure, the query result not received etc.In this way, receiving such as " just
Handling " as query result in the case where, cross-domain service can be continued with by the first system, until being disposed.
It is appreciated that the inquiry knot of " handling successfully ", " processing failure ", " processing " etc in this specification embodiment
Fruit or processing result are only a kind of expression way of result phase, other expression ways, this explanation also can be used in practice
Book embodiment is not construed as limiting this.
It may be noted that the embodiment shown in embodiment and Fig. 5 shown in Fig. 4, it is separately adapted to the of cross-domain service generation
One system and second system.Second system and the first system are cooperating respectively as the one end for asking summation process cross-domain service
At the process of cross-domain service, there is the interaction of some information, therefore some concepts, process can be mutually adapted or supplement.
It is worth noting that processing module that the first system handles cross-domain service and for handling inquiry request
Enquiry module can be and be set together, and can also be provided separately.For example, data can be written in processing result by processing module
Library, inquiry system inquire just for database, etc..
Above procedure is looked back, for the cross-domain service between the first system and second system occurs, by transmission
Setting processing time conditions when reason request: on the one hand, a side of processing request is received when obtaining processing request, first according to processing
Whether the request of time conditions detection processing is effective, and whether effectively obtains processing result according to processing request;On the other hand, it sends
The side for handling request can determine the inquiry initial time for starting to send inquiry request according to processing time conditions, in order to avoid locating
Reason requests the result queries for carrying out cross-domain service in unspent situation to another party, causes two side's results inconsistent.In this way, can
To evade the timing confusion phenomena being likely to occur in cross-domain service, thus make in the first system and second system, cross-domain service
Service condition record is consistent.Further, the validity of cross-domain service is improved.
According to the embodiment of another aspect, a kind of device of processing cross-domain service request is also provided.Cross-domain service includes hair
The raw business between the first system and second system.Fig. 6 shows the dress of the processing cross-domain service request according to one embodiment
The schematic block diagram set.The device 600 is adapted in the first system shown in FIG. 1 to FIG. 3.
As shown in fig. 6, the device 600 of processing cross-domain service request includes: acquiring unit 61, it is configured at the first moment,
It obtains the processing to cross-domain service from second system to request, wherein comprising handling processing request in processing request
Processing time conditions, processing time conditions for determine processing request effective time limit;Detection unit 62 is configured to detection
Whether one moment met processing time conditions;Processing unit 63 is configured to according to testing result, obtain the processing to cross-domain service
As a result, wherein in the case where meeting processing time conditions at the first moment, cross-domain service is handled, processing result is obtained;
In the case where being unsatisfactory for processing time conditions at the first moment, cross-domain service processing failure is determined.
According to one embodiment, detection unit 62 is further also configured as: being determined and is permitted according to processing time conditions
Perhaps the latest time of cross-domain service is handled;First moment was compared with latest time;At the first moment earlier than latest time
In the case where, determine that the first moment met processing time conditions;Otherwise, it determines the first moment was unsatisfactory for the processing timeline
Part.
According to a possible design, device 600 further includes query unit (not shown).The query unit can configure
Are as follows: at the second moment, receive the inquiry request that cross-domain service is directed to from second system, inquiry request is in the third moment from the
Two system issues, and the third moment is later than the latest time for allowing to handle cross-domain service limited by processing time conditions;It obtains
To the query result of cross-domain service, and to second system feedback query result.
According to a kind of implementation, in the case where the second moment is earlier than the first moment, the inquiry knot of query unit acquisition
Fruit may include one in following: not receive corresponding processing request;Processing failure;Etc. to be processed
According to another implementation, in the case where being later than for the first moment at the second moment, if processing request is effectively, and
And processing unit 63 is handled cross-domain service and is obtained processing result, the processing result may be handle successfully or
Person's processing failure.If processing request is effectively, but processing unit 63 is still handling the cross-domain service, then the first system can return
Return such as processing in etc query result.If processing request is invalid, it is true that query unit can also potentially get processing unit 63
The processing result of fixed processing failure etc is as query result.
It is worth noting that device 600 shown in fig. 6 is that device corresponding with the embodiment of the method shown in Fig. 4 is implemented
, the corresponding description in the embodiment of the method shown in Fig. 4 is equally applicable to device 600, and details are not described herein.
Embodiment according to another aspect, this specification also provide the inquiry unit of a kind of pair of cross-domain service.Cross-domain service
Including the business between the first system and second system occurs.Fig. 7 shows looking into cross-domain service according to one embodiment
Ask the schematic block diagram of device.The device 700 is adapted in second system shown in FIG. 1 to FIG. 3.
As shown in fig. 7, including: transmission unit 71 to the inquiry unit 700 of cross-domain service, it is configured to send to the first system
The processing of cross-domain service is requested, and processing request includes the processing time conditions handled cross-domain service;Determination unit 72, matches
It is set to based on above-mentioned processing time conditions, determines the inquiry initial time to cross-domain service, wherein inquiry initial time is no earlier than
Latest time being determined by processing time conditions, allowing the first system to handle cross-domain service;Transmission unit 71, is additionally configured to
According to inquiry initial time, inquiry request is sent to the first system, to obtain the first system to the query result of cross-domain service.
In one embodiment, above-mentioned query result may include the first system according to processing time conditions obtain to across
The processing result of domain business.
In another embodiment, above-mentioned query result may include that the first system does not receive the processing of cross-domain service and asks
The result asked.
According to a kind of possible design, transmission unit 71 is also configured as: since inquiring initial time, to the first system
System cycles through inquiry request, until receiving the predetermined queries result to cross-domain service.
It is worth noting that device 700 shown in Fig. 7 is that device corresponding with the embodiment of the method shown in Fig. 5 is implemented
, the corresponding description in the embodiment of the method shown in Fig. 5 is equally applicable to device 700, and details are not described herein.
It by apparatus above 600 and 700, is respectively arranged in the two systems shown in FIG. 1 to FIG. 3, based on processing timeline
The setting of part limits the process limited for cross-domain service.To, so that cross-domain service will not be processed except the process limited, it is right
The inquiry of cross-domain service will not issue within the process limited.To carry out orderly management to the business time limit, make that cross-domain industry occurs
The two systems of business are consistent, and improve the validity of cross-domain service processing.
According to the embodiment of another aspect, a kind of computer readable storage medium is also provided, is stored thereon with computer journey
Sequence enables computer execute and combines method described in Fig. 4 or Fig. 5 when the computer program executes in a computer.
According to the embodiment of another further aspect, a kind of calculating equipment, including memory and processor, the memory are also provided
In be stored with executable code, when the processor executes the executable code, realize the method in conjunction with described in Fig. 4 or Fig. 5.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Above-described specific embodiment has carried out further the purpose of the present invention, technical scheme and beneficial effects
It is described in detail, it should be understood that being not intended to limit the present invention the foregoing is merely a specific embodiment of the invention
Protection scope, all any modification, equivalent substitution, improvement and etc. on the basis of technical solution of the present invention, done should all
Including within protection scope of the present invention.