CN108449312A - A kind of method for converting protocol, device, system and gateway - Google Patents

A kind of method for converting protocol, device, system and gateway Download PDF

Info

Publication number
CN108449312A
CN108449312A CN201810096192.9A CN201810096192A CN108449312A CN 108449312 A CN108449312 A CN 108449312A CN 201810096192 A CN201810096192 A CN 201810096192A CN 108449312 A CN108449312 A CN 108449312A
Authority
CN
China
Prior art keywords
protocol
service
agreement
service request
micro services
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
CN201810096192.9A
Other languages
Chinese (zh)
Other versions
CN108449312B (en
Inventor
孙琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201810096192.9A priority Critical patent/CN108449312B/en
Publication of CN108449312A publication Critical patent/CN108449312A/en
Application granted granted Critical
Publication of CN108449312B publication Critical patent/CN108449312B/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
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

An embodiment of the present invention provides a kind of method for converting protocol, device, system and gateway, it is applied to protocol conversion gateway, wherein this method includes:The first Protocol service request that service requester is sent by the first agreement is received, the first Protocol service request is the service request for supporting the first agreement, and the first agreement is the agreement that service requester is supported;First Protocol service request is respectively converted into multiple second protocol service requests, wherein multiple second protocol service requests are respectively to support the service request of different second protocols, and different second protocols are the agreement that multiple micro services of service provider are supported respectively;Multiple second protocol service requests are respectively sent to multiple micro services of service provider.Method for converting protocol, device, system and the gateway provided through the embodiment of the present invention, can improve development efficiency.

Description

A kind of method for converting protocol, device, system and gateway
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of method for converting protocol, device, system and gateway.
Background technology
Micro services are a kind of emerging service architectures, are conceived to solution in the service development and improvement under distributed environment The various problems occurred.Relative to traditional service architecture, in micro services framework, a large-scale service is split as multiple micro- Service, and be independent between each micro services, different protocol realizations can be passed through.Service provider passes through multiple micro services Service is provided to service requester, it can be seen that when multiple micro services request service of service request direction service provider, and When the agreement that the agreement used is supported with multiple micro services differs, there are problems that protocol conversion.
The gateway for realizing specific protocol conversion by one in the prior art, service requester is supported by its own The service request that agreement is sent is converted to the service request of the agreement of the micro services support of service provider;And it is this is micro- The service response that service is sent is converted to the service response of the agreement of service requester support.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art:
For the micro services different from service requester agreement of each in service provider, it is required for accordingly developing one Kind gateway, so that development process becomes complicated, development efficiency is relatively low.
Invention content
The embodiment of the present invention is designed to provide a kind of method for converting protocol, device, system and gateway, to improve exploitation Efficiency.Specific technical solution is as follows:
In a first aspect, an embodiment of the present invention provides a kind of method for converting protocol, it is applied to protocol conversion gateway, the side Method includes:
Receive the first Protocol service request that service requester is sent by the first agreement, first Protocol service request To support that the service request of first agreement, first agreement are the agreement that the service requester is supported;
First Protocol service request is respectively converted into multiple second protocol service requests, wherein multiple described Two Protocol service requests are respectively the service request for supporting different second protocols, and the different second protocols are service provider The agreement that multiple micro services are supported respectively;
Multiple second protocol service requests are respectively sent to the multiple micro services of the service provider.
Optionally, multiple second protocol service requests are being respectively sent to the multiple of the service provider After micro services, the method further includes:
Multiple second protocol service responses that the multiple micro services of the service provider are sent respectively are received, In, multiple second protocol service responses are to respond multiple second protocol service requests respectively and support described second The service response of agreement;
Multiple second protocol service responses are respectively converted into multiple first protocol service responses;Wherein, described One protocol service response is to support the service response of first agreement;
Multiple first protocol service responses are sent to the service requester.
Optionally, described that first Protocol service request is respectively converted into multiple second protocol service requests, including:
It will support that the parameter format of the first agreement, corresponding conversion are multiple described second in first Protocol service request The parameter format for the second protocol that Protocol service request is supported respectively.
Second aspect, an embodiment of the present invention provides a kind of protocol conversion apparatus, are applied to protocol conversion gateway, the dress Set including:
First receiving module, the first Protocol service request sent by the first agreement for receiving service requester, institute It is the service request for supporting first agreement to state the first Protocol service request, and first agreement is the service requester branch The agreement held;
First conversion module is asked for first Protocol service request to be respectively converted into multiple second protocol services It asks, wherein multiple second protocol service requests are respectively to support the service request of different second protocols, difference described second Agreement is the agreement that multiple micro services of service provider are supported respectively;
First sending module, for multiple second protocol service requests to be respectively sent to the service provider The multiple micro services.
Optionally, described device further includes:
Second receiving module, the multiple micro services for receiving the service provider send respectively multiple second Protocol service response, wherein multiple second protocol service responses be respond respectively multiple second protocol service requests, And support the service response of the second protocol;
Second conversion module, for multiple second protocol service responses to be respectively converted into multiple first protocol services Response;Wherein, the first protocol service response is to support the service response of first agreement;
Second sending module, for multiple first protocol service responses to be sent to the service requester.
Optionally, first conversion module, specifically for will support the first agreement in first Protocol service request Parameter format, corresponding conversion is the parameter format of second protocol that multiple second protocol service requests are supported respectively.
The third aspect, an embodiment of the present invention provides a kind of protocol conversion systems, including:Service requester, protocol conversion Gateway and service provider;
The service requester is asked for passing through the first agreement to the first protocol service of protocol conversion gateway transmission It asks, first Protocol service request is the service request for supporting first agreement, and first agreement is that the service is asked The agreement that the side of asking supports;
The protocol conversion gateway, for receiving first Protocol service request;By first Protocol service request It is respectively converted into multiple second protocol service requests, wherein multiple second protocol service requests are respectively to support different the The service request of two agreements, the different second protocols are the agreement that multiple micro services of service provider are supported respectively;It will be more A second protocol service request is respectively sent to the multiple micro services of the service provider;
The service provider is asked for receiving multiple second protocol services respectively by the multiple micro services It asks.
Fourth aspect, an embodiment of the present invention provides a kind of protocol conversion gateways, which is characterized in that including processor, leads to Believe interface, memory and communication bus, wherein processor, communication interface, memory complete mutual lead to by communication bus Letter;
Memory, for storing computer program;
Processor, when for executing the program stored on memory, the method for realizing above-mentioned first aspect the method Step.
At the another aspect that the present invention is implemented, a kind of computer readable storage medium is additionally provided, it is described computer-readable Instruction is stored in storage medium, when run on a computer so that computer executes above-mentioned first aspect the method Method and step.
At the another aspect that the present invention is implemented, the embodiment of the present invention additionally provides a kind of computer program production comprising instruction Product, when run on a computer so that computer executes the method and step of above-mentioned first aspect the method.
Method for converting protocol, device, system and gateway provided in an embodiment of the present invention can receive service requester and pass through The first Protocol service request that first agreement is sent, the first agreement are the agreement that service requester is supported;By the first protocol service Request is respectively converted into multiple second protocol service requests, wherein multiple second protocol service requests are respectively to support different the The service request of two agreements, different second protocols are respectively the agreement that service provider multiple micro services for including are supported respectively; Multiple second protocol service requests are respectively sent to multiple micro services that service provider includes.As can be seen that the present invention is real In method for converting protocol, device, system and gateway that example offer is provided, it can will be propped up by a general protocol conversion gateway The first Protocol service request for holding the first agreement is respectively converted into multiple second protocol service requests, multiple second protocol services Request is respectively to support the service requests of different second protocols, different second protocols be respectively service provider include it is multiple micro- Service the agreement supported respectively.So that service request direction includes the mistake of the service provider request service of multiple micro services Cheng Zhong, without being converted to the service request of each second protocol for the first Protocol service request, a kind of all corresponding net of exploitation It closes.Development process can so be simplified, improve development efficiency.Certainly, it implements any of the products of the present invention or method must be not necessarily It needs to reach all the above advantage simultaneously.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technology description to be briefly described.
Fig. 1 is the structural schematic diagram of protocol conversion system provided in an embodiment of the present invention;
Fig. 2 is a kind of flow chart of method for converting protocol provided in an embodiment of the present invention;
Fig. 3 is another flow chart of method for converting protocol provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of protocol conversion apparatus provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of protocol conversion gateway provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention is described.
Micro services are a kind of emerging service architectures, are conceived to solution in the service development and improvement under distributed environment The various problems occurred.Relative to traditional service architecture, in micro services framework, a large-scale service is split as multiple micro- It services, in micro services framework, the number amount and type of service may be more.For example, the mobile APP about take-away (Application, application program), the APP can rely on a total service in traditional service architecture, and the service offers outer Sell relevant various services, such as order, payment, trade company's management, customer account management, notice etc..As can be seen that traditional service In framework, all kinds of business are mixed in together so that complex management.And be in micro services framework, between each micro services it is independent, It can be managed respectively between each micro services so that management is more efficient.
But service is split as multiple micro services in micro services framework, service provider is by multiple micro services to clothes Business requesting party provides service, and service requester needs to be interacted with multiple micro services to obtain the clothes of service provider offer Business, for example, service requester needs to know address and restriction on the parameters of each micro services etc., so will increase service requester Cost is added.Each micro services can be realized by different agreements.As can be seen that working as service request direction service provider The request service of multiple micro services, and when the agreement supported of the agreement used and multiple micro services differs, there are protocol conversions The problem of.
For service request direction service provider ask service when there are the problem of.In the prior art, pass through a reality The gateway of existing specific protocol conversion, the service request that service requester is sent by the agreement that its own is supported are converted to clothes The service request for the agreement that the micro services of business provider are supported;And the service response that the micro services are sent is converted into service The service response of requesting party's supported protocol.
But realize that the gateway of protocol conversion can only realize the conversion between specific protocol in the prior art, for example, being only capable of It realizes and HTTP (Hyper Text Transfer Protocol, hypertext transfer protocol) is converted into Thrift agreements, without Can HTTP be converted into gRPC agreements again, HTTP is converted into gRPC agreements if to realize, need to develop another net It closes.As can be seen that in the prior art, each protocol conversion is another agreement, it is required for a kind of corresponding gateway of exploitation, works as clothes When business provider includes the micro services of multiple and different protocol realizations, then the corresponding a variety of gateways of exploitation are needed.And when service carries When supplier increases a micro services newly in original micro services, it is also necessary to accordingly newly developed a kind of corresponding with the newly-increased micro services Gateway, and compatible between the gateway newly developed and original gateway also can bring difficulty to exploitation.So that exploitation Process becomes complicated, and development efficiency is relatively low.
In order to improve development efficiency, an embodiment of the present invention provides a kind of protocol conversion system, the protocol conversion system packets It includes:Service requester, protocol conversion gateway and service provider, wherein service provider is by multiple micro services to service Requesting party provides service, specifically, as shown in Figure 1:
Service requester 10 sends the first Protocol service request, the first association by the first agreement to protocol conversion gateway 20 View service request is to support the service request of the first agreement, and the first agreement is the agreement that service requester is supported.
Protocol conversion gateway 20 receives the first Protocol service request that service requester 10 is sent by the first agreement, the One Protocol service request is the service request for supporting the first agreement, and the first agreement is the agreement that service requester 10 is supported;By One Protocol service request is respectively converted into multiple second protocol service requests, wherein multiple second protocol service requests are respectively Support that the service request of different second protocols, different second protocols are that multiple micro services that service provider includes are supported respectively Agreement, wherein multiple micro services may include a micro services 31, b micro services 32 shown in Fig. 1 ..., n micro services 3n;It will Multiple second protocol service requests are respectively sent to multiple micro services that service provider includes.
Service provider receives multiple second protocol service requests respectively by multiple micro services.
In the embodiment of the present invention, by a general protocol conversion gateway, the association of service requester support may be implemented Conversion between the agreement that view and multiple micro services of service provider are supported respectively, so that service request direction includes During the service provider request service of multiple micro services, every 1 second is converted to without being directed to the first Protocol service request A kind of service request of agreement, all corresponding gateway of exploitation, can simplify development process, improve development efficiency.And when service carries It, need not be accordingly newly developed a kind of corresponding with the newly-increased micro services when supplier increases a micro services newly in original micro services Gateway, so as to avoid the compatibling problem between gateway, without the service of restarting again.
An embodiment of the present invention provides a kind of method for converting protocol, as shown in Fig. 2, this method includes:
S201 receives the first Protocol service request that service requester is sent by the first agreement.
Method provided in an embodiment of the present invention can be applied to protocol conversion gateway.
First Protocol service request is the service request for supporting the first agreement, and the first agreement is the association that service requester is supported View.For example, the first agreement may include:HTTP, Thrift agreement or gRPC agreements etc..
Service requester and service provider are realized by the protocol conversion gateway to be interacted, and service requester passes through the agreement Transfer gateway asks to service to service provider.Specifically, arbitrary service requester can be by the first agreement to protocol conversion Gateway sends first service request, and protocol conversion gateway receives first association that arbitrary service requester is sent by the first agreement Discuss service request.
Wherein, service requester can be the user terminal etc. that user uses, and service provider can be server etc..
First Protocol service request is respectively converted into multiple second protocol service requests by S202.
Wherein, multiple second protocol service requests are respectively to support the service request of different second protocols, and difference second is assisted View is the agreement that multiple micro services of service provider are supported respectively.For example, second protocol may include:HTTP, Thrift are assisted View or gRPC agreements etc..
The first Protocol service request received is converted to second protocol service request by protocol conversion gateway.For example, will The first Protocol service request of http protocol is supported to be converted to the second protocol service request for supporting Thrift agreements;Or it will branch The first Protocol service request for holding http protocol is converted to the second protocol service request for supporting gRPC agreements;Or it will support First Protocol service request of Thrift agreements is converted to the second association for supporting http protocol respectively and supporting gRPC agreements simultaneously Discuss service request.
When service provider includes multiple micro services, the multiple micro services request services in service request direction.And it is multiple in incognito It can be independent from each other between business, different protocol realizations can be passed through.In this way, protocol conversion gateway sends out service requester The the first Protocol service request corresponding conversion sent is second protocol service request.Wherein, which includes more Corresponding second protocol is supported in a micro services request, the request of these micro services respectively.
Specifically, the first Protocol service request is converted into second protocol service request, it can be by by first agreement It supports that the parameter format of the first agreement, corresponding conversion are to support the parameter format of second protocol in service request, so can be achieved The first Protocol service request of the first agreement will be supported to be converted to the second protocol service request of support second protocol.
It should be noted that the mode that do not converted between service request in the embodiment of the present invention is restricted, it is any can The mode that will support that the service request of different agreement is converted, in the protection domain of the embodiment of the present invention.
Multiple second protocol service requests are respectively sent to multiple micro services of service provider by S203.
Protocol conversion gateway by the multiple second protocol service requests for supporting different second protocols respectively, be respectively sent to take Multiple micro services of business provider, are asked so that multiple micro services of service provider can receive and process second protocol service It asks.Specifically, multiple micro services in service provider respectively make a response corresponding second protocol service request, specifically Ground generates the corresponding second protocol service response of each second protocol service request, and respectively takes each second protocol respectively Business response is sent to protocol conversion gateway.
Method for converting protocol provided in an embodiment of the present invention may be implemented to take by a general protocol conversion gateway Conversion between the agreement that the business requesting party agreement supported and multiple micro services of service provider are supported respectively, so that During service request direction includes the service provider request service of multiple micro services, asked without being directed to the first protocol service Ask the service request for being converted to each second protocol, a kind of all corresponding gateway of exploitation that can simplify development process, improve exploitation Efficiency.
In addition, in a kind of optional embodiment of the embodiment of the present invention, protocol conversion gateway is receiving service requester transmission During first Protocol service request, it can also be filtered operation, for example, carrying out authorization check, current limliting and monitoring, visit Ask the operations such as interception.
On the basis of embodiment shown in Fig. 2, as shown in figure 3, after S203, further include:
S204 receives multiple second protocol service responses that multiple micro services of service provider are sent respectively.
Wherein, multiple second protocol service responses are to respond multiple second protocol service requests respectively and support the second association The service response of view.
It, can be to second protocol service after service provider receives second protocol service request in the embodiment of the present invention Response is made in request, can also build the second protocol service response of corresponding support second protocol, and second protocol is taken Business response is sent to protocol conversion gateway.In this way, protocol conversion gateway can receive multiple micro services difference in service provider The multiple second protocol service responses sent.
Multiple second protocol service responses are respectively converted into multiple first protocol service responses by S205.
Wherein, the first protocol service response is to support the service response of the first agreement.
In the embodiment of the present invention, multiple second protocol service responses are converted to the process of multiple first protocol service responses It can be regarded as the above-mentioned inverse process that first Protocol service request is converted to multiple second protocol service requests.Specifically, may be used Will support that the parameter format of second protocol, corresponding conversion are to support the parameter lattice of the first agreement in second protocol service response Formula.
It should be noted that the mode that do not converted between service response in the embodiment of the present invention is restricted, it is any can The mode that will support that the service response of different agreement is converted, in the protection domain of the embodiment of the present invention.
Multiple first protocol service responses are sent to service requester by S206.
The multiple first protocol service responses for the first agreement of support being converted to are sent to service by protocol conversion gateway Requesting party, such service requester obtain the service that service side is provided by multiple micro services.It specifically, can be by multiple first Service response is sent respectively to service requester, or can also multiple first service responses be first packaged into a service and answered It answers, a service response after the encapsulation is then sent to service requester again.
So that multiple micro services provide service to service requester in service provider, service requester can divide Multiple micro services ask to service respectively not into service provider, further such that service development is more efficient, and can be independent Ground is managed multiple micro services so that management is more efficient.Meanwhile service requester is asking to service to service provider During realize protocol conversion when, without restarting the process of protocol conversion gateway.
In the embodiment of the present invention, by a general protocol conversion gateway, realize between a variety of heterogeneous protocol objects Conversion so that the realization of transfer process is easier.In this way, service requester can by the protocol conversion gateway, to including The service provider request service for supporting multiple micro services of different agreement is further able to simplify service requester request service Process.
The embodiment of the present invention additionally provides a kind of protocol conversion apparatus, is applied to protocol conversion gateway, as shown in figure 4, should Device includes:
First receiving module 401, the first Protocol service request sent by the first agreement for receiving service requester, First Protocol service request is the service request for supporting the first agreement, and the first agreement is the agreement that service requester is supported;
First conversion module 402, for the first Protocol service request to be respectively converted into multiple second protocol service requests, Wherein, multiple second protocol service requests are respectively to support the service request of different second protocols, and different second protocols are service The agreement that multiple micro services of provider are supported respectively;
First sending module 403, for multiple second protocol service requests to be respectively sent to the multiple of service provider Micro services.
Protocol conversion apparatus provided in an embodiment of the present invention may be implemented to take by a general protocol conversion gateway Conversion between the agreement that the business requesting party agreement supported and multiple micro services of service provider are supported respectively, so that During service request direction includes the service provider request service of multiple micro services, asked without being directed to the first protocol service Ask the service request for being converted to each second protocol, a kind of all corresponding gateway of exploitation that can simplify development process, improve exploitation Efficiency.
Optionally, which further includes:
Second receiving module (not shown), multiple micro services for receiving service provider send multiple respectively Second protocol service response, wherein multiple second protocol service responses are to respond multiple second protocol service requests respectively and prop up Hold the service response of second protocol;
Second conversion module (not shown), for multiple second protocol service responses to be respectively converted into multiple first Protocol service response;Wherein, the first protocol service response is to support the service response of the first agreement;
Second sending module (not shown), for multiple first protocol service responses to be sent to service requester.
Optionally, the first conversion module, specifically for will support the parameter lattice of the first agreement in the first Protocol service request Formula, corresponding conversion are the parameter format for the second protocol that multiple second protocol service requests are supported respectively.
It should be noted that protocol conversion apparatus provided in an embodiment of the present invention is the dress using above-mentioned method for converting protocol It sets, then all embodiments of above-mentioned method for converting protocol are suitable for the device, and can reach same or analogous beneficial to effect Fruit.
The embodiment of the present invention additionally provides a kind of protocol conversion gateway, as shown in figure 5, including processor 501, communication interface 502, memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory 503 pass through communication bus 504 complete mutual communication,
Memory 503, for storing computer program;
Processor 501 when for executing the program stored on memory 503, realizes the side of above-mentioned method for converting protocol Method step.
Protocol conversion gateway provided in an embodiment of the present invention may be implemented to take by a general protocol conversion gateway Conversion between the agreement that the business requesting party agreement supported and multiple micro services of service provider are supported respectively, so that During service request direction includes the service provider request service of multiple micro services, asked without being directed to the first protocol service Ask the service request for being converted to each second protocol, a kind of all corresponding gateway of exploitation that can simplify development process, improve exploitation Efficiency.
The communication bus that above-mentioned protocol conversion gateway is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, abbreviation PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, abbreviation EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control Bus processed etc..It for ease of indicating, is only indicated with a thick line in figure, it is not intended that an only bus or a type of total Line.
Communication interface is for the communication between above-mentioned protocol conversion gateway and other equipment.
Memory may include random access memory (Random Access Memory, abbreviation RAM), can also include Nonvolatile memory (non-volatile memory), for example, at least a magnetic disk storage.Optionally, memory may be used also To be at least one storage device for being located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, Abbreviation CPU), network processing unit (Network Processor, abbreviation NP) etc.;It can also be digital signal processor (Digital Signal Processing, abbreviation DSP), application-specific integrated circuit (Application Specific Integrated Circuit, abbreviation ASIC), field programmable gate array (Field-Programmable Gate Array, Abbreviation FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer so that computer executes above-mentioned method for converting protocol Method and step.
Computer readable storage medium provided in an embodiment of the present invention can be with by a general protocol conversion gateway Realize the conversion between the agreement that multiple micro services of the agreement that service requester is supported and service provider are supported respectively, such as During this makes the service provider request service that service request direction includes multiple micro services, without being directed to the first agreement Service request is converted to the service request of each second protocol, and a kind of all corresponding gateway of exploitation can simplify development process, carry High development efficiency.
In another embodiment provided by the invention, a kind of computer program product including instruction is additionally provided, when it When running on computers so that computer executes the method and step of above-mentioned method for converting protocol.
Computer program product provided in an embodiment of the present invention may be implemented by a general protocol conversion gateway Conversion between the agreement that multiple micro services of agreement and service provider that service requester is supported are supported respectively, so makes During obtaining the service provider request service that service request direction includes multiple micro services, without being directed to the first protocol service Request is converted to the service request of each second protocol, and a kind of all corresponding gateway of exploitation can simplify development process, raising is opened Send out efficiency.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or its arbitrary combination real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to the flow or function described in the embodiment of the present invention.The computer can be all-purpose computer, special meter Calculation machine, computer network or other programmable devices.The computer instruction can be stored in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state disk Solid State Disk (SSD)) etc..
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device, For system, gateway, computer readable storage medium and computer program product embodiments, since it is substantially similar to method Embodiment, so description is fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (8)

