CN108829496A - A kind of service calling method, device and electronic equipment - Google Patents

A kind of service calling method, device and electronic equipment Download PDF

Info

Publication number
CN108829496A
CN108829496A CN201810533959.XA CN201810533959A CN108829496A CN 108829496 A CN108829496 A CN 108829496A CN 201810533959 A CN201810533959 A CN 201810533959A CN 108829496 A CN108829496 A CN 108829496A
Authority
CN
China
Prior art keywords
data
service
link
target service
subsystem
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810533959.XA
Other languages
Chinese (zh)
Inventor
王磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810533959.XA priority Critical patent/CN108829496A/en
Publication of CN108829496A publication Critical patent/CN108829496A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This specification provides a kind of service calling method, applied to the distributed business system for including the serial traffic link being made of multiple service sub-systems there are calling service relationship;Including:Data call of the head end service sub-system by the first Client-initiated for target service data in service link is requested, the end subsystem transmitting into service link;Determine whether to receive the target service data that end subsystem is returned by service link;If receiving the target service data that end subsystem is returned by service link, then target service data are cached in data temporary storage space, so that being requested in the data call for the target service data for initiating second user, after end subsystem transmitting into service link, when not receiving the target service data that end subsystem is returned by service link, target service data are read from data temporary storage space, and the target service data read are returned into second user.

Description

