CN113556392B - Communication system, method, apparatus and storage medium - Google Patents

Communication system, method, apparatus and storage medium Download PDF

Info

Publication number
CN113556392B
CN113556392B CN202110811696.6A CN202110811696A CN113556392B CN 113556392 B CN113556392 B CN 113556392B CN 202110811696 A CN202110811696 A CN 202110811696A CN 113556392 B CN113556392 B CN 113556392B
Authority
CN
China
Prior art keywords
target
gateway
protocol
call
remote
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
CN202110811696.6A
Other languages
Chinese (zh)
Other versions
CN113556392A (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.)
Guangzhou Baiguoyuan Information Technology Co Ltd
Original Assignee
Guangzhou Baiguoyuan 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 Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202110811696.6A priority Critical patent/CN113556392B/en
Publication of CN113556392A publication Critical patent/CN113556392A/en
Application granted granted Critical
Publication of CN113556392B publication Critical patent/CN113556392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/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
    • 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
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Abstract

The embodiment of the invention discloses a communication system, a communication method, communication equipment and a storage medium. The system comprises a calling party and a remote calling gateway, wherein the remote calling gateway comprises a plurality of protocol adapters, the calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, the calling request comprises a target communication protocol corresponding to the target called party, the remote calling gateway is used for determining a corresponding first target protocol adapter according to the target communication protocol contained in the calling request, converting the calling request into a target calling request matched with the target communication protocol through the first target protocol adapter, and sending the target calling request to the target called party, and the target calling request comprises request content in the calling request. The technical scheme provided by the embodiment of the invention can reduce the cross-protocol access cost of the calling party.

Description

