CN113556392A - Communication system, method, device and storage medium - Google Patents

Communication system, method, device and storage medium Download PDF

Info

Publication number
CN113556392A
CN113556392A CN202110811696.6A CN202110811696A CN113556392A CN 113556392 A CN113556392 A CN 113556392A CN 202110811696 A CN202110811696 A CN 202110811696A CN 113556392 A CN113556392 A CN 113556392A
Authority
CN
China
Prior art keywords
target
calling
gateway
protocol
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.)
Granted
Application number
CN202110811696.6A
Other languages
Chinese (zh)
Other versions
CN113556392B (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 Network Technology Co Ltd
Original Assignee
Guangzhou Baiguoyuan Network 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 Network Technology Co Ltd filed Critical Guangzhou Baiguoyuan Network 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

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/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

Landscapes

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

Abstract

The embodiment of the invention discloses a communication system, a method, 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, the calling request is converted into a target calling request matched with the target communication protocol through the first target protocol adapter, and the target calling request is sent 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, device 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, a device, and a storage medium.
Background
A Remote Procedure Call (RPC) gateway generally refers to a proxy service between a caller and a callee, and is responsible for forwarding a request of the caller to an appropriate downstream service and transmitting a response packet replied by the downstream service to the caller.
The communication protocol can be regarded as a language for communication between a calling party and a called party, and a traditional RPC gateway generally forwards a calling request and a calling response in a request transparent transmission mode, so that the calling party needs to construct a request packet according to a protocol specified or allowed by the called party, otherwise, the called party cannot correctly analyze the request. Thus, the caller is required to fully understand the details of the callee's communication protocol to build the correct request packet. With the increasing size and complexity of service systems and the increasing number of called parties, downstream protocols are generally not universal and have a large variety, and the cross-protocol access threshold is greatly improved.
Disclosure of Invention
The embodiment of the invention provides a communication system, a communication method, communication 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 invocation gateway, where the remote invocation 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 calling gateway is used for determining a corresponding first target protocol adapter according to a 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, wherein the target calling request contains request content in the calling request.
In a second aspect, an embodiment of the present invention provides a communication method, which is executed by a communication system provided in an embodiment of the present invention, and the method includes:
sending a calling request aiming at a target called party to a remote calling gateway through a calling party 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 executable on the processor, where the processor implements a communication method according to an embodiment of the present invention when executing the computer program, or implements functions provided in a system according to an embodiment of the present invention.
In a fourth aspect, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a communication method as provided by the embodiment of the present invention, or implements functions provided in a system as provided by the embodiment of the present invention.
According to the communication scheme provided by the embodiment of the invention, the communication system comprises a calling party and a remote calling gateway, 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, wherein 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, a plurality of protocol adapters are arranged in the remote calling gateway, when a calling party needs to call a target called party, the calling party does not need to sense the implementation details of a target communication protocol corresponding to the target called party, sends a calling request to the remote calling gateway based on a preset communication protocol and informs the remote calling gateway of the target communication protocol needing 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 adapters corresponding to the target communication protocol and 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 calling request content sent by the calling party, and the cross-protocol access cost of the calling party can be greatly reduced under the condition that the called party supports more types of communication protocols, namely, the development cost of the calling party is reduced.
Drawings
Fig. 1 is a scene architecture diagram of an application scenario to which a communication system according to an embodiment of the present invention is applied;
fig. 2 is a block diagram of a communication system according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating 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 a communication system according to another embodiment of the present invention;
fig. 6 is a schematic diagram of another communication process provided by the embodiment of the present invention;
fig. 7 is a flowchart illustrating 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 present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
Fig. 1 is a scene architecture diagram of an application scene to which a communication system according to an embodiment of the present invention is applied. Specifically, referring to fig. 1, the application scenario may include an invoker 101, a remote invocation gateway 102 and a callee 103, and the invoker 101 and the remote invocation gateway 102 may be regarded as a communication system. A remote invocation may be considered a process in which a node (caller) requests 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 subprogram of another address space (typically a computer of an open network), as well as invoking a local program, generally 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 a software-implemented module of a gateway layer.
In the prior art, a caller and a callee need to communicate based on a communication protocol supported or allowed by the callee, where the communication protocol may be regarded as a language for the caller and the callee to communicate, and generally includes two parts, namely, a protocol Header (Header) and a Payload (Payload), where the Payload generally includes valid data content, such as request content or response content, and is encoded by using a corresponding protocol specification, and the protocol Header generally includes information, such as a callee identifier, and the specifically included information may be different depending on the communication protocol. The traditional RPC gateway usually forwards the request and the response body in a transparent transmission manner, that is, the call request and the call response are not modified in the forwarding process, so that the calling party needs to completely understand the details of the communication protocol of the called party to construct a correct request packet. With the increasingly large and complex business systems, the number of the called parties is increasing, the downstream protocols are generally not universal and are diversified, for example, an idio service grid popular in the industry requires that both the calling party and the called party adopt a HyperText Transfer Protocol (HTTP) 2.0 Protocol, many calling parties need to be modified to use the Protocol, and the cross-Protocol access threshold is high.
In the embodiment of the invention, the remote calling gateway is improved, a plurality of protocol adapters are arranged in the remote calling gateway, a calling party and the remote calling gateway adopt a unified preset communication protocol for communication, the remote calling gateway converts the calling request of the preset communication protocol into the target calling request which meets the requirement of the called party by using the protocol adapters, so that the called party can correctly analyze the calling request, and the calling party does not need to sense 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 applied to 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 by software and/or hardware, and may generally be integrated in one or more computer devices. As shown in fig. 2, the system includes a caller 201 and a remote invocation gateway 202, where the remote invocation gateway 202 includes a plurality of protocol adapters 2021 (the specific number is not limited, and only 2 are shown in the figure 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 calling gateway is used for determining a corresponding first target protocol adapter according to a 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, wherein the target calling request contains request content in the calling request.
The communication protocol involved in the embodiment of the present invention may specifically be a communication protocol of an application layer. For example, the preset communication Protocol may be set according to actual requirements, and a communication Protocol of a relatively general application Layer may be generally selected, so as to reduce development cost of a calling party, for example, the preset communication Protocol may be an HTTP Protocol or a hypertext Transfer Protocol over secure session Layer (HTTPs) or the like. The communication protocol specifically supported and converted by the plurality of protocol adapters included in the remote invocation gateway can be determined according to the service actually required to be invoked by the caller, that is, according to the communication protocol supported or allowed by the callee. For example, the communication protocols supported by the existing multiple callers include HTTP2.0 protocol, gRPC protocol, swift protocol, Redis protocol, and the like, and the protocol adapters respectively supporting HTTP2.0 protocol conversion, gRPC protocol conversion, swift protocol conversion, and Redis protocol conversion may be correspondingly arranged, where the conversion may be understood as converting the call request of the preset communication protocol into the target call request matched with the corresponding communication protocol (i.e. the target call request meeting the specification or requirement of the communication protocol corresponding to the protocol adapter). For example, for a protocol adapter of the Thrift protocol, a call request of a preset communication protocol may be converted into a target call request matching the Thrift protocol.
For example, when a caller needs to call a certain service (corresponding to a target callee), a target communication protocol corresponding to the target callee may be determined first, for example, an identifier such as a name or a code number of the target communication protocol is determined, a preset communication protocol is used to construct a call request for the target callee, 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 the Thrift protocol, and an identification (such as a name or code number) of the Thrift 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, and taking the preset communication protocol as the HTTP protocol as an example, the request body (payload) may be stored in the HTTP body. Subsequently, the caller may send a call request for the target callee to the remote call gateway based on the preset communication protocol.
For example, after receiving the invocation request, the remote invocation gateway may obtain the identifier of the target communication protocol from the corresponding location according to the agreement with the invocation party, and further determine that the protocol adapter corresponding to the target communication protocol is the first target protocol adapter, for example, determine the protocol adapter of the thread protocol as the first target protocol adapter. The remote invocation gateway may then invoke the first target protocol adapter to convert the invocation request into a target invocation request matching the target communication protocol.
For example, a protocol Adapter may be understood as a packaged software functional module with a protocol conversion function, which may also be referred to as a protocol Adapter. The protocol adapter may include a packetizer (may be referred to as an Encoder), the remote invocation gateway may invoke the packetizer in the first target protocol adapter, parse the invocation request based on a preset communication protocol to obtain request content, generate a protocol header and data meeting the requirements of the target communication protocol according to the request content (it may also need other related information, which is generally related to the specific requirements of the target communication protocol, and is not specifically limited), and then assemble a complete request packet according to the protocol header and the data to serve as the target invocation request.
For example, the remote invocation gateway may parse the invocation request to obtain relevant information of the target callee, such as address information or service name, and send the translated target invocation request to the target callee. After receiving the target calling request, the target called party can analyze the target calling request according to the target communication protocol to obtain the request content, and then responses 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, the calling request is converted into a target calling request matched with the target communication protocol through the first target protocol adapter, and the target calling request is sent to the target called party. By adopting the technical scheme, a plurality of protocol adapters are arranged in the remote calling gateway, when a calling party needs to call a target called party, the calling party does not need to sense the implementation details of a target communication protocol corresponding to the target called party and does not need to process the package logic of a bottom complex protocol, a calling request is sent to the remote calling gateway based on a preset communication protocol, and the calling request is informed of the target communication protocol needing to be converted by the remote calling gateway, the remote calling gateway can convert the calling request into the target calling request matched with the target communication protocol by utilizing the protocol adapters corresponding to the target communication protocol and contained in the remote calling gateway, and the target calling request is sent to the target called party, so that the target called party can successfully identify the calling request content sent by the calling party, and the cross-protocol access cost of the calling party can be greatly reduced under the condition that the types of the communication protocols supported by the called party are more, namely, the development cost of the calling party is reduced. Moreover, the called party is not required to be transformed basically, so that the development cost of calling through is reduced remarkably on the whole.
In some embodiments, 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 matched with the preset communication protocol through the second target protocol adapter, and send the target invocation response to the callee, where the target invocation response includes response content in the invocation response. The remote calling gateway has the advantages that the remote calling gateway can convert the calling response conforming to the target communication protocol into the target calling response matched with the preset communication protocol by using the protocol adapter, so that a calling party can successfully analyze the response content.
For example, target communication protocols corresponding to different called parties may be different, and therefore, 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 specifically. The protocol adapter may include a depacketizer (may be called a Decoder), the remote calling gateway may call the depacketizer 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, generating a protocol header and data meeting the requirements of the preset communication protocol according to the response content (it needs to be noted that other relevant information may be needed, and is generally related to the specific requirements of the preset communication protocol, and is not limited specifically), then, according to the protocol head and data, a complete response packet is assembled to be used as a target calling response, the remote calling gateway sends the converted target calling response to the calling party, and after receiving the target calling response, the target call response can be analyzed according to a preset communication protocol to obtain response content, and then corresponding processing is performed in a targeted manner.
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 traditional remote call gateway transparently transmits the call request and a call response based on the target communication protocol returned by the callee, and the caller analyzes the call response based on the target communication protocol, so that the caller needs to know 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 notify a remote call gateway of data in a call request and a target communication protocol that needs to be converted, and the remote call gateway can automatically assemble a target request that can be recognized by the callee by calling a protocol adapter. And then, after the called party responds to the calling request, the remote calling gateway can call the corresponding protocol adapter to analyze the calling response and automatically assemble a target response which can be identified by the calling party. Comparing fig. 3 and fig. 4, it can be known that the caller can complete the call of the service of the callee without knowing the details of the communication protocol of the callee, and the cross-protocol access cost of the caller can be greatly reduced.
In some embodiments, the remote invocation gateway, upon determining the second target protocol adapter corresponding to the invocation response, implements the following: and the remote calling gateway identifies the sequence number contained in the calling response, determines a protocol adapter corresponding to the sent target calling request containing the sequence number as a second target protocol adapter, and converts the calling response into a target calling response matched with the preset communication protocol through the second target protocol adapter. This has the advantage that the second target protocol adapter can be determined quickly and accurately.
When the called party with multiple communication protocols exists, the remote calling gateway may receive calling responses of different communication protocols, and when a certain calling response is received, a matched protocol adapter needs to be found for conversion. For example, for some communication protocols, such as the aforementioned HTTP2.0 protocol and gRPC protocol, a unique sequence number needs to be carried when sending a request, and a called party also needs to carry the same sequence number when responding to the request, so that it is possible to find which protocol adapter that previously performed the conversion of the call request is by identifying the sequence number, so that 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 serial number contained in the call response is identified to be failed, determining candidate protocol adapters, sequentially trying to analyze the call response through the candidate protocol adapters, and if the analysis is successful, determining the current candidate protocol adapter as a second target protocol adapter. Optionally, the remote invocation gateway may also be configured to, when the identification of the sequence number included in the invocation response fails, determine a candidate protocol adapter, sequentially attempt to convert the invocation response into a target invocation response matched with the preset communication protocol through the candidate protocol adapter, if the attempt is successful, determine the current candidate protocol adapter as a second target protocol adapter, and send the target invocation response that has been successfully converted to the caller. This has the advantage that the conversion can be successful for some communication protocols that do not support sequence numbers.
For example, when the identification of 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 the sequence number, such as the above-mentioned thread protocol and Redis protocol. At this time, the protocol adapters corresponding to the communication protocols that do not support the serial number may be determined as candidate protocol adapters, the call responses may be analyzed one by one through each candidate protocol adapter, if the analysis fails, the next candidate protocol adapter may be continuously used to analyze the call responses, if the current candidate protocol adapter matches the communication protocol used by the call responses, the analysis may be successful, the attempt is successful, and the candidate protocol adapter that can be successfully analyzed at present is determined as the second target protocol adapter.
For the service corresponding to the called party, a plurality of instances generally exist, the name service system can manage instance list information of the service, and the calling party acquires the instance list information by inquiring the name service system and can send a calling request to one of the instances. The name service system may be understood as a service system providing 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 called party generally needs to register to the corresponding name service system, that is, register a service name. As business systems become more and more huge and complex, a plurality of sets of name service systems may exist simultaneously in the same technical system, and the implementation manners of different name service systems generally differ, for example, the adopted programming languages, architectures, functions, interaction logics and the like are different, when a scene needing a cross-name service system appears, a calling party 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 aiming at the scene.
In some embodiments, the remote invocation gateway may also include a plurality of name service adapters; the calling 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. When the remote calling gateway sends the target calling request to the target called party, the remote calling gateway is realized by the following modes: 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 as a target called party to be sent based on a preset selection strategy, and sends the target calling request to the target node. The remote calling gateway has the advantages that the remote calling gateway realizes the access of various name service systems, greatly simplifies the access cost of calling the cross-name service system, and further reduces the development cost of a calling party.
Illustratively, when a caller sends a call request to a remote call gateway, the call request includes a name service system (called a target name service system) that needs to be called currently and a service name (called a target service name) that needs to be called, the remote call gateway automatically selects a corresponding target name service adapter according to the target name service system, the target name service adapter can be understood as a client corresponding to the target name service system and can be implemented by a Software Development Kit (SDK), the target name service adapter can access the corresponding target name service system, and then a target service instance list corresponding to the target service name is searched. The target service instance list may generally include address information of each node corresponding to the target service name, such as an Internet Protocol (IP) address and a port, may also include other information such as a version, and may also 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 as a target called party to be sent based on a preset selection strategy 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, faulty node elimination, and the like may be considered.
Fig. 5 is a block diagram of a further communication system according to an embodiment of the present invention, and as shown in fig. 5, the system includes a caller 501 and a remote invocation gateway 502, where the remote invocation gateway 502 includes a plurality of name service adapters 5021 (a specific number is not limited, and only 2 are shown in the figure as an example) and a plurality of protocol adapters 5022 (a specific number is not limited, and only 2 are shown in the figure as an example).
In some embodiments, the remote invocation gateway comprises a local remote invocation gateway and a remote invocation gateway, and the local remote invocation gateway and the invoker are integrated in the same entity device. The advantage of this arrangement is that better disaster tolerance can be provided by combining the local gateway and the remote gateway. The remote invocation gateway at the remote end may be implemented in a cluster manner, and may be called a disaster recovery gateway cluster, for example. Optionally, to improve the availability, 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 the probability that the callee successfully receives the target call request.
In some embodiments, the caller is specifically configured to: and judging whether the local remote calling gateway is normal, if so, sending a calling request aiming at the target called party to the local remote calling gateway based on a preset communication protocol, otherwise, sending a calling request aiming at the target called party to the remote calling gateway based on the preset communication protocol. The method has the advantages that under the condition that the local remote calling gateway is normal, the local remote calling gateway is preferentially adopted to forward the calling request, the calling time delay introduced by the gateway can be obviously reduced, the forwarding efficiency is ensured, when the local remote calling gateway cannot normally work due to upgrading or faults and the like, the calling party requests to be degraded to the remote calling gateway, and the system availability is effectively improved.
Fig. 6 is a schematic diagram of another communication process provided in an embodiment of the present invention, as shown in fig. 6, a calling party and a local remote calling gateway are deployed in a machine a (or called a first computer device), and a called party is deployed in a machine B (or called a second computer device), where the communication system further includes a disaster tolerance gateway cluster, the calling party preferentially calls the local remote calling gateway in the same machine, and when the local remote calling gateway is unavailable, calls a remote calling gateway node in the disaster tolerance gateway cluster, so as to effectively improve system availability.
In some embodiments, the caller includes a front-end module of the script language, so that the low-cost calling of the back-end service by the script language and the front-end module becomes a reality, the modification time of cross-language or cross-frame calling is significantly reduced, the development cost of the caller in the application scene is reduced, and the system upgrading efficiency can also be improved.
Fig. 7 is a flowchart illustrating a communication method according to an embodiment of the present invention, where the method may be executed by a communication system according to an embodiment of the present invention, and the method includes:
step 701, sending a calling request aiming at a target called party to a remote calling gateway through a calling party 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.
The communication method provided by the embodiment of the invention is characterized in that a plurality of protocol adapters are arranged in a remote calling gateway, when a calling party needs to call a target called party, the calling party does not need to sense the implementation details of a target communication protocol corresponding to the target called party, sends a calling request to the remote calling gateway based on a preset communication protocol and informs the remote calling gateway of the target communication protocol needing 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 adapters corresponding to the target communication protocol and 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 calling request content sent by the calling party, and the cross-protocol access cost of the calling party can be greatly reduced under the condition that the called party supports more types of communication protocols, namely, the development cost of the calling party is reduced.
The embodiment of the invention provides computer equipment, wherein 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 on the memory 801 and operable on the processor 802, wherein the processor 802 implements the communication method provided by the embodiment of the present invention when executing the computer program, or implements the functions provided in the system provided by the embodiment of the present invention.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which are used to execute a communication method provided by an embodiment of the present invention or implement functions provided in a system provided by an embodiment of the present invention when executed by a computer processor.
The communication method, the communication device, and the storage medium provided in the embodiments described above can implement the functions provided in the communication system provided in any embodiment of the present invention, and can implement advantageous effects. Technical details that have not been elaborated in the above embodiments may be referred to 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, although the present invention has been described in more detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the claims.

Claims (11)

1. A communication system, comprising a caller and a remote invocation gateway, wherein the remote invocation gateway comprises 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 calling gateway is used for determining a corresponding first target protocol adapter according to a 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, wherein the target calling request contains request content in the calling request.
2. The system according to 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 matched with the preset communication protocol through the second target protocol adapter, and send the target invocation response to the callee, where the target invocation response includes response content in the invocation response.
3. The system of claim 2, wherein the remote invocation gateway, in determining the second target protocol adapter to which the invocation response corresponds, implements the following:
and the remote calling gateway identifies the sequence number contained in the calling response, determines a protocol adapter corresponding to the sent target calling request containing the sequence number as a second target protocol adapter, and converts the calling response into a target calling 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 serial number contained in the call response is identified to be failed, determining candidate protocol adapters, sequentially trying to analyze the call response through the candidate protocol adapters, 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 calling 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;
when the remote calling gateway sends the target calling request to the target called party, the remote calling gateway is realized by the following modes:
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 as a target called party to be sent based on a preset selection strategy, 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, and wherein the local remote invocation gateway and the invoker are integrated into the same physical device.
7. The system of claim 6, wherein the caller is specifically configured to:
and judging whether the local remote calling gateway is normal, if so, sending a calling request aiming at the target called party to the local remote calling gateway based on a preset communication protocol, otherwise, sending a calling request aiming at the target called party to the remote calling gateway based on the preset communication protocol.
8. The system of claims 1-7, wherein the caller comprises a front end module of a scripting language.
9. A communication method, performed by the system of any one of claims 1-8, comprising:
sending a calling request aiming at a target called party to a remote calling gateway through a calling party 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 computer 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 implements the functions provided in the system according to any of the claims 1-8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of claim 9 or to carry out the functions of the system of any one 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 true CN113556392A (en) 2021-10-26
CN113556392B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880139A (en) * 2022-04-26 2022-08-09 阿里巴巴(中国)有限公司 Task scheduling method, device and system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083214A1 (en) * 2000-12-27 2002-06-27 International Business Machines Corporation Protocol adapter framework for integrating non-IIOP applications into an object server container
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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020083214A1 (en) * 2000-12-27 2002-06-27 International Business Machines Corporation Protocol adapter framework for integrating non-IIOP applications into an object server container
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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114880139A (en) * 2022-04-26 2022-08-09 阿里巴巴(中国)有限公司 Task scheduling method, device and system

Also Published As

Publication number Publication date
CN113556392B (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN113301166B (en) Service calling method and device, storage medium and electronic device
US8402132B2 (en) Method, system and device for device capabilities exchange
CN102571947B (en) Processing method proxy method, device and system
CN101364976B (en) Method and apparatus for establishing communication channel and data communication system
CN105791315A (en) Method and system for accelerating UDP protocol
US8527661B1 (en) Gateway for connecting clients and servers utilizing remote direct memory access controls to separate data path from control path
CN112181681B (en) Remote calling method, device, computer equipment and storage medium
US9350606B2 (en) System and method for assigning server to terminal and efficiently delivering messages to the terminal
CN115567521A (en) Communication method and device between local area network and public cloud, and computing equipment
CN112968965A (en) Metadata service method, server and storage medium for NFV network node
CN112217845B (en) Data transmission method based on Netconf protocol and related equipment
CN113556392A (en) Communication system, method, device and storage medium
CN104065688B (en) A kind of method and device for calling underlying services
CN111064588B (en) Message processing method, system, device and storage medium
CN112653716B (en) Service binding method and device
CN113918326B (en) Method and device for processing request
CN115766829A (en) Communication processing method and communication node
CN114301993B (en) Data transmission method, device, terminal equipment and storage medium
US20220350748A1 (en) Consistent hashing for communication devices
US20230188625A1 (en) Service request handling
CN114327823A (en) Method, system, terminal and storage medium for calling resources of micro-service cluster
CN104363275A (en) Method, device and system for processing data by using agencies
CN112689013A (en) System, method and device for service discovery
CN113709264A (en) Address acquisition method, equipment, system and storage medium
CN113454959A (en) Control plane network function, user plane network function, and packet processing method using the same

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