CN111010438B - Remote procedure calling method, device, server and storage medium - Google Patents

Remote procedure calling method, device, server and storage medium Download PDF

Info

Publication number
CN111010438B
CN111010438B CN201911285194.3A CN201911285194A CN111010438B CN 111010438 B CN111010438 B CN 111010438B CN 201911285194 A CN201911285194 A CN 201911285194A CN 111010438 B CN111010438 B CN 111010438B
Authority
CN
China
Prior art keywords
format
target
calling
service
result
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
CN201911285194.3A
Other languages
Chinese (zh)
Other versions
CN111010438A (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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201911285194.3A priority Critical patent/CN111010438B/en
Publication of CN111010438A publication Critical patent/CN111010438A/en
Application granted granted Critical
Publication of CN111010438B publication Critical patent/CN111010438B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/565Conversion or adaptation of application format or content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • 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]

Abstract

The disclosure relates to a remote procedure call method, a remote procedure call device, a server and a storage medium, relates to the technical field of communication, and aims to solve the problem that the debugging process of a gPC service is complicated and time-consuming, so that the whole development efficiency is low. The remote procedure call method comprises the following steps: receiving a target calling parameter; converting the target calling parameter from a first format to a second format, and sending the target calling parameter in the second format; receiving a calling result, wherein the calling result is a result of calling a target framework service by a remote process; converting the calling result from the second format into the first format; and sending the calling result in the first format. The method and the device are applied to the process of debugging the target framework service.

Description