Communication system, method, apparatus and storage medium
Technical Field
Embodiments of the present invention relate to the field of computer technologies, and in particular, to a communication system, a method, an apparatus, and a storage medium.
Background
The remote invocation (Remote Procedure Call, RPC) gateway generally refers to a proxy service between the caller and the callee, responsible for forwarding the caller's request to the appropriate downstream service and wrapping the response to the downstream service reply to the caller.
The communication protocol can be regarded as the language that the calling party and the called party communicate, and the traditional RPC gateway generally forwards the call request and the call response in a request transparent transmission mode, so that the calling party needs to construct a request packet according to the protocol specified or allowed by the called party, otherwise, the called party cannot correctly analyze the request. Thus, the caller needs to fully understand the details of the communication protocol of the callee to construct the correct request packet. As the service system becomes larger and more complex, the number of called parties becomes larger and larger, the downstream protocols are generally not universal and are various, and the inter-protocol access threshold is greatly improved.
Disclosure of Invention
The embodiment of the invention provides a communication system, a method, equipment and a storage medium, which can optimize the existing communication scheme based on a remote call gateway.
In a first aspect, an embodiment of the present invention provides a communication system, where the communication system includes a caller and a remote call gateway, where the remote call gateway includes a plurality of protocol adapters, where:
the calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party;
the remote call gateway is used for determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request.
In a second aspect, an embodiment of the present invention provides a communication method, which is performed by a communication system provided by the embodiment of the present invention, where the method includes:
a calling party sends a calling request aiming at a target called party to a remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party;
determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request through a remote call gateway, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory, a processor, and a computer program stored on the memory and capable of running on the processor, where the processor implements a communication method as provided in the embodiment of the present invention or implements a function provided in a system as provided in the embodiment of the present invention when the processor executes the computer program.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a communication method as provided by the embodiment of the present invention, or implements a function provided in a system as provided by the embodiment of the present invention.
The communication scheme provided by the embodiment of the invention comprises a calling party and a remote calling gateway, wherein the remote calling gateway comprises a plurality of protocol adapters, the calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, the calling request comprises a target communication protocol corresponding to the target called party, the remote calling gateway is used for determining a corresponding first target protocol adapter according to the target communication protocol contained in the calling request, converting the calling request into a target calling request matched with the target communication protocol through the first target protocol adapter, and sending the target calling request to the target called party. By adopting the technical scheme, the plurality of protocol adapters are arranged in the remote calling gateway, when the target called party needs to call, the calling party does not need to perceive the implementation details of the target communication protocol corresponding to the target called party, the calling request is sent to the remote calling gateway based on the preset communication protocol, the remote calling gateway is informed of the target communication protocol which needs to be converted in the calling request, the remote calling gateway can convert the calling request into the target calling request matched with the target communication protocol by utilizing the protocol adapter which is contained in the remote calling gateway and sends the target calling request to the target called party, so that the target called party can successfully identify the content of the calling request sent by the calling party, and the cross-protocol access cost of the calling party can be greatly reduced for the condition that the communication protocol types supported by the called party are more, namely the development cost of the calling party is reduced.
Drawings
Fig. 1 is a scene structure diagram of an application scene applicable to a communication system according to an embodiment of the present invention;
fig. 2 is a block diagram of a communication system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a communication process in the prior art;
FIG. 4 is a schematic diagram of a communication process according to an embodiment of the present invention;
fig. 5 is a block diagram of still another communication system according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of another communication process according to an embodiment of the present invention;
fig. 7 is a schematic flow chart of a communication method according to an embodiment of the present invention;
fig. 8 is a block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings. Furthermore, embodiments of the invention and features of the embodiments may be combined with each other without conflict.
Fig. 1 is a scene structure diagram of an application scene applicable to a communication system according to an embodiment of the present invention. Specifically, referring to fig. 1, the application scenario may include a caller 101, a remote invocation gateway 102, and a callee 103, where the caller 101 and the remote invocation gateway 102 may be regarded as a communication system. A remotely invoked procedure may be considered as a node (caller) requesting a service provided by another node (callee), and in particular, a remote invocation may be understood as a computer communication protocol that allows a program running on one computer to invoke a subroutine of another address space (typically a computer of an open network) just as if the local program were invoked, typically without the need to additionally program this interaction. In general, the caller 101 and the callee 103 may be understood as software-implemented modules of an application layer, and the remote invocation gateway 102 may be understood as software-implemented modules of a gateway layer.
In the prior art, a calling party and a called party need to communicate based on a communication protocol supported or allowed by the called party, the communication protocol can be regarded as a language that the calling party and the called party communicate, and generally comprises two parts, namely a Header and a Payload (also called data or Payload, etc.), the Payload generally comprises valid data content, such as request content or response content, etc., the request content or the response content is encoded by adopting corresponding protocol rules, the Header generally comprises information such as identification of the called party, and the specific contained information can be different according to different communication protocols. The conventional RPC gateway generally forwards the request and the response body in a transparent manner, that is, the call request and the call response are not modified in the forwarding process, so that the caller needs to fully understand the details of the communication protocol of the callee to construct a correct request packet. As service systems become larger and more complex, the number of called parties becomes larger and larger, downstream protocols are generally not universal and are of various types, such as the popular istio service grid in the industry, and the called parties are required to both adopt the hypertext transfer protocol (HyperText Transfer Protocol, HTTP) 2.0 protocol, so that many called parties need to be modified to use, and the cross-protocol access threshold is high.
In the embodiment of the invention, the remote call gateway is improved, a plurality of protocol adapters are arranged in the remote call gateway, a unified preset communication protocol is adopted for communication between the calling party and the remote call gateway, the remote call gateway converts the call request of the preset communication protocol into the target call request meeting the requirements of the called party by using the protocol adapter, so that the called party can accurately analyze the call request, and the calling party does not need to perceive the implementation details of the target communication protocol corresponding to the target called party, thereby reducing the cross-protocol access cost of the calling party.
Fig. 2 is a block diagram of a communication system according to an embodiment of the present invention, where the communication system may be suitable for an application scenario of cross-protocol remote invocation, and may also be referred to as a remote invocation communication system or a remote invocation system. The system may be implemented in software and/or hardware and may be generally integrated in one or more computer devices. As shown in fig. 2, the system includes a caller 201 and a remote invocation gateway 202, wherein the remote invocation gateway 202 includes a plurality of protocol adapters 2021 (the specific number is not limited, and only 2 are shown as an example). The calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party. The remote call gateway is used for determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request.
The communication protocol involved in the embodiment of the present invention may be specifically an application layer communication protocol. For example, the preset communication protocol may be set according to actual requirements, and a communication protocol of a general application layer may be selected generally, so as to reduce development cost of a calling party, for example, may be HTTP protocol or hypertext transfer security protocol (Hyper Text Transfer Protocol over SecureSocket Layer, HTTPs), and the like. The specific communication protocols supported by the plurality of protocol adapters included in the remote invocation gateway may be determined according to the service actually required to be invoked by the caller, that is, according to the communication protocols supported or allowed by the callee. For example, if the existing communication protocols supported by the multiple invokers include HTTP2.0 protocol, gRPC protocol, thread protocol, and Redis protocol, etc., protocol adapters respectively supporting HTTP2.0 protocol conversion, gRPC protocol conversion, thread protocol conversion, and Redis protocol conversion may be correspondingly provided, where conversion may be understood as converting a call request of a preset communication protocol into a target call request matched with the corresponding communication protocol (i.e., a target call request meeting a specification or requirement of the communication protocol corresponding to the protocol adapter). For example, for a protocol adapter of the thread protocol, a call request of a preset communication protocol may be converted into a target call request matching the thread protocol.
For example, when a calling party needs to call a certain service (corresponding to a target called party), a target communication protocol corresponding to the target called party may be determined first, for example, a name or a code number of the target communication protocol is determined, a call request for the target called party is constructed by adopting a preset communication protocol, and in the process of constructing the call request, the target communication protocol may be added to a protocol header or data of the call request, and may generally be added to an extension field or a reserved field in the protocol header. For example, the target communication protocol is a thread protocol, and an identification (such as a name or code number) of the thread protocol may be added to an extension field in the protocol header. In the process of constructing the call request, the request content is stored in the data, taking the preset communication protocol as an HTTP protocol as an example, and the request body (payload) can be stored in the HTTP body. The caller may then send a call request for the target callee to the remote call gateway based on the preset communication protocol.
For example, after receiving the call request, the remote call gateway may obtain the identifier of the target communication protocol from the corresponding location according to the contract between the remote call gateway and the caller, so as to determine that the protocol adapter corresponding to the target communication protocol is the first target protocol adapter, for example, determine that the protocol adapter of the thread protocol is the first target protocol adapter. The remote invocation gateway may then invoke the first target protocol adapter to translate the invocation request into a target invocation request that matches the target communication protocol.
By way of example, a protocol Adapter is understood to mean an encapsulated software functional module with protocol conversion functions, which may also be referred to as a protocol Adapter. The protocol adapter may include a packetizer (may be referred to as an Encoder), and the remote call gateway may invoke the packetizer in the first target protocol adapter to parse the call request based on the preset communication protocol to obtain a request content, generate, according to the request content (to be noted, other related information may be required, which is generally related to a specific requirement of the target communication protocol, and not limited in detail), a protocol header and data that meet the requirement of the target communication protocol, and further assemble a complete request packet according to the protocol header and the data, as a target call request.
For example, the remote call gateway may parse related information of the target called party, such as address information or service name, from the call request, and then send the converted target call request to the target called party. After receiving the target call request, the target called party can analyze the target call request according to the target communication protocol to obtain the request content, and then respond in a targeted manner.
The communication system provided by the embodiment of the invention comprises a calling party and a remote calling gateway, wherein the remote calling gateway comprises a plurality of protocol adapters, the calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, the calling request comprises a target communication protocol corresponding to the target called party, the remote calling gateway is used for determining a corresponding first target protocol adapter according to the target communication protocol contained in the calling request, converting the calling request into a target calling request matched with the target communication protocol through the first target protocol adapter, and sending the target calling request to the target called party. By adopting the technical scheme, the plurality of protocol adapters are arranged in the remote calling gateway, when the target called party needs to call, the calling party does not need to perceive the implementation details of the target communication protocol corresponding to the target called party, does not need to process the packing logic of the bottom complex protocol, sends the calling request to the remote calling gateway based on the preset communication protocol, informs the remote calling gateway of the target communication protocol needing to be converted in the calling request, and can convert the calling request into the target calling request matched with the target communication protocol by utilizing the protocol adapter corresponding to the target communication protocol contained in the remote calling gateway and send the target calling request to the target called party, so that the target called party can successfully identify the content of the calling request sent by the calling party, and can greatly reduce the cross-protocol access cost of the calling party, namely the development cost of the calling party for the situation that the communication protocols supported by the called party are more. In addition, the method also basically does not need to be modified for the called party, so that the development cost of call chain opening is obviously reduced as a whole.
In some embodiments, the remote call gateway is further configured to receive a call response returned by the called party, determine a second target protocol adapter corresponding to the call response, convert the call response into a target call response matched with the preset communication protocol through the second target protocol adapter, and send the target call response to the calling party, where the target call response includes response content in the call response. The remote call gateway can convert the call response conforming to the target communication protocol into the target call response matched with the preset communication protocol by using the protocol adapter, so that the caller can successfully analyze the call response to obtain the response content.
For example, the target communication protocols corresponding to different called parties may be different, so the second target protocol adapter and the first target protocol adapter may be the same protocol adapter or different protocol adapters, which is not limited in particular. The protocol adapter may include a decapsulator (which may be called a Decoder), the remote call gateway may call the decapsulator in the second target protocol adapter, parse the call response based on the target communication protocol corresponding to the second target protocol adapter to obtain response content, generate a protocol header and data according to the response content (which may need other related information and is generally related to a specific requirement of a preset communication protocol, and specifically do not limit the specific requirement), further assemble a complete response packet according to the protocol header and the data, and use the complete response packet as a target call response, and send the converted target call response to the caller by the remote call gateway, after receiving the target call response, the caller may parse the target call response according to the preset communication protocol to obtain the response content, thereby performing corresponding processing with pertinence.
Fig. 3 is a schematic diagram of a communication process in the prior art, as shown in fig. 3, a caller needs to use a target communication protocol to construct a call request, a conventional remote call gateway transparently transmits the call request and a call response returned by a called party and based on the target communication protocol, and the caller analyzes the call response based on the target communication protocol, so that the caller must know the details of the target communication protocol.
Fig. 4 is a schematic diagram of a communication process according to an embodiment of the present invention, as shown in fig. 4, a caller only needs to use a preset communication protocol to inform a remote call gateway of data in a call request and a target communication protocol to be converted, and the remote call gateway can automatically assemble a target request that can be identified by a callee through a call protocol adapter. And then, after the called party responds to the call request, the remote call gateway can call the corresponding protocol adapter to analyze the call response and automatically assemble a target response which can be identified by the calling party. As can be seen from comparing fig. 3 and fig. 4, the caller can complete calling the service of the callee without knowing the details of the communication protocol of the callee, so that the cross-protocol access cost of the caller can be greatly reduced.
In some embodiments, the remote invocation gateway, when determining the second target protocol adapter to which the invocation response corresponds, is implemented by: and the remote call gateway identifies the serial number contained in the call response, determines the protocol adapter corresponding to the sent target call request containing the serial number as a second target protocol adapter, and converts the call response into a target call response matched with the preset communication protocol through the second target protocol adapter. The advantage of this is that the second target protocol adapter can be determined quickly and accurately.
When there are called parties of multiple communication protocols, the remote call gateway may receive call responses of the various different communication protocols, and when a call response is received, a matching protocol adapter needs to be found for conversion. For some communication protocols, such as the HTTP2.0 protocol and the gRPC protocol described above, for example, a unique serial number needs to be carried when a request is sent, and a called party also carries the same serial number when responding to the request, so that by means of identifying the serial number, it is possible to find out which protocol adapter previously performs call request conversion, and thus, the protocol adapter can successfully parse the call response and convert the call response into a corresponding target call response.
In some embodiments, the remote invocation gateway is further configured to: and when the sequence number contained in the call response is identified to be failed, determining a candidate protocol adapter, sequentially attempting to analyze the call response through the candidate protocol adapter, and if the analysis is successful, determining the current candidate protocol adapter as a second target protocol adapter. Optionally, the remote call gateway may be further configured to determine a candidate protocol adapter when identifying that the sequence number included in the call response fails, sequentially attempt to convert the call response into a target call response matched with the preset communication protocol through the candidate protocol adapter, and if the attempt is successful, determine the current candidate protocol adapter as a second target protocol adapter, and send the target call response that has been successfully converted to the caller. The advantage of this is that for some communication protocols that do not support sequence numbers, the conversion can be successfully performed.
Illustratively, when identifying that the sequence number included in the call response fails, it is indicated that the communication protocol corresponding to the current call response may not support sequence numbers, such as the thread protocol and the dis protocol described above. At this time, the protocol adapter corresponding to the communication protocol that does not support the serial number may be determined as a candidate protocol adapter, the call response is parsed one by one through each candidate protocol adapter, if the parsing fails, the next candidate protocol adapter may be continued to be used for parsing the call response, if the current candidate protocol adapter matches the communication protocol used for the call response, the parsing may be successful, the attempt is successful, and the candidate protocol adapter that can be successfully parsed at present is determined as the second target protocol adapter.
For a service corresponding to a called party, a plurality of instances generally exist, the instance list information of the service can be managed by a name service system, a calling party obtains the instance list information by querying the name service system, and a calling request can be sent to one of the instances. The name service system may be understood as a service system that provides functions such as service registration and service discovery, and after a service (also may be understood as a process) corresponding to a called party is online, the service system generally needs to register to a corresponding name service system, that is, to register a service name. Along with the increasing size and complexity of service systems, multiple sets of name service systems may exist in the same technical system at the same time, and the implementation modes of different name service systems generally have differences, such as different programming languages, architectures, functions, interaction logic and the like, so that when a scene that needs to cross the name service systems occurs, a caller needs to know the access implementation of the name service of the called party, and the threshold is higher. The embodiment of the invention can be further optimized for the scene.
In some embodiments, the remote invocation gateway may further include a plurality of name service adapters therein; the call request also comprises a target name service system and a target service name, and the target service name is matched with the target called party. The remote call gateway is realized by the following modes when sending the target call request to the target called party: the remote calling gateway determines a corresponding target name service adapter according to the target name service system, searches a target service instance list corresponding to the target service name from the target name service system through the target name service adapter, selects a target node from the target service instance list based on a preset selection strategy as a target called party to be sent, and sends the target calling request to the target node. The advantage of this arrangement is that the remote invocation gateway enables access to a variety of name service systems, greatly simplifying the access cost of the cross-name service system invocation, i.e. further reducing the development cost of the caller.
When sending a call request to a remote call gateway, the call party includes a name service system (called a target name service system) to be called currently and a service name (called a target service name) to be called, and the remote call gateway automatically selects a corresponding target name service adapter according to the target name service system, wherein the target name service adapter can be understood as a client corresponding to the target name service system, can be realized by a software development kit (Software Development Kit, SDK), can access the corresponding target name service system through the target name service adapter, and further searches a target service instance list corresponding to the target service name. The target service instance list may generally include address information of each node corresponding to the target service name, such as an internet protocol (Internet Protocol, IP) address and a port, and may further include other information such as version, and may further include a communication protocol corresponding to the target service name, that is, a communication protocol corresponding to the called party. And the remote calling gateway selects a target node from the target service instance list based on a preset selection strategy as a target called party to be sent, and sends a target calling request to the target node. The preset selection policy may be set according to actual requirements, for example, load balancing, fault node rejection, and the like may be considered.
Fig. 5 is a block diagram of still another communication system according to an embodiment of the present invention, as shown in fig. 5, where the system includes a caller 501 and a remote call gateway 502, where the remote call gateway 502 includes a plurality of name service adapters 5021 (specific number is not limited, only 2 are shown as an example in the figure) and a plurality of protocol adapters 5022 (specific number is not limited, only 2 are shown as an example in the figure).
In some embodiments, the remote invocation gateway includes a local remote invocation gateway and a remote invocation gateway, the local remote invocation gateway and the caller being integrated in the same physical device. The advantage of this arrangement is that it provides better disaster recovery performance by combining the local gateway with the remote gateway. The remote calling gateway can be implemented in a cluster manner, for example, can be called a disaster recovery gateway cluster. Optionally, in order to improve usability, the caller may be configured to send a call request for the target callee to the local remote call gateway and the remote call gateway simultaneously based on a preset communication protocol, so that the local remote call gateway and the remote call gateway may send two identical target call requests to the callee together, so as to improve a probability that the callee successfully receives the target call request.
In some embodiments, the caller is specifically configured to: judging whether the local remote call gateway is normal or not, if so, sending a call request aiming at the target called party to the local remote call gateway based on a preset communication protocol, otherwise, sending a call request aiming at the target called party to the remote call gateway based on the preset communication protocol. The advantage of this arrangement is that when the local remote calling gateway is normal, the local remote calling gateway is preferentially adopted to forward the calling request, so that the calling delay introduced by the gateway can be obviously reduced, the forwarding efficiency is ensured, and when the local remote calling gateway cannot work normally due to upgrading or failure, the calling party request is degraded to the remote calling gateway, and the availability of the system is effectively improved.
Fig. 6 is a schematic diagram of another communication process provided by the embodiment of the present invention, as shown in fig. 6, in which a calling party and a local remote call gateway are deployed in a machine a (or called a first computer device), a called party is deployed in a machine B (or called a second computer device), the communication system further includes a disaster recovery gateway cluster, and the calling party preferentially calls the local remote call gateway in the same machine, and in the case that the local remote call gateway is unavailable, the remote call gateway node in the disaster recovery gateway cluster is called again, so as to effectively improve the availability of the system.
In some embodiments, the caller includes a front-end module of the scripting language, so that the low-cost call of the scripting class language and the front-end module to the back-end service can be realized, the reconstruction man-hour of cross-language or cross-frame call is obviously reduced, the development cost of the caller in the application scene is reduced, and the system upgrading efficiency can be improved.
Fig. 7 is a flow chart of a communication method according to an embodiment of the present invention, where the method may be performed by a communication system according to an embodiment of the present invention, and the method includes:
step 701, a calling party sends a calling request aiming at a target called party to a remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party.
Step 702, determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request through a remote call gateway, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request.
According to the communication method provided by the embodiment of the invention, the plurality of protocol adapters are arranged in the remote calling gateway, when the target called party needs to be called, the calling party does not need to perceive the implementation details of the target communication protocol corresponding to the target called party, the calling request is sent to the remote calling gateway based on the preset communication protocol, the remote calling gateway is informed of the target communication protocol which needs to be converted in the calling request, the remote calling gateway can convert the calling request into the target calling request matched with the target communication protocol by utilizing the protocol adapter which is contained in the remote calling gateway and sends the target calling request to the target called party, so that the target called party can successfully identify the content of the calling request sent by the calling party, and the cross-protocol access cost of the calling party can be greatly reduced for the condition that the communication protocols supported by the called party are more in variety, namely the development cost of the calling party is reduced.
The embodiment of the invention provides computer equipment, and the communication device provided by the embodiment of the invention can be integrated in the computer equipment. Fig. 8 is a block diagram of a computer device according to an embodiment of the present invention. The computer device 800 comprises a memory 801, a processor 802 and a computer program stored in the memory 801 and executable on the processor 802, wherein the processor 802 implements the communication method provided by the embodiment of the present invention or implements the functions provided in the system provided by the embodiment of the present invention when executing the computer program.
The embodiments of the present invention also provide a storage medium containing computer-executable instructions which, when executed by a computer processor, are used to perform the communication method provided by the embodiments of the present invention, or to implement the functions provided in the system provided by the embodiments of the present invention.
The communication method, the device and the storage medium provided in the above embodiments can implement the functions provided in the communication system provided in any embodiment of the present invention, and can achieve beneficial effects. Technical details not described in detail in the above embodiments may be found in the communication system provided by any of the embodiments of the present invention.
Note that the above is only a preferred embodiment of the present invention. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. A communication system comprising a caller and a remote invocation gateway, the remote invocation gateway comprising a plurality of protocol adapters, wherein:
the calling party is used for sending a calling request aiming at a target called party to the remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party;
the remote call gateway is used for determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request;
the calling party carries a unique serial number when sending the call request, and the called party also carries the same serial number when responding to the target call request.
2. The system of claim 1, wherein the remote invocation gateway is further configured to receive an invocation response returned by the callee, determine a second target protocol adapter corresponding to the invocation response, convert the invocation response into a target invocation response matching the preset communication protocol by the second target protocol adapter, and send the target invocation response to the caller, where the target invocation response includes response content in the invocation response.
3. The system of claim 2, wherein the remote invocation gateway, upon determining the second target protocol adapter to which the invocation response corresponds, is implemented by:
and the remote call gateway identifies the serial number contained in the call response, determines the protocol adapter corresponding to the sent target call request containing the serial number as a second target protocol adapter, and converts the call response into a target call response matched with the preset communication protocol through the second target protocol adapter.
4. The system of claim 3, wherein the remote invocation gateway is further configured to:
and when the sequence number contained in the call response is identified to be failed, determining a candidate protocol adapter, sequentially attempting to analyze the call response through the candidate protocol adapter, and if the analysis is successful, determining the current candidate protocol adapter as a second target protocol adapter.
5. The system of claim 1, wherein the remote invocation gateway includes a plurality of name service adapters; the call request also comprises a target name service system and a target service name, wherein the target service name is matched with the target called party;
the remote call gateway is realized by the following modes when sending the target call request to the target called party:
the remote calling gateway determines a corresponding target name service adapter according to the target name service system, searches a target service instance list corresponding to the target service name from the target name service system through the target name service adapter, selects a target node from the target service instance list based on a preset selection strategy as a target called party to be sent, and sends the target calling request to the target node.
6. The system of claim 1, wherein the remote invocation gateway comprises a local remote invocation gateway and a remote invocation gateway, the local remote invocation gateway and the caller being integrated in the same physical device.
7. The system of claim 6, wherein the caller is specifically configured to:
judging whether the local remote call gateway is normal or not, if so, sending a call request aiming at the target called party to the local remote call gateway based on a preset communication protocol, otherwise, sending a call request aiming at the target called party to the remote call gateway based on the preset communication protocol.
8. The system of any of claims 1-7, wherein the caller comprises a front-end module of a scripting language.
9. A method of communication, performed by the system of any of claims 1-8, comprising:
a calling party sends a calling request aiming at a target called party to a remote calling gateway based on a preset communication protocol, wherein the calling request comprises a target communication protocol corresponding to the target called party;
determining a corresponding first target protocol adapter according to a target communication protocol contained in the call request through a remote call gateway, converting the call request into a target call request matched with the target communication protocol through the first target protocol adapter, and sending the target call request to the target called party, wherein the target call request contains request content in the call request.
10. A communication device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to claim 9 or the functions provided in the system according to any of claims 1-8 when executing the computer program.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to claim 9 or the functionality provided in the system according to any of claims 1-8.
CN202110811696.6A 2021-07-19 2021-07-19 Communication system, method, apparatus and storage medium Active CN113556392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110811696.6A CN113556392B (en) 2021-07-19 2021-07-19 Communication system, method, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110811696.6A CN113556392B (en) 2021-07-19 2021-07-19 Communication system, method, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN113556392A CN113556392A (en) 2021-10-26
CN113556392B true CN113556392B (en) 2023-11-14