A kind of service calling method, device and electronic equipment
Technical field
This specification is related to computer application field more particularly to a kind of service calling method, device and electronic equipment.
Background technique
In traditional distributed business system, it will usually there are it is some each other there are certain calling service relationships Service sub-system;Moreover, in some scenes, call relation between these service sub-systems may show a kind of string Capable situation;
For example, it is assumed that including subsystem A, B, C in a distributed business system, subsystem A receives the business of user After call request, calling service can be requested to pass to subsystem B initiation calling, subsystem B is further continued for asking calling service Ask and pass to subsystem B and initiate to call, last subsystem C after completing corresponding with the request of above-mentioned calling service calling service, Called business datum can be returned into subsystem B, subsystem B is further continued for returning to business datum into subsystem A.
Summary of the invention
This specification proposes a kind of service calling method, is applied to distributed business system;The distributed business system Including the service link being made of multiple service sub-systems there are calling service relationship;Wherein, the service link is serial Service link;The method includes:
First Client-initiated is directed to the data of target service data by the head end service sub-system in the service link Call request, the end subsystem transmitting into the service link;
Determine whether to receive the target service data that the end subsystem is returned by the service link;
If the target service data that the end subsystem is returned by the service link are received, by institute It states target service data to be cached in data temporary storage space, so as to be directed to the target initiate second user The data call of business datum is requested, and after the end subsystem transmitting into the service link, does not receive end When the target service data that system is returned by the service link, from the data temporary storage space described in reading Target service data, and the target service data read are returned into the second user.
Optionally, further include:
Determine whether the target service data cache successfully in the data temporary storage space;
If the target service data cache successfully in the data temporary storage space, by the target service number According to returning to first user.
Optionally, further include:
If not receiving the target service data that the end subsystem is returned by the service link, from The target service data are read in the data temporary storage space, and the target service data read are returned to First user.
Optionally, described to determine whether to receive the mesh that the end subsystem is returned by the service link Business datum is marked, including:
Determine whether the mesh that the end subsystem passback in the service link is received in preset overtime duration Mark business datum;If so, determination receives the target service that the end subsystem is returned by the service link Data;If not, determination does not receive the target service data that the end subsystem is returned by the service link.
Optionally, described to determine whether that receiving the end subsystem in the service link in preset overtime duration returns Before the target service data passed, further include:
Determine whether to receive in preset overtime duration the service link take up an official post alien's system passback therefore Hinder message;If so, determination does not receive the target service that the end subsystem is returned by the service link Data;If not, further determining whether that receiving the end subsystem in the service link in preset overtime duration returns The target service data passed.
Optionally, the data temporary storage space is the local cache space of the head end service sub-system;Alternatively, institute State the remote cache space of head end service sub-system docking.
Optionally, the business datum cached in the data temporary storage space has been predetermined caching validity period;
The method also includes:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then face from the data When memory space in delete the business datum.
This specification also proposes a kind of calling service device, is applied to distributed business system;The distributed service system System includes the service link being made of multiple service sub-systems there are calling service relationship;Wherein, the service link is string Row service link;Described device includes:
Transfer module, the data call by the first Client-initiated for target service data is requested, to the business chain End subsystem transmitting in road;
Determining module, it is determined whether receive the target industry that the end subsystem is returned by the service link Business data;
Cache module, if receiving the target service number that the end subsystem is returned by the service link According to then the target service data being cached in data temporary storage space, so that in the needle for initiating second user Data call request to the target service data does not receive after the end subsystem transmitting into the service link When the target service data that the end subsystem is returned by the service link, from the data temporary storage space It is middle to read the target service data, and the target service data read are returned into the second user.
Optionally, the determining module is further:
Determine whether the target service data cache successfully in the data temporary storage space;
Further include:
Return module will be described if the target service data cache successfully in the data temporary storage space Target service data return to first user.
Optionally, further include:
Read module, if not receiving the target service that the end subsystem is returned by the service link Data then read the target service data, and the target service that will be read from the data temporary storage space Data return to first user.
Optionally, the determining module:
Determine whether the mesh that the end subsystem passback in the service link is received in preset overtime duration Mark business datum;If so, determination receives the target service that the end subsystem is returned by the service link Data;If not, determination does not receive the target service data that the end subsystem is returned by the service link.
Optionally, the determining module is further:
Determining whether to receive in preset overtime duration described in the end subsystem passback in the service link Before target service data, it is determined whether receive the service link in preset overtime duration and take up an official post alien's system The failure message of passback;If so, described in determining that not receiving the end subsystem is returned by the service link Target service data;If not, further determining whether to receive the end in the service link in preset overtime duration The target service data of subsystem passback.
Optionally, the data temporary storage space is the local cache space of the head end service sub-system;Alternatively, institute State the remote cache space of head end service sub-system docking.
Optionally, the business datum cached in the data temporary storage space has been predetermined caching validity period;
Optionally, the cache module is further:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then face from the data When memory space in delete the business datum.
This specification also proposes a kind of electronic equipment, during the distribution where the electronic equipment is logical, including is deposited by multiple In the service link that the service sub-system of calling service relationship is constituted;Wherein, the service link is serial traffic link, described Electronic equipment includes:
Processor;
For storing the memory of machine-executable instruction;
Wherein, it can be held by reading and executing the machine corresponding with the control logic of calling service of the memory storage Row instruction, the processor are prompted to:
Data call by the first Client-initiated for target service data is requested, the end into the service link Subsystem transmitting;
Determine whether to receive the target service data that the end subsystem is returned by the service link;
If the target service data that the end subsystem is returned by the service link are received, by institute It states target service data to be cached in data temporary storage space, so as to be directed to the target initiate second user The data call of business datum is requested, and after the end subsystem transmitting into the service link, does not receive end When the target service data that system is returned by the service link, from the data temporary storage space described in reading Target service data, and the target service data read are returned into the second user.
By above technical scheme, under the business scenario of distributed business system, when user relies on by multiple presence The serial traffic link that the service sub-system of calling service relationship is constituted, to initiate the data call for target service data When, by introducing data temporary memory space, can break down in any downstream subsystem in above-mentioned serial traffic link In the case where, it still is able to normally call from above-mentioned data temporary storage space to relevant business datum, can be improved The stability of service link.
Detailed description of the invention
Fig. 1 is the flow chart that this specification one implements a kind of service calling method exemplified;
Fig. 2 is the schematic diagram that this specification one implements a kind of typical serial traffic link exemplified;
Fig. 3 be this specification one implement to exemplify a kind of complete industry in the serial traffic link of distributed business system The flow chart of business data call;
Fig. 4 is hardware involved in a kind of electronic equipment for carrying calling service device of one embodiment of this specification offer Structure chart;
Fig. 5 is a kind of logic diagram for calling service device that one embodiment of this specification provides.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the application.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the application.
It is only to be not intended to be limiting the application merely for for the purpose of describing particular embodiments in term used in this application. It is also intended in the application and the "an" of singular used in the attached claims, " described " and "the" including majority Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from In the case where the application range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determination ".
This specification is directed to one kind in distributed business system, is promoted using data temporary storage space by more The technical solution of the stability of a serial traffic link constituted there are the service sub-system of calling service relationship.
When realizing, above-mentioned distributed business system can dispose data temporary storage space in advance;For example, in above-mentioned number According to temporary memory space, the local cache space of the head end service sub-system of above-mentioned serial traffic chain road can be;Alternatively, It can be the remote cache space of above-mentioned head end service sub-system docking.
When the first user initiates the data tune for target service data in the head end subsystem of the serial traffic link Used time, above-mentioned head end subsystem can request above-mentioned data call, the end subsystem into above-mentioned serial traffic link into Row transmitting;
For example, head end subsystem can request data call to be issued to next son adjacent in above-mentioned serial traffic link System, and next subsystem can execute identical operation after receiving data call request, continue downstream subsystem Data call request is issued, until the end subsystem being passed in above-mentioned serial traffic link is requested in the data call.
And above-mentioned data call is being requested to pass to the end subsystem of above-mentioned serial traffic link by above-mentioned head end subsystem After passing, it may determine whether to receive the target service data that above-mentioned end subsystem is returned by above-mentioned serial traffic link.
If head end subsystem has received the target service data of above-mentioned end subsystem passback, show above-mentioned head end at this time Downstream subsystem of the subsystem on above-mentioned serial traffic chain road is in normal condition, and above-mentioned head end subsystem is in addition to that can incite somebody to action Above-mentioned target service data return to other than above-mentioned first user, can also be interim in above-mentioned data by above-mentioned target service data Memory space is cached.
It, can be with when the data call for above-mentioned target service data that head end subsystem is received again by second user is requested Identical operation is executed, above-mentioned data call can be requested, which is requested into above-mentioned serial traffic link End subsystem is transmitted, and determines whether that receiving above-mentioned end subsystem passes through the mesh that above-mentioned serial traffic link returns Mark business datum.If not receiving the target service data that above-mentioned end subsystem is returned by above-mentioned serial traffic link, Above-mentioned target service data, the target industry that then will be read can be directly read from above-mentioned data temporary storage space at this time Business data return to second user.
By above technical scheme, under the business scenario of distributed business system, when user relies on by multiple presence The serial traffic link that the service sub-system of calling service relationship is constituted, to initiate the data call for target service data When, by introducing data temporary memory space, can break down in any downstream subsystem in above-mentioned serial traffic link In the case where, it still is able to normally call from above-mentioned data temporary storage space to relevant business datum, can be improved The stability of service link.
This specification is described below by specific embodiment and in conjunction with specific application scenarios.
Referring to FIG. 1, Fig. 1 is a kind of service calling method that one embodiment of this specification provides, it is applied to distributed industry Business system;The distributed business system includes the business chain being made of multiple service sub-systems there are calling service relationship Road;Wherein, the service link is serial traffic link;Execute following steps:
Step 102, the first Client-initiated is directed to target service number by the head end service sub-system in the service link According to data call request, into the service link end subsystem transmitting;
Step 104, it is determined whether receive the target industry that the end subsystem is returned by the service link Business data;
Step 106, if receiving the target service number that the end subsystem is returned by the service link According to then the target service data being cached in data temporary storage space, so that in the needle for initiating second user Data call request to the target service data does not receive after the end subsystem transmitting into the service link When the target service data that the end subsystem is returned by the service link, from the data temporary storage space It is middle to read the target service data, and the target service data read are returned into the second user.
Distributed business system described above can specifically include the presentation distributed structure/architecture built based on device clusters Operation system;For example, above-mentioned distributed business system specifically can be based on server set in a kind of more typical framework The operation system for the distributed structure/architecture that group builds.
Wherein, in above-mentioned distributed business system, it may include that several there are the service sub-systems of calling service relationship; So-called calling service relationship, refers to the data dependence between multiple service sub-systems there are service layer;For example, it is assumed that subsystem A, B and C has calling service relationship, then user is after subsystem A initiates to the calling of business datum, subsystem A can be into one Call subsystem B is walked, further call subsystem C successively carries out data transmitting to subsystem B.
Above-mentioned serial traffic link refers to and is made of multiple service sub-systems there are calling service relationship, each subsystem It unites in the data dependence of service layer, a kind of service link of serial presence is presented.
For example, referring to Fig. 2, Fig. 2 is a kind of typical serial traffic link shown;In Fig. 2, user is in subsystem When A initiates to be directed to the data call of business datum, data call request further can be passed through subsystem B by subsystem A, be sent out The calling of starting sub-system B, from subsystem B requested service data;And subsystem B is in the data tune for receiving subsystem A transparent transmission After request, identical movement can be executed, data call request is passed through into subsystem C, initiates the tune for being directed to subsystem C With from subsystem C requested service data;And subsystem C can respond above-mentioned data call request, execute relevant data clothes Called business datum is returned to subsystem B, then returns to subsystem A by subsystem B by business.
Subsystem in above-mentioned head end service sub-system, in particular to above-mentioned serial traffic link as head end node;Example Such as, subsystem A shown in Figure 2 is the head-end node of above-mentioned serial traffic link.It, can be with as the subsystem of head-end node It is directly docked with user client, to respond Client-initiated data call request, and the data call is requested to continue It is transmitted to the downstream subsystem of service link;
Correspondingly, the subsystem in above-mentioned end subsystem, in particular to above-mentioned serial traffic link as endpoint node; For example, subsystem C shown in Figure 2 is the endpoint node of above-mentioned serial traffic link;It, can as the subsystem of endpoint node Using the execution node as final response Client-initiated data call request, by calling relevant data service, to user The called business datum of passback.
Refer to Fig. 3, Fig. 3 is that a kind of shown in this specification completes in the serial traffic link of distributed business system The flow chart that business datum is called.
Wherein, it should be noted that serial traffic link shown in Fig. 3, for by the business with calling service relationship The serial traffic link that the three subsystems such as subsystem A, B and C are constituted is only schematical, in practical applications, above-mentioned serial The data in service sub-system in service link depend on actual business scenario, in this specification without being particularly limited to.
As shown in figure 3, data temporary storage space can be disposed in advance in above-mentioned distributed business system;Wherein, on Data temporary storage space is stated, specifically for caching the business datum being successfully invoked.I.e. when Client-initiated data call is asked It asks, is successively passed in order in above-mentioned serial traffic link by the head end service sub-system in above-mentioned serial traffic link After the subsystem of end, if end subsystem performs this data call, and it will be adjusted by above-mentioned serial traffic link Business datum is successfully back to above-mentioned head end subsystem, indicates that this is called successfully, and the business datum of passback is by conduct The business datum being successfully invoked is cached to above-mentioned data temporary storage space.
Wherein, it should be noted that above-mentioned data temporary storage space specifically can be and dispose in above-mentioned distributed system Spatial cache.
In a kind of embodiment shown, above-mentioned spatial cache specifically can be the local cache of above-mentioned head end subsystem Space is also possible to the remote cache space of above-mentioned joint terminal system docking;For example, in one implementation, it can be upper In the memory space for stating the corresponding server of head end subsystem, a certain size spatial cache is marked off in advance as above-mentioned data Temporary memory space;In another implementation, above-mentioned head end subsystem can be delayed this with one cache server of long range dock The all or part of memory space marked off in advance on server is deposited, as above-mentioned data temporary storage space.
Be based on serial traffic link shown in Fig. 3 below with the first user and second user calls portion identical respectively The technical solution of this specification is described in detail in target service data instance.
Fig. 3 is referred to, the first user and second user can be linked into above-mentioned string by service customer end (such as APP) Service sub-system A in row service link initiates the data tune for being directed to above-mentioned target service data to above-mentioned service sub-system A With.
Wherein, user initiates the triggering mode of the data call to above-mentioned target service data by service customer end, Without being particularly limited in this specification;It in practical applications, can be by being mentioned in the user interface of above-mentioned service customer end It is realized for the operation entry for initiating data call;
For example, the first user and second user are based on above-mentioned serial traffic using above-mentioned target service data as order data Link for calling an identical order data, can provide one for triggering looking into for order inquiries in above-mentioned client Button is ask, user can input order number to be checked by service customer end, then by operating the inquiry button, initiate needle Data call inquiry to the order data of order number instruction.
Continuing with referring to Fig. 3, target industry is directed to when above-mentioned subsystem A (i.e. head end subsystem) receives the first Client-initiated After the data call request for data of being engaged in, which can be requested to continue up the downstream subsystem for stating serial traffic chain road System is issued, and data call request is further issued to subsystem B.And subsystem B is in the number for receiving subsystem A and issuing After call request, identical movement can be executed, continues data call request to be issued to subsystem C, and so on, directly Above-mentioned serial traffic link is relied on to data call request, has finally been passed through end subsystem.
When above-mentioned subsystem C (i.e. end subsystem) receives the data call to come via above-mentioned serial traffic link transparent transmission After request, relevant data service can be called, relevant service database is accessed and therefrom inquires the first user and need to call Target service data.
Wherein, it should be noted that the first Client-initiated is directed in the data call request of above-mentioned target service data, The identification information of above-mentioned target service data can specifically be carried.
For example, above-mentioned identification information specifically can be O/No. so that above-mentioned target service data are order data as an example.
And above-mentioned subsystem C is when calling relevant data service, specifically the data call can be requested in carry The identification information of the target service data therefrom inquires above-mentioned target service as search index, from relevant service database Data.
After inquiring the target service data that the first user needs to call referring to Fig. 3, subsystem C, Ke Yijin One step returns the target service data to the upstream subsystem of above-mentioned serial traffic link, by the target service data into One step is back to subsystem B.And subsystem B can be executed identical dynamic after the target service data for receiving subsystem C passback Make, which is continued to be back to subsystem A, and so on, until the target service data rely on above-mentioned string Row service link has finally passed back to head end subsystem.
And for subsystem A, by the first Client-initiated for above-mentioned target service data data call request into After one step is handed down to downstream subsystem, it can determine immediately whether to receive the mesh that subsystem C is returned by above-mentioned service link Mark business datum.
Wherein, in a kind of embodiment shown, subsystem A is in the target for determining whether to receive subsystem C passback When business datum, it can specifically be realized by introducing passback timeout mechanism.
In this case, subsystem A can preset the overtime duration of a passback, and subsystem A is used by first After the data call request for above-mentioned target service data that family is initiated further is handed down to downstream subsystem, it can open immediately Dynamic timer starts timing, and the timing result based on the timer, to be confirmed whether within the passback time-out duration, receives The target service data returned to subsystem C;
If having received the target service data of system C passback in the passback time-out duration, show above-mentioned serial traffic Each downstream subsystem of chain road is normal condition, and the mesh for having received subsystem C return can be confirmed in subsystem A at this time Mark business datum.
, whereas if not receiving the target service data of system C passback in the passback time-out duration, show above-mentioned serial In downstream subsystem in service link, it is understood that there may be malfunctioning node;For example, the corresponding server delay machine of subsystem, or Since network failure leads to packet loss, normal data back can not be carried out;At this point, subsystem A can be confirmed and have received subsystem The target service data that the C that unites is returned.
Certainly, in practical applications, downstream subsystem of the subsystem A on above-mentioned serial traffic chain road meets with downstream It, can also actively upstream subsystem reporting fault message when subsystem fault.
For example, subsystem B by above-mentioned data call request be further issued to subsystem C after, if subsystem C return Pass the target service data for not receiving subsystem C passback in overtime duration;Alternatively, detecting subsystem by other detection means It is currently at the inaccessible state of link between C and subsystem B, may determine that subsystem C breaks down at this time, subsystem B can The failure message that a prompt subsystem C breaks down is returned with subsystem A upstream.
In this case, above-mentioned subsystem A may also determine whether to receive in the overtime duration of passback above-mentioned serial Service link is taken up an official post the failure message of alien's system passback;If subsystem A is received in above-mentioned passback time-out duration The failure message that downstream subsystem breaks down can determine the target service number for not receiving the passback of end subsystem immediately According to;, whereas if subsystem A does not receive the failure message that downstream subsystem breaks down in above-mentioned passback time-out duration, It can start to determine whether to receive the target service data that subsystem C is returned within above-mentioned passback time-out duration again at this time.
In this way, the failure message that can will be returned based on downstream subsystem, to determine whether receiving son The mechanism of the target service data of system C passback is returned to by introducing passback timeout mechanism to determine whether to receive subsystem C The mechanism of the target service data of biography, is further supplemented, system erroneous judgement can be effectively prevented.
After the target service data for having acknowledged receipt of subsystem C passback referring to Fig. 3, subsystem A, show above-mentioned Each downstream subsystem of serial traffic chain road is normal condition, and above-mentioned subsystem A is in addition to can be by above-mentioned target at this time Business datum is returned to other than the first user by service customer end, can also be using above-mentioned target service data as successfully calling Business datum, caching is to above-mentioned data temporary storage space.
It is subsequent, if second user is linked into above-mentioned service sub-system A by service customer end, rely on above-mentioned serial industry Business link, when initiating to be directed to the data call of above-mentioned target service data again, if the downstream subsystem of service sub-system A is sent out Raw failure causes subsystem C can not be by above-mentioned target service data back to above-mentioned subsystem A, and subsystem A can be from upper at this time It states and reads the target service data in data temporary storage space, and the target service data read are returned to above-mentioned Two users, to guarantee the stability of above-mentioned serial traffic link.
Certainly, after the first user initiates to be directed to the calling of above-mentioned target service data, if subsystem A confirmation does not receive The target service data of subsystem C passback, can also read the target service data (i.e. from above-mentioned data temporary storage space Before the first user successfully calls above-mentioned target service data, there are other users successfully to call and obtain prior to the first user Get above-mentioned target service data), the target service data read are then returned into above-mentioned first user.
Wherein, it should be noted that above-mentioned subsystem A in the movement for returning to above-mentioned target service data to the first user, Movement that above-mentioned target service data cache in above-mentioned data temporary storage space is executed into elder generation with above-mentioned subsystem A Sequence afterwards, in the present specification without being particularly limited to.
In a kind of embodiment shown, above-mentioned subsystem A initiation faces above-mentioned target service data to above-mentioned data When memory space cached after, may further determine that whether above-mentioned target service data cache success;If cached successfully, Above-mentioned target service data are returned into first user by service customer end again.
In this way, it can be ensured that again successfully cache above-mentioned target service data empty to above-mentioned data temporary storage Between after, then to above-mentioned first user above-mentioned target service data are returned to, so as to avoid due to above-mentioned target service data not Being successfully accessed above-mentioned data temporary storage space can not obtain when caused same user calls identical business datum again The problem of business datum, helps to promote user experience.
Certainly, in practical applications, above-mentioned subsystem A is in the movement for returning to above-mentioned target service data to the first user, The movement for caching above-mentioned target service data in above-mentioned data temporary storage space with above-mentioned subsystem A, can also be with It is performed simultaneously;Alternatively, above-mentioned subsystem A is in the movement for returning to above-mentioned target service data to the first user, it can also be prior to upper Subsystem A is stated to execute the movement that above-mentioned target service data cache in above-mentioned data temporary storage space.
Continuing with referring to Fig. 3, it is assumed that second user relies on above-mentioned serial traffic link and initiated again for above-mentioned target The calling of business datum, at this time when above-mentioned subsystem A receives the data call for target service data of second user initiation It after request, can adopt in a like fashion, data call request is further issued to subsystem B, again should by subsystem B Data call request continues to be issued to subsystem C.When above-mentioned subsystem C is calling relevant data service, relevant industry is accessed It, can be further by the target service data to above-mentioned serial traffic after business database therefrom inquires above-mentioned target service data The upstream subsystem of link is returned, which is further back to subsystem B, then by subsystem B Further return to subsystem A.
And subsystem A, still it can be asked in the data call by the first Client-initiated for above-mentioned target service data It asks after being further handed down to downstream subsystem, determines immediately whether and receive the mesh that subsystem C is returned by above-mentioned service link Mark business datum.Wherein, specific validation testing repeats no more, the record before please referring to.
On the one hand, if subsystem A, which is determined, receives subsystem C passback target service data, show above-mentioned serial traffic Each downstream subsystem of chain road is normal condition, and subsystem A can directly return to the target service data at this time Second user;Simultaneously as above-mentioned target service data have successfully been cached before this to data temporary storage space, at this time Above-mentioned subsystem A can ignore the movement by above-mentioned target service data buffer storage to above-mentioned data temporary storage space.On alternatively, Stating subsystem A can also execute once again by the dynamic of above-mentioned target service data buffer storage to above-mentioned data temporary storage space Make, covering update is carried out to the third preceding buffered supreme above-mentioned target service data stated in data temporary storage space.
On the other hand, if subsystem A, which is determined, does not receive subsystem C passback target service data, show above-mentioned serial In downstream subsystem in service link, it is understood that there may be malfunctioning node is (shown in Fig. 4 between subsystem A and subsystem B Network interruption occurs), emergency preplan can be started immediately, above-mentioned target service number is read from above-mentioned data temporary storage space According to the above-mentioned target service data read are then returned to second user by service customer end;
For example, the identification information carried in above-mentioned data call being requested faces as search index in above-mentioned data When memory space in initiate inquiry, the target service data inquired are then returned into above-mentioned second user.
For second user, since it still is able to normally get the target service data for needing to call, and And failure has occurred in the downstream subsystem that can not perceive current above-mentioned serial traffic chain road, therefore facilitates promotion second The user experience of user.
In the present specification, it for the business datum being buffered in above-mentioned data temporary storage space, can also set in advance It sets caching validity period, and then when the caching validity period of the business datum cached in above-mentioned data temporary storage space time-out, then may be used To delete the business datum from above-mentioned data temporary storage space.
In this way, the storage resource in above-mentioned data temporary storage space can be utilized to the greatest extent.
Wherein, it should be noted that for the caching for the business datum setting being buffered in above-mentioned data temporary storage space The specific validity period length of validity period can be based on the corresponding type of service of business datum, carry out differentiation in practical applications Setting;It can be directed to different types of service, different caching validity periods is respectively set;For example, for some business datums The lower business scenario of renewal frequency, a biggish value can be set by the caching validity period of business datum;Conversely, Business scenario higher for the renewal frequency of some business datums can set one for the caching validity period of business datum Lesser value.
Corresponding with above method embodiment, this specification additionally provides a kind of embodiment of calling service device.This theory The embodiment of the calling service device of bright book can be using on an electronic device.Installation practice can by software realization, It can be realized by way of hardware or software and hardware combining.Taking software implementation as an example, as the device on a logical meaning, It is that computer program instructions corresponding in nonvolatile memory are read by memory by the processor of electronic equipment where it What middle operation was formed.
For hardware view, as shown in figure 4, one kind for electronic equipment where the calling service device of this specification is hard Part structure chart fills in embodiment other than processor shown in Fig. 4, memory, network interface and nonvolatile memory Electronic equipment where setting can also include other hardware, repeat no more to this generally according to the actual functional capability of the electronic equipment.
Fig. 5 is a kind of block diagram of calling service device shown in one exemplary embodiment of this specification.
Referring to FIG. 5, the calling service device 50 can be applied in aforementioned electronic equipment shown in Fig. 4;Wherein, institute It states in the distributed system where electronic equipment, including the business being made of multiple service sub-systems there are calling service relationship Link;The service link is serial traffic link;Described device includes:Transfer module 501, determining module 502 and caching Module 503;
Transfer module 501, the data call by the first Client-initiated for target service data is requested, to the business End subsystem transmitting in link;
Determining module 502, it is determined whether receive the mesh that the end subsystem is returned by the service link Mark business datum;
Cache module 503, if receiving the target industry that the end subsystem is returned by the service link Business data, then cache the target service data in data temporary storage space, so as to initiate by second user The data call for the target service data request, after the transmitting of end subsystem into the service link, do not connect When receiving the target service data that the end subsystem is returned by the service link, from the data temporary storage The target service data are read in space, and the target service data read are returned into the second user.
In the present embodiment, the determining module 502 is further:
Determine whether the target service data cache successfully in the data temporary storage space;
Described device 50 further includes:
Return module 504 (is not shown) in Fig. 5, if the target service data are in the data temporary storage space It caches successfully, the target service data is returned into first user.
In the present embodiment, described device 50 further includes:
Read module 505 (is not shown) in Fig. 5, is returned if not receiving the end subsystem by the service link The target service data passed then read the target service data from the data temporary storage space, and will read To the target service data return to first user.
In the present embodiment, the determining module 502:
Determine whether the mesh that the end subsystem passback in the service link is received in preset overtime duration Mark business datum;If so, determination receives the target service that the end subsystem is returned by the service link Data;If not, determination does not receive the target service data that the end subsystem is returned by the service link.
In the present embodiment, the determining module 502 is further:
Determining whether to receive in preset overtime duration described in the end subsystem passback in the service link Before target service data, it is determined whether receive the service link in preset overtime duration and take up an official post alien's system The failure message of passback;If so, described in determining that not receiving the end subsystem is returned by the service link Target service data;If not, further determining whether to receive the end in the service link in preset overtime duration The target service data of subsystem passback.
In the present embodiment, the data temporary storage space is the local cache space of the head end service sub-system; Alternatively, the remote cache space of the head end service sub-system docking.
In the present embodiment, the business datum cached in the data temporary storage space has been predetermined caching validity period;
The cache module 503 is further:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then face from the data When memory space in delete the business datum.
The function of modules and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The module of explanation may or may not be physically separated, and the component shown as module can be or can also be with It is not physical module, it can it is in one place, or may be distributed on multiple network modules.It can be according to actual The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not In the case where making the creative labor, it can understand and implement.
Corresponding with above method embodiment, this specification additionally provides the embodiment of a kind of electronic equipment.Wherein, the electricity In distributed system where sub- equipment, including the business chain being made of multiple service sub-systems there are calling service relationship Road;Wherein, the service link is serial traffic link;The electronic equipment includes:It processor and can be held for storing machine The memory of row instruction;Wherein, processor and memory are usually connected with each other by internal bus.In other possible realization sides In formula, the equipment is also possible that external interface, can be communicated with other equipment or component.
In the present embodiment, by reading and executing the corresponding with the control logic of calling service of the memory storage Machine-executable instruction, the processor are prompted to:
Data call by the first Client-initiated for target service data is requested, the end into the service link Subsystem transmitting;
Determine whether to receive the target service data that the end subsystem is returned by the service link;
If the target service data that the end subsystem is returned by the service link are received, by institute It states target service data to be cached in data temporary storage space, so as to be directed to the target initiate second user The data call of business datum is requested, and after the end subsystem transmitting into the service link, does not receive end When the target service data that system is returned by the service link, from the data temporary storage space described in reading Target service data, and the target service data read are returned into the second user.
In the present embodiment, by reading and executing the corresponding with the control logic of calling service of the memory storage Machine-executable instruction, the processor are also prompted to:
Determine whether the target service data cache successfully in the data temporary storage space;
If the target service data cache successfully in the data temporary storage space, by the target service number According to returning to first user.
In the present embodiment, by reading and executing the corresponding with the control logic of calling service of the memory storage Machine-executable instruction, the processor are also prompted to:
If not receiving the target service data that the end subsystem is returned by the service link, from The target service data are read in the data temporary storage space, and the target service data read are returned to First user.
In the present embodiment, by reading and executing the corresponding with the control logic of calling service of the memory storage Machine-executable instruction, the processor are also prompted to:
Determine whether the mesh that the end subsystem passback in the service link is received in preset overtime duration Mark business datum;If so, determination receives the target service that the end subsystem is returned by the service link Data;If not, determination does not receive the target service data that the end subsystem is returned by the service link.
In the present embodiment, by reading and executing the corresponding with the control logic of calling service of the memory storage Machine-executable instruction, the processor are also prompted to:
Determining whether to receive in preset overtime duration described in the end subsystem passback in the service link Before target service data, it is determined whether receive the service link in preset overtime duration and take up an official post alien's system The failure message of passback;If so, described in determining that not receiving the end subsystem is returned by the service link Target service data;If not, further determining whether to receive the end in the service link in preset overtime duration The target service data of subsystem passback.
In the present embodiment, the business datum cached in the data temporary storage space has been predetermined caching validity period; By reading and executing the machine-executable instruction corresponding with the control logic of calling service of the memory storage, the place Reason device is also prompted to:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then face from the data When memory space in delete the business datum.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to this specification Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications, Purposes or adaptive change follow the general principle of this specification and undocumented in the art including this specification Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings, And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims System.
The foregoing is merely the preferred embodiments of this specification, all in this explanation not to limit this specification Within the spirit and principle of book, any modification, equivalent substitution, improvement and etc. done should be included in the model of this specification protection Within enclosing.

