CN113051202A - Interface adaptation method, device, electronic equipment and computer readable storage medium - Google Patents

Interface adaptation method, device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN113051202A
CN113051202A CN201911372846.7A CN201911372846A CN113051202A CN 113051202 A CN113051202 A CN 113051202A CN 201911372846 A CN201911372846 A CN 201911372846A CN 113051202 A CN113051202 A CN 113051202A
Authority
CN
China
Prior art keywords
interface
protocol
interface protocol
service processing
adapter
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
CN201911372846.7A
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.)
China Mobile Communications Group Co Ltd
China Mobile Group Henan Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Group Henan 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 China Mobile Communications Group Co Ltd, China Mobile Group Henan Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911372846.7A priority Critical patent/CN113051202A/en
Publication of CN113051202A publication Critical patent/CN113051202A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/387Information transfer, e.g. on bus using universal interface adapter for adaptation of different data processing systems to different peripheral devices, e.g. protocol converters for incompatible systems, open system

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the invention provides an interface adaptation method, an interface adaptation device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through the interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; and formatting the result of the service processing through the interface adapter to obtain a response message, and sending the response message. The embodiment of the invention can reduce the repeated code amount of the interfaces of different systems during adaptation.

Description

Interface adaptation method, device, electronic equipment and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an interface adaptation method, an interface adaptation apparatus, an electronic device, and a computer-readable storage medium.
Background
With the continuous development of the internet, a plurality of interface protocols are often involved in the docking process of different systems, and with the continuous increase of the complexity of the systems, more requirements are put on how to adapt the interface protocols between the systems.
When the existing system is used for adapting to different interface protocols, the existing system is mostly realized by adopting a hard coding mode, and when the existing system is used for adapting to interfaces with different interface protocols, a large amount of code repetition can be caused inevitably.
Disclosure of Invention
An object of the embodiments of the present invention is to provide an interface adaptation method, an interface adaptation apparatus, an electronic device, and a computer-readable storage medium, which can reduce the amount of codes repeated when interfaces of different systems are adapted.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides an interface adaptation method, including:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
receiving a request message through the interface adapter, and analyzing and processing the request message to obtain service data;
performing corresponding service processing on the service data to obtain a service processing result;
and formatting the result of the service processing through the interface adapter to obtain a response message, and sending the response message.
In a second aspect, an embodiment of the present invention provides an interface adaptation method, including:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
formatting the service data through the interface adapter to obtain a request message, and sending the request message;
receiving a response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result;
and performing corresponding service processing according to the service processing result to realize corresponding service.
In a third aspect, an embodiment of the present invention provides an interface adapter apparatus, including:
the interface adapter is used for acquiring an interface protocol from an interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message, and analyzing and processing the request message to obtain service data;
the service processing module is used for carrying out corresponding service processing on the service data to obtain a service processing result;
the interface adapter is also used for formatting the result of the service processing to obtain a response message and sending the response message.
In a fourth aspect, an embodiment of the present invention provides an interface adapter apparatus, including:
the interface adapter is used for acquiring an interface protocol from an interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data to obtain a request message, and sending the request message; receiving a response message, and analyzing and processing the response message to obtain a service processing result;
and the service processing module is used for carrying out corresponding service processing according to the result of the service processing so as to realize corresponding services.
In a fifth aspect, an embodiment of the present invention provides an electronic device, which is characterized by including a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a bus; the memory is used for storing a computer program; the processor is configured to execute the program stored in the memory, so as to implement the interface adaptation method according to the first aspect.
In a sixth aspect, the embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the interface adaptation method according to the first aspect.
According to the interface adaptation method, the interface adaptation device, the electronic equipment and the computer readable storage medium provided by the embodiment of the invention, the interface protocol is acquired from the interface protocol library, and the interface adapter is created based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic flowchart of an implementation manner of an interface adaptation method according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating one implementation of constructing an interface protocol library in accordance with the present invention;
fig. 3 is a flowchart illustrating another implementation manner of an interface adaptation method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a further implementation manner of the interface adaptation method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram illustrating an implementation manner of an interface adapter according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an implementation manner of the interface protocol library constructing apparatus according to the embodiment of the present invention;
fig. 7 is a schematic structural diagram illustrating another implementation manner of an interface adapter according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart illustrating an implementation manner of an interface adaptation method according to an embodiment of the present invention, where the method shown in fig. 1 may be executed by a server, and the server may be a server that performs service processing in a service processing system, for example: a number portability service system, a customer management system, and the like, as shown in fig. 1, the method at least includes:
s102, acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on the interface adapter template.
In the embodiment of the present invention, the interface protocol library may be a database created in advance and storing the interface protocol. Optionally, the interface protocol library may be a database server separately configured, or may also be a database configured in the service server, and the implementation of the present invention does not limit the configuration manner of the interface protocol library. The interface protocol may include: communication protocols and message formats; the communication protocol defines a data transmission mode, for example: TCP/IP, IPX/SPX, NetBEUI, RS-232-C, HDLC and other communication protocols, and the embodiment of the invention does not limit the type of the communication protocols; a message is a carrier of data transmission, and the format of the message defines rules for encapsulating data into a message, for example: the message formats such as XML, JSON, ProtoBuf, YAML and the like can be continuously encapsulated into packets, data packets and frames for transmission in the transmission process.
In the embodiment of the invention, the interface adapter template can be generated based on the communication protocol and the message format, and the interface protocol library can be constructed according to the generated interface protocol by the interface protocol generated by the interface adapter template. Optionally, the interface adapter template may be generated through a preset class, or may be generated through other ways.
In some optional examples, an interface adaptation class may be preset as an interface adapter template, and the preset interface adapter class may include an implementation method of a communication protocol, a conversion method of a message format, an initialization method of an adapter instance, and the like. In other optional examples, a communication protocol class and a message conversion class may be preset, the preset communication protocol class may include an implementation method of a communication protocol and an initialization method of an adapter instance, the preset message conversion class may include a conversion method of a message format, and the preset message conversion class may be inherited and overwritten by the preset communication protocol class to generate an interface adapter template. In still other alternative examples, an interface adapter class, a communication protocol class, and a message conversion class may be preset, the preset interface adapter class may include an initialization method of an adapter instance, the preset communication protocol class may include an implementation method of a communication protocol, the preset message conversion class may include a conversion method of a message format, and the preset interface adapter class may inherit and overwrite the preset communication protocol class and the preset message conversion class, and generate an interface adapter template.
And S104, receiving the request message through the interface adapter, and analyzing and processing the request message to obtain the service data.
In the embodiment of the present invention, the request packet may be a packet sent by the client and containing service data to be processed, and the request packet may be a packet conforming to an interface protocol acquired by the server from the interface protocol database, for example: the request message may be a message conforming to a communication protocol and a message format in the interface protocol. After an interface adapter is created based on an interface protocol acquired from an interface protocol database, a server can receive a request message sent by a client through a communication protocol in the interface adapter, and analyze the received request message through a message format in the interface adapter, so as to obtain service data in the request message. The implementation method adopted for receiving and/or analyzing the request message is different for different interface adapters with different communication protocols and/or different message formats.
In some optional examples, the interface protocol acquired from the interface protocol database adopts an HTTP protocol and a JSON format, and after the server creates a corresponding interface adapter based on the interface protocol, the server may receive a request packet sent by the client through the HTTP protocol in the interface adapter, and parse the received request packet through the JSON format in the interface adapter to obtain service data in the request packet. In other optional examples, the interface protocol acquired from the interface protocol database adopts an HTTP protocol and an XML format, and after the server creates a corresponding interface adapter based on the interface protocol, the server may receive a request message sent by the client through the HTTP protocol in the interface adapter, and parse the received request message through the XML format in the interface adapter to obtain service data in the request message.
And S106, performing corresponding service processing on the service data to obtain a service processing result.
In the embodiment of the present invention, a service processing method corresponding to the service processing system may be preset in the server, for example: for the server of the number portability service system, a processing method for number portability may be preset in the server, and for the server of the client management system, a processing method for client management may be preset in the server, and the like, which is not limited in the embodiment of the present invention. After the request message is analyzed through the interface adapter to obtain the service data, the server can perform corresponding service processing on the service data by calling a service processing method preset in the server to obtain a service nursing result. The embodiment of the present invention does not limit the implementation manner of the service processing performed by the server.
And S108, formatting the service processing result through the interface adapter to obtain a response message, and sending the response message.
In the embodiment of the present invention, the response packet may be a packet sent by the server and containing a result of the service processing, the response packet may be a packet obtained by formatting the result of the service processing by the server through a packet format in the interface adapter, and after the response packet is obtained, the server may send the response packet through a communication protocol in the interface adapter. The implementation methods adopted for formatting the result of the service processing and/or sending the response message are different for different interface adapters with different communication protocols and/or different message formats.
In some optional examples, the interface adapter employs an HTTP protocol and a JSON format, and after obtaining the result of the service processing, the server may format the result of the service processing through the JSON format in the interface adapter to obtain a response packet including the result of the service processing, and send the obtained response packet through the HTTP protocol in the interface adapter. In other optional examples, the interface adapter employs an HTTP protocol and an XML format, and after obtaining the result of the service processing, the server may format the result of the service processing in the XML format in the interface adapter to obtain a response packet including the result of the service processing, and send the obtained response packet through the HTTP protocol in the interface adapter.
The interface adaptation method provided by the embodiment of the invention acquires the interface protocol from the interface protocol library and creates the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
The interface adaptation method of the present invention will be described in detail with reference to the embodiments of fig. 2 to 3.
Fig. 2 is a schematic flowchart of an implementation manner of constructing an interface protocol library according to the embodiment of the present invention, where an interface adaptation method according to the embodiment of the present invention acquires an interface protocol from an interface protocol library, and before an interface adapter is created based on the interface protocol, the interface protocol library needs to be created, and after the interface protocol library is created, a server only needs to acquire the interface protocol from the created interface protocol library each time the server executes the interface adaptation method according to the embodiment of the present invention, as shown in fig. 2, the method for creating the interface protocol library according to the embodiment of the present invention at least includes:
s202, inheriting and overwriting a preset communication protocol class and a preset message conversion class through a preset interface adapter class, and generating an interface adapter template.
In the embodiment of the present invention, an interface adapter class, a communication protocol class and a message conversion class may be predefined, where the communication protocol class is used to implement receiving and sending of a message, the message conversion class is used to implement inter-translation of the message and service data, and the interface adapter class is used to combine the communication protocol class and the message conversion class, and may inherit and overwrite the communication protocol class and the message conversion class through the interface adapter class to generate an interface adapter template.
Optionally, the service processing system includes a server and a client, and the preset communication protocol class and the preset message conversion class may be inherited and overwritten by the preset interface adapter class, and a server interface adapter template and a client interface adapter template are respectively generated for the server and the client in the service processing system, so as to respectively meet requirements of the server and the client in the service processing system on an interface protocol.
In some optional examples, the predefined communication protocol class may be IProtocol, which may include the method:
public Object receive()throws Exception;
public void send(Object data)throws Exception;
public Object invoke(String methodCode,Object...objects)throws Exception;
the receive is used for receiving the message, the send is used for sending the message, the invoke is used for enhancing the universality of the implementation of the communication protocol, the receive and the send are mainly used for implementing the communication protocol in the server, and the invoke is mainly used for implementing the communication protocol in the client.
In other optional examples, the predefined packet switch class may be ITranslate, which may include the method:
public Map translate(Object message)throws Exception;
public Object translate(Map param,Object...objects)throws Exception;
the former method is used to analyze a message in a specific format to obtain service data, for example, using Map storage), and the latter method is used to format the service data into a message in a specific format.
In some alternative examples, the predefined interface adapter class may be an IAdapter, and the IAdapter may further include, in addition to inheriting the methods in the communication protocol class and the packet conversion class, a method of:
public void initAdapter(Object...params)throws Exception;
public String getInterfaceCode(Object param)throws Exception;
the initAdapter is used for initializing the adapter instance, and the getinterface code is used for analyzing the interface code from the message or the service data.
The embodiment of the present invention does not limit the types and implementation manners of the methods included in the predefined interface adapter class, communication protocol class, and message conversion class.
And S204, generating a corresponding interface protocol through the interface adapter template according to the type of the communication protocol and the type of the message format.
In the embodiment of the invention, after the interface adapter template is generated, the type of the communication protocol and the type of the message format can be determined, and the determined type of the communication protocol and the determined type of the message format are utilized to generate a plurality of interface protocol instances through the interface adapter template. For example: the communication protocol adopts an HTTP protocol, the message format adopts a JSON format, and the HTTP protocol adopting the JSON format can be generated through an interface adapter template; the communication protocol adopts HTTP protocol, the message format adopts XML format, the HTTP protocol adopting XML format can be generated through the interface adapter template, and the like.
Optionally, the service processing system includes a server and a client, and after a server interface adapter template and a client interface adapter template are respectively generated for the server and the client in the service processing system, a server interface protocol instance may be generated through the server interface adapter template and a client interface protocol instance may be generated through the client interface adapter template by using the determined type of the communication protocol and the type of the message format.
In some optional examples, taking the HTTP protocol and the JSON format as examples, after generating the interface adapter template by inheriting and overwriting IProtocol and itrasllate through the IAdapter, generating the HTTP protocol in the JSON format through the interface adapter template may be implemented as follows. Wherein the content of the first and second substances,
the conversion between the service data and the JSON format message is realized:
Figure BDA0002340153360000081
Figure BDA0002340153360000091
implementation of HTTP and JSON interface adapter (HTTP jsonserveradapter) of server:
Figure BDA0002340153360000092
Figure BDA0002340153360000101
implementation of the HTTP and JSON interface adapter (httpjson clientadapter) for clients:
Figure BDA0002340153360000102
s206, constructing an interface protocol library according to the generated interface protocol.
In the embodiment of the invention, after the multiple interface protocol instances are generated through the interface protocol template, the interface protocol library can be configured according to the multiple interface protocol instances. Table 1 is an implementation of a configuration table of an interface protocol library.
TABLE 1
Figure BDA0002340153360000111
The configuration table of the interface protocol library displays a server interface protocol and a client interface protocol which are generated through an interface adapter template according to an HTTP protocol and a JSON format.
Optionally, to improve the performance of the interface protocol library, an index may be created for the interface protocol library. Optionally, an index may be created for the interface protocol library by using an existing index creating manner, or an index may be created for the interface protocol library according to characteristics of the interface protocol library.
In some optional examples, an index may be created for the interface protocol library by associating the service processing system with the interface protocol, as shown in fig. 2, after the interface protocol library is constructed according to the generated interface protocol at S206, S208 may be further included, the service processing system is associated with the interface protocol in the interface protocol library, and the protocol number is configured for the service processing system, and the protocol number configured according to the service processing system may be used as the index of the interface protocol library. Table 2 is one implementation of the interface protocol library index.
TABLE 2
Figure BDA0002340153360000112
The number portability service system is associated with an HTTP protocol in an XML format of a server and a client in an interface protocol library, and a CSMS is configured for the number portability service system, namely, the interface protocol for communication between the client and the server is carried out in the interface protocol library by adopting a message in the XML format through the HTTP protocol and indexing through the CSMS; the client management system and the server and the client in the interface protocol library adopt the HTTP protocol in the JSON format, and the protocol number CRM is configured for the client management system, namely, the interface protocol for communication between the client and the server is carried out in the interface protocol library through CRM indexes and the messages in the JSON format through the HTTP protocol.
Fig. 3 is a schematic flowchart of another implementation manner of the interface adaptation method according to the embodiment of the present invention, where the method shown in fig. 3 is similar to the method shown in fig. 1, only the differences between the method shown in fig. 3 and the method shown in fig. 1 will be described below, and for the same operations in the method shown in fig. 3 as in fig. 1, reference may be made to the related description in fig. 1, and therefore, a description thereof will not be provided here. As shown in fig. 3, the method at least comprises:
s302, according to the protocol number, the interface protocol related to the service processing system corresponding to the protocol number is inquired in the interface protocol library, and an interface adapter is created based on the interface protocol.
In the embodiment of the present invention, when the interface protocol library is a database with an index, if the index is created by associating the service processing system with the interface protocol and configuring a protocol number for the service processing system, the interface protocol may be acquired by querying the interface protocol associated with the service processing system corresponding to the protocol number in the interface protocol library according to the protocol number of the service processing system, and the interface adapter may be created based on the interface protocol.
S304, receiving the request message through the interface adapter, and analyzing and processing the request message to obtain the service data.
S306, analyzing the interface code from the service data through the interface adapter.
Alternatively, a method for analyzing the interface code from the message or the service data may be defined in a preset interface adapter class for generating the interface adapter template, and after the request message is analyzed by the interface adapter to obtain the service data, the interface code is analyzed from the service data by the interface adapter.
In some optional examples, the interface adapter class IAdapter may include methods:
public String getInterfaceCode(Object param)throws Exception;
wherein, the getInterfaceCode is used for analyzing the interface code from the message or the service data.
S308, judging whether the interface code is a preset interface code.
If the interface code is the preset interface code, executing S310; otherwise, the service data is discarded.
In the embodiment of the present invention, the preset interface code may be data agreed in advance by the server and the client in the service processing system, and by comparing the interface code analyzed from the request packet with the preset interface code, it may be determined whether the request packet received by the server is sent by the client of the service processing system, so as to determine whether the service data in the request packet is service-processed by the server.
S310, corresponding service processing is carried out on the service data, and a service processing result is obtained.
S312, the result of the service processing is formatted through the interface adapter to obtain a response message, and the response message is sent.
In some optional examples, the core code implemented in the server by the interface adaptation method according to the embodiment of the present invention is as follows:
Figure BDA0002340153360000131
Figure BDA0002340153360000141
when the server is initialized, acquiring an interface protocol associated with the service processing system through appframe.server.name, for example, inquiring the interface protocol in an interface protocol library through protocol code CRM, and initializing the interface adapter by calling an initAdapter method of the interface adapter; when the server receives a service request, acquiring a request message by calling a receive method of an interface adapter; analyzing the request message by calling a translate method of the interface adapter to obtain service data; then, the service processing method is used for carrying out service processing on the service data; then, the result of the service processing is formatted into a response message by calling a translate method of the interface adapter; and finally, returning the response message to the client by calling the send method of the interface adapter.
Corresponding to the methods described in fig. 1 to fig. 3, based on the same technical concept, an interface adaptation method is further provided in the embodiments of the present invention, fig. 4 is a flowchart illustrating another implementation manner of the interface adaptation method in the embodiments of the present invention, the method shown in fig. 4 may be executed by a client, and the client may be a client initiating a service processing request in a service processing system, for example: a number portability service system, a customer management system and the like.
The method shown in fig. 4 is a method executed by a client corresponding to the method executed by the server shown in fig. 1, and since operations in the method executed by the client correspond to operations in the method executed by the server, the description of the operations in the method shown in fig. 4 may refer to the description of the related operations in fig. 1, and thus will not be described here again. As shown in fig. 4, the method at least comprises:
s402, acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on the interface adapter template.
S404, the business data is formatted through the interface adapter to obtain a request message, and the request message is sent.
S406, receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result.
S408, according to the result of the service processing, corresponding service processing is carried out, and corresponding service is realized.
In some optional examples, the core code implemented in the client by the interface adaptation method according to the embodiment of the present invention is as follows:
Figure BDA0002340153360000151
Figure BDA0002340153360000161
when the client side is initialized, acquiring an interface protocol associated with the service processing system by calling a getClientAdapter method of the interface adapter, for example, inquiring the interface protocol in an interface protocol library through a protocol code CRM, and initializing the interface adapter; when a client receives a service request, formatting service data by calling a translate method of an interface adapter to obtain a request message; and then sending a request message by calling an invoke method of the interface adapter. Receiving a response message; then, analyzing the response message by calling a translate method of the interface adapter to obtain a service processing result; and finally, realizing corresponding services through a service processing method according to the service processing result.
The interface adaptation method provided by the embodiment of the invention acquires the interface protocol from the interface protocol library and creates the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data through an interface adapter to obtain a request message, and sending the request message; receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result; performing corresponding service processing according to the result of the service processing to realize corresponding service; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Based on the same technical concept, corresponding to the methods described in fig. 1 to fig. 3, an embodiment of the present invention further provides an interface adaptation apparatus, and fig. 5 is a schematic structural diagram of an implementation manner of the interface adaptation apparatus according to the embodiment of the present invention, where the interface adaptation apparatus may be used to perform the interface adaptation methods described in fig. 1 to fig. 3, and as shown in fig. 5, the interface adaptation apparatus at least includes: an interface adapter 510 and a traffic processing module 520, wherein the interface adapter 510 is connected to the traffic processing module 520.
The interface adapter 510 is used for acquiring an interface protocol from an interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; and receiving the request message, and analyzing and processing the request message to obtain the service data.
The service processing module 520 is configured to perform corresponding service processing on the service data to obtain a result of the service processing.
The interface adapter 510 is further configured to format a result of the service processing to obtain a response packet, and send the response packet.
In the embodiment of the present invention, the descriptions of the interface adapter 510 and the service processing module 520 may refer to the descriptions of S102 to S108 in fig. 1, and therefore, the descriptions will not be repeated here.
The interface adapter device provided by the embodiment of the invention acquires the interface protocol from the interface protocol library and establishes the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Optionally, the interface adapter 510 is configured to query, according to the protocol number, the interface protocol associated with the service processing system corresponding to the protocol number in the interface protocol library, and create the interface adapter based on the interface protocol.
Optionally, the interface adapter 510 is further configured to parse the interface code from the service data through the interface adapter; judging whether the interface code is a preset interface code; and if the interface code is not the preset interface code, discarding the service data.
And the service processing module 520 is configured to perform corresponding service processing on the service data to obtain a service processing result if the interface code is the preset interface code.
On the basis of the same technical concept, corresponding to the method described in fig. 2, an embodiment of the present invention further provides an interface protocol library constructing apparatus, and fig. 6 is a schematic diagram of a composition structure of an implementation manner of the interface protocol library constructing apparatus according to the embodiment of the present invention, where the interface protocol library constructing apparatus may be used to execute the method for constructing an interface protocol library described in fig. 2, and as shown in fig. 6, the interface protocol library constructing apparatus at least includes: the device comprises a template generating module 610, a protocol generating module 620 and a protocol library constructing module 630, wherein the template generating module 610, the protocol generating module 620 and the protocol library constructing module 630 are connected in sequence.
The template generating module 610 is configured to inherit and overwrite the preset communication protocol class and the preset packet conversion class through the preset interface adapter class, and generate an interface adapter template.
The protocol generating module 620 is configured to generate a corresponding interface protocol through the interface adapter template according to the type of the communication protocol and the type of the message format.
A protocol library constructing module 630, configured to construct an interface protocol library according to the generated interface protocol.
In the embodiment of the present invention, the descriptions of the template generating module 610, the protocol generating module 620, and the protocol library constructing module 630 may refer to the descriptions of S202 to S206 in fig. 2, and therefore, the descriptions thereof will not be repeated here.
Optionally, as shown in fig. 6, the interface protocol library constructing apparatus further includes: an index creating module 640, connected to the protocol library constructing module 630, for associating the service processing system with the interface protocol in the interface protocol library and configuring a protocol number for the service processing system; the service processing system comprises a client and a server.
On the basis of the same technical concept, corresponding to the method described in fig. 4, an embodiment of the present invention further provides an interface adaptation apparatus, fig. 7 is a schematic diagram of a composition structure of another implementation manner of the interface adaptation apparatus according to the embodiment of the present invention, and the interface adaptation apparatus may be used to execute the interface adaptation method described in fig. 4, as shown in fig. 7, the interface adaptation apparatus at least includes: the interface adapter 710 and the service processing module 720, wherein the interface adapter 710 and the service processing module 720 are connected.
The interface adapter 710 is used for acquiring an interface protocol from the interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data to obtain a request message, and sending the request message; and receiving the response message, and analyzing and processing the response message to obtain a service processing result.
And the service processing module 720 is configured to perform corresponding service processing according to the result of the service processing, so as to implement a corresponding service.
In the embodiment of the present invention, the descriptions of the interface adapter 710 and the service processing module 720 may refer to the descriptions of S102 to S108 in fig. 1, and therefore, the descriptions will not be repeated here.
The interface adapter device provided by the embodiment of the invention acquires the interface protocol from the interface protocol library and establishes the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data through an interface adapter to obtain a request message, and sending the request message; receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result; performing corresponding service processing according to the result of the service processing to realize corresponding service; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Based on the same technical concept, the embodiment of the present invention further provides an electronic device for performing the interface adapting method of fig. 1 to 3 corresponding to the method described in fig. 1 to 3, and fig. 8 is a schematic structural diagram of an electronic device implementing the embodiment of the present invention, as shown in fig. 8. Electronic devices may vary widely in configuration or performance and may include one or more processors 801 and memory 802, where the memory 802 may store one or more stored applications or data. Wherein the memory 802 may be a transient storage or a persistent storage. The application program stored in memory 802 may include one or more modules (not shown), each of which may include a series of computer-executable instructions for a computing device. Still further, the processor 801 may be configured to communicate with the memory 802 to execute a series of computer-executable instructions in the memory 802 on a computer device. The computer apparatus may also include one or more power supplies 803, one or more wired or wireless network interfaces 804, one or more input-output interfaces 805, one or more keyboards 806.
In this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a bus; a memory for storing a computer program; a processor for executing the program stored in the memory, implementing the following method steps:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
receiving a request message through the interface adapter, and analyzing and processing the request message to obtain service data;
performing corresponding service processing on the service data to obtain a service processing result;
and formatting the result of the service processing through the interface adapter to obtain a response message, and sending the response message.
According to the electronic equipment provided by the embodiment of the invention, the interface protocol is acquired from the interface protocol library, and the interface adapter is established based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Based on the same technical concept, embodiments of the present application further provide a computer-readable storage medium storing a computer program, where the computer program is executed by a processor to implement the following method steps:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
receiving a request message through the interface adapter, and analyzing and processing the request message to obtain service data;
performing corresponding service processing on the service data to obtain a service processing result;
and formatting the result of the service processing through the interface adapter to obtain a response message, and sending the response message.
The computer-readable storage medium provided by the embodiment of the invention acquires an interface protocol from an interface protocol library, and creates an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
On the basis of the same technical concept, corresponding to the method described in fig. 4, an embodiment of the present invention further provides an electronic device, which is configured to execute the interface adaptation method in fig. 4, and the electronic device may be implemented by using the electronic device in fig. 7, where in this embodiment, the electronic device includes a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a bus; a memory for storing a computer program; a processor for executing the program stored in the memory, implementing the following method steps:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
formatting the service data through the interface adapter to obtain a request message, and sending the request message;
receiving a response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result;
and performing corresponding service processing according to the service processing result to realize corresponding service.
According to the electronic equipment provided by the embodiment of the invention, the interface protocol is acquired from the interface protocol library, and the interface adapter is established based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data through an interface adapter to obtain a request message, and sending the request message; receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result; performing corresponding service processing according to the result of the service processing to realize corresponding service; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Based on the same technical concept, corresponding to the method described in fig. 4, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when executed by a processor, the computer program implements the following method steps:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
formatting the service data through the interface adapter to obtain a request message, and sending the request message;
receiving a response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result;
and performing corresponding service processing according to the service processing result to realize corresponding service.
The computer-readable storage medium provided by the embodiment of the invention acquires an interface protocol from an interface protocol library, and creates an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data through an interface adapter to obtain a request message, and sending the request message; receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result; performing corresponding service processing according to the result of the service processing to realize corresponding service; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
Corresponding to the methods described in fig. 1 to fig. 4, based on the same technical concept, an embodiment of the present invention further provides an interface adaptation system, where the interface adaptation system at least includes: the system comprises an interface protocol library, a server and a client, wherein the interface protocol library, the server and the client are connected with each other.
The interface protocol library is used for storing interface protocols; the interface protocol library is constructed based on the interface adapter template.
The server is used for acquiring the interface protocol from the interface protocol library and creating an interface adapter based on the interface protocol; receiving a request message through an interface adapter, and analyzing and processing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; and formatting the service processing result through the interface adapter to obtain a response message, and sending the response message.
The client is used for acquiring the interface protocol from the interface protocol library and creating an interface adapter based on the interface protocol; formatting the service data through an interface adapter to obtain a request message, and sending the request message; receiving the response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result; and performing corresponding service processing according to the service processing result to realize corresponding service.
The interface adaptation system provided by the embodiment of the invention stores the interface protocol through the interface protocol library, wherein the interface protocol library is constructed based on the interface adapter template; the server acquires an interface protocol from an interface protocol library and creates an interface adapter based on the interface protocol; analyzing the request message to obtain service data; performing corresponding service processing on the service data to obtain a service processing result; formatting the result of the service processing through an interface adapter to obtain a response message, and sending the response message; the client acquires an interface protocol from the interface protocol library and creates an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data to obtain a request message, and sending the request message; receiving a response message, and analyzing and processing the response message to obtain a service processing result; according to the result of the service processing, corresponding service processing is carried out to realize corresponding service; the interface protocol library is constructed by utilizing the interface adapter template, when the service processing system carries out service processing, the interface adapter is established by calling the interface protocol in the interface protocol library, the interface protocol is loaded, the interface protocol can be separated from the service processing, therefore, when the interfaces of different systems are adapted, only the uniform interface protocol in the interface protocol library needs to be called, the repeated code amount of the interfaces of different systems during adaptation can be reduced, the interface protocol is uniformly configured through the interface protocol library, repeated development can be reduced, the compatibility of the interfaces under interaction of various protocols and various modes can be realized, the risk caused by protocol change can be reduced, and the expansibility can be improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. An interface adaptation method, comprising:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
receiving a request message through the interface adapter, and analyzing and processing the request message to obtain service data;
performing corresponding service processing on the service data to obtain a service processing result;
and formatting the result of the service processing through the interface adapter to obtain a response message, and sending the response message.
2. The method according to claim 1, wherein before the obtaining the interface protocol from the interface protocol library and creating the interface adapter based on the interface protocol, further comprising:
generating an interface adapter template by inheriting and overwriting a preset communication protocol class and a preset message conversion class by a preset interface adapter class;
generating a corresponding interface protocol through the interface adapter template according to the type of the communication protocol and the type of the message format;
and constructing the interface protocol library according to the generated interface protocol.
3. The method according to claim 2, wherein after the constructing the interface protocol library according to the generated interface protocol, further comprising:
associating a service processing system with an interface protocol in the interface protocol library, and configuring a protocol number for the service processing system; the business processing system comprises a client and a server.
4. The method of claim 3, wherein the retrieving the interface protocol from the interface protocol library and creating the interface adapter comprises:
and inquiring an interface protocol associated with the service processing system corresponding to the protocol number in the interface protocol library according to the protocol number, and creating the interface adapter based on the interface protocol.
5. The method according to any one of claims 1 to 4, wherein the receiving, by the interface adapter, a request packet, and performing parsing processing on the request packet to obtain service data further comprises:
analyzing an interface code from the service data through the interface adapter;
judging whether the interface code is a preset interface code; if the interface code is a preset interface code, performing corresponding service processing on the service data to obtain a service processing result; otherwise, the service data is discarded.
6. An interface adaptation method, comprising:
acquiring an interface protocol from an interface protocol library, and creating an interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template;
formatting the service data through the interface adapter to obtain a request message, and sending the request message;
receiving a response message through the interface adapter, and analyzing and processing the response message to obtain a service processing result;
and performing corresponding service processing according to the service processing result to realize corresponding service.
7. An interface adapter device, comprising:
the interface adapter is used for acquiring an interface protocol from an interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; receiving a request message, and analyzing and processing the request message to obtain service data;
the service processing module is used for carrying out corresponding service processing on the service data to obtain a service processing result;
the interface adapter is also used for formatting the result of the service processing to obtain a response message and sending the response message.
8. An interface adapter device, comprising:
the interface adapter is used for acquiring an interface protocol from an interface protocol library and creating the interface adapter based on the interface protocol; the interface protocol library is constructed based on an interface adapter template; formatting the service data to obtain a request message, and sending the request message; receiving a response message, and analyzing and processing the response message to obtain a service processing result;
and the service processing module is used for carrying out corresponding service processing according to the result of the service processing so as to realize corresponding services.
9. An electronic device comprising a processor, a communication interface, a memory, and a communication bus; the processor, the communication interface and the memory complete mutual communication through a bus; the memory is used for storing a computer program; the processor is used for executing the program stored on the memory and realizing the interface adaptation method according to any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the interface adaptation method according to any one of claims 1-5.
CN201911372846.7A 2019-12-27 2019-12-27 Interface adaptation method, device, electronic equipment and computer readable storage medium Pending CN113051202A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911372846.7A CN113051202A (en) 2019-12-27 2019-12-27 Interface adaptation method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911372846.7A CN113051202A (en) 2019-12-27 2019-12-27 Interface adaptation method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113051202A true CN113051202A (en) 2021-06-29

