CN112367383A - Service calling method and related equipment - Google Patents

Service calling method and related equipment Download PDF

Info

Publication number
CN112367383A
CN112367383A CN202011189884.1A CN202011189884A CN112367383A CN 112367383 A CN112367383 A CN 112367383A CN 202011189884 A CN202011189884 A CN 202011189884A CN 112367383 A CN112367383 A CN 112367383A
Authority
CN
China
Prior art keywords
service
client
request
server
proxy
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
CN202011189884.1A
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.)
Shenzhen Yunzhijia Network Co ltd
Original Assignee
Shenzhen Yunzhijia Network Co 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 Shenzhen Yunzhijia Network Co ltd filed Critical Shenzhen Yunzhijia Network Co ltd
Priority to CN202011189884.1A priority Critical patent/CN112367383A/en
Publication of CN112367383A publication Critical patent/CN112367383A/en
Pending legal-status Critical Current

Links

Images

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/01Protocols
    • H04L67/133Protocols for remote procedure calls [RPC]
    • 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/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The embodiment of the application discloses a service calling method and related equipment, which are used for solving the technical problem that remote calling of a service cannot be realized because a client and a server are respectively deployed in different local area networks. The method in the embodiment of the application comprises the following steps: the proxy service node provides a proxy for calling the target service for the client, when the client and the server are not deployed in the same local area network, the client can initiate a service calling request to the server through the proxy service node, the proxy service node constructs an HTTP request according to the service calling request, sends the HTTP request to the server and returns the target service obtained by processing the HTTP request to the client, and therefore the problem that the client and the server cannot realize remote calling of the service due to the fact that the client and the server are respectively deployed in different local area networks is solved.

Description