Claims (15)

1. a kind of service calling method is applied to distributed business system;The distributed business system includes by multiple presence The service link that the service sub-system of calling service relationship is constituted;Wherein, the service link is serial traffic link;The side Method includes:
First Client-initiated is directed to the data call of target service data by the head end service sub-system in the service link Request, the end subsystem transmitting into the service link;
Determine whether to receive the target service data that the end subsystem is returned by the service link;
If the target service data that the end subsystem is returned by the service link are received, by the mesh Mark business datum is cached in data temporary storage space, so as to be directed to the target service initiate second user The data call of data is requested, and after the end subsystem transmitting into the service link, does not receive the end subsystem When the target service data returned by the service link, the target is read from the data temporary storage space Business datum, and the target service data read are returned into the second user.
2. according to the method described in claim 1, further including:
Determine whether the target service data cache successfully in the data temporary storage space;
If the target service data cache successfully in the data temporary storage space, the target service data are returned Back to first user.
3. according to the method described in claim 1, further including:
If not receiving the target service data that the end subsystem is returned by the service link, from described It reads the target service data in data temporary storage space, and the target service data read is returned to described First user.
4. according to the method described in claim 1, described determine whether that receiving the end subsystem passes through the business The target service data of link passback, including:
Determine whether the target industry that the end subsystem passback in the service link is received in preset overtime duration Business data;If so, determination receives the target service data that the end subsystem is returned by the service link; If not, determination does not receive the target service data that the end subsystem is returned by the service link.
5. according to the method described in claim 4, described determine whether to receive the service link in preset overtime duration In end subsystem passback the target service data before, further include:
Determine whether to receive the take up an official post failure of alien's system passback of the service link in preset overtime duration to disappear Breath;If so, determination does not receive the target service data that the end subsystem is returned by the service link; If not, further determining whether the institute for receiving the end subsystem passback in the service link in preset overtime duration State target service data.
6. according to the method described in claim 1, the data temporary storage space is the local of the head end service sub-system Spatial cache;Alternatively, the remote cache space of the head end service sub-system docking.
7. delaying according to the method described in claim 1, the business datum cached in the data temporary storage space has been predetermined Deposit validity period;
The method also includes:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then temporarily deposited from the data Storage deletes the business datum in space.
8. a kind of calling service device is applied to distributed business system;The distributed business system includes by multiple presence The service link that the service sub-system of calling service relationship is constituted;Wherein, the service link is serial traffic link;The dress Set including:
Transfer module, the data call by the first Client-initiated for target service data is requested, into the service link End subsystem transmitting;
Determining module, it is determined whether receive the target service number that the end subsystem is returned by the service link According to;
Cache module, if receiving the target service data that the end subsystem is returned by the service link, Then the target service data are cached in data temporary storage space, so as to be directed to institute initiate second user The data call request for stating target service data does not receive described after the end subsystem transmitting into the service link When the target service data that end subsystem is returned by the service link, read from the data temporary storage space The target service data are taken, and the target service data read are returned into the second user.
9. device according to claim 8, the determining module is further:
Determine whether the target service data cache successfully in the data temporary storage space;
Further include:
Return module, if the target service data cache successfully in the data temporary storage space, by the target Business datum returns to first user.
10. device according to claim 8, further includes:
Read module, if not receiving the target service number that the end subsystem is returned by the service link According to then reading the target service data, and the target service number that will be read from the data temporary storage space According to returning to first user.
11. device according to claim 8, the determining module:
Determine whether the target industry that the end subsystem passback in the service link is received in preset overtime duration Business data;If so, determination receives the target service data that the end subsystem is returned by the service link; If not, determination does not receive the target service data that the end subsystem is returned by the service link.
12. device according to claim 11, the determining module is further:
In the target for determining whether to receive the end subsystem passback in the service link in preset overtime duration Before business datum, it is determined whether receive the service link in preset overtime duration and take up an official post alien's system passback Failure message;If so, determination does not receive the target that the end subsystem is returned by the service link Business datum;If not, further determining whether to receive the end subsystem in the service link in preset overtime duration The target service data of system passback.
13. device according to claim 8, the data temporary storage space is the local of the head end service sub-system Spatial cache;Alternatively, the remote cache space of the head end service sub-system docking.
14. device according to claim 8, the business datum cached in the data temporary storage space has been predetermined slow Deposit validity period;
The cache module is further:
When the caching validity period time-out of the business datum cached in the data temporary storage space, then temporarily deposited from the data Storage deletes the business datum in space.
15. a kind of electronic equipment, during distribution where the electronic equipment is logical, including by multiple there are calling service relationship The service link that service sub-system is constituted;Wherein, the service link is serial traffic link, and the electronic equipment includes:
Processor;
For storing the memory of machine-executable instruction;
Wherein, referred to by reading and executing the machine corresponding with the control logic of calling service of the memory storage and can be performed It enables, the processor is prompted to:
Data call by the first Client-initiated for target service data is requested, the end subsystem into the service link System transmitting;
Determine whether to receive the target service data that the end subsystem is returned by the service link;
If the target service data that the end subsystem is returned by the service link are received, by the mesh Mark business datum is cached in data temporary storage space, so as to be directed to the target service initiate second user The data call of data is requested, and after the end subsystem transmitting into the service link, does not receive the end subsystem When the target service data returned by the service link, the target is read from the data temporary storage space Business datum, and the target service data read are returned into the second user.
CN201810533959.XA 2018-05-29 2018-05-29 A kind of service calling method, device and electronic equipment Pending CN108829496A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810533959.XA CN108829496A (en) 2018-05-29 2018-05-29 A kind of service calling method, device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810533959.XA CN108829496A (en) 2018-05-29 2018-05-29 A kind of service calling method, device and electronic equipment