Family

ID=78103387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110811696.6A Active CN113556392B (en) 2021-07-19 2021-07-19 Communication system, method, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN113556392B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100789755B1 (en) * 2006-07-12 2008-01-02 한국전자통신연구원 Communication apparatus for using common platform adapted multi-protocol in wireless personal area network and method thereof
CN105656947A (en) * 2016-03-30 2016-06-08 深圳市金证科技股份有限公司 Method, device and system for interaction between transaction middleware and third-party system
CN109120684A (en) * 2018-08-01 2019-01-01 武汉索雅信息技术有限公司 Informatization management method, device, ESB bus platform and storage medium
CN110557357A (en) * 2018-05-31 2019-12-10 华为技术有限公司 remote procedure call protocol self-adaption method, related device and server
CN111294317A (en) * 2018-12-07 2020-06-16 北京新媒传信科技有限公司 Method and device for RCS to support multi-protocol access and electronic equipment
CN112235308A (en) * 2020-10-16 2021-01-15 广州纳诺科技股份有限公司 Data transmission method and system for industrial equipment with different communication protocols

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7127517B2 (en) * 2000-12-27 2006-10-24 International Business Machines Corporation Protocol adapter framework for integrating non-IIOP applications into an object server container

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100789755B1 (en) * 2006-07-12 2008-01-02 한국전자통신연구원 Communication apparatus for using common platform adapted multi-protocol in wireless personal area network and method thereof
CN105656947A (en) * 2016-03-30 2016-06-08 深圳市金证科技股份有限公司 Method, device and system for interaction between transaction middleware and third-party system
CN110557357A (en) * 2018-05-31 2019-12-10 华为技术有限公司 remote procedure call protocol self-adaption method, related device and server
CN109120684A (en) * 2018-08-01 2019-01-01 武汉索雅信息技术有限公司 Informatization management method, device, ESB bus platform and storage medium
CN111294317A (en) * 2018-12-07 2020-06-16 北京新媒传信科技有限公司 Method and device for RCS to support multi-protocol access and electronic equipment
CN112235308A (en) * 2020-10-16 2021-01-15 广州纳诺科技股份有限公司 Data transmission method and system for industrial equipment with different communication protocols