Service calling method and related equipment
Technical Field
The embodiment of the application relates to the field of equipment communication, in particular to a service calling method and related equipment.
Background
Rpc (remote procedure call), is a mechanism for calling remote services. The initiator calling the RPC service is an RPC client, and the provider providing the RPC service is an RPC server. In the RPC calling process, the RPC server registers the service to the registration center, the RPC client subscribes a service list from the registration center, and initiates RPC calling to the RPC server according to the service list.
When the RPC call is realized, the RPC client and the RPC server need to be deployed in the same local area network, so that the RPC client and the RPC server can normally perform network communication. Once the RPC client and the RPC server are respectively deployed in two different local area networks, and the two local area networks cannot directly perform network communication, the RPC call cannot be realized.
Therefore, a technical solution is needed to enable the RPC client and the RPC server to be respectively deployed in two local area networks that cannot directly perform network communication and still implement normal RPC calling.
Disclosure of Invention
The embodiment of the application provides a service calling method and related equipment, which are used for solving the technical problem that remote calling of a service cannot be realized because a client and a server are respectively deployed in different local area networks.
A first aspect of an embodiment of the present application provides a service invocation method, where the method is applied to a proxy service node, where the proxy service node is in communication connection with a client, and the method includes:
receiving a service calling request sent by the client, wherein the service calling request is used for indicating that a target service is called by a request of a server;
constructing a hypertext transfer protocol (HTTP) request according to the service calling request, and sending the HTTP request to the server;
and receiving the target service obtained by processing the HTTP request by the service terminal, and returning the target service to the client.
A second aspect of the embodiments of the present application provides a service invocation method, where the method is applied to a client, the client is in communication connection with a proxy service node, and the proxy service node is used for proxying invocation of a target service for the client; the method comprises the following steps:
sending a service calling request to the proxy service node, wherein the service calling request is used for indicating that a service end is requested to call the target service;
and receiving the target service obtained by processing a hypertext transfer protocol (HTTP) request by the server side returned by the proxy service node, wherein the HTTP request is obtained by the proxy service node according to the service calling request structure and is sent to the server side by the proxy service node.
A third aspect of an embodiment of the present application provides a proxy service node, where the proxy service node is communicatively connected to a client, and the proxy service node includes:
the first receiving unit is used for receiving a service calling request sent by the client, wherein the service calling request is used for indicating that a target service is called by a request of a server;
the construction unit is used for constructing a hypertext transfer protocol (HTTP) request according to the service calling request;
the first sending unit is used for sending the HTTP request to the server;
a second receiving unit, configured to receive the target service obtained by the server processing the HTTP request;
and the second sending unit is used for returning the target service to the client.
A fourth aspect of the embodiments of the present application provides a client, where the client is in communication connection with a proxy service node, and the proxy service node is configured to proxy a call of a target service for the client;
the client comprises:
a sending unit, configured to send a service invocation request to the proxy service node, where the service invocation request is used to indicate that a request is made to a service end to invoke the target service;
a receiving unit, configured to receive the target service obtained by processing a hypertext transfer protocol HTTP request by the server, where the target service is returned by the proxy service node, and the HTTP request is obtained by the proxy service node according to the service invocation request structure and is sent to the server by the proxy service node.
A fifth aspect of an embodiment of the present application provides a proxy service node, where the proxy service node is connected to a client in a communication manner, and the proxy service node includes:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the input and output equipment is used for receiving a service calling request sent by the client, and the service calling request is used for indicating that a target service is called by a request of a server;
the processor is also used for constructing a hypertext transfer protocol (HTTP) request according to the service calling request;
the input and output device is further configured to send the HTTP request to the server, receive the target service obtained by the server processing the HTTP request, and return the target service to the client.
A sixth aspect of the present embodiment provides a client, where the client is in communication connection with a proxy service node, and the proxy service node is configured to proxy a call of a target service for the client;
the client comprises:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the processor is used for generating a service calling request, and the service calling request is used for indicating that the target service is called by a request of a service end;
the input and output device is used for sending the service calling request to the proxy service node, receiving the target service obtained by the server side returned by the proxy service node and processing a hypertext transfer protocol (HTTP) request, wherein the HTTP request is obtained by the proxy service node according to the service calling request structure and is sent to the server side by the proxy service node.
A seventh aspect of embodiments of the present application provides a computer storage medium, in which instructions are stored, and when executed on a computer, the instructions cause the computer to perform the method of the foregoing first aspect.
An eighth aspect of embodiments of the present application provides a computer storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of the foregoing second aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, the proxy service node provides a proxy for calling the target service for the client, when the client and the server are not deployed in the same local area network, the client can initiate a service calling request to the server through the proxy service node, the proxy service node constructs an HTTP request according to the service calling request and sends the HTTP request to the server, and returns the target service obtained by processing the HTTP request by the server to the client, so that the problem that the client and the server cannot realize remote service calling due to the fact that the client and the server are respectively deployed in different local area networks is solved.
Drawings
FIG. 1 is a schematic diagram of a network framework in an embodiment of the present application;
FIG. 2 is a flowchart illustrating a service invocation method in an embodiment of the present application;
FIG. 3 is another flow chart illustrating a service invocation method in an embodiment of the present application;
FIG. 4 is another flow chart illustrating a service invocation method in an embodiment of the present application;
FIG. 5 is a schematic structural diagram of a proxy service node in an embodiment of the present application;
FIG. 6 is a schematic structural diagram of a client in an embodiment of the present application;
FIG. 7 is a schematic diagram of another structure of a proxy service node in the embodiment of the present application;
fig. 8 is another schematic structural diagram of the client in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a service calling method and related equipment, which are used for solving the technical problem that remote calling of a service cannot be realized because a client and a server are respectively deployed in different local area networks.
Referring to fig. 1, the network framework in the embodiment of the present application includes:
a client 101, a proxy service node 102, a gateway 103 and a server 104;
the client 101 may be a terminal device such as a smart phone, a tablet computer, a laptop portable computer, a desktop computer, a self-service terminal, and a wearable electronic device; the server 104 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud database, cloud computing, a big data and artificial intelligence platform, and the like.
The proxy service node 102 is a network device installed with a proxy service program, where the proxy service program is used to provide a variety of proxy services for the client 101, and in this embodiment of the present application, the proxy service program may specifically proxy a call of a target service for the client 101. The proxy service node 102 may be a terminal or a server, and the terminal type or the server type of the proxy service node is similar to the terminal type of the client 101 and the server type of the server 104, which is not described herein again. If the proxy service node 102 is a terminal, the proxy service program runs in an operating system of the terminal, where the operating system may be a Windows operating system, a Linux operating system, or another operating system.
The client 101 and the proxy service node 102 may perform communication interaction and data transmission with the server 104 through the network 105. The network 103 is typically a wireless network, which may be a wired network, and if a wireless network, the type of network may be a cellular network, or a WiFi network, or other types of wireless networks. In the case of a wired network, the general network form is a fiber optic network.
In order to realize the communication interaction between the client 101 and the proxy service node 102, the client 101 and the proxy service node 102 may be deployed in the same local area network, and in addition, the proxy service node 102 may also be deployed in a public network to realize the communication interaction between the client 101 and the proxy service node 102. Preferably, in order to ensure that the proxy service provided by the proxy service node 102 for the client is not disclosed or exposed to the public network, and protect the privacy of the client user, it is more preferable that the client 101 and the proxy service node 102 are deployed in the same local area network.
When the server 104 is deployed in the same local area network as the gateway 103, the server 104 may receive data sent by other network devices (such as the proxy service node 102) outside the local area network through the gateway 103, that is, after the data sent to the server 104 by the other network devices reaches the gateway 103, the data is forwarded to the server 104 by the gateway 103. When the server 104 is deployed in a public network, the data sent to the server 104 may directly reach the server 104 without passing through a gateway, and the gateway is not required to forward the data to the server 104.
It should be noted that the network architecture only exemplifies one client 101, proxy service node 102, gateway 103 and server 104, but the network architecture may also have more clients, proxy service nodes and/or servers, and is not limited herein.
In the embodiment of the present application, based on the above network architecture, the client 101 may call a target service provided by the server 104 through a Remote Procedure Call (RPC) mechanism. The following describes a service invocation method in the embodiment of the present application with reference to the network framework of fig. 1:
referring to fig. 2, an embodiment of a service invocation method in the embodiment of the present application includes:
201. receiving a service calling request sent by a client;
the method of the embodiment is applied to a proxy service node, which is in communication connection with a client and is used for providing proxy service for the client. Therefore, the proxy service node registers the calling proxy service, and the calling proxy service can be used for calling the target service for the client proxy, namely when the client needs to remotely call the target service from the server, the proxy service node provides the client with the proxy of the calling target service based on the calling proxy service.
When the client needs to call the target service from the server, the client generates a service call request, wherein the service call request is used for indicating that the target service is called by requesting the server, and the request is sent to the proxy service node, and then the proxy service node receives the request.
202. Constructing a hypertext transfer protocol (HTTP) request according to the service calling request, and sending the HTTP request to a server;
in order to avoid that the service calling request of the client is lost in the sending process to cause that the server cannot receive the request, the proxy service node constructs an HTTP request according to the service calling request so as to be convenient for transmission in a communication link and ensure that the server effectively receives the HTTP request.
203. Receiving a target service obtained by processing the HTTP request by the server, and returning the target service to the client;
after the server receives the HTTP request, the server processes the HTTP request according to normal business processing logic, determines that the HTTP request is that the client needs to call the target service, and returns the target service to the proxy service node. And after receiving the target service, the proxy service node returns the target service to the client, so that the client calls the target service.
In the embodiment, the proxy service node provides a proxy for calling the target service for the client, when the client and the server are not deployed in the same local area network, the client can initiate a service calling request to the server through the proxy service node, the proxy service node constructs an HTTP request according to the service calling request and sends the HTTP request to the server, and returns the target service obtained by processing the HTTP request by the server to the client, so that the problem that the remote calling of the service cannot be realized because the client and the server are respectively deployed in different local area networks is solved.
The service calling method according to the embodiment of the present application is described above based on the perspective of the proxy service node. Embodiments of the present application will be further described below from the client perspective. Referring to fig. 3, an embodiment of a service invocation method in the embodiment of the present application includes:
301. sending a service calling request to a proxy service node;
the method of the embodiment is applied to a client, the client is in communication connection with a proxy service node, and the proxy service node is used for proxying the calling of the target service for the client. When the client needs to call the target service from the server, the client generates a service call request, wherein the service call request is used for indicating that the target service is called by the request of the server, and the request is sent to the proxy service node.
302. Receiving a target service obtained by processing a hypertext transfer protocol (HTTP) request by a server side returned by the proxy service node;
after the proxy service node receives the service calling request, the proxy service node constructs an HTTP request according to the service calling request and sends the HTTP request to the server. And the server processes the HTTP request according to normal business processing logic and returns a response result to the proxy service node, namely returns the target service required to be called by the client. The proxy service node returns the target service to the client, so that the client calls the target service of the server.
In this embodiment, an agent for invoking a target service is provided for a client by an agent service node, when the client and a server are not deployed in the same local area network, the client may initiate a service invocation request to the server by the agent service node, the agent service node constructs an HTTP request according to the service invocation request and sends the HTTP request to the server, and receives a target service obtained by the server processing the HTTP request, and the client receives the target service returned by the agent service node, thereby overcoming a problem that remote invocation of the service cannot be achieved because the client and the server are respectively deployed in different local area networks.
The embodiments of the present application will be described in further detail below on the basis of the embodiments shown in fig. 2 and 3. Referring to fig. 4, another embodiment of the service invocation method in the embodiment of the present application includes:
401. the proxy service node sends a service list to the client;
in this embodiment, a technician may configure a service list on the proxy service node, where the service list includes a plurality of services. After the service list is obtained through configuration, the proxy service node sends the service list to the client, so that the client can determine the target service needing to be called according to the service list.
402. The client determines a target service to be called based on the service list;
after the client obtains the service list, the target service needing to be called is determined based on the service list.
403. The client sends a service calling request to the proxy service node;
after determining the target service needing to be called, the client generates a service calling request for the target service and sends the request to the proxy service node.
In this embodiment, the client may call the remote service based on the RPC mechanism, and the call proxy service registered by the proxy service node is the RPC proxy service, and accordingly, the service call request initiated by the client is an RPC call request indicating that the client is to call the remote service through the RPC mechanism.
404. The proxy service node constructs a hypertext transfer protocol (HTTP) request according to the service calling request;
in order to avoid that the service calling request of the client is lost in the sending process to cause that the server cannot receive the request, the proxy service node constructs an HTTP request according to the service calling request so as to be convenient for transmission in a communication link and ensure that the server effectively receives the HTTP request.
405. The proxy service node sends an HTTP request to a gateway of a server;
after constructing the HTTP request, the proxy service node forwards the HTTP request to the gateway of the server. The gateway and the server of the server can be deployed in the same local area network to realize communication interaction between the gateway and the server.
406. The gateway forwards the HTTP request to the server;
after receiving the HTTP request sent by the proxy service node, the gateway forwards the HTTP request to the server, so that the server receives the HTTP request sent by the proxy service node.
In this embodiment, when both the proxy service node and the server are deployed in the public network, the proxy service node may also directly send the HTTP request to the server without forwarding through the gateway. The present embodiment does not limit the manner in which the proxy service node sends the HTTP request to the server.
407. The server side processes the HTTP request;
after receiving the HTTP request, the server processes the HTTP request according to normal business processing logic, and determines that the HTTP request is the target service which needs to be called by the client.
408. The server returns the target service to the gateway;
and the server side responds to the HTTP request and returns a response result to the gateway, namely, the target service required to be called by the client side is returned.
In this embodiment, the content of the target service is not limited, as long as the target service can provide the functions and/or data required by the client, that is, the target service may be various types of services such as a functional service and a data service, for example, a web page, an application program capable of executing a certain function, or report data, database data, and the like.
409. The proxy service node receives the target service forwarded by the gateway;
after receiving the target service returned by the server, the gateway forwards the target service to the proxy service node, so that the proxy service node can receive the target service provided by the server.
Similarly, in this embodiment, if both the proxy service node and the server are deployed in the public network, the server may also directly return the target service to the proxy service node without forwarding through the gateway. The present embodiment does not limit the way in which the server returns the target service to the proxy service node.
410. The proxy service node returns the target service to the client;
after receiving the target service returned by the server, the proxy service node returns the target service to the client, so that the client can obtain the target service, and the target service is called.
In this embodiment, the client may invoke the remote service based on the RPC mechanism, and when the client and the server are respectively deployed in different local area networks, the client and the server may still invoke the target service remotely through the proxy service node.
The service invoking method in the embodiment of the present application is described above, and referring to fig. 5, a proxy service node in the embodiment of the present application is described below, where an embodiment of the proxy service node in the embodiment of the present application includes:
the proxy service node is in communication connection with the client, and comprises:
a first receiving unit 501, configured to receive a service invocation request sent by a client, where the service invocation request is used to indicate that a target service is invoked by requesting a server;
a constructing unit 502, configured to construct a hypertext transfer protocol HTTP request according to the service invocation request;
a first sending unit 503, configured to send an HTTP request to a server;
a second receiving unit 504, configured to receive a target service obtained by processing the HTTP request at the server;
and a second sending unit 505, configured to return the target service to the client.
In a preferred implementation manner of this embodiment, the first sending unit 503 is specifically configured to forward the HTTP request to a gateway of the server, so that the gateway forwards the HTTP request to the server.
In a preferred implementation manner of this embodiment, the second receiving unit 504 is specifically configured to receive a target service forwarded by a gateway, where the target service is returned to the gateway by a server.
In a preferred implementation manner of this embodiment, the second sending unit 505 is further configured to send the service list to the client, so that the client determines the target service that needs to be invoked based on the service list.
In a preferred embodiment of this embodiment, the call proxy service is a Remote Procedure Call (RPC) proxy service, and the service call request is an RPC call request.
In this embodiment, operations performed by each unit in the proxy service node are similar to those described in the embodiments shown in fig. 2 and fig. 4, and are not described again here.
In this embodiment, a proxy for invoking a target service is provided for a client by a proxy service node, when the client and a server are not deployed in the same local area network, the client may initiate a service invocation request to the server by the proxy service node, the constructing unit 502 constructs an HTTP request according to the service invocation request and sends the HTTP request to the server by the first sending unit 503, and the second sending unit 505 returns a target service obtained by processing the HTTP request to the client, so as to overcome a problem that the client and the server are respectively deployed in different local area networks and cannot implement remote invocation of the service.
With reference to fig. 6, the proxy service node in the embodiment of the present application is described above, and a client in the embodiment of the present application is described below, where an embodiment of the client in the embodiment of the present application includes:
the client is in communication connection with the proxy service node, and the proxy service node is used for calling a client proxy target service;
the client comprises:
a sending unit 601, configured to send a service invocation request to the proxy service node, where the service invocation request is used to indicate that a target service is requested to be invoked from a server;
a receiving unit 602, configured to receive a target service obtained by processing a hypertext transfer protocol HTTP request by a server returned by the proxy service node, where the HTTP request is obtained by the proxy service node according to a service invocation request structure, and is sent to the server by the proxy service node.
In a preferred implementation manner of this embodiment, the receiving unit 602 is further configured to receive a service list sent by the proxy service node, and determine a target service that needs to be invoked based on the service list.
In a preferred implementation manner of this embodiment, the service invocation request is a remote procedure invocation request.
In this embodiment, operations performed by each unit in the proxy service node are similar to those described in the embodiments shown in fig. 3 and fig. 4, and are not described again here.
In this embodiment, an agent for invoking a target service is provided for a client through an agent service node, when the client and a server are not deployed in the same local area network, a sending unit 601 of the client may initiate a service invocation request to the server through the agent service node, the agent service node constructs an HTTP request according to the service invocation request and sends the HTTP request to the server, and receives the target service obtained by the server processing the HTTP request, and a receiving unit 602 of the client receives the target service returned by the agent service node, thereby overcoming a problem that remote invocation of the service cannot be achieved because the client and the server are respectively deployed in different local area networks.
Referring to fig. 7, a proxy service node in an embodiment of the present application is described below, where an embodiment of the proxy service node in the embodiment of the present application includes:
the proxy service node 700 may include one or more Central Processing Units (CPUs) 701 and a memory 705, where the memory 705 stores one or more applications or data.
The memory 705 may be volatile storage or persistent storage, among others. The program stored in the memory 705 may include one or more modules, each of which may include a sequence of instructions operating on a proxy service node. Further, the central processor 701 may be configured to communicate with the memory 705, and to execute a series of instruction operations in the memory 705 on the proxy service node 700.
The proxy service node 700 may also include one or more power supplies 702, one or more wired or wireless network interfaces 703, one or more input-output interfaces 704, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The central processing unit 701 may perform the operations performed by the proxy service node in the embodiments shown in fig. 2 and fig. 4, which are not described herein again.
Referring to fig. 8, a client in an embodiment of the present application is described below, where an embodiment of the client in the embodiment of the present application includes:
the client 800 may include one or more Central Processing Units (CPUs) 801 and a memory 805, where one or more applications or data are stored in the memory 805.
Memory 805 may be volatile storage or persistent storage, among others. The program stored in memory 805 may include one or more modules, each of which may include a sequence of instructions for operation in a client. Still further, central processor 801 may be configured to communicate with memory 805 to execute a series of instruction operations in memory 805 on client 800.
Client 800 may also include one or more power supplies 802, one or more wired or wireless network interfaces 803, one or more input-output interfaces 804, and/or one or more operating systems, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
The central processing unit 801 may perform the operations performed by the client in the embodiments shown in fig. 3 and fig. 4, which are not described herein again.
An embodiment of the present application further provides a computer storage medium, where one embodiment includes: the computer storage medium has stored therein instructions that, when executed on a computer, cause the computer to perform the operations performed by the proxy service node in the embodiments of fig. 2 and 4.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. A service invocation method applied to a proxy service node, the proxy service node being in communication connection with a client, the method comprising:
receiving a service calling request sent by the client, wherein the service calling request is used for indicating that a target service is called by a request of a server;
constructing a hypertext transfer protocol (HTTP) request according to the service calling request, and sending the HTTP request to the server;
and receiving the target service obtained by processing the HTTP request by the service terminal, and returning the target service to the client.
2. The service invocation method according to claim 1, wherein said sending the HTTP request to the server side comprises:
and forwarding the HTTP request to a gateway of the server side, so that the gateway forwards the HTTP request to the server side.
3. The service invocation method according to claim 2, wherein the receiving of the target service obtained by the server side processing the HTTP request comprises:
and receiving the target service forwarded by the gateway, wherein the target service is returned to the gateway by the server.
4. The service invocation method according to claim 1, characterized in that the method further comprises:
and sending a service list to the client so that the client determines a target service needing to be called based on the service list.
5. The service invocation method according to any of claims 1 to 4, wherein the call proxy service is a Remote Procedure Call (RPC) proxy service and the service invocation request is an RPC invocation request.
6. The service calling method is applied to a client, the client is in communication connection with a proxy service node, and the proxy service node is used for proxying calling of a target service for the client; the method comprises the following steps:
sending a service calling request to the proxy service node, wherein the service calling request is used for indicating that a service end is requested to call the target service;
and receiving the target service obtained by processing a hypertext transfer protocol (HTTP) request by the server side returned by the proxy service node, wherein the HTTP request is obtained by the proxy service node according to the service calling request structure and is sent to the server side by the proxy service node.
7. The service invocation method according to claim 6, wherein the method further comprises:
and receiving a service list sent by the proxy service node, and determining a target service to be called based on the service list.
8. The service invocation method according to any one of claims 6 to 7, wherein the service invocation request is a remote procedure invocation request.
9. A proxy service node, wherein the proxy service node is communicatively coupled to a client, the proxy service node comprising:
the first receiving unit is used for receiving a service calling request sent by the client, wherein the service calling request is used for indicating that a target service is called by a request of a server;
the construction unit is used for constructing a hypertext transfer protocol (HTTP) request according to the service calling request;
the first sending unit is used for sending the HTTP request to the server;
a second receiving unit, configured to receive the target service obtained by the server processing the HTTP request;
and the second sending unit is used for returning the target service to the client.
10. A client, wherein the client is communicatively coupled to a proxy service node, wherein the proxy service node is configured to proxy a call for a target service for the client;
the client comprises:
a sending unit, configured to send a service invocation request to the proxy service node, where the service invocation request is used to indicate that a request is made to a service end to invoke the target service;
a receiving unit, configured to receive the target service obtained by processing a hypertext transfer protocol HTTP request by the server, where the target service is returned by the proxy service node, and the HTTP request is obtained by the proxy service node according to the service invocation request structure and is sent to the server by the proxy service node.
CN202011189884.1A 2020-10-30 2020-10-30 Service calling method and related equipment Pending CN112367383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011189884.1A CN112367383A (en) 2020-10-30 2020-10-30 Service calling method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011189884.1A CN112367383A (en) 2020-10-30 2020-10-30 Service calling method and related equipment

