[go: up one dir, main page]

CN112688915A - Cross-protocol communication method, device and server - Google Patents

Cross-protocol communication method, device and server Download PDF

Info

Publication number
CN112688915A
CN112688915A CN202011420341.6A CN202011420341A CN112688915A CN 112688915 A CN112688915 A CN 112688915A CN 202011420341 A CN202011420341 A CN 202011420341A CN 112688915 A CN112688915 A CN 112688915A
Authority
CN
China
Prior art keywords
service class
terminal
communication protocol
protocol
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011420341.6A
Other languages
Chinese (zh)
Inventor
房成进
张福伟
郑靖舒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Pinecone Electronic Co Ltd
Original Assignee
Beijing Xiaomi Pinecone Electronic 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 Xiaomi Pinecone Electronic Co Ltd filed Critical Beijing Xiaomi Pinecone Electronic Co Ltd
Priority to CN202011420341.6A priority Critical patent/CN112688915A/en
Publication of CN112688915A publication Critical patent/CN112688915A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The present disclosure relates to a cross-protocol communication method, comprising: receiving a request message of a first terminal, wherein the first terminal supports a first communication protocol; analyzing the request message according to the first communication protocol to acquire the request content of the request message and a second terminal communicated with the request message; acquiring a service class object corresponding to a second communication protocol supported by the second terminal from an object container; and calling the service class corresponding to the service class object, and sending the request content to the second terminal. The embodiment of the disclosure realizes cross-protocol communication by calling the service class created in advance, so that the communication can run in the same process without cross-process communication, thereby avoiding the problems of delay and performance loss caused by cross-process communication and improving the stability of cross-protocol communication. In addition, only one process is needed, so that subsequent deployment, upgrading and system maintenance are facilitated.

Description