Publications (1)

Publication Number Publication Date
CN108829496A true CN108829496A (en) 2018-11-16

Family

ID=64146720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810533959.XA Pending CN108829496A (en) 2018-05-29 2018-05-29 A kind of service calling method, device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108829496A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751415A (en) * 2008-12-09 2010-06-23 ***通信集团公司 Metadata service system metadata synchronized method and writing server updating method
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
CN105335170A (en) * 2014-06-05 2016-02-17 阿里巴巴集团控股有限公司 Distributed system and incremental data updating method
US20160313994A1 (en) * 2015-04-24 2016-10-27 Freescale Semiconductor, Inc. Data processing system with speculative fetching
CN106598488A (en) * 2016-11-24 2017-04-26 北京小米移动软件有限公司 Distributed data reading method and device
CN106959820A (en) * 2016-01-11 2017-07-18 杭州海康威视数字技术股份有限公司 A kind of data extraction method and system
CN107038025A (en) * 2016-09-28 2017-08-11 阿里巴巴集团控股有限公司 System call method and device based on SOA framework
CN107770630A (en) * 2017-10-25 2018-03-06 深圳市雷鸟信息科技有限公司 Television navigation page display method and device, navigation system and readable storage medium
CN107832125A (en) * 2017-10-10 2018-03-23 ***股份有限公司 Method for processing business and device under a kind of distributed environment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751415A (en) * 2008-12-09 2010-06-23 ***通信集团公司 Metadata service system metadata synchronized method and writing server updating method
CN103490886A (en) * 2012-06-12 2014-01-01 阿里巴巴集团控股有限公司 Permission data validation method, device and system
CN105335170A (en) * 2014-06-05 2016-02-17 阿里巴巴集团控股有限公司 Distributed system and incremental data updating method
US20160313994A1 (en) * 2015-04-24 2016-10-27 Freescale Semiconductor, Inc. Data processing system with speculative fetching
CN106959820A (en) * 2016-01-11 2017-07-18 杭州海康威视数字技术股份有限公司 A kind of data extraction method and system
CN107038025A (en) * 2016-09-28 2017-08-11 阿里巴巴集团控股有限公司 System call method and device based on SOA framework
CN106598488A (en) * 2016-11-24 2017-04-26 北京小米移动软件有限公司 Distributed data reading method and device
CN107832125A (en) * 2017-10-10 2018-03-23 ***股份有限公司 Method for processing business and device under a kind of distributed environment
CN107770630A (en) * 2017-10-25 2018-03-06 深圳市雷鸟信息科技有限公司 Television navigation page display method and device, navigation system and readable storage medium