Publications (1)

Publication Number Publication Date
CN112367383A true CN112367383A (en) 2021-02-12

Family

ID=74513082

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011189884.1A Pending CN112367383A (en) 2020-10-30 2020-10-30 Service calling method and related equipment

Country Status (1)

Country Link
CN (1) CN112367383A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117336519A (en) * 2023-11-30 2024-01-02 江西拓世智能科技股份有限公司 Method and device for synchronous live broadcasting in multi-live broadcasting room based on AI digital person

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035904A (en) * 2010-12-10 2011-04-27 北京中科大洋科技发展股份有限公司 Method for converting TCP network communication server into client
CN108901022A (en) * 2018-06-28 2018-11-27 深圳云之家网络有限公司 A kind of micro services universal retrieval method and gateway
CN108989420A (en) * 2018-07-12 2018-12-11 上海携程商务有限公司 The method and system of registration service, the method and system for calling service
CN110399233A (en) * 2019-06-28 2019-11-01 口碑(上海)信息技术有限公司 The processing method and processing device of remote procedure call
CN110933188A (en) * 2019-12-31 2020-03-27 深圳市优必选科技股份有限公司 Remote service calling method, system, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035904A (en) * 2010-12-10 2011-04-27 北京中科大洋科技发展股份有限公司 Method for converting TCP network communication server into client
CN108901022A (en) * 2018-06-28 2018-11-27 深圳云之家网络有限公司 A kind of micro services universal retrieval method and gateway
CN108989420A (en) * 2018-07-12 2018-12-11 上海携程商务有限公司 The method and system of registration service, the method and system for calling service
CN110399233A (en) * 2019-06-28 2019-11-01 口碑(上海)信息技术有限公司 The processing method and processing device of remote procedure call
CN110933188A (en) * 2019-12-31 2020-03-27 深圳市优必选科技股份有限公司 Remote service calling method, system, server and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117336519A (en) * 2023-11-30 2024-01-02 江西拓世智能科技股份有限公司 Method and device for synchronous live broadcasting in multi-live broadcasting room based on AI digital person
CN117336519B (en) * 2023-11-30 2024-04-26 江西拓世智能科技股份有限公司 Method and device for synchronous live broadcasting in multi-live broadcasting room based on AI digital person