Cross-protocol communication method, device and server
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a cross-protocol communication method, an apparatus, and a server.
Background
In the related art, as for the cross-protocol Communication technology, it is currently possible to implement the cross-protocol Communication technology by means of an IPC (Inter-Process Communication) technology. For example, two processes are started at a server as a server receiving different protocols, and simultaneously, the two processes are used as a client and a third party service vector, so that inter-process communication is carried out.
Fig. 1 is a schematic diagram illustrating a cross-protocol communication implemented by an interprocess communication technology in the related art. A TCP (Transmission Control Protocol) server and an HTTP (Hypertext Transfer Protocol over secure session Layer) client are established in a server, and a TCP process and an HTTP process are arranged in the server. The TCP server communicates with the TCP client through a TCP protocol, receives data sent by the TCP client, the TCP process transmits the received data to the HTTP process in an inter-protocol communication mode, and the HTTP process calls the HTTP client to send the data to other Web (World Wide Web) terminals.
The related art has a problem that, first, a TCP service and an HTTP service on a server are respectively run in different processes, and there is process isolation, and therefore, inter-process communication is required. The inter-process communication causes the following problems:
1. cross-process communication is inconvenient to deploy and upgrade;
2. the success or failure of the inter-process communication determines the stability of the cross-protocol communication;
3. the data format of cross-process communication needs to be well defined in two services at the same time, and maintenance and upgrading are not facilitated;
4. there is end-to-end latency and performance loss across interprocess communications.
Disclosure of Invention
The disclosure provides a cross-protocol communication method, a cross-protocol communication device and a cross-protocol communication server, which are used for at least solving the problem caused by the need of interprocess communication in the related art. The technical scheme of the disclosure is as follows:
according to an aspect of the embodiments of the present disclosure, there is provided a cross-protocol communication method, including: receiving a request message of a first terminal, wherein the first terminal supports a first communication protocol; analyzing the request message according to the first communication protocol to acquire the request content of the request message and a second terminal communicated with the request message; acquiring a service class object corresponding to a second communication protocol supported by the second terminal from an object container; and calling the service class corresponding to the service class object, and sending the request content to the second terminal.
In an embodiment of the disclosure, before the obtaining the request message of the first terminal, the method further includes: and registering the service class object corresponding to the second communication protocol to the object container.
In an embodiment of the disclosure, the method is applied to a microservice development SpringBoot framework, where registering the service class corresponding to the second communication protocol to the object container includes: establishing a service class corresponding to the second communication protocol; when the SpringBoot framework is started, analyzing the annotation of the service class; and if the annotation meets the preset requirement, generating a service class object corresponding to the service class, and registering the service class object to the object container.
In one embodiment of the present disclosure, the method further includes: acquiring a service class object in the object container; and loading the service class corresponding to the service class object into the virtual machine for calling.
In one embodiment of the present disclosure, the method further includes: receiving a response message sent by the second terminal through the service class; analyzing the response message according to the second communication protocol to acquire response content and the first terminal communicated with the response message; and converting the response content into a message of a first communication protocol, and sending the message to the first terminal.
In an embodiment of the present disclosure, the first communication protocol is one of a hypertext transfer protocol HTTP and a transmission control protocol TCP, and the second communication protocol is the other of the HTTP and TCP.
According to another aspect of the embodiments of the present disclosure, there is also provided a cross-protocol communication apparatus, including: a first receiving module, configured to receive a request message of a first terminal, where the first terminal supports a first communication protocol; the first analysis module is used for analyzing the request message according to the first communication protocol so as to obtain the request content of the request message and a second terminal communicated with the request message; an obtaining module, configured to obtain, from an object container, a service class object corresponding to a second communication protocol supported by the second terminal; and the calling module is used for calling the service class corresponding to the service class object and sending the request content to the second terminal.
In one embodiment of the present disclosure, the method further includes: and the object container management module is used for registering the service class object corresponding to the second communication protocol to the object container.
In an embodiment of the disclosure, the apparatus is applied to a microservice development spring boot framework, wherein the object container management module includes: the establishing submodule is used for establishing a service class corresponding to the second communication protocol; the parsing submodule is used for parsing the annotation of the service class when the SpringBoot framework is started; and the management submodule is used for generating a service class object corresponding to the service class when the annotation meets the preset requirement, and registering the service class object to the object container.
In one embodiment of the present disclosure, the method further includes: the service object acquisition module is used for acquiring the service class object in the object container; and the loading module is used for loading the service class corresponding to the service class object into the virtual machine for calling.
In one embodiment of the present disclosure, the method further includes: a second receiving module, configured to receive, through the service class, a response message sent by the second terminal; the second analysis module is used for analyzing the response message according to the second communication protocol to acquire response content and the first terminal communicated with the response message; and the sending module is used for converting the response content into a message of a first communication protocol and sending the message to the first terminal.
In one embodiment of the present disclosure, the first communication protocol is one of HTTP and TCP, and the second communication protocol is the other of HTTP and TCP.
According to still another aspect of the embodiments of the present disclosure, there is also provided a server, including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the cross-protocol communication method as described above.
According to yet another aspect of the embodiments of the present disclosure, there is also provided a storage medium whose instructions, when executed by a processor of a server, enable the server to perform the cross-protocol communication method as described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the embodiment of the disclosure realizes cross-protocol communication by calling the service class created in advance, so that the communication can run in the same process without cross-process communication, thereby avoiding the problems of delay and performance loss caused by cross-process communication and improving the stability of cross-protocol communication. In addition, only one process is needed, so that subsequent deployment, upgrading and system maintenance are facilitated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a diagram illustrating cross-protocol communication implemented by inter-process communication technology in the related art;
FIG. 2 is a flow diagram of a cross-protocol communication method according to one embodiment of the present disclosure;
FIG. 3 is an architecture diagram of cross-protocol communication according to one embodiment of the present disclosure;
FIG. 4 is a block diagram of a cross-protocol communication device according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a server according to one embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 2 is a flowchart of a cross-protocol communication method that may be used in a server according to an embodiment of the present disclosure. As shown in fig. 3, is an architectural diagram of the present disclosure for cross-protocol communication. As shown in fig. 3, the server 200 has a first interface and a second interface therein, wherein the first interface supports a first communication protocol, and the second interface supports a second communication protocol. The server communicates with the first terminal 100 through a first communication protocol and communicates with the second terminal 300 through a second communication protocol. Wherein, in the server 200, the communication with the second terminal is realized by the service class in the server 200, so that the communication can be completed in one process in the server 200. In one embodiment of the present disclosure, the first communication protocol is one of HTTP and TCP, and the second communication protocol is the other of HTTP and TCP. Specifically, the method comprises the following steps:
step 210, receiving a request message of a first terminal, wherein the first terminal supports a first communication protocol.
In one embodiment of the present disclosure, the first communication protocol is determined by a scenario to which the cross-protocol communication method of the present disclosure is applied. As an example, a possible scenario is that the first terminal is an application of a mobile terminal or a web page of a computer, and the second terminal is an internet of things terminal device, such as a single chip microcomputer or a sensor. And the user reads the data collected by the terminal equipment of the Internet of things through the application program of the mobile terminal, or controls the terminal equipment of the Internet of things through the application program of the mobile terminal. At the moment, the first terminal is communicated with the server through the HTTP protocol, the second terminal is communicated with the server through the TCP protocol, and therefore the second terminal (the terminal equipment of the internet of things) does not need to keep the HTTP connection with the server for a long time, and the terminal equipment of the internet of things is beneficial to saving energy consumption.
In an embodiment of the present disclosure, the server has a first interface and a second interface, in the above example, the first interface supports the HTTP protocol, the second interface supports the TCP protocol, and the first interface and the second interface are controlled by one control process.
Step 230, parsing the request message according to the first communication protocol to obtain the request content of the request message and the second terminal to which the request message is communicated.
In the embodiment of the present disclosure, the request message is parsed with reference to the HTTP protocol, and the request content in the request message and the destination address of the request message, i.e. the second terminal communicating with the first terminal, are obtained.
Step 250, obtaining the service class object corresponding to the second communication protocol supported by the second terminal from the object container.
In an embodiment of the present disclosure, a plurality of service classes may be started in advance in a server, each service class corresponds to a function, each service class has a service class object, the service class object is added to an object container, and a corresponding service class may be called through the service class object.
In one embodiment, a TCP service class may be registered, and the TCP service class has a function of communicating with a terminal device of the internet of things. After the request message is analyzed, the function requested by the request message can be obtained, and the corresponding service class is called. In an embodiment of the present disclosure, for an internet of things terminal device, a service class may include service start, service close, connection with a client, sending data, receiving data, keep-alive detection, behavior data definition, and the like.
In other embodiments of the present disclosure, the server may communicate with the second terminal through another communication protocol, and similarly, the other communication protocol may be loaded to the server as a service class.
Step 270, invoking the service class corresponding to the service class object, and sending the request content to the second terminal.
In an embodiment of the present disclosure, one or more service class objects in an object container are obtained, and a service class corresponding to the one or more service class objects is loaded into a virtual machine in advance for invocation. In the embodiment of the present disclosure, the object container is used to manage the loaded service class, and for the service class object loaded into the object container, the corresponding service class is loaded into the virtual machine in advance, so that communication can be performed through the corresponding service class.
The embodiment of the disclosure realizes cross-protocol communication by calling the service class created in advance, so that the communication can run in the same process without cross-process communication, thereby avoiding the problems of delay and performance loss caused by cross-process communication and improving the stability of cross-protocol communication. In addition, only one process is needed, so that subsequent deployment, upgrading and system maintenance are facilitated.
In an embodiment of the present disclosure, the service class object corresponding to the second communication protocol needs to be registered in an object container in advance. In one embodiment, referring to the above scenario, if the second communication protocol is the TCP protocol, the TCP service class object is registered in the object container. Similarly, if the second communication protocol is another protocol, the corresponding service class object may be registered in the object container, and if the server communicates with the second terminals of multiple protocol types, multiple service class objects need to be registered in the object container of the server, and different service class objects call different service classes to communicate with the second terminals of different communication protocols.
In one embodiment of the present disclosure, the functions described above may be implemented using a microservice development SpringBoot framework. Of course, in other embodiments of the present disclosure, other frameworks may also be used to implement the process based on the above embodiments, which is not described herein again. The SpringBoot framework is used to simplify the initial set-up and development process of a new Spring application. The framework uses a specific way to configure, thereby eliminating the need for developers to define a templated configuration. In addition, the SpringBoot controls the relationship between program objects through a container, rather than being directly controlled by program code in the conventional implementation. Control is transferred from the application code to the external container, which is Spring to control the object lifecycle and the relationship between the objects. In this embodiment, a service class corresponding to the second communication protocol, for example, a TCP service class, is first established, and a preset annotation, for example, an @ Component annotation, is added to the class name of the service class. And then when the Springboot framework is started, analyzing the annotation of the service class, if the annotation meets the preset requirement, generating a service class object corresponding to the service class, and registering the service class object to an object container. In this embodiment, it is determined whether the class name of the service class has the @ Component annotation, and if so, it is considered that the preset requirement is satisfied, and is registered in the object container.
In an embodiment of the present disclosure, a service class may be further added separately, where the service class has a function of reading a service class object in an object container when a SpringBoot framework is started, and loading a service class corresponding to the service class object into a virtual machine for subsequent invocation.
In one embodiment of the disclosure, a response message of the second terminal may also be fed back to the first terminal. For example, a response message sent by the second terminal is received through the service class, and the response message is parsed according to the second communication protocol to obtain response content, and the first terminal to which the response message is communicated. And then, converting the response content into a message of the first communication protocol and sending the message to the first terminal.
In an embodiment of the disclosure, after the SpringBoot, the context environment of the SpringBoot runtime is obtained, and the service class object is obtained from a class object container of the context environment. Java generation can be performed through modifying an entry boot file, so as to obtain an object container used for representing the application context of the SpringBoot runtime environment, obtain a TCP service class object from the object container, and call a corresponding service class for service.
Fig. 4 is a block diagram illustrating a cross-protocol communication device in accordance with an example embodiment. Referring to fig. 4, the cross-protocol communication apparatus 400 includes a first receiving module 410, a first parsing module 420, an obtaining module 430, and a calling module 440. The first receiving module 410 is configured to receive a request message of a first terminal, where the first terminal supports a first communication protocol. The first parsing module 420 is configured to parse the request message according to the first communication protocol to obtain the request content of the request message and the second terminal with which the request message is communicated. The obtaining module 430 is configured to obtain a service class object corresponding to the second communication protocol supported by the second terminal from the object container. The invoking module 440 is configured to invoke the service class corresponding to the service class object, and send the request content to the second terminal.
In one embodiment of the present disclosure, the cross-protocol communication apparatus 400 further includes an object container management module 450. The object container management module 450 is configured to register the service class object corresponding to the second communication protocol in the object container.
In one embodiment of the present disclosure, the cross-protocol communication device 400 is applied to a microservice development spring boot framework. The object container management module 450 includes an establishing sub-module 451, a parsing sub-module 452, and a management sub-module 453. The establishing sub-module 451 is configured to establish a service class corresponding to the second communication protocol. The parsing submodule 452 is configured to parse the annotation of the service class when the SpringBoot framework is started. The management submodule 453 is configured to generate a service class object corresponding to the service class when the annotation meets the preset requirement, and register the service class object in the object container.
In one embodiment of the present disclosure, the cross-protocol communication apparatus 400 further includes a service object acquisition module 460 and a loading module 470. The service object obtaining module 460 is configured to obtain a service class object in an object container. The loading module 470 is configured to load the service class corresponding to the service class object into the virtual machine for calling.
In one embodiment of the present disclosure, the cross-protocol communication apparatus 400 further includes a second receiving module 480, a second parsing module 490, and a sending module 4100. The second receiving module 480 is configured to receive a response message sent by the second terminal through the service class. The second parsing module 490 is configured to parse the response message according to the second communication protocol to obtain the response content, and the first terminal to which the response message is communicated. The sending module 4100 is configured to convert the response content into a message of the first communication protocol, and send the message to the first terminal.
In one embodiment of the present disclosure, the first communication protocol is one of HTTP and TCP, and the second communication protocol is the other of HTTP and TCP.
According to still another aspect of the embodiments of the present disclosure, there is also provided a server, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions. Fig. 5 is a block diagram illustrating a server 200 for cross-protocol communication in accordance with an example embodiment. As shown in fig. 5, the server 200 includes:
a memory 210 and a processor 220, a bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 storing a computer program, and the processor 220 implementing the cross-protocol communication method according to the embodiment of the present disclosure when executing the program.
Bus 230 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Server 200 typically includes a variety of electronic device readable media. Such media may be any available media that is accessible by server 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)240 and/or cache memory 250. The server 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). A magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 230 by one or more data media interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the disclosure.
A program/utility 280 having a set (at least one) of program modules 270, including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment, may be stored in, for example, the memory 210. The program modules 270 generally perform the functions and/or methodologies of the embodiments described in this disclosure.
The server 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), with one or more devices that enable a user to interact with the server 200, and/or with any devices (e.g., network card, modem, etc.) that enable the server 200 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 292. Also, server 200 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via network adapter 293. As shown in FIG. 5, network adapter 293 communicates with the other modules of server 200 via bus 230. It should be appreciated that although not shown in FIG. 5, other hardware and/or software modules may be used in conjunction with server 200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 220 executes various functional applications and data processing by executing programs stored in the memory 210.
It should be noted that, for the implementation process and the technical principle of the server in this embodiment, reference is made to the foregoing explanation of the cross-protocol communication method in the embodiment of the present disclosure, and details are not described here again.
According to yet another aspect of the embodiments of the present disclosure, there is also provided a storage medium whose instructions, when executed by a processor of a server, enable the server to perform the cross-protocol communication method as described above.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the embodiment of the disclosure realizes cross-protocol communication by calling the service class created in advance, so that the communication can run in the same process without cross-process communication, thereby avoiding the problems of delay and performance loss caused by cross-process communication and improving the stability of cross-protocol communication. In addition, only one process is needed, so that subsequent deployment, upgrading and system maintenance are facilitated.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A method of cross-protocol communication, comprising:
receiving a request message of a first terminal, wherein the first terminal supports a first communication protocol;
analyzing the request message according to the first communication protocol to acquire the request content of the request message and a second terminal communicated with the request message;
acquiring a service class object corresponding to a second communication protocol supported by the second terminal from an object container; and
and calling the service class corresponding to the service class object, and sending the request content to the second terminal.
2. The method of claim 1, wherein prior to said obtaining the request message for the first terminal, further comprising:
and registering the service class object corresponding to the second communication protocol to the object container.
3. The method of claim 2, wherein the method is applied to a microservice development SpringBoot framework, and wherein the registering the service class corresponding to the second communication protocol to the object container comprises:
establishing a service class corresponding to the second communication protocol;
when the SpringBoot framework is started, analyzing the annotation of the service class;
and if the annotation meets the preset requirement, generating a service class object corresponding to the service class, and registering the service class object to the object container.
4. The method of claim 2, further comprising:
acquiring a service class object in the object container;
and loading the service class corresponding to the service class object into the virtual machine for calling.
5. The method of claim 1, further comprising:
receiving a response message sent by the second terminal through the service class;
analyzing the response message according to the second communication protocol to acquire response content and the first terminal communicated with the response message;
and converting the response content into a message of a first communication protocol, and sending the message to the first terminal.
6. The method of claim 1, wherein the first communication protocol is one of a hypertext transfer protocol (HTTP) and a Transmission Control Protocol (TCP), and the second communication protocol is the other of the HTTP and TCP.
7. An inter-protocol communication apparatus, comprising:
a first receiving module, configured to receive a request message of a first terminal, where the first terminal supports a first communication protocol;
the first analysis module is used for analyzing the request message according to the first communication protocol so as to obtain the request content of the request message and a second terminal communicated with the request message;
an obtaining module, configured to obtain, from an object container, a service class object corresponding to a second communication protocol supported by the second terminal; and
and the calling module is used for calling the service class corresponding to the service class object and sending the request content to the second terminal.
8. The apparatus of claim 7, further comprising:
and the object container management module is used for registering the service class object corresponding to the second communication protocol to the object container.
9. The apparatus of claim 8, wherein the apparatus is applied to a microservice development SpringBoot framework, wherein the object container management module comprises:
the establishing submodule is used for establishing a service class corresponding to the second communication protocol;
the parsing submodule is used for parsing the annotation of the service class when the SpringBoot framework is started;
and the management submodule is used for generating a service class object corresponding to the service class when the annotation meets the preset requirement, and registering the service class object to the object container.
10. The apparatus of claim 8, further comprising:
the service object acquisition module is used for acquiring the service class object in the object container;
and the loading module is used for loading the service class corresponding to the service class object into the virtual machine for calling.
11. The apparatus of claim 7, further comprising:
a second receiving module, configured to receive, through the service class, a response message sent by the second terminal;
the second analysis module is used for analyzing the response message according to the second communication protocol to acquire response content and the first terminal communicated with the response message;
and the sending module is used for converting the response content into a message of a first communication protocol and sending the message to the first terminal.
12. The apparatus of claim 7, wherein the first communication protocol is one of HTTP and TCP, and the second communication protocol is the other of HTTP and TCP.
13. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the cross-protocol communication method of any of claims 1-6.
14. A storage medium in which instructions, when executed by a processor of a server, enable the server to perform the cross-protocol communication method of any one of claims 1 to 6.
CN202011420341.6A 2020-12-07 2020-12-07 Cross-protocol communication method, device and server Pending CN112688915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011420341.6A CN112688915A (en) 2020-12-07 2020-12-07 Cross-protocol communication method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011420341.6A CN112688915A (en) 2020-12-07 2020-12-07 Cross-protocol communication method, device and server