Family

ID=76505983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911372846.7A Pending CN113051202A (en) 2019-12-27 2019-12-27 Interface adaptation method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113051202A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500676A (en) * 2021-12-28 2022-05-13 山东浪潮工业互联网产业股份有限公司 Information interaction method and device among industrial internet devices and storage medium
CN115801920A (en) * 2022-10-13 2023-03-14 深圳市正浩创新科技股份有限公司 Communication method, communication chip, electronic device, and computer-readable storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050149941A1 (en) * 2004-01-05 2005-07-07 Information Builders, Inc. Framework for adapter used in enterprise application integration
CN1767530A (en) * 2004-10-29 2006-05-03 北京航空航天大学 Adapter
CN102413057A (en) * 2011-12-22 2012-04-11 北京新媒传信科技有限公司 Method and system for providing service application in internet
CN102868623A (en) * 2012-09-10 2013-01-09 北京用友政务软件有限公司 Data exchange method capable of simultaneously supporting multiple communication protocols and multiple packet specifications
CN106293651A (en) * 2015-05-19 2017-01-04 深圳中兴网信科技有限公司 The implementation method of a kind of general-purpose interface and device
CN107656874A (en) * 2017-11-07 2018-02-02 中国银行股份有限公司 A kind of interface test method, device, simulation baffle plate and system
CN110351325A (en) * 2018-04-08 2019-10-18 腾讯科技(深圳)有限公司 A kind of data processing method and relevant device
CN110474915A (en) * 2019-08-20 2019-11-19 苏州恒志汇智能科技有限公司 A kind of design method of industrial protocol dynamic self-adapting adaption system
CN110519254A (en) * 2019-08-21 2019-11-29 科大国创软件股份有限公司 A kind of interactive interfacing protocol fitting method and its system based on script

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050149941A1 (en) * 2004-01-05 2005-07-07 Information Builders, Inc. Framework for adapter used in enterprise application integration
CN1767530A (en) * 2004-10-29 2006-05-03 北京航空航天大学 Adapter
CN102413057A (en) * 2011-12-22 2012-04-11 北京新媒传信科技有限公司 Method and system for providing service application in internet
CN102868623A (en) * 2012-09-10 2013-01-09 北京用友政务软件有限公司 Data exchange method capable of simultaneously supporting multiple communication protocols and multiple packet specifications
CN106293651A (en) * 2015-05-19 2017-01-04 深圳中兴网信科技有限公司 The implementation method of a kind of general-purpose interface and device
CN107656874A (en) * 2017-11-07 2018-02-02 中国银行股份有限公司 A kind of interface test method, device, simulation baffle plate and system
CN110351325A (en) * 2018-04-08 2019-10-18 腾讯科技(深圳)有限公司 A kind of data processing method and relevant device
CN110474915A (en) * 2019-08-20 2019-11-19 苏州恒志汇智能科技有限公司 A kind of design method of industrial protocol dynamic self-adapting adaption system
CN110519254A (en) * 2019-08-21 2019-11-29 科大国创软件股份有限公司 A kind of interactive interfacing protocol fitting method and its system based on script

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
[美]凯S.霍斯特曼: "《Java核心技术卷I基础知识(原书第10版)》", 30 September 2016, 机械工业出版社 *
何丽华等: "CBTC测试平台通用接口适配器的设计与实现", 《机电一体化》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500676A (en) * 2021-12-28 2022-05-13 山东浪潮工业互联网产业股份有限公司 Information interaction method and device among industrial internet devices and storage medium
CN114500676B (en) * 2021-12-28 2024-05-24 浪潮工业互联网股份有限公司 Information interaction method and device between industrial Internet devices and storage medium
CN115801920A (en) * 2022-10-13 2023-03-14 深圳市正浩创新科技股份有限公司 Communication method, communication chip, electronic device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN111552838B (en) Data processing method and device, computer equipment and storage medium
CN110022289B (en) Data transmission method, device and system
US7269602B2 (en) Method and device for defining objects allowing establishment of a device management tree for mobile communication devices
US8656417B2 (en) Interface for telecommunication services using uniform resource identifiers
CN107346320B (en) Data calling method and device
US11188443B2 (en) Method, apparatus and system for processing log data
CN111722947A (en) Service calling method and system
CN109522139B (en) Data table service generation and calling method, device, equipment and storage medium
CN111241182A (en) Data processing method and apparatus, storage medium, and electronic apparatus
CN109062906B (en) Translation method and device for program language resources
CN112507005B (en) Method and device for processing message
CN112311664A (en) Industrial Internet data interaction method and system and industrial gateway
CN113051202A (en) Interface adaptation method, device, electronic equipment and computer readable storage medium
CN111294235A (en) Data processing method, device, gateway and readable storage medium
CN112511591A (en) Method, device, equipment and medium for realizing hospital interface data interaction
CN107040613B (en) Message transmission method and system
CN113076294A (en) Information sharing method and device
CN112134900B (en) Data message processing method and device
CN109068286B (en) Information analysis method, medium and equipment
CN116049114A (en) Processing method, processor and storage medium for internationalization log
WO2017084515A1 (en) Method and device for transmitting data code stream
CN112769741B (en) Message communication method and electronic equipment
CN112001156A (en) Form processing method and device and computer readable storage medium
CN114499759B (en) Message generation method and device, electronic equipment and storage medium
CN117573395B (en) Remote scheduling method and system between micro services

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: 20210629