Similar Documents

Publication Publication Date Title
CN101421702B (en) Load control device and its method
US6708224B1 (en) Methods, systems and computer program products for coordination of operations for interrelated tasks
CN110381072A (en) Data verification method, system and computer readable storage medium based on block chain
CN105446827B (en) Date storage method and equipment when a kind of database failure
CN109597818A (en) Data-updating method, device, storage medium and equipment
CN110622478A (en) Method and device for data synchronous processing
KR20010072379A (en) Fault tolerant computer system
CN111338773A (en) Distributed timed task scheduling method, scheduling system and server cluster
CN109660422B (en) Network card bandwidth testing method, device, terminal and storage medium based on multiple processes
CN113568686B (en) Asynchronous processing method and device for Lua language, computer equipment and storage medium
CN111062723B (en) Virtual account transfer method, device, system and storage medium
JP2022187116A (en) Multiple-control program, information processing apparatus, and multiple-control method
CN110471749A (en) Task processing method, device, computer readable storage medium and computer equipment
CN109002249A (en) Method, storage medium, equipment and the system of present double hit are realized by long-pressing gesture
CN108418859B (en) Method and device for writing data
CN112015595B (en) Master-slave database switching method, computing device and storage medium
CN110166529A (en) It keeps logging in state method, apparatus, equipment and storage medium
CN114328132A (en) Method, device, equipment and medium for monitoring state of external data source
CN115150419A (en) Configuration and access method and system for hybrid cloud object storage
CN109939441B (en) Application multi-disk verification processing method and system
CN106034141A (en) Message processing method, resource obtaining method, server and terminal device
CN109697112B (en) Distributed intensive one-stop operating system and implementation method
CN110750365A (en) Remote procedure calling method, system, terminal and storage medium
CN111078418B (en) Operation synchronization method, device, electronic equipment and computer readable storage medium
CN108829496A (en) A kind of service calling method, device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200922

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181116