Publications (1)

Publication Number Publication Date
CN112688915A true CN112688915A (en) 2021-04-20

Family

ID=75446209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011420341.6A Pending CN112688915A (en) 2020-12-07 2020-12-07 Cross-protocol communication method, device and server

Country Status (1)

Country Link
CN (1) CN112688915A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448689A (en) * 2021-07-09 2021-09-28 中国银行股份有限公司 Dubbo protocol conversion device and method in operation period
CN114070896A (en) * 2021-10-29 2022-02-18 深圳市优必选科技股份有限公司 Communication interface, electronic device and device management method
CN114356678A (en) * 2022-03-17 2022-04-15 北京奇立软件技术有限公司 Method and system for acquiring hardware information of equipment
CN115766874A (en) * 2022-11-21 2023-03-07 航天信息股份有限公司 Peripheral calling device, method, system, electronic device and computer storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170374180A1 (en) * 2016-06-22 2017-12-28 RtBrick Inc. Method to build a modular distributed network device using microservices architecture
CN107835178A (en) * 2017-11-13 2018-03-23 北京奇艺世纪科技有限公司 A kind of multi-protocols communication for service method, apparatus and electronic equipment
CN108989356A (en) * 2018-09-10 2018-12-11 四川长虹电器股份有限公司 A kind of method that API gateway realizes protocol conversion
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN111221570A (en) * 2019-12-30 2020-06-02 中国平安财产保险股份有限公司 Migration method, device, equipment and storage medium of microservice framework

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170374180A1 (en) * 2016-06-22 2017-12-28 RtBrick Inc. Method to build a modular distributed network device using microservices architecture
CN107835178A (en) * 2017-11-13 2018-03-23 北京奇艺世纪科技有限公司 A kind of multi-protocols communication for service method, apparatus and electronic equipment
CN108989356A (en) * 2018-09-10 2018-12-11 四川长虹电器股份有限公司 A kind of method that API gateway realizes protocol conversion
CN109246251A (en) * 2018-11-13 2019-01-18 杭州数梦工场科技有限公司 A kind of micro services call method, device, system, equipment and readable storage medium storing program for executing
CN111221570A (en) * 2019-12-30 2020-06-02 中国平安财产保险股份有限公司 Migration method, device, equipment and storage medium of microservice framework

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113448689A (en) * 2021-07-09 2021-09-28 中国银行股份有限公司 Dubbo protocol conversion device and method in operation period
CN114070896A (en) * 2021-10-29 2022-02-18 深圳市优必选科技股份有限公司 Communication interface, electronic device and device management method
CN114070896B (en) * 2021-10-29 2023-12-15 深圳市优必选科技股份有限公司 Communication interface, electronic device and device management method
CN114356678A (en) * 2022-03-17 2022-04-15 北京奇立软件技术有限公司 Method and system for acquiring hardware information of equipment
CN115766874A (en) * 2022-11-21 2023-03-07 航天信息股份有限公司 Peripheral calling device, method, system, electronic device and computer storage medium