Similar Documents

Publication Publication Date Title
CN110602254B (en) Method, device and system for realizing load balance
CN108200165B (en) Request Transmission system, method, apparatus and storage medium
RU2498520C2 (en) Method of providing peer-to-peer communication on web page
CN111818158B (en) Gateway control method, device, electronic equipment and storage medium
CN110012083A (en) A kind of data transmission method, server and data transmission device
CN111726400A (en) Reverse connection method, device and server-side system
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN106357654B (en) Remote procedure calling method, device and communication system
CN112367383A (en) Service calling method and related equipment
CN112015383A (en) Login method and device
CN112527669B (en) Self-testing method and system for local service
CN112202744B (en) Multi-system data communication method and device
CN116633993B (en) Cross-network micro-service calling method, device, equipment and storage medium
US20130226984A1 (en) Method and apparatus of providing optimized web browser communications
CN111953718B (en) Page debugging method and device
KR20220006605A (en) Cloud communication method and device, user device, network device
CN113645259B (en) Micro-service elastic expansion method, system and related equipment
CN108696598B (en) Method and device for transparently transmitting message received by stateless service through long connection under micro-service architecture
CN112929453A (en) Method and device for sharing session data
CN114884880A (en) Data transmission method and system
CN109450885B (en) Network data interception method and device, electronic equipment and storage medium
CN114448703B (en) Request processing method, request processing device, electronic equipment and storage medium
CN114745153B (en) Link tracking method combining WCF and log4net
CN109600452A (en) Server cluster, information push method and associated server
US20230396591A1 (en) Server-Side Anonymous Identifier Web Service

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210212