[go: up one dir, main page]

CN106487849B - A kind of information transferring method and device based on redirection - Google Patents

A kind of information transferring method and device based on redirection Download PDF

Info

Publication number
CN106487849B
CN106487849B CN201510543209.7A CN201510543209A CN106487849B CN 106487849 B CN106487849 B CN 106487849B CN 201510543209 A CN201510543209 A CN 201510543209A CN 106487849 B CN106487849 B CN 106487849B
Authority
CN
China
Prior art keywords
server
information
request
subservice
business
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.)
Active
Application number
CN201510543209.7A
Other languages
Chinese (zh)
Other versions
CN106487849A (en
Inventor
胡宗旺
李佳佳
于新林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN201510543209.7A priority Critical patent/CN106487849B/en
Publication of CN106487849A publication Critical patent/CN106487849A/en
Application granted granted Critical
Publication of CN106487849B publication Critical patent/CN106487849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

This application discloses a kind of information transferring method and device based on redirection, this method comprises: server side receives the service request that client is sent, and the request of the first subservice of the service request is forwarded to the first server with the first business function, server side receives the service identification information of the first server feedback, the request of the second subservice is generated according to the service identification information, server side indicates information according to orientation, second subservice request is sent to the second server with the second business function, server side receives the business information of the second server feedback, the business information is transmitted to client.Redirection operation in the application is completed by server side, and the redirection process in server side belongs to the interaction in service system, and such mode can effectively reduce the limitation of network environment, and promotes the efficiency of information transmission.

Description

A kind of information transferring method and device based on redirection
Technical field
This application involves field of computer technology more particularly to a kind of information transferring methods and device based on redirection.
Background technique
With the development of information technology, Internet service provider (such as: website) can provide business service abundant for user.
For Internet service provider, backstage is usually provided with service system, and a large amount of clothes are included in service system Business device, these servers often use the mode of Service-Oriented Architecture Based (Service-Oriented Architecture, SOA), It is divided into different server clusters.Different server cluster have the function of it is different, to provide different business services.
In the prior art, the business service that user is got by network operation, it usually needs have in service system The server of different function is realized jointly.That is, needing to call or access server different in service system.For reality Now to the calling and access of service function different in service system, redirecting technique is generallyd use, such as: when user is in certain quotient In product website, after placing an order to certain commodity, then, client can with have in service system under unifunctional lower single server Connection is established, the request that will place an order is sent in lower single server, and after successfully placing an order, is redirected to payment function Payment request is sent in payment server by server, thus, it is exactly current page for the form of expression in the client Face jumps to the corresponding payment page automatically.
But using redirection in the prior art, in client call different function, need with different server it Between be attached, not only increase the consumption of Internet resources, also increase the delay of business service.
Summary of the invention
The embodiment of the present application provides a kind of information transferring method and device based on redirection, resets to solve client To when obtain the lower problem of efficiency of business service.
A kind of information transferring method based on redirection provided by the embodiments of the present application, comprising:
The service request that client is sent is received, and the request of the first subservice of the service request is forwarded to the The first server of one business function utilizes described first so that the first server is requested according to first subservice Business function generates service identification information;
The service identification information for receiving the first server feedback, generates the second sub- industry according to the service identification information Business request;
In server side, information is indicated according to orientation, second subservice request is sent to the second business function The second server of energy, so that the second server requests according to second subservice and generates business information;
Server side receives the business information of the second server feedback, which is transmitted to client.
A kind of information transferring method based on redirection that the embodiment of the present application also provides, comprising:
The processing result that first server is requested according to the first subservice of the service request sent to client generates the The request of two subservices, and according to orientation instruction information second subservice request is sent to the second business function the Two servers, so that the second server requests to generate business information according to second subservice;
The first server receives the business information of the second server feedback, which is transmitted to client End.
A kind of information carrying means based on redirection provided by the embodiments of the present application, comprising:
Service request module, for receiving the service request of client transmission, and by the first of the service request the sub- industry Business request is forwarded to the first server with the first business function, so that the first server is according to first subservice Request generates service identification information using first business function;
Second subservice request module, for receiving the service identification information of the first server feedback, according to described Service identification information generates the request of the second subservice;
Second subservice request is sent to the second industry by redirection module for indicating information according to orientation The second server for function of being engaged in, so that the second server requests to generate business information according to second subservice;
The business information is transmitted to client for receiving the business information of the second server feedback by feedback module End.
A kind of server side gateway that the embodiment of the present application also provides, is set in service system, with client and the clothes First server in business system is connected with second server, and the server side gateway includes:
Service request module, for receiving the service request of client transmission, and by the first of the service request the sub- industry Business request is forwarded to the first server for executing the first business function, so that the first server is according to first subservice Request generates service identification information using first business function;
Second subservice request module, for receiving the service identification information of the first server feedback, according to The service identification information generates the request of the second subservice;
Second subservice request is sent to the second industry by redirection module for indicating information according to orientation The second server for function of being engaged in, so that the second server requests to generate business information according to second subservice;
The business information is transmitted to client for receiving the business information of the second server feedback by feedback module End.
A kind of information carrying means based on redirection that the embodiment of the present application separately provides, comprising:
Sending module, the processing result of the first subservice request of the service request for sending to client, generates the The request of two subservices, and according to orientation instruction information second subservice request is sent to the second business function the Two servers, so that the second server requests to generate business information according to second subservice;
The business information is transmitted to client for receiving the business information of the second server feedback by feedback module End.
A kind of service system that the embodiment of the present application also provides, the service system are connect with client, the service system Include:
Server side gateway, the service request sent for receiving the client, and by the first of the service request Subservice request is forwarded to the first server for executing the first business function, receives the service identification of the first server feedback Information generates the request of the second subservice according to the service identification information, information is indicated according to orientation, by second subservice Request is sent to the second server with the second business function, the business information of the second server feedback is received, by this Business information is transmitted to client;
First server, the service request sent for receiving the gateway generate the industry according to the service request Business identification information, feeds back to the gateway for the service identification information;
Second server, the second subservice request sent for receiving the gateway, is asked according to second subservice The business information is sought survival into, the business information is fed back into the gateway.
The embodiment of the present application provides a kind of information transferring method and device based on redirection, in the method, by servicing Device flanks the service request for receiving client, and the first subservice request in service request is transmitted to first server, also, The service identification information that the server side can be fed back according to first server generates corresponding second subservice request, and root The request of the second subservice is redirected according to orientation instruction information, second server is sent to, so that second server creates Corresponding business service, after the business service of creation is fed back to server side by second server, server side can should The connection that business service is established before with client, is then forwarded to client.As it can be seen that the redirection operation in the application is not Occur in the client, but completed by server side, that is to say, that the redirection process in server side belongs to service Interaction in system, such mode can effectively reduce the limitation of network environment, and improve the efficiency of information transmission.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the message transmitting procedure provided by the embodiments of the present application based on redirection;
Fig. 2 a, 2b, 2c are the message transmitting procedure based on redirection in application example provided by the embodiments of the present application Schematic diagram;
Fig. 3 is another message transmitting procedure based on redirection provided by the embodiments of the present application;
Fig. 4 is the information carrying means structural schematic diagram provided by the embodiments of the present application based on redirection;
Fig. 5 is the structural schematic diagram of server side gateway provided by the embodiments of the present application;
Fig. 6 is another information carrying means structural schematic diagram based on redirection provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of service system provided by the embodiments of the present application.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
As shown in Figure 1, providing a kind of message transmitting procedure based on redirection in the embodiment of the present application, which is specifically wrapped Include following steps:
S101 receives the service request that client is sent, and the request of the first subservice of the service request is forwarded to First server with the first business function utilizes institute so that the first server is requested according to first subservice It states the first business function and generates service identification information.
Under practical application scene, when user obtains business service using client, it usually needs foundation and server Between connection (such as: server connection).Mutual connection is carried out by gateway between client and server, in the application reality It applies in example, can be realized and be redirected by the gateway for being set to server side, wherein server side gateway refers to one kind for realizing clothes The network equipment of network connection is established between business device and client, client-side and server side are often provided with gateway and (set The gateway in client-side is set, commonly used in realizing the interconnection between local area network, the gateway of client-side is not said here It is bright).
It is of course also possible to completed by other network equipments for being set to server side, such as: middleware, alternatively, special provide The server etc. of redirection function does not constitute the application limit here.
For the convenience of description, in the embodiment of the present application, being illustrated by executing subject of server side gateway, here simultaneously The restriction to the application is not constituted.
After a connection setup, user can use client to issue corresponding operation, to obtain business service, such as: use Family uses client, lower single operation is carried out for certain commodity in corresponding website, to buy the commodity.In above-mentioned example, use After family is operated on the client, client will generate corresponding service request, be sent to server side gateway, then lead to It crosses server side gateway a certain subservice request in the service request is sent in corresponding server.
What needs to be explained here is that certain business services need to call the function of server different in service system.Example Such as: user buys certain commodity, then, entire purchasing process includes placing an order and paying two parts, therefore for purchasing process, no It only needs to call the lower single function in lower single server, it is also desirable to call the payment function in payment server.At this point, user sends out Having gone out purchase request (just includes the request that places an order in purchase request, it is believed that the request that places an order is one of entire purchase business Point, that is, the first subservice is requested), then, which will be first sent in lower single server (that is, first service Device).
So in the embodiment of the present application, same business may be made of different subservices, server side gateway is received It, will be by the first sub- industry in the service request after having arrived the service request (such as: the purchase request in upper example) of client sending Business request (request that places an order in upper example) is first sent in the first server with the first business function, so as to described first Server is requested according to first subservice, generates service identification information using first business function.
S102 receives the service identification information of first server feedback, generates the according to the service identification information The request of two subservices.
After server side gateway, which has sent the first subservice to first server, requests, first server will be according to this The request of first subservice carries out response processing, generates service identification information corresponding with the first subservice request and is sent to service Device side gateway.
Continuation of the previous cases: service request is the purchase request for a certain commodity, and the request of the first subservice is the request that places an order, that , first server can place an order request according to this, generate corresponding order information (such as: order number) and feed back.At this point, order is believed Breath is exactly service identification information.
It should be noted that the service identification information, is not the final result of entire business procedure, but it is a kind of The transitional information of pilot process, the service identification information can be used as one of subsequent process mark, such as: the order in upper example Information can uniquely determine out a payment transaction as a kind of service identification information, it is subsequent can according to the order information, This payment transaction is paid.
So server side gateway can be performed the next step according to the service identification information operation (such as: gateway according to Order information, to the server request payment page with payment function).Specifically, server side gateway can be according to Service identification information generates the request of the second subservice.
What needs to be explained here is that the request of the second subservice is a kind of for carrying out the request of service creation.Certainly, described The second subservice request in carry the service identification information, alternatively, the second subservice request in carry service identification The partial information of mark action is played in information, does not constitute the restriction to the application here.
S103 indicates information according to orientation in server side, and second subservice request is sent to the second industry The second server for function of being engaged in, so that the second server requests to generate business information according to second subservice.
In practical applications, business service acquired in user, it usually needs different server is completed jointly, is serviced The service identification information of the feedback of first server received by the gateway of device side, only shows the first server and completes itself Business service, and to complete entire business, it is necessary to call other servers.
Therefore in this application, server side gateway can request to redirect to the second subservice of generation, so that described The request of second subservice is no longer sent to first server, but is sent in other servers (in the embodiment of the present application, the The request of two subservices is sent to second server).Wherein, the first server and second server provide different respectively Business service.
Specifically, server side gateway can be redirected according to orientation instruction information in the application, that is, described Orientation instruction information to indicate that the second subservice requests target position to be sent.In the embodiment of the present application, described Orientation instruction information there are two types of source: one is by what is carried in service identification information, another kind is the server side gateway What itself was generated.Server side gateway indicates information according to the orientation, so that it may determine the second subservice request institute The target position to be sent to, that is, second subservice request is sent to second server.
Unlike the prior art, redirection process in the prior art is realized by client, and the embodiment of the present application In the process that redirects, not by client executing, but completed by server side gateway, it is clear that due to server side Gateway is in service system, then, server side gateway easily can carry out letter with each server in service system Breath transmission, is not limited by network environment, and in the prior art, the information in client and service system between each server Transmission will be influenced by gateway environment, it is seen then that carry out information transmission in the application between server side gateway and each server Interactive efficiency, much higher than the efficiency interacted between client and each server.
S104, server side receive the business information of the second server feedback, which are transmitted to client End.
It, will be according to second son after second server has received the second subservice request of server side gateway transmission Service request creates corresponding business, and generates corresponding business information and feed back in server side gateway.To service The business information that device side gateway can will receive, is transmitted to client.
Through the above steps as it can be seen that the redirection operation in the embodiment of the present application does not occur in the client, but by taking Device side gateway of being engaged in is completed, and server side gateway belongs to a part in service system, that is to say, that server side gateway and each Interaction between server belongs to the interaction in service system, and such mode can effectively reduce the limitation of network environment, And improve interactive efficiency.
It should be noted that the mode that client redirects in the prior art, client needs to establish difference respectively Connection, with realize with different server carry out information transmit interact, such as: in the examples described above, client firstly the need of with Lower list server establishes connection, after being redirected, it is also necessary to establish connection with payment server.Obviously, such side Formula will increase link cost and consume the Internet resources of service system.
Therefore, as one of the embodiment of the present application preferred embodiment, server side gateway with the client by building Vertical connection receives the service request, and the business information is fed back to the client by the connection.As it can be seen that at this Apply in embodiment, between server side gateway and client, need to only maintain a connection, such mode effectively saves About link cost, moreover, in practical applications, the service system of Internet service provider, usually a large amount of client provides industry Business service, then, if can effectively save the net of service system to a connection is maintained between service system and each client Network resource.
In addition, the mode that client redirects in the prior art, also will increase the consumption of the floating resources of client, specifically For, taking the above example as an example, it is assumed that server of the client into service system sends request and need to consume 1KB flow, visitor The information of server feedback that family end receives in service system needs to consume 1KB flow, then, due to client need respectively to Lower list server, payment server send request, and receive the information that two servers are fed back, so, whole process needs Consume the flow of 4KB.And the redirection mode of server side gateway in the embodiment of the present application is used, server side gateway and each clothes Information transmission interaction between business device belongs to the interaction in service system, and client need to only send to server side gateway and ask The information of server side gateway feedback is sought and receives, so, for client, whole process need to only consume 2KB stream Amount.Obviously, the mode that server side gateway redirects in the application can effectively save the floating resources (section of client It saves 50%).
In the embodiment of the present application, for server side gateway, due to being related to different function in different server Calling, so using in application layer application programming interface (Application Programming Interface, API the interaction to the calling of function in different server and between different server) is completed.
So in the embodiment of the present application, it is believed that the process that server side gateway redirects exactly changes not With the process of the API of server.It will be made below being described in detail.
As a kind of preferred embodiment of the embodiment of the present application, in service system, different servers can be by respective API It is distributed to server side gateway in advance, so, in server side gateway local, so that it may call different server API realizes the interaction between different server, and obtains the types of functionality in different server.
Under the preferred embodiment, server side gateway is asked to server (including first server and second server) transmission The feedback of server is sought or received, the server side gateway locally existing API completion can be directly passed through.
Specifically, the service request is forwarded to first with the first business function in above-mentioned steps S101 Server, specifically: it determines API corresponding with the first server, calls the API, the service request is passed through into institute It states API and is sent to the first server.
In order to the concrete scheme in clearer elaboration the embodiment of the present application, now carried out specifically in conjunction with attached drawing It is bright.
It as shown in Figure 2 a, is client, the server side gateway in service system and server (including first server And second server) between framework.In fig. 2 a, the corresponding API of first server is API 1, and second server is corresponding API is API 2.Client sends service request in server side gateway, at this point, server side gateway will determine the first clothes Be engaged in the corresponding API of device, that is, it is determined as API 1, then, server side gateway can then call the API 1 by the service request The request of the first subservice be sent in first server that (in fig. 2 a, API 1 is solid line state, indicates called, and API 2 be dashed lines states, and expression is not called upon).Also, server side gateway will also receive first server feedback by API 1 Service identification information.
It, will be according to the business mark after server side gateway has received the service identification information of first server feedback Know information and generate the request of the second subservice, to carry out the creation of business service in corresponding server.This is just needed to described The request of second subservice redirects, to be sent in corresponding server.
And since the orientation of the application instruction information is there are two types of source: by being carried in service identification information, or by server Side gateway itself generates.Therefore it will be illustrated below for two kinds of situations:
One, orientation instruction information in service identification information by carrying
In this case, in the service system based on SOA framework, for needing to call the business of a variety of different service functions For, with different service functions each server between can carry out in advance business agreement (business agreement form can be with The mode of configuration file is realized), that is, business agreement has meant that certain server executes certain a part of entire business, and raw At corresponding identification information, other servers execute the further part of the business according to the identification information of generation, thus, it is formed One complete business service.
Refer to so first server just contains orientation after generating service identification information, in the service identification information Show information, thus, it, can be direct after server side gateway has received the service identification information that first server is fed back Information, the operation redirected are indicated according to orientation therein, that is, referring to when carrying orientation in the service identification information When showing information, information is indicated according to orientation, second subservice request is sent to the second clothes with the second business function Business device, specifically: it determines the corresponding API of the orientation instruction information, determines the corresponding second server of the API, call institute It states API and second subservice request is sent to second server corresponding with the API.
Use the example above, when gateway generate the second subservice request after, will according to orientation instruction information determine with this second Subservice requests corresponding A PI (second server of the API), at this point, gateway will call API corresponding with second server, That is, API 2, and second subservice request is sent to by second server by API 2.I.e. as shown in Figure 2 b, API 2 is Solid line state, expression have been called.
Two, orientation instruction information is generated by server side gateway itself
Under practical application scene, for certain service identification informations, wherein not carrying orientation instruction information, example Such as: after user information of the user in certain website using itself is registered, account server can return to the response succeeded in registration As a result, still, in the response results and to include orientation instruction information.At this point, server side gateway just needs itself to generate Corresponding orientation instruction information, to execute follow-up business.
Specifically, in the embodiment of the present application, when orientation instruction information is not carried in the service identification information, The method also includes: for server side gateway according to preset service logic relationship, determination is corresponding with the service identification information Business service, determine API corresponding to the business service, generate orientation instruction information.
Wherein, the service logic relationship, indicates in the business service process of complete set, and each server executes not The sequencing of congenerous.The service logic relationship can be stored in server side gateway by the way of configuration file, The service logic relationship can be updated by the host of service system, certainly, not constitute the restriction to the application here.
The example of above-mentioned registration is continued to use, server side gateway can be known according to the service logic relationship, when account takes After business device returns to the response results to succeed in registration, it should according to the response results, send and request to site resource server, obtain Corresponding site resource (form of expression, which can be, jumps back to homepage, or not shown content etc. in the unlock page).
To indicate information according to orientation, second subservice request is sent to the with the second business function Two servers, specifically: it determines the corresponding API of the orientation instruction information, determines the corresponding second server of the API, adjust Second subservice request is sent to second server corresponding with the API with the API.
Certainly, it in above-mentioned two situations, when server side gateway transmits information to second server, is taken with first The corresponding API of business device is also maintained with first server and is connect still in called state, that is, server side gateway, is shown So, such mode is likely to result in the wastes of Internet resources (because after being redirected, server side gateway is not used The API of first server).So in the embodiment of the present application, the API is being called to incite somebody to action as a kind of more preferably mode The second subservice request is sent to before second server corresponding with the API, further includes: is deactivated and first clothes Be engaged in the corresponding API of device.
As shown in Figure 2 c, after having deactivated API corresponding with first server, the API 1 in Fig. 2 c is in dashed lines states, Expression is not called upon, and API 2 is solid line state, and expression has been called.
After above-mentioned steps, server side gateway can be after the business information for receiving second server feedback, by industry Information of being engaged in is sent to client (only maintaining one with client to connect) by the connection between client.
As the another way of the embodiment of the present application, the API in server side gateway is not pre- by different server It first issues, but is obtained when server side gateway is needed to corresponding server transport information, then from corresponding server Take API.In this mode, the process of the transmission of information performed by server side gateway is similar with aforesaid way, therefore herein not Ao Shu again.
In above-mentioned some embodiments, by server side gateway realization and the letter between first server and second server Breath transmission interaction, to reduce the interaction times with client, such mode is conducive to promote client acquisition business clothes The efficiency of business.As it can be seen that information exchange between server side gateway and first server and second server in from the discussion above Although belonging to the interaction in entire service system, the information exchange between several distinct devices, meeting under this situation can be The transfer resource in entire service system is occupied to a certain extent.A kind of base is additionally provided based on this, in the embodiment of the present application In the information transferring method of redirection, as shown in figure 3, this method comprises:
S301, the processing result that first server is requested according to the first subservice of the service request sent to client, And second subservice request is sent to by the second server with the second business function according to orientation instruction information, so that The second server is obtained to be requested to generate business information according to second subservice.
Service request described here is identical as in above-described embodiment, can be issued by client, in the service request It equally may include the request of the first subservice, no longer excessively repeat here.Similarly, here second server and above-mentioned reality Apply the server in example with the second business function.
Include with above method difference, the service request that client is issued in the present embodiment can be transmitted directly to In the first server, the first subservice request of service request is handled by the first server, it can in processing result With comprising service identification information, then, first server further generates the second subservice request hair according to service identification information Give second server.
S302, the first server receive the business information of the second server feedback, which are fed back To client.
In the method, first server can be directly realized by the information exchange with client and second server.This Kind mode can save the information transmission resources inside service system, and then promote the efficiency of information transmission.
The above are several embodiments of the information transferring method provided by the present application based on redirection, are thought based on same Road, present invention also provides the embodiments of the information carrying means based on redirection, as shown in Figure 4.In Fig. 4 based on redirection Information carrying means, described device includes: service request module 401, the second subservice request module 402, redirection module 403 and feedback module 404, wherein
The service request module 401, for receiving the service request of client transmission, and by the of the service request The request of one subservice is forwarded to the first server with the first business function.
The second subservice request module 402, for receiving the service identification information of the first server feedback, root The request of the second subservice is generated according to the service identification information.
The redirection module 403, for indicating information according to orientation, second subservice request, which is sent to, to be had The second server of second business function, so that the second server requests generation business to be believed according to second subservice Breath.
The feedback module 404 forwards the business information for receiving the business information of the second server feedback To client.
It should be noted that in the embodiment of the present application, server side is received by the connection established with the client The service request, and the business information is fed back to by the client by the connection.
The service request module 401, is specifically used for determining API corresponding with the first server, described in calling API requests the first subservice of the service request to be sent to the first server by the API, so as to described the One server is requested according to first subservice, generates service identification information using first business function.
The redirection module 403 is specifically used for determining the corresponding API of the orientation instruction information, determines described API pairs The second server answered calls the API that second subservice request is sent to second service corresponding with the API Device.
In the embodiment of the present application in a scenario, the orientation instruction information includes: to carry in the service identification Orientation in information indicates information.
However in practical applications, and not all orientation instruction information is carried by service identification information, such Under scene, when carrying orientation instruction information in the service identification information, the redirection module 403 is also used to basis Preset service logic relationship determines business service corresponding with the service identification information, determines that the business service institute is right The API answered generates orientation instruction information.
In addition, as one of the embodiment of the present application preferred embodiment, the redirection module 403 is also used to calling Before second subservice request is sent to second server corresponding with the API by the API, deactivate and described first The corresponding API of server.
The embodiment of the present application also provides a kind of server side gateway, as shown in Figure 5.Wherein, the server side gateway is set Be placed in service system, in client and the service system first server and second server be connected, the service Device side gateway includes:
Service request module 501, the second subservice request module 502, redirection module 503 and feedback module 504, In,
Service request module 501, for receiving the service request of client transmission, and it is sub by the first of the service request Service request is forwarded to the first server with the first business function, so that the first server is according to the described first sub- industry Business request generates service identification information using first business function;
Second subservice request module 502, for receiving the service identification information of the first server feedback, according to institute It states service identification information and generates the request of the second subservice;
Second subservice request is sent to second by redirection module 503 for indicating information according to orientation The second server of business function, so that the second server requests to generate business information according to second subservice;
The business information is forwarded to visitor for receiving the business information of the second server feedback by feedback module 504 Family end.
It should be noted that server side receives the service request by the connection established with the client, and lead to It crosses the connection and the business information is fed back into the client.
For above-mentioned module, specifically, the service request module 501, is specifically used for the determining and first service The corresponding API of device, calls the API, and the service request is sent to the first server by the API.
The redirection module 503 is specifically used for determining the corresponding API of the orientation instruction information, determines described API pairs The second server answered calls the API that second subservice request is sent to second service corresponding with the API Device.
The orientation instruction information includes: the orientation instruction information carried in the service identification information.
And orientation instruction information is not carried in certain practical application scenes, in certain service identification informations, therefore at this Apply in embodiment, when carrying orientation instruction information in the service identification information, the redirection module 503 is also used According to preset service logic relationship, business service corresponding with the service identification information is determined, determine the business clothes The corresponding API of business generates orientation instruction information.
Certainly, the redirection module 503 as a preferred method, be also used to call the API by described second Subservice request is sent to before second server corresponding with the API, deactivates API corresponding with the first server.
The application also provides the information carrying means based on redirection, as shown in fig. 6, being arranged in first server, packet It includes:
Sending module 601, the processing result for being requested according to the first subservice of the service request to client transmission, The request of the second subservice is generated, and second subservice request is sent to the second business function according to orientation instruction information The second server of energy, so that the second server requests to generate business information according to second subservice.
The business information is transmitted to visitor for receiving the business information of the second server feedback by feedback module 602 Family end.
The application also provides a kind of server system, as shown in Figure 7.Wherein, the service system is connect with client, should Service system includes:
Server side gateway 701, the service request sent for receiving the client, and by the of the service request The request of one subservice is forwarded to the first server with the first business function, receives the business mark of the first server feedback Know information, the request of the second subservice is generated according to the service identification information, information is indicated according to orientation, by the described second sub- industry Business request is sent to the second server with the second business function, receives the business information of the second server feedback, will The business information is transmitted to client.
First server 702, the service request sent for receiving the server side gateway, according to the service request The service identification information is generated, which is fed back into the server side gateway.
Second server 703, the second subservice request sent for receiving the server side gateway, according to described the The request of two subservices generates the business information, and the business information is fed back to the server side gateway.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (21)

1. a kind of information transferring method based on redirection characterized by comprising
The service request that client is sent is received, and the request of the first subservice of the service request is forwarded to the first industry The first server of business function utilizes first business so that the first server is requested according to first subservice Function generates service identification information;
The service identification information for receiving the first server feedback, generates the second sub- industry according to the service identification information Business request;
In server side, information is indicated according to orientation, second subservice request is sent to the second business function Second server, so that the second server requests to generate business information according to second subservice;
Server side receives the business information of the second server feedback, which is transmitted to client.
2. the method as described in claim 1, which is characterized in that server side is received by the connection established with the client The service request, and the business information is fed back to by the client by the connection.
3. the method as described in claim 1, which is characterized in that the first subservice request of the service request is forwarded to tool There is the first server of the first business function, specifically include:
Determine application programming interface API corresponding with the first server;
The API is called, the first subservice of the service request is requested to be sent to the first service by the API Device.
4. the method as described in claim 1, which is characterized in that indicate information according to orientation, second subservice is requested It is sent to the second server with the second business function, is specifically included:
Determine the corresponding API of the orientation instruction information;
Determine the corresponding second server of the API;
Call the API that second subservice request is sent to second server corresponding with the API.
5. the method as described in claim 1, which is characterized in that the orientation instruction information includes: to carry in the business mark The orientation known in information indicates information.
6. method as claimed in claim 5, which is characterized in that believe when not carrying orientation instruction in the service identification information When breath, the method also includes:
Server side determines business service corresponding with the service identification information according to preset service logic relationship;
It determines API corresponding to the business service, generates orientation instruction information.
7. method as claimed in claim 4, which is characterized in that the method also includes:
Deactivate API corresponding with the first server.
8. a kind of information transferring method based on redirection characterized by comprising
The processing result that first server is requested according to the first subservice of the service request sent to client generates the second son Service request, and second subservice request is sent to according to orientation instruction information by the second clothes with the second business function Business device, so that the second server requests to generate business information according to second subservice;
The first server receives the business information of the second server feedback, which is transmitted to client.
9. a kind of information carrying means based on redirection characterized by comprising
Service request module for receiving the service request of client transmission, and the first subservice of the service request is asked It asks and is forwarded to the first server with the first business function, so that the first server is asked according to first subservice It asks, generates service identification information using first business function;
Second subservice request module, for receiving the service identification information of the first server feedback, according to described Service identification information generates the request of the second subservice;
Second subservice request is sent to the second business function by redirection module for indicating information according to orientation The second server of energy, so that the second server requests to generate business information according to second subservice;
The business information is transmitted to client for receiving the business information of the second server feedback by feedback module.
10. device as claimed in claim 9, which is characterized in that server side is connect by the connection established with the client The service request is received, and the business information is fed back to by the client by the connection.
11. device as claimed in claim 9, which is characterized in that the service request module is specifically used for determining with described the The corresponding API of one server, calls the API, and the service request is sent to the first server by the API.
12. device as claimed in claim 9, which is characterized in that the redirection module refers to specifically for the determination orientation Show the corresponding API of information, determine the corresponding second server of the API, the API is called to request to send out by second subservice It send to second server corresponding with the API.
13. device as claimed in claim 9, which is characterized in that the orientation instruction information includes: to carry in the business mark The orientation known in information indicates information.
14. device as claimed in claim 13, which is characterized in that indicated when not carrying orientation in the service identification information When information, the redirection module is also used to according to preset service logic relationship, and determination is corresponding with the service identification information Business service, determine API corresponding to the business service, generate orientation instruction information.
15. device as claimed in claim 12, which is characterized in that the redirection module, being also used to will in the calling API The second subservice request is sent to before second server corresponding with the API, is deactivated and the first server pair The API answered.
16. a kind of server side gateway, which is characterized in that be set in service system, in client and the service system First server is connected with second server, and the server side gateway includes:
Service request module for receiving the service request of client transmission, and the first subservice of the service request is asked It asks and is forwarded to the first server with the first business function, so that the first server is asked according to first subservice It asks, generates service identification information using first business function;
Second subservice request module, for receiving the service identification information of the first server feedback, according to described Service identification information generates the request of the second subservice;
Second subservice request is sent to the second business function by redirection module for indicating information according to orientation The second server of energy, so that the second server requests to generate business information according to second subservice;
The business information is forwarded to client for receiving the business information of the second server feedback by feedback module.
17. server side gateway as claimed in claim 16, which is characterized in that the service request module is specifically used for true Fixed API corresponding with the first server, calls the API, and the service request is sent to described the by the API One server.
18. server side gateway as claimed in claim 16, which is characterized in that the redirection module is specifically used for determining The orientation indicates the corresponding API of information, determines the corresponding second server of the API, calls the API by second son Service request is sent to second server corresponding with the API.
19. server side gateway as claimed in claim 18, which is characterized in that the redirection module is also used to calling Before second subservice request is sent to second server corresponding with the API by the API, deactivate and described first The corresponding API of server.
20. a kind of information carrying means based on redirection, which is characterized in that be arranged in first server, comprising:
Sending module generates for the processing result according to the first subservice request of the service request sent to client The request of two subservices, and according to orientation instruction information second subservice request is sent to the second business function the Two servers, so that the second server requests to generate business information according to second subservice;
The business information is transmitted to client for receiving the business information of the second server feedback by feedback module.
21. a kind of server system, which is characterized in that the service system is connect with client, which includes:
Server side gateway, the service request sent for receiving the client, and by the first of the service request the sub- industry Business request is forwarded to the first server with the first business function, receives the service identification letter of the first server feedback Breath generates the request of the second subservice according to the service identification information, indicates information according to orientation, second subservice is asked It asks and is sent to the second server with the second business function, the business information of the second server feedback is received, by the industry Business information is transmitted to client;
First server, the first subservice request sent for receiving the gateway, please seek survival according to first subservice At the service identification information, which is fed back into the gateway;
Second server, the second subservice request sent for receiving the gateway, please seek survival according to second subservice At the business information, the business information is fed back into the gateway.
CN201510543209.7A 2015-08-28 2015-08-28 A kind of information transferring method and device based on redirection Active CN106487849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510543209.7A CN106487849B (en) 2015-08-28 2015-08-28 A kind of information transferring method and device based on redirection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510543209.7A CN106487849B (en) 2015-08-28 2015-08-28 A kind of information transferring method and device based on redirection

Publications (2)

Publication Number Publication Date
CN106487849A CN106487849A (en) 2017-03-08
CN106487849B true CN106487849B (en) 2019-08-23

Family

ID=58234963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510543209.7A Active CN106487849B (en) 2015-08-28 2015-08-28 A kind of information transferring method and device based on redirection

Country Status (1)

Country Link
CN (1) CN106487849B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109120706A (en) * 2018-08-28 2019-01-01 中国邮政储蓄银行股份有限公司 Business scheduling method and system
CN114079612B (en) * 2020-08-03 2024-06-04 阿里巴巴集团控股有限公司 Disaster recovery system and management and control method, device, equipment and medium thereof
CN117956042B (en) * 2023-10-24 2024-08-27 华为技术有限公司 Request scheduling method and device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546165A (en) * 2010-12-31 2012-07-04 中国银联股份有限公司 Dynamic uniform resource locator (URL) generator, generation method, dynamic-URL-based authentication system and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7401115B1 (en) * 2000-10-23 2008-07-15 Aol Llc Processing selected browser requests
CN103856497B (en) * 2012-11-29 2017-06-06 华为终端有限公司 Terminal management method, equipment and home network in home network

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546165A (en) * 2010-12-31 2012-07-04 中国银联股份有限公司 Dynamic uniform resource locator (URL) generator, generation method, dynamic-URL-based authentication system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
SP服务器端的重定向技术;郭松 等;《信息通信》;20141015;全文

Also Published As

Publication number Publication date
CN106487849A (en) 2017-03-08

Similar Documents

Publication Publication Date Title
CN110908658B (en) Micro-service and micro-application system, data processing method and device
CN111901173A (en) Cloud edge cooperative system construction method, device, equipment and readable medium
WO2019056640A1 (en) Order processing method and device
CN109491758A (en) Docker mirror image distribution method, system, data gateway and computer readable storage medium
CN113572835B (en) Data processing method, network element equipment and readable storage medium
CN104113435B (en) Generate the method and device of mark
CN104965690B (en) Data processing method and device
US20120096136A1 (en) Method and apparatus for sharing contents using information of group change in content oriented network environment
CN104579905A (en) Message passing method and system, MOM (message oriented middleware) server and receiving terminal
CN106487849B (en) A kind of information transferring method and device based on redirection
CN105469294A (en) Purchase request processing method and purchase request processing device
US8606908B2 (en) Wake-up server
TWI659312B (en) Business processing method and device
CN105743947A (en) Resource sharing method and apparatus
JP2018537777A (en) Internet of things information system
CN104954894A (en) A video traffic guidance method, device and electronic equipment
CN109840815B (en) System and method for order processing
CN108737343A (en) A kind of implementation method and device of secure access network
Silva et al. In‐network computing—challenges and opportunities
CN105556918A (en) Resource downloading method, electronic device, and apparatus
CN201854301U (en) Middleware system for data sharing on mobile devices
CN103745399A (en) Auction processing system and method
US10536389B1 (en) Biased selection of dedicated physical connections to provider network
CN118626743A (en) A method, device, electronic device and storage medium for transferring virtual resources
CN106911739A (en) A kind of information dispensing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1234921

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20200921

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

Patentee after: Innovative advanced technology Co.,Ltd.

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

Patentee before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200921

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

Patentee after: Advanced innovation technology Co.,Ltd.

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

Patentee before: Alibaba Group Holding Ltd.