Remote procedure calling method, device, server and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a remote procedure call method, apparatus, server, and storage medium.
Background
Remote Procedure Call (RPC) is a computer communication protocol that allows a program running on one computer to Call a subroutine of another address space, typically a computer of an open network. The gPC is a high-performance and universal open-source RPC framework, when the gPC is used, service definition is firstly defined, one or more methods capable of performing RPC are specified, a service end (namely a gPC service end) can realize the methods and is deployed as gPC service, and therefore a client can realize transparent calling of the gPC service through a stub object provided by the gPC.
However, since the gRPC is a C/S (Client/Server) architecture, in the debugging process of the gRPC service development stage, a dedicated Client code needs to be written to call the gRPC service, which results in a tedious and time-consuming debugging process of the gRPC service and thus results in low efficiency of the whole development.
Disclosure of Invention
The present disclosure provides a remote procedure call method, apparatus, server, and storage medium, to at least solve the problem of low efficiency of the whole development due to the tedious and time-consuming debugging process of gRPC service in the related art. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a remote procedure call method, applied to a proxy server, including: receiving a target calling parameter; converting the target calling parameter from the first format to a second format, and sending the target calling parameter in the second format; receiving a calling result, wherein the calling result is a result of calling a target framework service by a remote process; converting the calling result from the second format into the first format; and sending the calling result in the first format.
In one implementation, the call result is specifically a result of calling the target framework service through a remote procedure call framework reflection function.
In one implementation manner, before the step of receiving the target call parameter, the remote procedure call method provided in the embodiment of the present disclosure further includes: receiving address information of a target frame service; sending a target frame service access request according to the address information; target frame definition parameters are received.
In one implementation manner, after the step of receiving the target framework definition parameter, the remote procedure call method provided by the embodiment of the present disclosure further includes: converting the target frame definition parameters from the second format to the first format; the object frame definition parameters in the first format are sent.
According to a second aspect of embodiments of the present disclosure, there is provided a remote procedure call system, including: the system comprises front-end equipment, a proxy server and server-side equipment. The front-end equipment is used for sending the target calling parameter to the proxy server. The proxy server is used for receiving the target calling parameter, converting the target calling parameter from a first format into a second format, and sending the target calling parameter in the second format to the server-side equipment, wherein the first format is a format supported by the front-end equipment, and the second format is a format supported by the server-side equipment. And the server-side equipment is used for receiving the target calling parameters in the second format, calling the target framework service according to the target calling parameters in the second format, and sending a calling result to the proxy server. And the proxy server is also used for receiving the calling result, converting the calling result from the second format into the first format and sending the calling result in the first format to the front-end equipment. The front-end equipment is also used for receiving the calling result in the first format.
In an implementation manner, the server device is specifically configured to call, according to the target call parameter in the second format, a target frame service through a remote procedure call frame reflection function.
In an implementation manner, the front-end device is further configured to send address information of the target framework service to the proxy server before sending the target invocation parameter to the proxy server. The proxy server is further configured to receive the address information, and send a target framework service access request to the server device according to the address information. The server-side equipment is also used for receiving the target frame service access request and sending the target frame definition parameters to the proxy server according to the target frame service access request. The proxy server is further configured to receive the target frame definition parameter.
In an implementation manner, the proxy server is further configured to, after receiving the target frame definition parameters, convert the target frame definition parameters from the second format into the first format, and send the target frame definition parameters in the first format to the front-end device. The front-end device is further configured to receive the object framework definition parameters in the first format.
According to a third aspect of the embodiments of the present disclosure, there is provided a remote procedure call apparatus including: the device comprises a receiving module, a conversion module and a sending module. Wherein the receiving module is configured to execute receiving the target call parameter. A conversion module configured to perform a conversion of the target call parameter received by the receiving module from a first format to a second format. And the sending module is configured to execute the target calling parameter in the second format converted by the sending conversion module. And the receiving module is also configured to execute receiving a calling result, wherein the calling result is a result of the remote procedure calling the target framework service. A conversion module further configured to perform converting the call result from the second format to the first format. And the sending module is also configured to execute the calling result in the first format converted by the sending conversion module.
In one implementation, the call result is specifically a result of calling the target framework service through a remote procedure call framework reflection function.
In an implementation manner, the receiving module is further configured to perform receiving address information of the target framework service before receiving the target call parameter. The sending module is further configured to execute sending the target framework service access request according to the address information received by the receiving module. The receiving module is further configured to perform receiving the target frame definition parameter.
In one implementation, the converting module is further configured to perform converting the target frame definition parameters from the second format to the first format after the receiving module receives the target frame definition parameters. The sending module is further configured to execute the target frame definition parameters in the first format converted by the sending conversion module.
According to a fourth aspect of embodiments of the present disclosure, there is provided a server, including: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the remote procedure call method according to the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of a server, enable the server to perform the remote procedure call method according to the first aspect.
According to a sixth aspect of embodiments of the present disclosure, there is provided a computer program product comprising: one or more instructions which, when executed by a processor of a server, enable the server to perform a remote procedure call method as described in the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
by the scheme, the proxy server can perform format conversion processing on the target calling parameter and send the target calling parameter after the format conversion processing so as to obtain a calling result (namely, a result of calling the target framework service by the remote process), and then convert the calling result from the second format into the first format so as to send the calling result in the first format. After the target calling parameters are subjected to format conversion processing, the proxy server can directly and remotely call the target frame service in a process of remote procedure call and send the calling result to show the calling result to a user so as to realize the debugging of the target frame service, and a special client code does not need to be written, so that the debugging process of the target frame service can be simplified, and the whole development efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating an implementation environment for a remote procedure call method in accordance with an illustrative embodiment;
FIG. 2 is one of the flow diagrams illustrating a remote procedure call method in accordance with an exemplary embodiment;
FIG. 3 illustrates a second flow diagram of a remote procedure call method in accordance with an exemplary embodiment;
FIG. 4 is a third flowchart illustrating a remote procedure call method in accordance with an exemplary embodiment;
FIG. 5 is a fourth flowchart illustrating a remote procedure call method in accordance with an exemplary embodiment;
FIG. 6 is a fifth flowchart illustrating a remote procedure call method in accordance with an exemplary embodiment;
FIG. 7 is a sixth flowchart illustrating a remote procedure call method in accordance with an exemplary embodiment;
FIG. 8 is a block diagram illustrating a remote procedure call device in accordance with an exemplary embodiment;
fig. 9 is a schematic diagram illustrating a configuration of a server according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The embodiment of the disclosure provides a remote procedure call method, a remote procedure call device, a server and a storage medium, wherein after format conversion processing is performed on a target call parameter by a proxy server, a target frame service can be directly called by a remote procedure so as to debug the target frame service, and a special client code does not need to be written, so that the debugging process of the target frame service can be simplified, and the whole development efficiency is improved.
FIG. 1 is an architecture diagram illustrating an implementation environment in which the remote procedure call method described below may be applied, as shown in FIG. 1, according to an example embodiment. The implementation environment comprises a front-end device 01, a proxy server 02 and a server-side device 03. The front-end device 01 and the proxy server 02 can be interconnected and communicate through a network, and the proxy server 02 and the server-side device 03 can be interconnected and communicate through the network.
In the embodiment of the present invention, the front-end device 01 and the proxy server 02, and the proxy server 02 and the server-side device 03 shown in fig. 1 may be wirelessly connected. For more clear illustration of the connection relationship, fig. 1 illustrates the connection relationship between the front-end device 01 and the proxy server 02, and between the proxy server 02 and the server-side device 03 with solid lines.
The front-end device 01 may be a Swagger-ui. Swagger is a canonical and complete framework for generating, describing, invoking, and visualizing RESTful-style Web services. Swagger tightly integrates the methods, parameters, and models in the interface into the server-side code, allowing the API to remain synchronized at all times. Swagger-ui is a visual tool provided by Swagger, and can conveniently view and call related functions on a Web page.
The proxy server 02 may be a proxy server of a Web service, and the proxy server may implement processing (for example, format conversion processing in the embodiment of the present disclosure) and transmission of parameters between the front-end device 01 and the server-end device 03 to implement invocation of an RPC framework (for example, a gRPC) service. The proxy server 02 may be a server, a server cluster composed of a plurality of servers, or a cloud computing service center. Proxy server 02 may include a processor, memory, and network interface, among others.
The service end equipment 03 can be gPRC service end equipment which is a high-performance and universal open-source RPC framework, service definition is firstly formulated when the gPRC is used, one or more methods capable of performing RPC are specified, the service end equipment can realize the methods and is deployed as gPRC service, and therefore a client can realize transparent calling of gPRC service through stub objects provided by the gPRC.
It should be noted that the server device 03 may include a plurality of gRPC server devices.
It should be understood by those skilled in the art that the aforementioned front-end devices, proxy servers, and server devices are merely examples, and that other existing or future front-end devices, proxy servers, and server devices may be included within the scope of the present disclosure, as applicable, and are incorporated by reference herein.
Fig. 2 is a flowchart illustrating a remote procedure call method, which is applied to a proxy server as shown in fig. 2, according to an exemplary embodiment, and includes the following steps S11 to S15.
In step S11, the proxy server receives the target invocation parameter.
In the embodiment of the present disclosure, the proxy server may receive the target invocation parameter sent by the front-end device.
In the embodiment of the present disclosure, a user may input a target invocation parameter in a page of a front-end device, so that the front-end device may send the target invocation parameter to a proxy server (proxy).
In the embodiment of the disclosure, in the debugging process of each target frame service development phase, the proxy server may perform processing (for example, format conversion processing) and transmission of parameters between the front-end device and the server-end device to realize invocation of each target frame service, thereby realizing debugging of each target frame service.
In the embodiment of the present disclosure, the front-end device may send a call request to the proxy server, where the call request includes a target call parameter.
Optionally, in this disclosure, the target framework service may be an RPC framework service.
Optionally, in this embodiment of the present disclosure, the RPC framework service may be a gRPC service.
Optionally, in this embodiment of the present disclosure, the target call parameter may be a method parameter of an RPC framework service.
Optionally, in this embodiment of the present disclosure, the front-end device may be a Swagger-ui device.
It should be noted that, for specific descriptions of Swagger and Swagger-ui, reference may be made to the descriptions in the foregoing embodiments, and details are not described here again.
In step S12, the proxy server converts the target call parameter from the first format to the second format, and transmits the target call parameter in the second format.
In the embodiment of the present disclosure, the proxy server may send the target invocation parameter in the second format to the server device.
In this embodiment of the present disclosure, the first format is a format supported by a front-end device, and the second format is a format supported by a server-end device.
In the embodiment of the present disclosure, the proxy server may perform format conversion processing on the target invocation parameter, so as to convert the target invocation parameter into a format that can be supported by the server device.
Optionally, in this embodiment of the present disclosure, the first format may be a Swagger format, and the second format may be a format that the gRPC service can support (that is, a parameter format required by the gRPC service).
In step S13, the proxy server receives the call result.
In the embodiment of the present disclosure, the call result is a result of a remote procedure calling a target framework service.
In the embodiment of the present disclosure, the proxy server may receive a call result sent by the server device, where the call result is a result of the server device calling the target framework service according to the target call parameter in the second format.
It can be understood that, after receiving the target call parameter in the second format, the server device may execute a code according to the target call parameter to obtain a corresponding execution result (i.e., a call result), and send the execution result to the proxy server, so as to implement the remote procedure call target framework service.
In the embodiment of the present disclosure, the server device may read the RPC framework definition according to the target call parameter, so as to call the RPC framework service/method.
Optionally, in this disclosure, the call result may specifically be a result of calling the target framework service through the remote procedure call framework reflection function.
Optionally, in this embodiment of the present disclosure, the call result may specifically be a result that the server device calls the target framework service through the remote procedure call framework reflection function according to the target call parameter in the second format.
Optionally, in this embodiment of the disclosure, the remote procedure call frame reflection function may be an RPC frame reflection function.
In step S14, the proxy server converts the call result from the second format to the first format.
In step S15, the proxy server transmits the call result in the first format.
In the embodiment of the disclosure, the proxy server sends the calling result in the first format to the front-end device.
Optionally, in this embodiment of the present disclosure, the proxy server may convert the call result from a format that the gRPC service can support into a Swagger format, so that the front-end device may identify and use the call result.
Optionally, in this embodiment of the present disclosure, after receiving the call result, the front-end device may present/display the call result to the user through a Web page (for example, including the gRPC defining and calling the relevant gPRC method).
In the embodiment of the disclosure, swagger and the RPC frame service can be integrated, and a user can more conveniently check and online call the PRC frame method related to RPC frame definition and call through a Web page, so that the debugging process of the RPC frame service is simplified.
The disclosed embodiment provides a remote procedure call method, wherein a proxy server can perform format conversion processing on a target call parameter and send the target call parameter after the format conversion processing to obtain a call result (namely, a result of calling a target framework service by a remote procedure), and then convert the call result from a second format into a first format to send the call result in the first format. The proxy server can directly and remotely call the target frame service after the target call parameter is subjected to format conversion processing, and sends the call result to display the call result to the user so as to debug the target frame service without compiling a special client code, so that the debugging process of the target frame service can be simplified, and the whole development efficiency is improved.
Optionally, in this embodiment of the present disclosure, before the target framework service call is performed, a registration service may be performed first. Specifically, with reference to fig. 2, as shown in fig. 3, before the step S11, the remote procedure call method provided in the embodiment of the present disclosure further includes the following steps S16 to S18.
In step S16, the proxy server receives address information of the target framework service.
In the embodiment of the present disclosure, the proxy server may receive address information of the target framework service sent by the front-end device.
In the embodiment of the disclosure, the user may input address information of a target framework service (e.g., a gPRC service) in a page of the front-end device, so that the front-end device may send the address information to the proxy server.
In the embodiment of the disclosure, before the target framework service is called, a user performs a service registration process through a front-end device, a proxy server and a server device.
In step S17, the proxy server transmits a target framework service access request according to the address information.
In the embodiment of the disclosure, the proxy server may send a target framework service access request to the server device.
In this embodiment of the disclosure, the proxy server may generate a corresponding target frame service access request (e.g., an RPC frame service access request) according to the address information, so as to request the service-side device for definition parameters corresponding to the target frame service.
In step S18, the proxy server receives the target framework definition parameters.
In the embodiment of the disclosure, the proxy server receives the target framework definition parameters sent by the server device.
In this embodiment of the present disclosure, the server device may perform registration service of the target framework service according to the target framework service access request, and send a target framework definition parameter (for example, an RPC framework definition parameter) corresponding to the registration service process to the proxy server.
In the embodiment of the disclosure, a user can input the service address information of the target frame, so that the proxy server obtains the relevant method definition of the target frame from the server device, thereby implementing the service registration process.
Optionally, in this disclosure, the RPC frame definition parameter may be defined by a method of an RPC frame.
Optionally, in this embodiment of the present disclosure, with reference to fig. 3, as shown in fig. 4, after step S18, the remote procedure call method provided in this embodiment of the present disclosure further includes the following step S19 and step S20.
In step S19, the proxy server converts the target frame definition parameters from the second format to the first format.
It should be noted that, for specific descriptions of the first format and the second format, reference may be made to relevant descriptions in the foregoing embodiments, and details are not described here again.
In step S20, the proxy server transmits the object framework definition parameters in the first format.
In the embodiment of the present disclosure, the proxy server may send the target framework definition parameters in the first format to the front-end device.
Optionally, in this embodiment of the present disclosure, the proxy server may convert the RPC framework definition parameter from a format that the gRPC service can support to a Swagger format, so that the front-end device may identify and use the RPC framework definition parameter.
Optionally, in this embodiment of the disclosure, the front-end device may present/display the RPC framework definition parameters to the user in a UI form.
In the embodiment of the disclosure, swagger and RPC framework services can be integrated, and a user can more conveniently view the relevant method definition of the RPC framework through a Web page.
The above embodiment exemplarily describes the remote procedure call method provided by the embodiment of the present disclosure from the perspective of the proxy server, and the remote procedure call method provided by the embodiment of the present disclosure is further exemplarily described below from the perspective of interaction of the proxy server, the front-end device, and the server device with reference to fig. 5 to 7, respectively.
Fig. 5 is a flowchart illustrating a remote procedure call method applied to a proxy server, a front-end device, and a server device as shown in fig. 5, according to an exemplary embodiment, including the following steps S30 to S38.
In step S30, the front-end device transmits the target invocation parameter to the proxy server.
In step S31, the proxy server receives the target invocation parameter sent by the front-end device.
In step S32, the proxy server converts the target invocation parameter from the first format to the second format, and sends the target invocation parameter in the second format to the server device.
In step S33, the server device receives the target call parameter in the second format sent by the proxy server.
In step S34, the server device sends the calling result to the proxy server according to the target calling parameter in the second format.
In step S35, the proxy server receives the call result sent by the server device.
In step S36, the proxy server converts the call result from the second format into the first format.
In step S37, the proxy server transmits the call result in the first format to the front-end device.
In step S38, the front-end device receives the call result in the first format sent by the proxy server.
It should be noted that, for relevant contents related to steps S30 to S38, reference may be made to relevant descriptions in the foregoing embodiments, and details are not repeated here.
Optionally, in this embodiment of the present disclosure, with reference to fig. 5, as shown in fig. 6, before the step S30, the remote procedure call method provided in this embodiment of the present disclosure further includes the following steps S39 to S44.
In step S39, the front-end device transmits address information of the target framework service to the proxy server.
In step S40, the proxy server receives the address information of the target framework service sent by the front-end device.
In step S41, the proxy server sends a target framework service access request to the server device according to the address information.
In step S42, the server device receives the target framework service access request sent by the proxy server.
In step S43, the server device sends the target frame definition parameter to the proxy server according to the target frame service access request.
In step S44, the proxy server receives the target frame definition parameters sent by the server device.
It should be noted that, for the related contents in the above steps S39 to S44, reference may be made to the related description in the above embodiments, and details are not repeated here.
Optionally, in this embodiment of the present disclosure, with reference to fig. 6, as shown in fig. 7, after step S44, the remote procedure call method provided in this embodiment of the present disclosure further includes the following steps S45 to S47.
In step S45, the proxy server converts the target frame definition parameters from the second format to the first format.
In step S46, the proxy server sends the target framework definition parameters in the first format to the front-end device.
In step S47, the front-end device receives the object framework definition parameters in the first format sent by the proxy server.
In the embodiment of the present disclosure, the steps S39 to S47 are a registration service process, and the steps S30 to S38 are a service invocation process.
It should be noted that, for the relevant contents related in the above steps S45 to S47, reference may be made to the relevant description in the above embodiments, and details are not repeated here.
The disclosed embodiment provides a remote procedure call system, including: the system comprises front-end equipment, a proxy server and server-side equipment.
The front-end equipment is used for sending the target calling parameter to the proxy server. The proxy server is used for receiving the target calling parameter, converting the target calling parameter from a first format into a second format, and sending the target calling parameter in the second format to the server-side equipment, wherein the first format is a format supported by the front-end equipment, and the second format is a format supported by the server-side equipment. And the server-side equipment is used for receiving the target calling parameters in the second format, calling the RPC frame service according to the target calling parameters in the second format, and sending a calling result to the proxy server. And the proxy server is also used for receiving the calling result, converting the calling result from the second format into the first format and sending the calling result in the first format to the front-end equipment. The front-end equipment is also used for receiving the calling result in the first format.
Optionally, in this embodiment of the present disclosure, the server device is specifically configured to call, according to the target call parameter in the second format, a target framework service through a remote procedure call framework reflection function.
Optionally, in this embodiment of the present disclosure, the front-end device is further configured to send address information of the target framework service to the proxy server before sending the target call parameter to the proxy server. The proxy server is further configured to receive the address information, and send a target framework service access request to the server device according to the address information. The server-side equipment is also used for receiving the target frame service access request and sending the target frame definition parameters to the proxy server according to the target frame service access request. The proxy server is further configured to receive the target frame definition parameter.
Optionally, in this embodiment of the present disclosure, the proxy server is further configured to convert the target frame definition parameter from the second format to the first format after receiving the target frame definition parameter, and send the target frame definition parameter in the first format to the front-end device. The front-end device is further configured to receive the object framework definition parameters in the first format.
With respect to the remote procedure call system in the above embodiment, the specific manner in which each module/device performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated herein.
In summary, the proxy server may perform format conversion processing on the target call parameter sent by the front-end device, so that the server device may directly call the RPC framework service according to the target call parameter after the format conversion processing to implement debugging of the RPC framework service, without writing a special client code, thereby simplifying a debugging process of the RPC framework service and improving the whole development efficiency.
FIG. 8 is a block diagram illustrating a remote procedure call device in accordance with an exemplary embodiment. Referring to fig. 8, the remote procedure call device 80 includes: a receiving module 81, a converting module 82 and a sending module 83.
Wherein, the receiving module 81 is configured to execute the receiving target call parameter. A conversion module 82 configured to perform a conversion of the target call parameter received by the receiving module 81 from the first format to the second format. And a sending module 83 configured to execute the target call parameter in the second format converted by the sending conversion module 82. The receiving module 81 is further configured to perform receiving a call result, which is a result of the remote procedure calling the target framework service. The conversion module 82 is further configured to perform converting the call result from the second format to the first format. The sending module 83 is further configured to execute the calling result in the first format converted by the sending conversion module 82.
Optionally, in this disclosure, the call result may specifically be a result of calling the target framework service through the remote procedure call framework reflection function.
Optionally, in this embodiment of the present disclosure, the receiving module 81 is further configured to receive, before receiving the target call parameter, address information of the target framework service sent by the front-end device. The sending module 83 is further configured to send the target framework service access request according to the address information received by the receiving module 81. The receiving module 81 is further configured to perform receiving the target frame definition parameter.
Optionally, in this embodiment of the present disclosure, the converting module 82 is further configured to perform, after the receiving module 81 receives the target frame definition parameter, converting the target frame definition parameter from the second format to the first format. The sending module 83 is further configured to execute the target frame definition parameters of the first format converted by the sending conversion module 82.
With regard to the remote procedure call device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
In summary, after the format conversion processing is performed on the target call parameter, the remote procedure call device may directly call the target framework service in the remote procedure, and send the call result to show the call result to the user, so as to implement the debugging of the target framework service, without writing a dedicated client code, thereby simplifying the debugging process of the target framework service, and improving the efficiency of the whole development.
In addition, when the remote procedure call device provided in the foregoing embodiment implements the functions thereof, the above-mentioned division of each function module is merely used as an example, and in practical applications, the above-mentioned function distribution may be completed by different function modules according to needs, that is, the internal structure of the remote procedure call device is divided into different function modules, so as to complete all or part of the above-mentioned functions.
Fig. 9 is a schematic diagram illustrating a structure of a server, which is a proxy server, according to an example embodiment. As shown in fig. 9, the server 130 includes, but is not limited to: at least one processor 131, memory 132, a user interface 133, and at least one network interface 134. The various components in the server 130 are coupled together by a bus system 135.
It should be noted that the structure of the server shown in fig. 9 is not limited to the server, and the server may include more or less components than those shown in fig. 9, or may combine some components, or may be arranged in different components, as will be understood by those skilled in the art.
In the disclosed embodiment, at least one network interface 134 is configured to receive a target call parameter; and sending the target calling parameter in the second format; receiving a calling result, wherein the calling result is a result of calling the target framework service by the remote process; and sending the calling result in the first format.
At least one processor 131 for converting the target call parameter from a first format to a second format; and converting the call result from the second format to the first format.
In summary, after the proxy server performs format conversion processing on the target call parameter, the proxy server may directly and remotely call the target framework service, and send the call result to show the call result to the user, so as to implement debugging of the target framework service, without writing a dedicated client code, thereby simplifying the debugging process of the target framework service, and improving the efficiency of the whole development.
It will be appreciated that the bus system 135 is used to enable communications among the components. The bus system 135 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 135 in fig. 9.
The user interface 133 may include, among other things, a display, a keyboard or a pointing device (e.g., a mouse, a trackball, a touch pad, or a touch screen).
It will be appreciated that the memory 132 in embodiments of the present disclosure may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), dynamic Random Access Memory (DRAM), synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), double Data Rate Synchronous Dynamic random access memory (ddr Data Rate SDRAM, ddr SDRAM), enhanced Synchronous SDRAM (ESDRAM), synchlronous SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 132 described in connection with the disclosed embodiments is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 132 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 1321 and application programs 1322.
The operating system 1321 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 1322, including various application programs such as a media player, a browser, and the like, are used for implementing various application services. Programs that implement methods of embodiments of the present disclosure can be embodied in the application programs 1322.
In the disclosed embodiment, the server 130 may further include a computer program stored on the memory 132 and executable on the processor 131, and when the computer program is executed by the processor 131, the computer program implements the steps of the method provided by the disclosed embodiment.
The method disclosed by the above-mentioned embodiment of the present disclosure may be applied to the processor 131, or implemented by the processor 131. The processor 131 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 131. The Processor 131 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present disclosure may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present disclosure may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules may reside in ram, flash memory, rom, prom, or eprom, registers, among other computer-readable storage media known in the art. The computer readable storage medium is located in the memory 132, and the processor 131 reads the information in the memory 132 and completes the steps of the above method in combination with the hardware. In particular, the computer readable storage medium has stored thereon a computer program which, when executed by the processor 131, implements the steps of the method embodiments as provided by the embodiments of the present disclosure.
It is to be understood that the embodiments described in connection with the embodiments disclosed herein may be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more ASICs, DSPs, digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), FPGAs, general purpose processors, controllers, micro-controllers, microprocessors, other electronic units designed to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, an embodiment of the present disclosure further provides a server, including a processor 131 and a memory 132 for storing executable instructions of the processor 131, as shown in fig. 9, where the processor 131 is configured to execute the instructions, so as to implement each process of the foregoing method embodiment, and achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
In an exemplary embodiment, the disclosed embodiment also provides a storage medium comprising instructions, such as the memory 132 comprising instructions, which when executed by the processor 131 of the server 130, enable the server 130 to perform the above-mentioned method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a read only memory ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
In an exemplary embodiment, the disclosed embodiments also provide a computer program product comprising one or more instructions executable by the processor 101 of the server 130 to perform the above-described method.
It should be noted that when the instructions in the storage medium or one or more instructions in the computer program product are executed by the processor 101, the processes of the method embodiments are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A remote procedure call method applied to a proxy server is characterized by comprising the following steps:
receiving a target calling parameter sent by front-end equipment in a debugging process of a target framework service development stage; the target framework service is a remote procedure call service framework gPRC service; the front-end equipment responds to the input operation of a user on a network Web page of Swagger-ui and sends the target calling parameters;
converting the target calling parameter from a first format to a second format, and sending the target calling parameter in the second format to server-side equipment; the first format comprises a Swagger format, and the second format comprises a format supported by the gRPC service;
receiving a calling result sent by the server-side equipment, wherein the calling result is a result of calling the target framework service by a remote process;
converting the call result from the second format to the first format;
sending the calling result in the first format to the front-end equipment; and the calling result in the first format is used for displaying the calling result on the Web page by the front-end equipment.
2. The remote procedure call method according to claim 1, wherein the call result is in particular a result of calling the target framework service by a remote procedure call framework reflection function.
3. The remote procedure call method according to claim 1 or 2, wherein prior to the step of receiving the target call parameter, the remote procedure call method further comprises:
receiving address information of the target framework service;
sending a target frame service access request according to the address information;
target frame definition parameters are received.
4. The remote procedure call method according to claim 3, wherein after the step of receiving the target framework definition parameters, the remote procedure call method further comprises:
converting the object frame definition parameters from the second format to the first format;
and sending the target frame definition parameters of the first format.
5. A remote procedure call system, comprising: the system comprises front-end equipment, a proxy server and server-side equipment;
the front-end equipment is used for responding to the input operation of a user on a Swagger-ui Web page to send target calling parameters to the proxy server in the debugging process of a target frame service development stage; the target framework service is a gRPC service;
the proxy server is configured to receive the target invocation parameter, convert the target invocation parameter from a first format to a second format, and send the target invocation parameter in the second format to the server device, where the first format is a format supported by the front-end device, and the second format is a format supported by the server device; the first format comprises a Swagger format, and the second format comprises a format supported by the gRPC service;
the server-side equipment is used for receiving the target calling parameters in the second format, calling the target framework service according to the target calling parameters in the second format, and sending a calling result to the proxy server;
the proxy server is further configured to receive the call result, convert the call result from the second format into the first format, and send the call result in the first format to the front-end device;
the front-end device is further configured to receive the call result in the first format, and display the call result on the Web page based on the first format.
6. The remote procedure call system according to claim 5, wherein the server device is specifically configured to call the target framework service through a remote procedure call framework reflection function according to the target call parameter in the second format.
7. The remote procedure call system according to claim 5 or 6, wherein the front-end device is further configured to send address information of the target framework service to the proxy server before sending the target call parameter to the proxy server;
the proxy server is also used for receiving the address information and sending a target frame service access request to the server side equipment according to the address information;
the server-side equipment is also used for receiving the target frame service access request and sending target frame definition parameters to the proxy server according to the target frame service access request;
the proxy server is also used for receiving the target frame definition parameters.
8. The remote procedure call system according to claim 7, wherein the proxy server is further configured to, after receiving the object framework definition parameters, convert the object framework definition parameters from the second format to the first format and send the object framework definition parameters in the first format to the front-end device;
the front-end device is further configured to receive the target frame definition parameters in the first format.
9. A remote procedure call device, comprising: the device comprises a receiving module, a conversion module and a sending module;
the receiving module is configured to receive a target calling parameter sent by front-end equipment in a debugging process of a target framework service development stage; the target framework service is a gPRC service; the front-end equipment responds to the input operation of a user on a network Web page of Swagger-ui and sends the target calling parameter;
the conversion module is configured to convert the target call parameter received by the receiving module from a first format to a second format; the first format comprises a Swagger format, and the second format comprises a format supported by the gRPC service;
the sending module is configured to execute sending of the target calling parameter in the second format converted by the conversion module to a server device;
the receiving module is further configured to execute receiving of a calling result sent by the server device, where the calling result is a result of a remote process calling the target framework service;
the conversion module is further configured to perform a conversion of the call result from the second format to the first format;
the sending module is further configured to execute sending, to the front-end device, the call result in the first format converted by the conversion module; and the calling result in the first format is used for displaying the calling result on the Web page by the front-end equipment.
10. The remote procedure call device according to claim 9, wherein the call result is in particular a result of calling the target framework service by a remote procedure call framework reflection function.
11. The remote procedure call device according to claim 9 or 10, wherein the receiving module is further configured to perform receiving address information of the target framework service before receiving the target call parameter;
the sending module is further configured to execute sending a target framework service access request according to the address information received by the receiving module;
the receiving module is further configured to perform receiving the target frame definition parameters.
12. The remote procedure call device according to claim 11, wherein the conversion module is further configured to perform converting the target framework definition parameters from the second format to the first format after the receiving module receives the target framework definition parameters;
the sending module is further configured to execute sending the target framework definition parameters of the first format converted by the conversion module.
13. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the remote procedure call method of any of claims 1 to 4.
14. A storage medium, wherein instructions in the storage medium, when executed by a processor of a server, enable the server to perform the remote procedure call method of any of claims 1 to 4.
CN201911285194.3A 2019-12-13 2019-12-13 Remote procedure calling method, device, server and storage medium Active CN111010438B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911285194.3A CN111010438B (en) 2019-12-13 2019-12-13 Remote procedure calling method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911285194.3A CN111010438B (en) 2019-12-13 2019-12-13 Remote procedure calling method, device, server and storage medium