1. a kind of method for converting protocol, which is characterized in that it is applied to protocol conversion gateway, the method includes:
The first Protocol service request that service requester is sent by the first agreement is received, first Protocol service request is branch The service request of first agreement is held, first agreement is the agreement that the service requester is supported;
First Protocol service request is respectively converted into multiple second protocol service requests, wherein multiple second associations View service request is respectively to support the service request of different second protocols, and the different second protocols are the multiple of service provider The agreement that micro services are supported respectively;
Multiple second protocol service requests are respectively sent to the multiple micro services of the service provider.
2. according to the method described in claim 1, it is characterized in that, being sent respectively by multiple second protocol service requests To the multiple micro services of the service provider, the method further includes:
Receive multiple second protocol service responses that the multiple micro services of the service provider are sent respectively, wherein more A second protocol service response is to respond multiple second protocol service requests respectively and support the second protocol Service response;
Multiple second protocol service responses are respectively converted into multiple first protocol service responses;Wherein, first association It is to support the service response of first agreement to discuss service response;
Multiple first protocol service responses are sent to the service requester.
3. method according to claim 1 or 2, which is characterized in that described to turn first Protocol service request respectively Multiple second protocol service requests are changed to, including:
It will support that the parameter format of the first agreement, corresponding conversion are multiple second protocols in first Protocol service request The parameter format for the second protocol that service request is supported respectively.
4. a kind of protocol conversion apparatus, which is characterized in that be applied to protocol conversion gateway, described device includes:
First receiving module, the first Protocol service request sent by the first agreement for receiving service requester, described One Protocol service request is the service request for supporting first agreement, and first agreement is what the service requester was supported Agreement;
First conversion module, for first Protocol service request to be respectively converted into multiple second protocol service requests, In, multiple second protocol service requests are respectively to support the service request of different second protocols, the different second protocols The agreement supported respectively for multiple micro services of service provider;
First sending module, for multiple second protocol service requests to be respectively sent to described in the service provider Multiple micro services.
5. device according to claim 4, which is characterized in that described device further includes:
Second receiving module, multiple second protocols that the multiple micro services for receiving the service provider are sent respectively Service response, wherein multiple second protocol service responses are to respond multiple second protocol service requests respectively and prop up Hold the service response of the second protocol;
Second conversion module is answered for multiple second protocol service responses to be respectively converted into multiple first protocol services It answers;Wherein, the first protocol service response is to support the service response of first agreement;
Second sending module, for multiple first protocol service responses to be sent to the service requester.
6. device according to claim 4 or 5, which is characterized in that first conversion module is specifically used for described the Support that the parameter format of the first agreement, corresponding conversion are multiple second protocol service request difference in one Protocol service request The parameter format of the second protocol of support.
7. a kind of protocol conversion system, which is characterized in that including:Service requester, protocol conversion gateway and service provider;
The service requester, for sending the first Protocol service request, institute to the protocol conversion gateway by the first agreement It is the service request for supporting first agreement to state the first Protocol service request, and first agreement is the service requester branch The agreement held;
The protocol conversion gateway, for receiving first Protocol service request;First Protocol service request is distinguished Be converted to multiple second protocol service requests, wherein multiple second protocol service requests are respectively that difference second is supported to assist The service request of view, the different second protocols are the agreement that multiple micro services of service provider are supported respectively;By multiple institutes State the multiple micro services that second protocol service request is respectively sent to the service provider;
The service provider, for receiving multiple second protocol service requests respectively by the multiple micro services.
8. a kind of protocol conversion gateway, which is characterized in that including processor, communication interface, memory and communication bus, wherein Processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and steps of claim 1-3.
CN201810096192.9A 2018-01-31 2018-01-31 Protocol conversion method, device, system and gateway Active CN108449312B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810096192.9A CN108449312B (en) 2018-01-31 2018-01-31 Protocol conversion method, device, system and gateway

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810096192.9A CN108449312B (en) 2018-01-31 2018-01-31 Protocol conversion method, device, system and gateway