Also Published As

Publication number Publication date
CN113556392A (en) 2021-10-26

Similar Documents

Publication Publication Date Title
CN106856434B (en) Method and device for converting access request
CN102571947B (en) Processing method proxy method, device and system
US5848234A (en) Object procedure messaging facility
US8402132B2 (en) Method, system and device for device capabilities exchange
CN101848235B (en) Real-time multimedia data P2P transmission scheme for supporting NAT traversal
CN105791315A (en) Method and system for accelerating UDP protocol
EP1892929A1 (en) A method, an apparatus and a system for message transmission
JP5085781B2 (en) Method and system for characterizing heterogeneous communication nodes
CN113301166A (en) Service calling method and device, storage medium and electronic device
US20170048359A1 (en) Method and device for transmitting a message in a vehicle
US20230239326A1 (en) Microservice-Based Service Mesh System and Service Oriented Architecture Governance Method
CN111885004B (en) Application layer message transmission method and communication interface platform
CN112422681A (en) Cross-platform distributed communication calling method and device
CN113556392B (en) Communication system, method, apparatus and storage medium
CN116633775B (en) Container communication method and system of multi-container network interface
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN111064588B (en) Message processing method, system, device and storage medium
CN113765867A (en) Data transmission method, device, equipment and storage medium
WO2017000583A1 (en) Terminal access method and corresponding terminal, base station and main core network
CN110995829A (en) Instance calling method and device and computer storage medium
CN114327823A (en) Method, system, terminal and storage medium for calling resources of micro-service cluster
CN112653716B (en) Service binding method and device
CN112689013A (en) System, method and device for service discovery
CN112788116A (en) Message forwarding method and device
CN104363275A (en) Method, device and system for processing data by using agencies

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