Publications (2)

Publication Number Publication Date
CN111010438A CN111010438A (en) 2020-04-14
CN111010438B true CN111010438B (en) 2022-11-11

Family

ID=70114613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911285194.3A Active CN111010438B (en) 2019-12-13 2019-12-13 Remote procedure calling method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111010438B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113784237B (en) * 2020-06-09 2022-08-02 中国电信股份有限公司 Method, device, network equipment and computer medium for reporting collected data
CN112256448A (en) * 2020-09-30 2021-01-22 北京达佳互联信息技术有限公司 Remote control method, device, electronic equipment, system and storage medium
CN113126839B (en) * 2021-03-16 2023-06-23 北京达佳互联信息技术有限公司 Object playing method and device, electronic equipment and storage medium
CN113190362B (en) * 2021-04-22 2022-12-27 北京达佳互联信息技术有限公司 Service calling method and device, computer equipment and storage medium
CN114257635B (en) * 2021-11-19 2023-05-23 建信金融科技有限责任公司 Service calling method, system, computer device, storage medium and program product

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106651586A (en) * 2016-12-30 2017-05-10 上海富聪金融信息服务有限公司 Multi-distributor oriented financial product marketing open service platform
CN107872484A (en) * 2016-09-27 2018-04-03 中国电信股份有限公司 REST API fast registration methods, devices and systems
CN107967143A (en) * 2017-12-14 2018-04-27 泰康保险集团股份有限公司 Obtain the methods, devices and systems of the update instruction information of client application source code
CN108289060A (en) * 2017-01-09 2018-07-17 腾讯科技(深圳)有限公司 A kind of data processing method and device based on RPC service
WO2019100819A1 (en) * 2017-11-24 2019-05-31 中兴通讯股份有限公司 Method and device for implementing remote procedure call
CN110196733A (en) * 2019-06-06 2019-09-03 深圳市伊欧乐科技有限公司 A kind of default API document structure tree method, apparatus, equipment and storage medium
WO2019198054A1 (en) * 2018-04-14 2019-10-17 Telefonaktiebolaget Lm Ericsson (Publ) Service-based 5g core authentication endpoints
CN110489323A (en) * 2019-07-09 2019-11-22 北京字节跳动网络技术有限公司 Visual RPC API adjustment method, device, medium and equipment

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030149741A1 (en) * 2002-02-05 2003-08-07 Krooss Kevin William Methods for implementing remote operating system procedure calls
US7340745B2 (en) * 2002-06-25 2008-03-04 Sun Microsystems, Inc. Systems and methods for mapping API calls
CN102262560B (en) * 2010-05-27 2016-12-28 阿里巴巴集团控股有限公司 The call method of a kind of remote service, Apparatus and system
CN105450589B (en) * 2014-07-31 2018-12-14 阿里巴巴集团控股有限公司 Remote invocation method and system
CN105721512B (en) * 2016-05-06 2018-11-02 深圳大数点科技有限公司 A method of using RPC system
US10866788B2 (en) * 2018-04-30 2020-12-15 Boomi, Inc. System and method for automated generation of integration elements modeling process flow for an integration process with a swagger API
US11188529B2 (en) * 2018-06-04 2021-11-30 International Business Machines Corporation Autonomous generation of a graph query language interface on top of an application programming interface
CN108984316A (en) * 2018-06-15 2018-12-11 广州视源电子科技股份有限公司 It is a kind of for the method, apparatus of distributed data processing, electronic equipment and computer storage medium
CN109274773B (en) * 2018-11-14 2021-01-26 四川长虹电器股份有限公司 Method, device and system for realizing remote service calling
CN109614253A (en) * 2018-12-12 2019-04-12 郑州云海信息技术有限公司 A kind of method and device for realizing remote procedure call
CN110187983A (en) * 2019-05-24 2019-08-30 北京奇艺世纪科技有限公司 A kind of remote invocation method, device and electronic equipment
CN110287040B (en) * 2019-06-26 2021-06-18 苏宁消费金融有限公司 Implementation system for remotely calling service framework

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107872484A (en) * 2016-09-27 2018-04-03 中国电信股份有限公司 REST API fast registration methods, devices and systems
CN106651586A (en) * 2016-12-30 2017-05-10 上海富聪金融信息服务有限公司 Multi-distributor oriented financial product marketing open service platform
CN108289060A (en) * 2017-01-09 2018-07-17 腾讯科技(深圳)有限公司 A kind of data processing method and device based on RPC service
WO2019100819A1 (en) * 2017-11-24 2019-05-31 中兴通讯股份有限公司 Method and device for implementing remote procedure call
CN107967143A (en) * 2017-12-14 2018-04-27 泰康保险集团股份有限公司 Obtain the methods, devices and systems of the update instruction information of client application source code
WO2019198054A1 (en) * 2018-04-14 2019-10-17 Telefonaktiebolaget Lm Ericsson (Publ) Service-based 5g core authentication endpoints
CN110196733A (en) * 2019-06-06 2019-09-03 深圳市伊欧乐科技有限公司 A kind of default API document structure tree method, apparatus, equipment and storage medium
CN110489323A (en) * 2019-07-09 2019-11-22 北京字节跳动网络技术有限公司 Visual RPC API adjustment method, device, medium and equipment

