CN109144919B - Interface switching method and device - Google Patents

Interface switching method and device Download PDF

Info

Publication number
CN109144919B
CN109144919B CN201811042181.9A CN201811042181A CN109144919B CN 109144919 B CN109144919 B CN 109144919B CN 201811042181 A CN201811042181 A CN 201811042181A CN 109144919 B CN109144919 B CN 109144919B
Authority
CN
China
Prior art keywords
interface
target
client
external system
universal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811042181.9A
Other languages
Chinese (zh)
Other versions
CN109144919A (en
Inventor
杨德胜
孔睿
贺斌
高攀
王喜坤
王杰
陈胜国
吴豪
高胜杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sichuan Zhongdian Aostar Information Technologies Co ltd
State Grid Information and Telecommunication Co Ltd
Original Assignee
Sichuan Zhongdian Aostar Information Technologies Co ltd
State Grid Information and Telecommunication 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 Sichuan Zhongdian Aostar Information Technologies Co ltd, State Grid Information and Telecommunication Co Ltd filed Critical Sichuan Zhongdian Aostar Information Technologies Co ltd
Priority to CN201811042181.9A priority Critical patent/CN109144919B/en
Publication of CN109144919A publication Critical patent/CN109144919A/en
Application granted granted Critical
Publication of CN109144919B publication Critical patent/CN109144919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/73Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information by creating or determining hardware identification, e.g. serial numbers

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明提供了一种接口转接方法及装置,通过为外部系统的通用接口分配唯一的接口编号并添加接口描述内容,就可以利用解析接口转接请求所得到的目标系统标识和目标接口编号确定目标外部系统的目标通用接口,从而将解析得到的接口参数值传入目标通用接口的参数项来完成接口转接。基于此,可以为外部系统提供企业级支持,在系统的高并发和大容量的基础上提供安全可靠的通用性接入。

Figure 201811042181

The invention provides an interface switching method and device. By assigning a unique interface number to a general interface of an external system and adding interface description content, the target system identification and target interface number obtained by parsing the interface switching request can be used to determine The target general interface of the target external system, so that the interface parameter value obtained by parsing is passed into the parameter item of the target general interface to complete the interface transfer. Based on this, it can provide enterprise-level support for external systems, and provide safe and reliable universal access on the basis of high concurrency and large capacity of the system.

Figure 201811042181

Description

一种接口转接方法及装置Interface switching method and device

技术领域technical field

本发明涉及信息管理技术领域,更具体地说,涉及一种接口转接方法及装置。The present invention relates to the technical field of information management, and more particularly, to an interface switching method and device.

背景技术Background technique

计算机世界的接口具有两种含义:其一是指外部系统本身的接口,比如软件开发API,其二则是用户与外部系统之间的交互界面。The interface of the computer world has two meanings: one is the interface of the external system itself, such as software development API, and the other is the interactive interface between the user and the external system.

用户通过接口访问外部系统时,由于外部系统请求参数传输具有差异性,即使该接口属于通用接口,也必须针对性请求。因此,如何为外部系统提供通用性接入,是本领域技术人员亟需解决的问题。When a user accesses an external system through an interface, due to the differences in the transmission of parameters requested by the external system, even if the interface belongs to a general interface, a specific request must be made. Therefore, how to provide universal access for external systems is an urgent problem to be solved by those skilled in the art.

发明内容SUMMARY OF THE INVENTION

有鉴于此,为解决上述问题,本发明提供一种接口转接方法及装置,技术方案如下:In view of this, in order to solve the above problems, the present invention provides an interface switching method and device, and the technical solutions are as follows:

一种接口转接方法,包括:An interface transfer method, comprising:

为外部系统的通用接口分配唯一的接口编号,并为所述通用接口添加接口描述内容;其中,所述接口描述内容至少包括所述通用接口的参数项和所述外部系统的系统标识;Allocate a unique interface number to the general interface of the external system, and add interface description content to the general interface; wherein, the interface description content at least includes the parameter item of the general interface and the system identifier of the external system;

在接收到客户端所发送的接口转接请求的情况下,解析所述接口转接请求得到目标系统标识、目标接口编号以及接口参数值;In the case of receiving the interface transfer request sent by the client, analyze the interface transfer request to obtain the target system identifier, the target interface number and the interface parameter value;

确定所述目标系统标识所对应的目标外部系统,以及所述目标接口编号所对应的所述目标外部系统的目标通用接口;determining the target external system corresponding to the target system identifier, and the target general interface of the target external system corresponding to the target interface number;

将所述接口参数值传入至所述目标通用接口的参数项,以使所述客户端与所述目标通用接口对接。The interface parameter value is passed into the parameter item of the target general interface, so that the client is connected to the target general interface.

优选的,所述将所述接口参数值传入至所述目标通用接口的参数项,包括:Preferably, the parameter item for passing the interface parameter value to the target general interface includes:

按照预设安全控制逻辑将所述接口参数值传入至所述目标通用接口的参数项;其中,所述预设安全控制逻辑包括安全评估、访问控制、入侵检测、口令认证、安全审计、防恶意代码和加密中的任意一种或多种。According to the preset security control logic, the interface parameter value is transferred to the parameter item of the target general interface; wherein, the preset security control logic includes security assessment, access control, intrusion detection, password authentication, security audit, anti-virus Any one or more of malicious code and encryption.

优选的,与所述客户端的通信方式包括:Preferably, the communication method with the client includes:

同步请求/应答方式、异步请求/应答方式、会话方式、广播通知方式、事件订阅方式、可靠消息传输方式和文件传输方式中的任意一种。Any of synchronous request/response, asynchronous request/response, session, broadcast notification, event subscription, reliable message transmission and file transmission.

优选的,所述接口描述内容还包括:Preferably, the interface description content further includes:

所述通用接口的参数类型和接口类型。The parameter type and interface type of the generic interface.

优选的,所述方法还包括:Preferably, the method further includes:

在接收到所述客户端所发送的访问请求的情况下,通过所述目标通用接口将所述访问请求上传至所述目标外部系统;In the case of receiving the access request sent by the client, upload the access request to the target external system through the target general interface;

在接收到所述目标外部系统通过所述目标通用接口所下发的结果数据的情况下,将所述结果数据发送至所述客户端。In the case of receiving the result data sent by the target external system through the target general interface, the result data is sent to the client.

优选的,所述将所述结果数据发送至所述客户端之前,所述方法还包括:Preferably, before the sending the result data to the client, the method further includes:

对所述结果数据进行格式转换。Format conversion is performed on the result data.

一种接口转接装置,包括:An interface switching device, comprising:

注册模块,用于为外部系统的通用接口分配唯一的接口编号,并为所述通用接口添加接口描述内容;其中,所述接口描述内容至少包括所述通用接口的参数项和所述外部系统的系统标识;The registration module is used for assigning a unique interface number to the general interface of the external system, and adding interface description content to the general interface; wherein, the interface description content at least includes the parameter items of the general interface and the parameters of the external system. system identification;

解析模块,用于在接收到客户端所发送的接口转接请求的情况下,解析所述接口转接请求得到目标系统标识、目标接口编号以及接口参数值;a parsing module, configured to analyze the interface switching request to obtain a target system identifier, a target interface number and an interface parameter value after receiving the interface switching request sent by the client;

确定模块,用于确定所述目标系统标识所对应的目标外部系统,以及所述目标接口编号所对应的所述目标外部系统的目标通用接口;a determining module, configured to determine the target external system corresponding to the target system identifier, and the target general interface of the target external system corresponding to the target interface number;

传入模块,用于将所述接口参数值传入至所述目标通用接口的参数项,以使所述客户端与所述目标通用接口对接。The inputting module is configured to input the interface parameter value to the parameter item of the target general interface, so as to connect the client with the target general interface.

优选的,所述传入模块,具体用于:Preferably, the incoming module is specifically used for:

按照预设安全控制逻辑将所述接口参数值传入至所述目标通用接口的参数项;其中,所述预设安全控制逻辑包括安全评估、访问控制、入侵检测、口令认证、安全审计、防恶意代码和加密中的任意一种或多种。According to the preset security control logic, the interface parameter value is transferred to the parameter item of the target general interface; wherein, the preset security control logic includes security assessment, access control, intrusion detection, password authentication, security audit, anti-virus Any one or more of malicious code and encryption.

优选的,所述装置还包括:Preferably, the device further includes:

上传模块,用于在接收到所述客户端所发送的访问请求的情况下,通过所述目标通用接口将所述访问请求上传至所述目标外部系统;an uploading module, configured to upload the access request to the target external system through the target general interface when receiving the access request sent by the client;

发送模块,用于在接收到所述目标外部系统通过所述目标通用接口所下发的结果数据的情况下,将所述结果数据发送至所述客户端。A sending module, configured to send the result data to the client when receiving the result data sent by the target external system through the target general interface.

优选的,所述发送模块还用于:Preferably, the sending module is also used for:

对所述结果数据进行格式转换。Format conversion is performed on the result data.

相较于现有技术,本发明实现的有益效果为:Compared with the prior art, the beneficial effects realized by the present invention are:

以上本发明提供的一种接口转接方法及装置,通过为外部系统的通用接口分配唯一的接口编号并添加接口描述内容,就可以利用解析接口转接请求所得到的目标系统标识和目标接口编号确定目标外部系统的目标通用接口,从而将解析得到的接口参数值传入目标通用接口的参数项来完成接口转接。基于此,可以为外部系统提供企业级支持,在系统的高并发和大容量的基础上提供安全可靠的通用性接入。The above interface switching method and device provided by the present invention can use the target system identification and target interface number obtained by parsing the interface switching request by assigning a unique interface number to the general interface of the external system and adding the interface description content. Determine the target general interface of the target external system, so that the interface parameter value obtained by parsing is passed into the parameter item of the target general interface to complete the interface transfer. Based on this, it can provide enterprise-level support for external systems, and provide safe and reliable universal access based on the high concurrency and large capacity of the system.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without creative work.

图1为本发明实施例提供的接口转接方法的方法流程图;1 is a method flowchart of an interface switching method provided by an embodiment of the present invention;

图2为本发明实施例提供的接口转接方法的另一方法流程图;2 is a flowchart of another method of an interface switching method provided by an embodiment of the present invention;

图3为本发明实施例提供的接口转接装置的结构示意图。FIG. 3 is a schematic structural diagram of an interface switching device provided by an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例提供一种接口转接方法,该方法的方法流程图如图1所示,包括如下步骤:An embodiment of the present invention provides an interface switching method. The method flowchart of the method is shown in FIG. 1 , and includes the following steps:

S10,为外部系统的通用接口分配唯一的接口编号,并为通用接口添加接口描述内容;其中,接口描述内容至少包括通用接口的参数项和外部系统的系统标识。S10, assign a unique interface number to the general interface of the external system, and add interface description content to the general interface; wherein, the interface description content at least includes the parameter item of the general interface and the system identifier of the external system.

在执行步骤S10的过程中,通过搜集各外部系统的通用接口,比如获取用户信息的接口做统一管理。而为通用接口所分配的唯一的接口编号可以随机生成,还可以按照一定规则设置。In the process of executing step S10, unified management is performed by collecting common interfaces of various external systems, such as interfaces for acquiring user information. The unique interface number assigned to the general interface can be randomly generated or set according to certain rules.

以获取用户信息的接口为例,为其所添加的接口描述内容包括参数项empNo以及含有该接口的外部系统的系统标识,具体可以为外部系统的系统名称、系统编号或者系统简称等等。Taking the interface for obtaining user information as an example, the added interface description content includes the parameter item empNo and the system identifier of the external system containing the interface, which may be the system name, system number, or system abbreviation of the external system.

此外,接口描述内容还可以包括通用接口的参数类型和接口类型,比如,获取用户信息的接口的参数类型为string、接口类型为POST。当然,接口类型还可以为可扩展的标记语言XML、简单对象访问协议SOAP、会话bean、实体bean和消息驱动bean。In addition, the interface description content may also include the parameter type and interface type of the general interface, for example, the parameter type of the interface for obtaining user information is string, and the interface type is POST. Of course, the interface types can also be extensible markup language XML, Simple Object Access Protocol SOAP, session beans, entity beans, and message-driven beans.

S20,在接收到客户端所发送的接口转接请求的情况下,解析接口转接请求得到目标系统标识、目标接口编号以及接口参数值。S20, in the case of receiving the interface transfer request sent by the client, parse the interface transfer request to obtain the target system identifier, the target interface number and the interface parameter value.

为提高与客户端的通信效率,本实施例中,与客户端的通信方式包括:同步请求/应答方式、异步请求/应答方式、会话方式、广播通知方式、事件订阅方式、可靠消息传输方式和文件传输方式中的任意一种。In order to improve the communication efficiency with the client, in this embodiment, the communication methods with the client include: synchronous request/response, asynchronous request/response, session, broadcast notification, event subscription, reliable message transmission, and file transmission. any of the ways.

以下对上述通信方式分别进行简单介绍:The above communication methods are briefly introduced as follows:

同步请求/应答方式:客户端向服务器端发送服务请求,客户端阻塞等待服务器端返回处理结果。Synchronous request/response mode: The client sends a service request to the server, and the client blocks and waits for the server to return the processing result.

异步请求/应答方式:客户端向服务器端发送服务请求,与同步方式不同的是,在此方式下,服务器端处理请求时,客户端继续运行;当服务器端处理结束时返回处理结果。Asynchronous request/response mode: The client sends a service request to the server. Different from the synchronous mode, in this mode, when the server processes the request, the client continues to run; when the server process ends, the processing result is returned.

会话方式:客户端与服务器端建立连接后,可以多次发送或接收数据,同时存储信息的上下文关系。Session mode: After the client establishes a connection with the server, it can send or receive data multiple times and store the context of the information at the same time.

广播通知方式:由服务器端主动向客户端以单个或批量方式发出未经客户端请求的广播或通知消息,客户端可在适当的时候检查是否收到消息并定义收到消息后所采取的动作。Broadcast notification method: The server side actively sends out broadcast or notification messages that are not requested by the client side in a single or batch manner to the client side. The client side can check whether the message is received at the appropriate time and define the actions to be taken after receiving the message. .

事件订阅方式:客户端可事先向服务器端订阅自定义的事件,当这些事件发生时,服务器端通知客户端事件发生,客户端可采取相应处理。事件订阅方式使客户端拥有了个性化的事件触发功能,极大方便了客户端及时响应所订阅的事件。Event subscription method: The client can subscribe custom events to the server in advance. When these events occur, the server notifies the client that the event occurs, and the client can take corresponding processing. The event subscription method enables the client to have a personalized event triggering function, which greatly facilitates the client to respond to the subscribed events in a timely manner.

可靠消息传输方式:在接口通讯中,基于消息的传输处理方式,除了可采用以上几种通讯方式外,还可采用可靠消息传输方式,即通过存储队列方式,客户端和服务器端来传输消息,采取相应处理。Reliable message transmission method: In the interface communication, the message-based transmission processing method, in addition to the above communication methods, can also adopt the reliable message transmission method, that is, through the storage queue method, the client and the server transmit messages, Take appropriate action.

文件传输方式:客户端和服务器端通过文件的方式来传输消息,并采取相应处理。File transmission mode: The client and server transmit messages through files, and take corresponding processing.

S30,确定目标系统标识所对应的目标外部系统,以及目标接口编号所对应的目标外部系统的目标通用接口。S30, determine the target external system corresponding to the target system identifier and the target general interface of the target external system corresponding to the target interface number.

S40,将接口参数值传入至目标通用接口的参数项,以使客户端与目标通用接口对接。S40, the interface parameter value is passed into the parameter item of the target general interface, so that the client is connected to the target general interface.

为保证接口的数据传输和数据处理的安全性,可以结合接口连接特点与业务特色,制定专门的安全技术实施策略。具体可以按照预设安全控制逻辑将接口参数值传入至目标通用接口的参数项;其中,In order to ensure the security of data transmission and data processing of the interface, a special security technology implementation strategy can be formulated in combination with the interface connection characteristics and business characteristics. Specifically, the interface parameter value can be passed into the parameter item of the target general interface according to the preset security control logic; wherein,

预设安全控制逻辑包括安全评估、访问控制、入侵检测、口令认证、安全审计、防恶意代码和加密中的任意一种或多种。The preset security control logic includes any one or more of security assessment, access control, intrusion detection, password authentication, security audit, anti-malware code and encryption.

在其他一些实施例中,为建立客户端访问机制,在图1所示出接口转接方法的基础上,还包括如下步骤,方法流程图如图2所示:In some other embodiments, in order to establish a client access mechanism, on the basis of the interface switching method shown in FIG. 1 , the following steps are further included, and the method flowchart is shown in FIG. 2 :

S50,在接收到客户端所发送的访问请求的情况下,通过目标通用接口将访问请求上传至目标外部系统。S50, in the case of receiving the access request sent by the client, upload the access request to the target external system through the target general interface.

为提高接口吞吐能力,保证整体处理能力。目标通用接口可以采用负载均衡、伸缩性与动态配置管理或者网络调度等手段处理客户端所发送的访问请求。In order to improve the throughput of the interface and ensure the overall processing capacity. The target general interface can handle the access request sent by the client by means of load balancing, scalability and dynamic configuration management, or network scheduling.

负载均衡:为了确保接口服务吞吐量最大,接口应自动地在系统中完成动态负载均衡调度。Load balancing: In order to ensure the maximum throughput of the interface service, the interface should automatically complete dynamic load balancing scheduling in the system.

伸缩性与动态配置管理:由系统自动伸缩管理方式或动态配置管理方式实现队列管理、存取资源管理,以及接口应用的恢复处理等。Scalability and dynamic configuration management: Queue management, access resource management, and interface application recovery processing are implemented by the system's automatic scaling management mode or dynamic configuration management mode.

网络调度:在双方接口之间设置多个网络通道,实现接口的多数据通道和容错性,保证当有一网络通道通讯失败时,进行自动的切换,实现接口连接的自动恢复。Network scheduling: Set up multiple network channels between the two interfaces to realize multiple data channels and fault tolerance of the interface, to ensure that when a network channel fails to communicate, it will automatically switch to realize the automatic recovery of the interface connection.

S60,在接收到目标外部系统通过目标通用接口所下发的结果数据的情况下,将结果数据发送至客户端。S60, in the case of receiving the result data sent by the target external system through the target general interface, send the result data to the client.

在执行步骤S60的过程中,结果数据中包含有状态、类型和结果值三部分。其中,状态分为成功和失败,类型由请求方式分为GET和POST两种,而如果状态为失败,则结果值为空。In the process of executing step S60, the result data includes three parts: status, type and result value. Among them, the status is divided into success and failure, the type is divided into GET and POST by the request method, and if the status is failure, the result value is empty.

而为提高结果数据的合法性,在结果数据发送至客户端之前,还可对结果数据进行格式转换。具体是将结果数据中的结果值转换为指定格式。结果值的类型可以为文本格式,还可以为Json格式等等。In order to improve the legitimacy of the result data, before the result data is sent to the client, the result data can also be formatted. Specifically, the result value in the result data is converted into the specified format. The type of the result value can be in text format, Json format, etc.

本发明实施例提供的接口转接方法,通过为外部系统的通用接口分配唯一的接口编号并添加接口描述内容,就可以利用解析接口转接请求所得到的目标系统标识和目标接口编号确定目标外部系统的目标通用接口,从而将解析得到的接口参数值传入目标通用接口的参数项来完成接口转接。基于此,可以为外部系统提供企业级支持,在系统的高并发和大容量的基础上提供安全可靠的通用性接入。In the interface switching method provided by the embodiment of the present invention, by assigning a unique interface number to the general interface of the external system and adding the interface description content, the target system identifier and the target interface number obtained by parsing the interface switching request can be used to determine the target external The target general interface of the system, so that the interface parameter value obtained by parsing is passed into the parameter item of the target general interface to complete the interface transfer. Based on this, it can provide enterprise-level support for external systems, and provide safe and reliable universal access based on the high concurrency and large capacity of the system.

基于上述实施例提供的接口转接方法,本发明实施例对应提供一种执行上述接口转接方法的装置,该装置的结构示意图如图3所示,包括:Based on the interface switching method provided by the above-mentioned embodiment, an embodiment of the present invention correspondingly provides a device for executing the above-mentioned interface switching method. The schematic structural diagram of the device is shown in FIG. 3 , including:

注册模块10,用于为外部系统的通用接口分配唯一的接口编号,并为通用接口添加接口描述内容;其中,接口描述内容至少包括通用接口的参数项和外部系统的系统标识;The registration module 10 is used for assigning a unique interface number to the general interface of the external system, and adding interface description content for the general interface; wherein, the interface description content at least includes the parameter item of the general interface and the system identification of the external system;

解析模块20,用于在接收到客户端所发送的接口转接请求的情况下,解析接口转接请求得到目标系统标识、目标接口编号以及接口参数值;The parsing module 20 is configured to analyze the interface switching request to obtain the target system identifier, the target interface number and the interface parameter value in the case of receiving the interface switching request sent by the client;

确定模块30,用于确定目标系统标识所对应的目标外部系统,以及目标接口编号所对应的目标外部系统的目标通用接口;A determination module 30, configured to determine the target external system corresponding to the target system identifier, and the target general interface of the target external system corresponding to the target interface number;

传入模块40,用于将接口参数值传入至目标通用接口的参数项,以使客户端与目标通用接口对接。The inputting module 40 is used to input the interface parameter value to the parameter item of the target general interface, so that the client can connect with the target general interface.

可选的,传入模块40,具体用于:Optionally, the incoming module 40 is specifically used for:

按照预设安全控制逻辑将接口参数值传入至目标通用接口的参数项;其中,预设安全控制逻辑包括安全评估、访问控制、入侵检测、口令认证、安全审计、防恶意代码和加密中的任意一种或多种。According to the preset security control logic, the interface parameter value is passed into the parameter item of the target general interface; wherein, the preset security control logic includes security assessment, access control, intrusion detection, password authentication, security audit, anti-malicious code and encryption. any one or more.

可选的,装置还包括:Optionally, the device further includes:

上传模块,用于在接收到客户端所发送的访问请求的情况下,通过目标通用接口将访问请求上传至目标外部系统;The uploading module is used to upload the access request to the target external system through the target general interface when receiving the access request sent by the client;

发送模块,用于在接收到目标外部系统通过目标通用接口所下发的结果数据的情况下,将结果数据发送至客户端。The sending module is configured to send the result data to the client when receiving the result data sent by the target external system through the target general interface.

可选的,发送模块还用于:Optionally, the sending module is also used to:

对结果数据进行格式转换。Format conversion of the resulting data.

本发明实施例提供的接口转接装置,可以为外部系统提供企业级支持,在系统的高并发和大容量的基础上提供安全可靠的通用性接入。The interface switching device provided by the embodiment of the present invention can provide enterprise-level support for external systems, and provide safe and reliable universal access on the basis of high concurrency and large capacity of the system.

以上对本发明所提供的一种接口转接方法及装置进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。An interface switching method and device provided by the present invention have been introduced in detail above. The principles and implementations of the present invention are described with specific examples in this paper. The descriptions of the above embodiments are only used to help understand the present invention. method and its core idea; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation and application scope. Invention limitations.

需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts among the various embodiments, refer to each other Can. As for the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method.

还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备所固有的要素,或者是还包括为这些过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this document, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply those entities or operations There is no such actual relationship or order between them. Furthermore, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article, or device of a list of elements is included, inherent to, or is also included for, those processes. , method, article or device inherent elements. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. An interface switching method, comprising:
collecting a universal interface of each external system;
allocating a unique interface number for a universal interface of an external system, and adding interface description content for the universal interface; wherein the interface description content at least comprises parameter items of the universal interface and system identification of the external system;
under the condition of receiving an interface switching request sent by a client, analyzing the interface switching request to obtain a target system identifier, a target interface number and an interface parameter value;
determining a target external system corresponding to the target system identification and a target universal interface of the target external system corresponding to the target interface number;
transmitting the interface parameter values to the parameter items of the target universal interface so as to enable the client to be in interface with the target universal interface; the passing of the interface parameter values to the parameter items of the target generic interface comprises: transmitting the interface parameter values to the parameter items of the target universal interface according to a preset safety control logic; the preset security control logic comprises any one or more of security assessment, access control, intrusion detection, password authentication, security audit, malicious code prevention and encryption.
2. The method of claim 1, wherein the means of communicating with the client comprises:
any one of a synchronous request/response mode, an asynchronous request/response mode, a session mode, a broadcast notification mode, an event subscription mode, a reliable message transmission mode, and a file transmission mode.
3. The method of claim 1, wherein the interface description further comprises:
the parameter type and the interface type of the general interface.
4. The method of claim 1, further comprising:
uploading the access request to the target external system through the target general interface under the condition of receiving the access request sent by the client;
and under the condition of receiving result data issued by the target external system through the target universal interface, sending the result data to the client.
5. The method of claim 4, wherein prior to sending the result data to the client, the method further comprises:
and carrying out format conversion on the result data.
6. An interface adapter device, comprising:
the device is used for collecting the universal interfaces of all external systems;
the system comprises a registration module, a data processing module and a data processing module, wherein the registration module is used for allocating a unique interface number for a general interface of an external system and adding interface description content for the general interface; wherein the interface description content at least comprises parameter items of the universal interface and system identification of the external system;
the analysis module is used for analyzing the interface switching request to obtain a target system identifier, a target interface number and an interface parameter value under the condition of receiving the interface switching request sent by the client;
a determining module, configured to determine a target external system corresponding to the target system identifier and a target universal interface of the target external system corresponding to the target interface number;
an input module, configured to input the interface parameter value into a parameter item of the target universal interface, so that the client interfaces with the target universal interface;
the incoming module is specifically configured to: transmitting the interface parameter values to the parameter items of the target universal interface according to a preset safety control logic; the preset security control logic comprises any one or more of security assessment, access control, intrusion detection, password authentication, security audit, malicious code prevention and encryption.
7. The apparatus of claim 6, further comprising:
the uploading module is used for uploading the access request to the target external system through the target general interface under the condition of receiving the access request sent by the client;
and the sending module is used for sending the result data to the client under the condition of receiving the result data sent by the target external system through the target universal interface.
8. The apparatus of claim 7, wherein the sending module is further configured to:
and carrying out format conversion on the result data.
CN201811042181.9A 2018-09-07 2018-09-07 Interface switching method and device Active CN109144919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811042181.9A CN109144919B (en) 2018-09-07 2018-09-07 Interface switching method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811042181.9A CN109144919B (en) 2018-09-07 2018-09-07 Interface switching method and device

Publications (2)

Publication Number Publication Date
CN109144919A CN109144919A (en) 2019-01-04
CN109144919B true CN109144919B (en) 2022-03-29

Family

ID=64827601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811042181.9A Active CN109144919B (en) 2018-09-07 2018-09-07 Interface switching method and device

Country Status (1)

Country Link
CN (1) CN109144919B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110336826B (en) * 2019-07-12 2021-06-08 北京字节跳动网络技术有限公司 Method, device, equipment and storage medium for acquiring interface parameter types
CN114608695B (en) * 2021-12-03 2024-01-19 北京复兴华创技术有限公司 Electronic scale reading system, method, medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102090075A (en) * 2008-07-24 2011-06-08 三星电子株式会社 Method and apparatus for performing IPTV communication service
CN103957204A (en) * 2014-04-23 2014-07-30 福州柏科网安信息技术有限公司 Method for universal adaptation for communication with safety device interfaces
CN104252339A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Method and device for developing interface layers and realizing data interaction of interface layers
CN104852939A (en) * 2014-02-18 2015-08-19 中国电信股份有限公司 Capability interface deploying method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102090075A (en) * 2008-07-24 2011-06-08 三星电子株式会社 Method and apparatus for performing IPTV communication service
CN104252339A (en) * 2013-06-25 2014-12-31 腾讯科技(深圳)有限公司 Method and device for developing interface layers and realizing data interaction of interface layers
CN104852939A (en) * 2014-02-18 2015-08-19 中国电信股份有限公司 Capability interface deploying method and system
CN103957204A (en) * 2014-04-23 2014-07-30 福州柏科网安信息技术有限公司 Method for universal adaptation for communication with safety device interfaces

Also Published As

Publication number Publication date
CN109144919A (en) 2019-01-04

Similar Documents

Publication Publication Date Title
US11411897B2 (en) Communication method and communication apparatus for message queue telemetry transport
EP3117590B1 (en) Computer system to support failover in an event stream processing system
JP6686033B2 (en) Method and apparatus for pushing messages
US7451209B1 (en) Improving reliability and availability of a load balanced server
CN115118705A (en) Industrial edge management and control platform based on micro-service
CN104980333B (en) Pushlet Instant Messaging Method and Platform
US20240089343A1 (en) Service layer-based methods to enable efficient analytics of iot data
CN111240862A (en) Universal interface platform and data conversion method
CN102938770A (en) Method for realizing uniform interface for multi-protocol messages and related device and system
US8938680B2 (en) Methods and apparatus for E-mail-based management of virtualized environments
CN103457802A (en) Information transmission system and method
CN107168853A (en) A kind of server performance information acquisition method, system and substrate control manager
CN109144919B (en) Interface switching method and device
CN114598749A (en) Service access method and device
CN116595099A (en) Highly concurrent data asynchronous processing method and device
US11533597B2 (en) Method for processing message in M2M system and device therefor
CN116668557A (en) Data transmission method, system, electronic equipment and readable storage medium
CN1939035B (en) Method and apparatus for communicating data between computer devices
CN106941522B (en) Lightweight distributed computing platform and data processing method thereof
CN111130905A (en) Distributed cluster-based log level dynamic adjustment method
CN110708309A (en) Anti-crawler system and method
CN104426876A (en) Method for obtaining security information in cloud, and method and device for reporting security information in cloud
CN111182066A (en) Log level dynamic adjustment method based on token authentication
CN104717258B (en) A kind of data transmission method for uplink and system
CN114025005B (en) Data communication method, system, 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
GR01 Patent grant
GR01 Patent grant