Publications (2)

Publication Number Publication Date
CN108449312A true CN108449312A (en) 2018-08-24
CN108449312B CN108449312B (en) 2021-01-22

Family

ID=63191464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810096192.9A Active CN108449312B (en) 2018-01-31 2018-01-31 Protocol conversion method, device, system and gateway

Country Status (1)

Country Link
CN (1) CN108449312B (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150893A (en) * 2018-09-12 2019-01-04 山东中创软件工程股份有限公司 A kind of service request retransmission method and relevant apparatus
CN109348175A (en) * 2018-10-25 2019-02-15 北京邮电大学 Communication means between a kind of monitoring system
CN109445968A (en) * 2018-11-09 2019-03-08 金瓜子科技发展(北京)有限公司 Service request processing method, device, equipment and the storage medium of different agreement
CN111049791A (en) * 2018-10-15 2020-04-21 富士电机株式会社 Vending machine system and communication method of vending machine system
CN111510476A (en) * 2020-04-03 2020-08-07 金蝶软件(中国)有限公司 Communication method, communication apparatus, computer device, and computer-readable storage medium
CN111741003A (en) * 2020-06-23 2020-10-02 四川长虹电器股份有限公司 Multi-protocol conversion method and system for third-party platform docking
CN112054930A (en) * 2020-09-08 2020-12-08 上海欣诺通信技术股份有限公司 Network management method and system based on microservice
CN113301166A (en) * 2021-06-16 2021-08-24 杭州华橙软件技术有限公司 Service calling method and device, storage medium and electronic device
CN113595795A (en) * 2021-07-30 2021-11-02 工银科技有限公司 Network communication method, device, system, equipment and medium
CN113726869A (en) * 2021-08-26 2021-11-30 阿里巴巴(中国)有限公司 Communication method, gateway and electronic equipment
CN114125055A (en) * 2021-11-30 2022-03-01 神州数码系统集成服务有限公司 Multi-protocol automatic adaptation cloud native gateway system control method, system, equipment and application
CN114928596A (en) * 2022-04-20 2022-08-19 上海昱极科技有限公司 Data transmission method and device in micro-service communication process
CN115589430A (en) * 2022-09-20 2023-01-10 启明信息技术股份有限公司 Method for converting heterogeneous request standard into unified request standard
CN114928596B (en) * 2022-04-20 2024-06-21 上海昱极科技有限公司 Data transmission method and device in micro-service communication process

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11785065B2 (en) * 2021-04-15 2023-10-10 Nec Corporation Dynamic microservice intercommunication configuration

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050277420A1 (en) * 2004-06-10 2005-12-15 Samsung Electronics Co., Ltd. Single-sign-on method based on markup language and system using the method
CN101155190A (en) * 2006-09-29 2008-04-02 戴尔产品有限公司 Dynamic loading of protocol adapters on a client
WO2012057534A2 (en) * 2010-10-27 2012-05-03 삼성전자 주식회사 Method and apparatus for transmitting an soap message in a mobile communication system
CN102769630A (en) * 2012-08-01 2012-11-07 烽火通信科技股份有限公司 Conversion method for CWMP (CPE WAN Management Protocol) and UPnP (Universal Plug and Play) protocol in terminal management
CN103401859A (en) * 2013-07-29 2013-11-20 华为技术有限公司 Protocol conversion method and protocol converter
CN103595695A (en) * 2012-08-15 2014-02-19 深圳中兴网信科技有限公司 Method and system for providing services by service bus
CN106686094A (en) * 2016-12-30 2017-05-17 郑州云海信息技术有限公司 Micro-service architecture
CN107317881A (en) * 2017-08-10 2017-11-03 上海庄生机电工程设备有限公司 A kind of BA systems based on micro services framework
CN107370786A (en) * 2017-06-02 2017-11-21 广州杰赛科技股份有限公司 A kind of general information management system based on micro services framework

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050277420A1 (en) * 2004-06-10 2005-12-15 Samsung Electronics Co., Ltd. Single-sign-on method based on markup language and system using the method
CN101155190A (en) * 2006-09-29 2008-04-02 戴尔产品有限公司 Dynamic loading of protocol adapters on a client
WO2012057534A2 (en) * 2010-10-27 2012-05-03 삼성전자 주식회사 Method and apparatus for transmitting an soap message in a mobile communication system
CN102769630A (en) * 2012-08-01 2012-11-07 烽火通信科技股份有限公司 Conversion method for CWMP (CPE WAN Management Protocol) and UPnP (Universal Plug and Play) protocol in terminal management
CN103595695A (en) * 2012-08-15 2014-02-19 深圳中兴网信科技有限公司 Method and system for providing services by service bus
CN103401859A (en) * 2013-07-29 2013-11-20 华为技术有限公司 Protocol conversion method and protocol converter
CN106686094A (en) * 2016-12-30 2017-05-17 郑州云海信息技术有限公司 Micro-service architecture
CN107370786A (en) * 2017-06-02 2017-11-21 广州杰赛科技股份有限公司 A kind of general information management system based on micro services framework
CN107317881A (en) * 2017-08-10 2017-11-03 上海庄生机电工程设备有限公司 A kind of BA systems based on micro services framework

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109150893B (en) * 2018-09-12 2021-10-26 山东中创软件工程股份有限公司 Service request forwarding method and related device
CN109150893A (en) * 2018-09-12 2019-01-04 山东中创软件工程股份有限公司 A kind of service request retransmission method and relevant apparatus
CN111049791A (en) * 2018-10-15 2020-04-21 富士电机株式会社 Vending machine system and communication method of vending machine system
CN109348175A (en) * 2018-10-25 2019-02-15 北京邮电大学 Communication means between a kind of monitoring system
CN109445968A (en) * 2018-11-09 2019-03-08 金瓜子科技发展(北京)有限公司 Service request processing method, device, equipment and the storage medium of different agreement
CN111510476A (en) * 2020-04-03 2020-08-07 金蝶软件(中国)有限公司 Communication method, communication apparatus, computer device, and computer-readable storage medium
CN111741003A (en) * 2020-06-23 2020-10-02 四川长虹电器股份有限公司 Multi-protocol conversion method and system for third-party platform docking
CN112054930A (en) * 2020-09-08 2020-12-08 上海欣诺通信技术股份有限公司 Network management method and system based on microservice
CN113301166A (en) * 2021-06-16 2021-08-24 杭州华橙软件技术有限公司 Service calling method and device, storage medium and electronic device
CN113595795A (en) * 2021-07-30 2021-11-02 工银科技有限公司 Network communication method, device, system, equipment and medium
CN113726869A (en) * 2021-08-26 2021-11-30 阿里巴巴(中国)有限公司 Communication method, gateway and electronic equipment
CN114125055A (en) * 2021-11-30 2022-03-01 神州数码系统集成服务有限公司 Multi-protocol automatic adaptation cloud native gateway system control method, system, equipment and application
CN114125055B (en) * 2021-11-30 2023-12-12 神州数码系统集成服务有限公司 Multi-protocol automatic adaptation cloud native gateway system control method, system, equipment and application
CN114928596A (en) * 2022-04-20 2022-08-19 上海昱极科技有限公司 Data transmission method and device in micro-service communication process
CN114928596B (en) * 2022-04-20 2024-06-21 上海昱极科技有限公司 Data transmission method and device in micro-service communication process
CN115589430A (en) * 2022-09-20 2023-01-10 启明信息技术股份有限公司 Method for converting heterogeneous request standard into unified request standard

Also Published As

Publication number Publication date
CN108449312B (en) 2021-01-22

Similar Documents

Publication Publication Date Title
CN108449312A (en) A kind of method for converting protocol, device, system and gateway
US9990383B2 (en) Constructing a data adaptor in an enterprise server data ingestion environment
CN108322351A (en) Generate method and apparatus, fault determination method and the device of topological diagram
CN109586962B (en) Device and method for processing HTTPS (hypertext transfer protocol secure) outer chain problem of upgrading IPv4 to IPv6 and electronic equipment
CN111343020A (en) Unified management method and device for multi-protocol Internet of things equipment
US20150304404A1 (en) System architecture, subsystem, and method for opening telecommunications network capability
CN105847312B (en) A kind of resource access method and user terminal
CN107360261A (en) A kind of HTTP request processing method, device and electronic equipment
CN108600326A (en) Communication means, device and equipment
CN113141405B (en) Service access method, middleware system, electronic device, and storage medium
CN110704200A (en) Method and device for converting call interface
CN107872548A (en) Web page interlinkage method, apparatus and readable storage medium storing program for executing
CN114979295B (en) Gateway management method and device
CN110008173A (en) A kind of method and device of data storage
CN105975415B (en) Peripherals administration control device, method and system
CN111130828B (en) Intelligent network distribution method and device and terminal equipment
CN107040613A (en) A kind of message transmitting method and system
CN110247926A (en) A kind of exchange method and system
CN110780915B (en) Data processing method, device and storage medium
CN114640656A (en) Method, apparatus and medium for updating data
CN107222365A (en) Data processing method, device and server
US10148826B2 (en) Methods and apparatus to interface with different service provider information technology systems supporting service ordering
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
US10203965B2 (en) Data processing method and system for intercepting signals between a peripheral device and a software application
CN113709177B (en) Method for processing message and external call gateway

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