Similar Documents

Publication Publication Date Title
CN112688915A (en) Cross-protocol communication method, device and server
CN101436148B (en) Integrated client end and method for performing interaction of desktop application and network WEB application
CN109922158A (en) Data processing method, device, medium and electronic equipment based on micro services
US11182210B2 (en) Method for resource allocation and terminal device
CN112491948B (en) Non-invasive monomer application micro-service method, device and computer equipment
CN111737022A (en) Interface calling method, system, equipment and medium based on micro-service
CN114124929A (en) Cross-network data processing method and device
CN114221995B (en) Service calling method and device and electronic equipment
US20010011215A1 (en) Network device simulation system and method
CN114301970B (en) Service calling method, device, electronic equipment and storage medium
CN112698930B (en) Method, device, equipment and medium for obtaining server identification
CN111782420B (en) Information processing method, device, equipment and medium based on Java Web framework
CN108712298B (en) Network equipment upgrading method and device, network equipment and storage medium
CN117130933A (en) Baffle service method, system, equipment and storage medium
CN114726905B (en) Method, device, equipment and storage medium for accessing Tbox network into Android system
CN113760703B (en) A method, device, equipment and storage medium for generating mock data
CN107491330A (en) A kind of method for improving the built-in browser speed of service
US6823390B1 (en) Method of setting up data communication with a communication means and furthermore program modules and means therefor
US7685258B2 (en) Disconnectible applications
CN113918242A (en) Application programming interface calling method and device, electronic equipment and storage medium
CN118714059B (en) Method, device and storage medium for testing gateway equipment
CN112612428A (en) Method and device for improving performance of Codeigniter frame
CN112214333A (en) Webpage and local application communication protocol based on HTTP (hyper text transport protocol) and application
KR100494827B1 (en) Distributed object model based radio server with hardware-independent communication interface and communication control method using the same
CN115640153B (en) System architecture, message processing method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210420