Also Published As

Publication number Publication date
CN111010438A (en) 2020-04-14

Similar Documents

Publication Publication Date Title
CN111010438B (en) Remote procedure calling method, device, server and storage medium
JP2019032883A (en) Method, apparatus, server and system for implementing web application
US11182276B2 (en) Development-time awareness of a production dependency injection environment
CN109101228B (en) Application program execution method and device
TW201712564A (en) Method and apparatus for facilitating a software update process over a network
CN106815055B (en) Method and system for dynamic layout of mobile application
RU2580079C2 (en) Application activation framework
CN110895481A (en) Rendering method, device and system of desktop application
CN111666199B (en) Debugging method executed on intelligent terminal and software debugger
CN110928545B (en) Component distribution method, development method and device of single-page application and storage medium
CN107239265B (en) Binding method and device of Java function and C function
CN113821352A (en) Remote service calling method and device
US8806434B2 (en) Dynamically configuring an integrated development environment
US10530709B2 (en) Container contract for data dependencies
US9606775B2 (en) Developing rich internet application
CN109240673B (en) Method and system for dynamically loading and updating view based on react-native
WO2018121652A1 (en) Method and device for connecting wireless access point through application in user equipment
CN113779122B (en) Method and device for exporting data
CN115080109A (en) Multi-cloud-end environment joint debugging method, device, system and equipment based on hybrid development
CN112199112A (en) Method, device, terminal equipment and storage medium for automatically configuring simulation service
CN108170557B (en) Method and apparatus for outputting information
CN108459890B (en) Interface display method and device for application
JP2014229114A (en) OSGi SERVICE REGISTRATION DEVICE, REGISTRATION METHOD AND REGISTRATION PROGRAM
CN112988170B (en) Application display method and device
CN112688863B (en) Gateway data processing method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant