WO2020140679A1 - Interface docking method and apparatus, computer device and storage medium - Google Patents

Interface docking method and apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2020140679A1
WO2020140679A1 PCT/CN2019/123228 CN2019123228W WO2020140679A1 WO 2020140679 A1 WO2020140679 A1 WO 2020140679A1 CN 2019123228 W CN2019123228 W CN 2019123228W WO 2020140679 A1 WO2020140679 A1 WO 2020140679A1
Authority
WO
WIPO (PCT)
Prior art keywords
preset format
request
data
access request
code value
Prior art date
Application number
PCT/CN2019/123228
Other languages
French (fr)
Chinese (zh)
Inventor
吴锐
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020140679A1 publication Critical patent/WO2020140679A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications

Definitions

  • This application relates to an interface docking method, device, computer equipment, and storage medium.
  • an interface docking method, apparatus, computer equipment, and storage medium are provided.
  • An interface docking method includes:
  • the request object in the preset format is mapped to the corresponding domain object.
  • An interface docking device the device includes:
  • Access request receiving module used to receive the access request sent by the visitor
  • a format conversion module used for format conversion of the received request message in the access request to obtain a request object of a preset format
  • a data processing module configured to standardize the field names and code values in the received access request to obtain field names and code values in a preset format
  • a data verification module configured to perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result
  • the request object in the preset format is mapped to the corresponding domain object.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors are executed The following steps:
  • the request object in the preset format is mapped to the corresponding domain object.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
  • the request object in the preset format is mapped to the corresponding domain object.
  • FIG. 1 is an application scenario diagram of an interface docking method according to one or more embodiments.
  • FIG. 2 is a schematic flowchart of an interface docking method according to one or more embodiments.
  • FIG. 3 is a structural block diagram of an interface docking device according to one or more embodiments.
  • FIG. 4 is an internal structure diagram of a computer device according to one or more embodiments.
  • the interface docking method provided in this application can be applied to the application environment shown in FIG. 1.
  • the visitor server 102 exchanges information with the interface processing server 104 through the network through the network.
  • the interface processing server 104 receives the access request sent by the visitor server 102; the interface processing server 104 converts the format of the request message in the received access request to obtain a request object in a preset format, and converts the field in the received access request
  • the name and code value are subjected to data standardization processing to obtain the preset format field name and the preset format code value, and perform the data verification on the preset format request object, the preset format field name and the preset format code value to obtain the data Verification result; when the data verification result meets the requirements, the request object of the preset format is mapped to the corresponding domain object.
  • the visitor server 102 and the interface processing server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
  • an interface docking method is provided.
  • the method is applied to the interface processing server 104 in FIG. 1 as an example for description, including steps S220 to S300:
  • Step S220 Receive the access request sent by the visitor.
  • the visiting party can refer to one of the business parties.
  • the visiting party is the funding party and the visited party is the asset party
  • the corresponding visiting party server can refer to the funding party server
  • the visited party server can It is an asset-side server.
  • the fund-side server sends an access request to the asset-side server.
  • the asset-side server can be an interface processing server with financial business processing capabilities, or it can be an asset side that establishes a connection with the interface processing server for processing financial services. server.
  • the access request sent by the visitor can be an access request for access from different channels, such as: SOCKET request, HTTP request, etc.
  • SOCKET request can be understood as TCP/IP access.
  • SOCKET request is a so-called long connection.
  • the client and the server Once the connection is established, the terminal will not be actively disconnected, but due to various environmental factors, the connection may be disconnected, such as: the server or client host is shut down, the network is down, or there is no data transmission between the two for a long time.
  • the network firewall may disconnect the connection to free up network resources.
  • An HTTP request can be understood as an HTTP access.
  • An HTTP request is a so-called short connection, that is, the client sends a request to the server, and the connection is disconnected after the server responds. It can also be an access request accessed by different business scenarios of the same channel.
  • Step S240 Perform format conversion on the request message in the received access request to obtain a request object in a preset format.
  • the request object in a preset format may be a request object that determines a preset format according to the format type currently used by the visited party, or may be determined according to a suitable format type in the current system of the visited party
  • the request object in the preset format for example, the message format received by the current system is JSON, and the request object in the preset format is also in JSON format.
  • Format conversion refers to request messages sent by the visitor to convert request messages in other formats into JSON format.
  • the feedback message needs to be converted according to the message format adopted by the visitor. After obtaining the feedback message corresponding to the visitor's format, it will correspond to the visitor's format.
  • the feedback message is sent to the visitor.
  • the current system uses a JSON format message. When feeding back the message to the visitor, the JSON format message is converted into a message corresponding to the visitor's format.
  • Step S260 Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format.
  • the data standardization process refers to converting the field names and code values in the received access request into the field names and code values in a preset format
  • the field names in the preset format may be the format adopted by the field name of the current system of the accessed party
  • the code value in the preset format may be the format adopted by the code value of the current system of the accessed party.
  • the field name of the access request is: amt.
  • the field name in the preset format is obtained: applyAmount.
  • Step S280 Perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result.
  • the access data in the access request needs to be verified to verify whether it meets the access requirements, so the data of the access request needs to be verified.
  • the access data access data including: request message, field name and code value, etc.
  • the data is processed check.
  • step S300 when the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
  • mapping refers to mapping the internal network (LAN) IP address of a host to a public network (WAN) IP address, when the user When accessing a port of a host that provides a mapped port, the server transfers the request to the host that provides this specific service within the local LAN; the port mapping function can also map multiple ports of an external network IP address machine to different internal networks Different ports on the machine) to the corresponding domain object, mapping the request object of the preset format to the docking interface; mapping the request object of the preset format to the corresponding domain object refers to: the IP address of the host on the external network (Ie: a request object in a preset format) is mapped to a machine in the intranet (ie: a corresponding domain object) to provide corresponding services.
  • Ie a request object in a preset format
  • the server When a user accesses this port of the IP, the server automatically maps the request To the machine in the corresponding local area network, for example: the request object M in the preset format belongs to the application information object, then the request object M in the preset format is mapped to the application information object, when the user accesses through the request object M in the preset format To directly access the application information object.
  • the field name and code value in the received access request are subjected to data standardization processing, and the step of obtaining the field name and code value in the preset format includes:
  • the request data in the access request is parsed to obtain the field name and code value in the access request;
  • the channel type of the access request refers to the access request of different access parties, and the interface type refers to the interface such as http protocol, SOCKET request Interface and so on.
  • the conversion rules are defined according to different channel types and different interface types. The conversion rules are shown in Table 1:
  • the specific data standardization processing is as follows: the request/response field is named amt. According to the channel type yzt and interface type applyCredit of the access request, the conversion rule is determined to be applyAmount*100. According to the conversion rule, the request/response After the field name is amt and the data is standardized, the standard field name is applyAmount.
  • the step of performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format, to obtain the data verification result includes:
  • the preset format request object, preset format field name and preset format code value are verified based on the data dictionary in the database.
  • the preset format request object, preset format field name and preset format code When the value corresponds to the data in the data dictionary, the data verification result meets the requirements.
  • the data dictionary refers to a directory of record databases and application metadata that users can access, which defines and describes data items, data structures, data streams, data storage, processing logic, external entities, etc., It is a collection of information describing data, a collection of definitions of all data elements used in the system. Its purpose is to give a detailed description of each element in the data flow chart, and use a data dictionary as a simple modeling project.
  • the verification result is not in compliance with the requirements; when the data is verified When the result is that the requirements are not met, the access request is rejected.
  • the request object in the preset format, the field name in the preset format, the code value in the preset format and the data in the data dictionary are analyzed, and the request object in the preset format in the access request, the field name in the preset format and the Whether the code value in the preset format meets the requirements in the data dictionary, if it does not meet the requirements, it is determined that the access request is incorrect, and it is an access request for abnormal access, so the access request.
  • the access request that do not comply with the rules and malicious access are rejected to improve security.
  • the method further includes: when the request message of the received access request is When encrypting the request message, decrypt the encrypted request message to obtain the request message.
  • the encrypted request message may be that the visitor server exchanges the public key of the algorithm with the visited server before initiating the access request, that is, the visitor server gives its public key to the visited server, and the received server receives After the public key request of the visitor server, the public key of the visited server is returned to the visitor server to realize the exchange of the two.
  • the visitor server initiates the access request, the access request is encrypted by the other party's public key, and the encrypted access is encrypted.
  • the request is transmitted through a standard Socket message object, and the decryption can be decrypted by its own private key; it can also be a request message encrypted by other request message methods.
  • the interface docking method further includes the step of: when the received request message of the access request is an encrypted request message, encrypt the return object corresponding to the format of the access party according to the encryption rules of the access party to obtain The encrypted return object sends the encrypted return object to the visitor.
  • the visitor server exchanges the public key of the algorithm with the visited server before initiating the access request, that is, the visitor server gives its public key to the visited server, and the visited server receives the request from the visitor server After that, the public key of the visited server is returned to the visited server to realize the exchange of the two.
  • the returned object needs to be fed back to the visited party, the returned object is encrypted with the other party's public key, and the encrypted access request is passed through the standard Socket message.
  • Object delivery sending the encrypted return object to the visitor. It can solve the conversion of encrypted access requests and realize the conversion of multiple access requests. Enables access to encrypted access requests.
  • the method further includes: mapping the request object of the preset format and the preset format
  • mapping the request object of the preset format and the preset format The field name and the code value of the preset format are stored in the database after the data is persisted according to the corresponding domain object.
  • data persistence refers to the conversion of the data model into a storage model (some objects in memory are saved to disk), that is, the data is persisted and will not be lost.
  • the method of data persistence is as follows: the use of attribute lists File (equivalent to a small database), persist some relatively small data, xml format, persistent array and dictionary objects, save an object in memory to a local file in a certain format, so that it can be retrieved from the file later Read the object back in.
  • the attribute list file is used to persist the request object in the preset format, the field name in the preset format, and the code value in the preset format, and the corresponding domain object in the memory is saved in the local file through the preset format. In order to read the object back from the file later.
  • an interface docking method specifically uses each funding party as the access party, the asset party as the accessed party receives the access request, and the accessed party server is an interface processing server with financial business processing capabilities, wherein, Among the various funding parties, some channels are connected by SOCKET requests, and some channels are connected by HTTP requests, for example:
  • the interface processing server receives the access request of the funder, judges the type of the access request, and determines whether decryption is required according to the type of the access request.
  • the type of the access request is a SOCKET request, it decrypts and obtains the request message.
  • the type is HTTP request, get the request message.
  • the interface processing server converts the request message into a JSON format request message, obtains the request object in a preset format, and converts the field name and code value in the received access request into the format and asset used by the field name of the current system of the asset side
  • the format of the current system code value is used to obtain the field name and the code value in the preset format.
  • the field name in the preset format and the code value in the preset format are passed through the data dictionary.
  • Check the data in the data determine whether it meets the requirements, meet the requirements, map the request objects in the preset format to the corresponding domain objects, and use the attribute list file to map the request objects in the preset format and the field names in the preset format
  • the code value of the preset format is persistent, and the corresponding domain object in the memory is saved to the local file through the preset format. If the requirements are not met, the access request is denied.
  • steps in the flowchart of FIG. 2 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The order is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an interface docking device including: an access request receiving module 310, a format conversion module 320, a data processing module 330, and a data verification module 340, wherein:
  • the access request receiving module 310 is used to receive the access request sent by the visiting party.
  • the format conversion module 320 is configured to format the request message in the received access request to obtain a request object in a preset format.
  • the data processing module 330 is configured to perform data standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format.
  • the data verification module 340 is used to perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain the data verification result.
  • the The request object of the preset format is mapped to the corresponding domain object.
  • the data processing module 330 includes: a data acquisition unit for acquiring the field name and code value in the access request; a data processing unit for mapping the field name and code value according to the channel type and interface type of the access request
  • the conversion rules are processed by data standardization to obtain the field names in the preset format and the code values in the preset format.
  • the data verification module 340 includes: a data verification unit for verifying the request object in the preset format, the field name in the preset format, and the code value in the preset format based on the data dictionary in the database , A judging unit, used for requesting the object in the preset format, the field name in the preset format, and the code value in the preset format to correspond to the data in the data dictionary, and the data verification result meets the requirements.
  • the judgment unit is further used for: when the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary, the verification result is inconsistent Request, when the data verification result is not in line with the requirements, the access request is denied.
  • the interface docking device further includes an encryption and decryption module, configured to decrypt the encrypted request message to obtain the request message when the received request message of the access request is an encrypted request message.
  • the encryption and decryption module is further used to: when the received request message of the access request is an encrypted request message, encrypt the return object corresponding to the format of the access party according to the encryption rules of the access party to obtain The encrypted return object sends the encrypted return object to the visitor.
  • the interface docking device further includes: a data persistence module, configured to compare the request object in the preset format, the field name in the preset format, and the code value in the preset format according to the corresponding Domain objects are saved to the database after data persistence.
  • a data persistence module configured to compare the request object in the preset format, the field name in the preset format, and the code value in the preset format according to the corresponding Domain objects are saved to the database after data persistence.
  • Each module in the above interface docking device may be implemented in whole or in part by software, hardware, or a combination thereof.
  • the above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided.
  • the computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 4.
  • the computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer-readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the database of the computer device is used to store data dictionary data.
  • the network interface of the computer device is used to communicate with external terminals through a network connection.
  • the computer readable instructions are executed by the processor to implement an interface docking method.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.
  • the specific computer equipment may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
  • a computer device includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors perform the following steps:
  • the request object of the preset format is mapped to the corresponding domain object.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the computer-readable instructions When executed by one or more processors, the one or more processors perform the following steps:
  • the request object of the preset format is mapped to the corresponding domain object.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain (Synchlink) DRAM
  • RDRAM direct RAM
  • DRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)

Abstract

The present application relates to an interface docking method and apparatus, a computer device and a storage medium. The method comprises: receiving an access request sent by an access party; performing format conversion on a request message in the received access request to obtain a request object of a pre-set format; performing data standardization processing on a field name and a code value in the received access request to obtain a field name of a pre-set format and a code value of a pre-set format; performing data checking on the request object of the pre-set format, the field name of the pre-set format and the code value of the pre-set format to obtain a data check result; and when the data check result meets requirements, mapping the request object of the pre-set format into a corresponding domain object.

Description

接口对接方法、装置、计算机设备和存储介质Interface docking method, device, computer equipment and storage medium
相关申请的交叉引用Cross-reference of related applications
本申请要求于2019年01月03日提交中国专利局,申请号为2019100034871,申请名称为“接口对接方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires priority to be submitted to the China Patent Office on January 03, 2019, with the application number 2019100034871, and the priority of the Chinese patent application titled "Interface docking method, device, computer equipment and storage medium", the entire contents of which are incorporated by reference In this application.
技术领域Technical field
本申请涉及一种接口对接方法、装置、计算机设备和存储介质。This application relates to an interface docking method, device, computer equipment, and storage medium.
背景技术Background technique
随着互联网的不断发展,在业务处理过程中,各个业务方之间存在不同程度上业务交互,需要进行业务数据的对接。With the continuous development of the Internet, in the process of business processing, there are business interactions between various business parties to varying degrees, and business data connection is required.
然而,发明人意识到,在对接过程中,会出现以下几种问题:1、不同渠道可能对接方式不同,一些渠道的对接方式采用的是SOCKET请求,一些渠道的对接方式采用的是HTTP请求。2、一些渠道的报文需要加解密一些渠道的报文不需要。3、不同渠道的对接方式即使都采用HTTP/JSON请求,报文格式和字段名称也会出现差异。4、同一渠道的对接方式,不同业务场景也会出现请求报文的差异,比如车贷需要车辆相关信息字段,租房贷需要租赁公司,房屋编号等信息。因此,不同合作渠道间由于业务不尽相同,接口字段名称会有所区别,业务必须字段也会不同,开发时为每一合作渠道需要单独定义一个接口,接口重复定义,浪费资源。However, the inventor realized that during the docking process, the following problems will occur: 1. Different channels may have different docking methods. Some channels use a SOCKET request, and some channels use an HTTP request. 2. Some channels of messages need to encrypt and decrypt some channels of messages do not need. 3. Even if the HTTP/JSON request is used for the connection of different channels, the message format and field names will be different. 4. The connection method of the same channel, the difference in request messages will also appear in different business scenarios, such as car loan needs vehicle related information field, rent house loan needs information such as leasing company, house number and so on. Therefore, due to the different services between different cooperation channels, the interface field names will be different, and the business must have different fields. During development, a separate interface needs to be defined for each cooperation channel. The interface is repeatedly defined, wasting resources.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种接口对接方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, an interface docking method, apparatus, computer equipment, and storage medium are provided.
一种接口对接方法,所述方法包括:An interface docking method, the method includes:
接收访问方发送的访问请求;Receive the access request sent by the visitor;
将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
一种接口对接装置,所述装置包括:An interface docking device, the device includes:
访问请求接收模块,用于接收访问方发送的访问请求;Access request receiving module, used to receive the access request sent by the visitor;
格式转换模块,用于将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;A format conversion module, used for format conversion of the received request message in the access request to obtain a request object of a preset format;
数据处理模块,用于将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;A data processing module, configured to standardize the field names and code values in the received access request to obtain field names and code values in a preset format;
数据校验模块,用于对所述预设格式的请求对象、所述预设格式的字段名和所述预设格式的码值进行数据校验,获得数据校验结果;及A data verification module, configured to perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一 个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors are executed The following steps:
接收访问方发送的访问请求;Receive the access request sent by the visitor;
将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
接收访问方发送的访问请求;Receive the access request sent by the visitor;
将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the drawings and description below. Other features and advantages of this application will become apparent from the description, drawings, and claims.
附图说明BRIEF DESCRIPTION
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需 要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly explain the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. Those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
图1为根据一个或多个实施例中接口对接方法的应用场景图。FIG. 1 is an application scenario diagram of an interface docking method according to one or more embodiments.
图2为根据一个或多个实施例中接口对接方法的流程示意图。FIG. 2 is a schematic flowchart of an interface docking method according to one or more embodiments.
图3为根据一个或多个实施例中接口对接装置的结构框图。FIG. 3 is a structural block diagram of an interface docking device according to one or more embodiments.
图4为根据一个或多个实施例中计算机设备的内部结构图。4 is an internal structure diagram of a computer device according to one or more embodiments.
具体实施方式detailed description
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application more clear, the following describes the present application in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
本申请提供的接口对接方法,可以应用于如图1所示的应用环境中。访问方服务器102通过网络与接口处理服务器104通过网络进行信息交互。接口处理服务器104接收访问方服务器102发送的访问请求;接口处理服务器104将接收到的访问请求中的请求报文进行格式转换,获得预设格式的请求对象,将接收到的访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值,对预设格式的请求对象、预设格式的字段名及预设格式的码值进行数据校验,获得数据校验结果;当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中。访问方服务器102、接口处理服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The interface docking method provided in this application can be applied to the application environment shown in FIG. 1. The visitor server 102 exchanges information with the interface processing server 104 through the network through the network. The interface processing server 104 receives the access request sent by the visitor server 102; the interface processing server 104 converts the format of the request message in the received access request to obtain a request object in a preset format, and converts the field in the received access request The name and code value are subjected to data standardization processing to obtain the preset format field name and the preset format code value, and perform the data verification on the preset format request object, the preset format field name and the preset format code value to obtain the data Verification result; when the data verification result meets the requirements, the request object of the preset format is mapped to the corresponding domain object. The visitor server 102 and the interface processing server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种接口对接方法,以该方法应用于图1中的接口处理服务器104为例进行说明,包括步骤S220至步骤S300:In one of the embodiments, as shown in FIG. 2, an interface docking method is provided. The method is applied to the interface processing server 104 in FIG. 1 as an example for description, including steps S220 to S300:
步骤S220,接收访问方发送的访问请求。Step S220: Receive the access request sent by the visitor.
其中,访问方可以是指各业务方中的一方,以金融业务为例,访问方为 资金方,被访问方为资产方,则对应的访问方服务器可以指资金方服务器,被访问方服务器则为资产方服务器,资金方服务器发送访问请求给资产方服务器,资产方服务器可以是具备金融业务处理能力的接口处理服务器,也可以是与接口处理服务器建立连接关系,用于处理金融业务的资产方服务器。访问方发送的访问请求可以是不同渠道接入的访问请求,如:SOCKET请求、HTTP请求等,SOCKET请求可以理解为TCP/IP接入,SOCKET请求就是所谓的长连接,理论上客户端和服务器端一旦建立起连接将不会主动断掉,但是由于各种环境因素可能会是连接断开,如:服务器端或客户端主机关机了,网络故障,或者两者之间长时间没有数据传输,网络防火墙可能会断开该连接以释放网络资源。HTTP请求可以理解为HTTP接入,HTTP请求就是所谓的短连接,即客户端向服务器端发送一次请求,服务器端响应后连接即会断掉。也可以是同一渠道不同业务场景接入的访问请求。Among them, the visiting party can refer to one of the business parties. Taking the financial business as an example, the visiting party is the funding party and the visited party is the asset party, the corresponding visiting party server can refer to the funding party server, and the visited party server can It is an asset-side server. The fund-side server sends an access request to the asset-side server. The asset-side server can be an interface processing server with financial business processing capabilities, or it can be an asset side that establishes a connection with the interface processing server for processing financial services. server. The access request sent by the visitor can be an access request for access from different channels, such as: SOCKET request, HTTP request, etc. SOCKET request can be understood as TCP/IP access. SOCKET request is a so-called long connection. In theory, the client and the server Once the connection is established, the terminal will not be actively disconnected, but due to various environmental factors, the connection may be disconnected, such as: the server or client host is shut down, the network is down, or there is no data transmission between the two for a long time. The network firewall may disconnect the connection to free up network resources. An HTTP request can be understood as an HTTP access. An HTTP request is a so-called short connection, that is, the client sends a request to the server, and the connection is disconnected after the server responds. It can also be an access request accessed by different business scenarios of the same channel.
步骤S240,将接收到的访问请求中的请求报文进行格式转换,获得预设格式的请求对象。Step S240: Perform format conversion on the request message in the received access request to obtain a request object in a preset format.
其中,由于需要接收不同渠道接入的访问请求及同一渠道不同业务场景的访问请求,接收到的访问请求中的请求报文格式有差异,需要将不同格式的请求报文转换为统一格式的请求报文,获得预设格式的请求对象,预设格式的请求对象可以是根据被访问方当前使用的格式类型确定预设格式的请求对象,也可以是根据被访问方当前***合适的格式类型确定预设格式的请求对象,如:当前***接收的报文格式采用的是JSON,则预设格式的请求对象也为JSON格式。格式转换即是访问方发送的将其他格式的请求报文转换为JSON格式的请求报文。此外,当需要向访问方返回报文时,则需要将反馈的报文根据访问方所采用的报文格式进行转换,获得对应于访问方格式的反馈报文后,将对应于访问方格式的反馈报文发送至访问方,如:当前***采用的是JSON格式的报文,向访问方反馈报文时,将JSON格式的报文转换为访问方对应格式的报文。Among them, due to the need to receive access requests for access from different channels and access requests for different business scenarios in the same channel, the format of the request message in the received access request is different, and it is necessary to convert the request message of different formats into a unified format request Message to obtain a request object in a preset format. The request object in a preset format may be a request object that determines a preset format according to the format type currently used by the visited party, or may be determined according to a suitable format type in the current system of the visited party The request object in the preset format, for example, the message format received by the current system is JSON, and the request object in the preset format is also in JSON format. Format conversion refers to request messages sent by the visitor to convert request messages in other formats into JSON format. In addition, when a message needs to be returned to the visitor, the feedback message needs to be converted according to the message format adopted by the visitor. After obtaining the feedback message corresponding to the visitor's format, it will correspond to the visitor's format. The feedback message is sent to the visitor. For example, the current system uses a JSON format message. When feeding back the message to the visitor, the JSON format message is converted into a message corresponding to the visitor's format.
步骤S260,将接收到的访问请求中的字段名和码值进行数据标准化处理, 获得预设格式的字段名和预设格式的码值。Step S260: Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format.
其中,数据标准化处理指的是将接收到的访问请求中的字段名和码值转换为预设格式的字段名和码值,预设格式的字段名可以是被访问方当前***的字段名所采用的格式,预设格式的码值可以是被访问方当前***的码值所采用的格式,如:访问请求的字段名为:amt,进行数据标准化处理后,获得预设格式的字段名:applyAmount。Among them, the data standardization process refers to converting the field names and code values in the received access request into the field names and code values in a preset format, and the field names in the preset format may be the format adopted by the field name of the current system of the accessed party The code value in the preset format may be the format adopted by the code value of the current system of the accessed party. For example, the field name of the access request is: amt. After the data is standardized, the field name in the preset format is obtained: applyAmount.
步骤S280,对预设格式的请求对象、预设格式的字段名及预设格式的码值进行数据校验,获得数据校验结果。Step S280: Perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result.
其中,在接收到访问请求时,需要对该访问请求中的访问数据进行校验,校验是不是符合接入要求,因此需要对访问请求的数据进行校验。在对访问请求中的访问数据(访问数据包括:请求报文、字段名和码值等等)转换为预设格式的请求对象、预设格式的字段名及预设格式的码值后,进行数据校验。Wherein, when receiving the access request, the access data in the access request needs to be verified to verify whether it meets the access requirements, so the data of the access request needs to be verified. After converting the access data (access data including: request message, field name and code value, etc.) in the access request into a preset format request object, a preset format field name and a preset format code value, the data is processed check.
步骤S300,当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中。In step S300, when the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
其中,当数据校验结果为符合要求时,将预设格式的请求对象映射(映射指的是将一台主机的内网(LAN)IP地址映射成一个公网(WAN)IP地址,当用户访问提供映射端口主机的某个端口时,服务器将请求转移到本地局域网内部提供这种特定服务的主机;利用端口映射功能还可以将一台外网IP地址机器的多个端口映射到内网不同机器上的不同端口)到对应的领域对象中,将预设格式的请求对象映射到对接的接口;预设格式的请求对象映射到对应的领域对象中指的是:就是将外网主机的IP地址(即:预设格式的请求对象)的一个端口映射到内网中一台机器(即:对应的领域对象),提供相应的服务,当用户访问该IP的这个端口时,服务器自动将请求映射到对应局域网内部的机器上,如:预设格式的请求对象M属于申请信息对象,则将预设格式的请求对象M映射到申请信息对象中,当用户通过预设格式的请求对象M访问时,直接访问到申请信息对象。Among them, when the data verification result meets the requirements, the request object of the preset format is mapped (mapping refers to mapping the internal network (LAN) IP address of a host to a public network (WAN) IP address, when the user When accessing a port of a host that provides a mapped port, the server transfers the request to the host that provides this specific service within the local LAN; the port mapping function can also map multiple ports of an external network IP address machine to different internal networks Different ports on the machine) to the corresponding domain object, mapping the request object of the preset format to the docking interface; mapping the request object of the preset format to the corresponding domain object refers to: the IP address of the host on the external network (Ie: a request object in a preset format) is mapped to a machine in the intranet (ie: a corresponding domain object) to provide corresponding services. When a user accesses this port of the IP, the server automatically maps the request To the machine in the corresponding local area network, for example: the request object M in the preset format belongs to the application information object, then the request object M in the preset format is mapped to the application information object, when the user accesses through the request object M in the preset format To directly access the application information object.
上述接口对接方法中,结合权1中的技术特征进行合理推导,实现能够解决背景技术中所提出的技术问题的有益效果。In the above interface docking method, a reasonable derivation is carried out in combination with the technical features in the right 1, to achieve a beneficial effect that can solve the technical problems raised in the background art.
在其中一个实施例中,将接收到的访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值的步骤包括:In one of the embodiments, the field name and code value in the received access request are subjected to data standardization processing, and the step of obtaining the field name and code value in the preset format includes:
获取访问请求中的字段名和码值,将字段名和码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化处理,获得预设格式的字段名和预设格式的码值。Obtain the field name and code value in the access request, standardize the data according to the conversion rules corresponding to the channel type and interface type of the access request, and obtain the field name and code value in the preset format.
其中,对访问请求中的请求数据进行解析,获取访问请求中的字段名和码值;访问请求的渠道类型指的是不同访问方的访问请求,接口类型指的是如http协议的接口、SOCKET请求接口等等。转换规则是根据各个不同渠道类型及不同接口类型定义对应的各个转换规则,转换规则如表1所示:Among them, the request data in the access request is parsed to obtain the field name and code value in the access request; the channel type of the access request refers to the access request of different access parties, and the interface type refers to the interface such as http protocol, SOCKET request Interface and so on. The conversion rules are defined according to different channel types and different interface types. The conversion rules are shown in Table 1:
表1转换规则Table 1 Conversion rules
Figure PCTCN2019123228-appb-000001
Figure PCTCN2019123228-appb-000001
根据表1的转换规则,具体的数据标准化处理如:请求/响应字段名为amt,根据访问请求的渠道类型yzt及接口类型applyCredit,确定转换规则为applyAmount*100,根据转换规则,将请求/响应字段名为amt进行数据标准化处理后,标准字段名为applyAmount。According to the conversion rules in Table 1, the specific data standardization processing is as follows: the request/response field is named amt. According to the channel type yzt and interface type applyCredit of the access request, the conversion rule is determined to be applyAmount*100. According to the conversion rule, the request/response After the field name is amt and the data is standardized, the standard field name is applyAmount.
在其中一个实施例中,将预设格式的请求对象、预设格式的字段名及预设格式的码值进行数据校验,获得数据校验结果的步骤,包括:In one of the embodiments, the step of performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format, to obtain the data verification result, includes:
将预设格式的请求对象、预设格式的字段名及预设格式的码值基于数据库中的数据字典进行验证,当预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据对应时,数据校验结果为符合要求。The preset format request object, preset format field name and preset format code value are verified based on the data dictionary in the database. When the preset format request object, preset format field name and preset format code When the value corresponds to the data in the data dictionary, the data verification result meets the requirements.
其中,数据字典指的是一种用户可以访问的记录数据库和应用程序元数 据的目录,是对数据的数据项、数据结构、数据流、数据存储、处理逻辑、外部实体等进行定义和描述,是描述数据的信息集合,是对***中使用的所有数据元素的定义的集合,其目的是对数据流程图中的各个元素做出详细的说明,使用数据字典为简单的建模项目。将预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据进行分析,检验访问请求的预设格式的请求对象、预设格式的字段名及预设格式的码值是否符合数据字典中的要求,符合要求才能将访问请求映射到对应的接口。通过数据校验拒绝不符合规则的访问请求及恶意访问,提高安全性。Among them, the data dictionary refers to a directory of record databases and application metadata that users can access, which defines and describes data items, data structures, data streams, data storage, processing logic, external entities, etc., It is a collection of information describing data, a collection of definitions of all data elements used in the system. Its purpose is to give a detailed description of each element in the data flow chart, and use a data dictionary as a simple modeling project. Analyze the request object in the preset format, the field name in the preset format, the code value in the preset format, and the data in the data dictionary to verify the request object in the preset format, the field name in the preset format, and the preset in the access request Whether the code value in the format meets the requirements in the data dictionary can only be mapped to the corresponding interface if the requirements are met. Through data verification, access requests that do not comply with the rules and malicious access are rejected to improve security.
在其中一个实施例中,当预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据不对应时,校验结果为不符合要求;当数据校验结果为不符合要求时,拒绝所述访问请求。In one of the embodiments, when the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary, the verification result is not in compliance with the requirements; when the data is verified When the result is that the requirements are not met, the access request is rejected.
其中,将预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据进行分析,检验访问请求的预设格式的请求对象、预设格式的字段名及预设格式的码值是否符合数据字典中的要求,不符合要求则确定访问请求不正确,是不正常接入的访问请求,因此访问请求。通过数据校验拒绝不符合规则的访问请求及恶意访问,提高安全性。Among them, the request object in the preset format, the field name in the preset format, the code value in the preset format and the data in the data dictionary are analyzed, and the request object in the preset format in the access request, the field name in the preset format and the Whether the code value in the preset format meets the requirements in the data dictionary, if it does not meet the requirements, it is determined that the access request is incorrect, and it is an access request for abnormal access, so the access request. Through data verification, access requests that do not comply with the rules and malicious access are rejected to improve security.
在其中一个实施例中,在接收访问方发送的访问请求的步骤之后,将接收到的访问请求中的请求报文进行格式转换的步骤之前,还包括:当接收的访问请求的请求报文为加密的请求报文时,对加密的请求报文进行解密,获得请求报文。In one of the embodiments, after the step of receiving the access request sent by the visitor, before the step of format conversion of the request message in the received access request, the method further includes: when the request message of the received access request is When encrypting the request message, decrypt the encrypted request message to obtain the request message.
其中,加密的请求报文可以是访问方服务器在发起访问请求之前,与被访问方服务器交换算法的公钥,也就是访问方服务器把自己公钥给被访问方服务器,被访问方服务器收到访问方服务器的公钥请求后,返回被访问方服务器的公钥给访问方服务器,实现两者的交换,访问方服务器在发起访问请求时,将访问请求通过对方公钥加密,把加密的访问请求通过标准的Socket消息对象传递,解密可以是通过自身的私钥进行解密;也可以是其他请求报文方式加密的请求报文。可以根据访问请求类型确定是否为访问请求,如: HTTP请求与SOCKET请求,可以通过判断当前访问的请求是HTTP请求还是SOCKET请求,当是SOCKET请求时,则为加密的请求报文,当是HTTP请求时,是未加密的请求报文。实现可以对加密的访问请求的接入。The encrypted request message may be that the visitor server exchanges the public key of the algorithm with the visited server before initiating the access request, that is, the visitor server gives its public key to the visited server, and the received server receives After the public key request of the visitor server, the public key of the visited server is returned to the visitor server to realize the exchange of the two. When the visitor server initiates the access request, the access request is encrypted by the other party's public key, and the encrypted access is encrypted. The request is transmitted through a standard Socket message object, and the decryption can be decrypted by its own private key; it can also be a request message encrypted by other request message methods. You can determine whether it is an access request according to the type of access request, such as: HTTP request and SOCKET request, you can determine whether the current access request is an HTTP request or a SOCKET request, when it is a SOCKET request, it is an encrypted request message, when it is HTTP When requested, it is an unencrypted request message. Enables access to encrypted access requests.
在其中一个实施例中,接口对接方法还包括步骤:当接收的访问请求的请求报文为加密的请求报文时,将与访问方格式对应的返回对象根据访问方的加密规则进行加密,获得加密后的返回对象,将加密后的返回对象发送至访问方。In one of the embodiments, the interface docking method further includes the step of: when the received request message of the access request is an encrypted request message, encrypt the return object corresponding to the format of the access party according to the encryption rules of the access party to obtain The encrypted return object sends the encrypted return object to the visitor.
其中,访问方服务器在发起访问请求之前,与被访问方服务器交换算法的公钥,也就是访问方服务器把自己公钥给被访问方服务器,被访问方服务器收到访问方服务器的公钥请求后,返回被访问方服务器的公钥给访问方服务器,实现两者的交换,当需要对访问方反馈返回对象时,将返回对象通过对方公钥加密,把加密的访问请求通过标准的Socket消息对象传递,将加密后的返回对象发送至访问方。可以解决加密的访问请求的转换,实现多种访问请求的转换。实现可以对加密的访问请求的接入。Among them, the visitor server exchanges the public key of the algorithm with the visited server before initiating the access request, that is, the visitor server gives its public key to the visited server, and the visited server receives the request from the visitor server After that, the public key of the visited server is returned to the visited server to realize the exchange of the two. When the returned object needs to be fed back to the visited party, the returned object is encrypted with the other party's public key, and the encrypted access request is passed through the standard Socket message. Object delivery, sending the encrypted return object to the visitor. It can solve the conversion of encrypted access requests and realize the conversion of multiple access requests. Enables access to encrypted access requests.
在其中一个实施例中,在当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中的步骤之后,还包括:将预设格式的请求对象、预设格式的字段名及预设格式的码值根据对应的领域对象,进行数据持久化后保存至数据库。In one of the embodiments, after the step of mapping the request object of the preset format to the corresponding domain object when the data verification result meets the requirements, the method further includes: mapping the request object of the preset format and the preset format The field name and the code value of the preset format are stored in the database after the data is persisted according to the corresponding domain object.
其中,数据持久化指的是将数据模型转换成存储模型(内存中某些对象保存到磁盘中),就是将数据持久化的保存起来,不会丢失,数据持久化的方式如:利用属性列表文件(相当于一个小型数据库),持久化一些比较小的数据,xml格式,持久化数组和字典对象,通过某种格式把内存中的某个对象保存到本地文件中,以便以后再从该文件中读回该对象。具体地:利用属性列表文件,将预设格式的请求对象、预设格式的字段名及预设格式的码值持久化,通过预设的格式把内存中对应的领域对象保存到本地文件中。以便以后再从该文件中读回该对象。Among them, data persistence refers to the conversion of the data model into a storage model (some objects in memory are saved to disk), that is, the data is persisted and will not be lost. The method of data persistence is as follows: the use of attribute lists File (equivalent to a small database), persist some relatively small data, xml format, persistent array and dictionary objects, save an object in memory to a local file in a certain format, so that it can be retrieved from the file later Read the object back in. Specifically, the attribute list file is used to persist the request object in the preset format, the field name in the preset format, and the code value in the preset format, and the corresponding domain object in the memory is saved in the local file through the preset format. In order to read the object back from the file later.
在在其中一个实施例中,一种接口对接方法,具体以各个资金方为访问 方,资产方为被访问方接收访问请求,被访问方服务器为具备金融业务处理能力的接口处理服务器,其中,各个资金方中,一些渠道的对接方式为SOCKET请求,一些渠道的对接方式为HTTP请求,为例:In one of the embodiments, an interface docking method specifically uses each funding party as the access party, the asset party as the accessed party receives the access request, and the accessed party server is an interface processing server with financial business processing capabilities, wherein, Among the various funding parties, some channels are connected by SOCKET requests, and some channels are connected by HTTP requests, for example:
接口处理服务器接收到资金方的访问请求,判断该访问请求的类型,根据访问请求的类型确定是否需要进行解密,当访问请求的类型为SOCKET请求,进行解密,获得请求报文,当访问请求的类型为HTTP请求,获取请求报文。接口处理服务器将请求报文转换为JSON格式的请求报文,获得预设格式的请求对象,将接收到的访问请求中的字段名和码值转换为资产方当前***的字段名所采用的格式及资产方当前***的码值所采用的格式,获得预设格式的字段名及预设格式的码值,对JSON格式的请求报文、预设格式的字段名及预设格式的码值通过数据字典中的数据进行数据校验,判断是否符合要求,符合要求,将预设格式的请求对象映射到对应的领域对象中,利用属性列表文件,将预设格式的请求对象、预设格式的字段名及预设格式的码值持久化,通过预设的格式把内存中对应的领域对象保存到本地文件中。不符合要求,拒绝该访问请求。The interface processing server receives the access request of the funder, judges the type of the access request, and determines whether decryption is required according to the type of the access request. When the type of the access request is a SOCKET request, it decrypts and obtains the request message. When the access request is The type is HTTP request, get the request message. The interface processing server converts the request message into a JSON format request message, obtains the request object in a preset format, and converts the field name and code value in the received access request into the format and asset used by the field name of the current system of the asset side The format of the current system code value is used to obtain the field name and the code value in the preset format. For the request message in JSON format, the field name in the preset format and the code value in the preset format are passed through the data dictionary. Check the data in the data, determine whether it meets the requirements, meet the requirements, map the request objects in the preset format to the corresponding domain objects, and use the attribute list file to map the request objects in the preset format and the field names in the preset format And the code value of the preset format is persistent, and the corresponding domain object in the memory is saved to the local file through the preset format. If the requirements are not met, the access request is denied.
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowchart of FIG. 2 are displayed in order according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless clearly stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The order is not necessarily sequential, but may be executed in turn or alternately with at least a part of other steps or sub-steps or stages of other steps.
在其中一个实施例中,如图3所示,提供了一种接口对接装置,包括:访问请求接收模块310、格式转换模块320、数据处理模块330和数据校验模块340,其中:In one of the embodiments, as shown in FIG. 3, an interface docking device is provided, including: an access request receiving module 310, a format conversion module 320, a data processing module 330, and a data verification module 340, wherein:
访问请求接收模块310,用于接收访问方发送的访问请求。The access request receiving module 310 is used to receive the access request sent by the visiting party.
格式转换模块320,用于将接收到的访问请求中的请求报文进行格式转换,获得预设格式的请求对象。The format conversion module 320 is configured to format the request message in the received access request to obtain a request object in a preset format.
数据处理模块330,用于将接收到的访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值。The data processing module 330 is configured to perform data standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format.
数据校验模块340,用于对预设格式的请求对象、预设格式的字段名和预设格式的码值进行数据校验,获得数据校验结果,当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中。The data verification module 340 is used to perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain the data verification result. When the data verification result meets the requirements, the The request object of the preset format is mapped to the corresponding domain object.
在其中一个实施例中,数据处理模块330包括:数据获取单元,用于获取访问请求中的字段名和码值;数据处理单元,用于将字段名和码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化处理,获得预设格式的字段名和预设格式的码值。In one of the embodiments, the data processing module 330 includes: a data acquisition unit for acquiring the field name and code value in the access request; a data processing unit for mapping the field name and code value according to the channel type and interface type of the access request The conversion rules are processed by data standardization to obtain the field names in the preset format and the code values in the preset format.
在其中一个实施例中,数据校验模块340包括:数据校验单元,用于将预设格式的请求对象、预设格式的字段名及预设格式的码值基于数据库中的数据字典进行验证,判断单元,用于当预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据对应时,数据校验结果为符合要求。In one of the embodiments, the data verification module 340 includes: a data verification unit for verifying the request object in the preset format, the field name in the preset format, and the code value in the preset format based on the data dictionary in the database , A judging unit, used for requesting the object in the preset format, the field name in the preset format, and the code value in the preset format to correspond to the data in the data dictionary, and the data verification result meets the requirements.
在其中一个实施例中,判断单元还用于:当预设格式的请求对象、预设格式的字段名及预设格式的码值与数据字典中的数据不对应时,校验结果为不符合要求,当数据校验结果为不符合要求时,拒绝访问请求。In one of the embodiments, the judgment unit is further used for: when the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary, the verification result is inconsistent Request, when the data verification result is not in line with the requirements, the access request is denied.
在其中一个实施例中,接口对接装置还包括:加解密模块,用于当接收的访问请求的请求报文为加密的请求报文时,对加密的请求报文进行解密,获得请求报文。In one of the embodiments, the interface docking device further includes an encryption and decryption module, configured to decrypt the encrypted request message to obtain the request message when the received request message of the access request is an encrypted request message.
在其中一个实施例中,加解密模块还用于:当接收的访问请求的请求报文为加密的请求报文时,将与访问方格式对应的返回对象根据访问方的加密规则进行加密,获得加密后的返回对象,将加密后的返回对象发送至访问方。In one of the embodiments, the encryption and decryption module is further used to: when the received request message of the access request is an encrypted request message, encrypt the return object corresponding to the format of the access party according to the encryption rules of the access party to obtain The encrypted return object sends the encrypted return object to the visitor.
在其中一个实施例中,接口对接装置还包括:数据持久化模块,用于将 所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值根据对应的领域对象,进行数据持久化后保存至数据库。In one of the embodiments, the interface docking device further includes: a data persistence module, configured to compare the request object in the preset format, the field name in the preset format, and the code value in the preset format according to the corresponding Domain objects are saved to the database after data persistence.
关于接口对接装置的具体限定可以参见上文中对于接口对接方法的限定,在此不再赘述。上述接口对接装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the interface docking device, reference may be made to the above limitation on the interface docking method, and details are not described herein again. Each module in the above interface docking device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in the hardware form or independent of the processor in the computer device, or may be stored in the memory in the computer device in the form of software so that the processor can call and execute the operations corresponding to the above modules.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过***总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作***、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作***和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储数据字典数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种接口对接方法。In one of the embodiments, a computer device is provided. The computer device may be a server, and an internal structure diagram thereof may be as shown in FIG. 4. The computer device includes a processor, memory, network interface, and database connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer-readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The database of the computer device is used to store data dictionary data. The network interface of the computer device is used to communicate with external terminals through a network connection. The computer readable instructions are executed by the processor to implement an interface docking method.
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. The specific computer equipment may Include more or less components than shown in the figure, or combine certain components, or have a different arrangement of components.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors perform the following steps:
接收访问方发送的访问请求;Receive the access request sent by the visitor;
将接收到的访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Perform format conversion on the request message in the received access request to obtain a request object in a preset format;
将接收到的访问请求中的字段名和码值进行数据标准化处理,获得预设 格式的字段名和预设格式的码值;Perform field standardization on the field names and code values in the received access request to obtain field names and code values in preset formats;
对预设格式的请求对象、预设格式的字段名及预设格式的码值进行数据校验,获得数据校验结果;及Perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain the data verification result; and
当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object of the preset format is mapped to the corresponding domain object.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors perform the following steps:
接收访问方发送的访问请求;Receive the access request sent by the visitor;
将接收到的访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Perform format conversion on the request message in the received access request to obtain a request object in a preset format;
将接收到的访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform data standardization on the field names and code values in the received access request to obtain field names and code values in preset formats;
对预设格式的请求对象、预设格式的字段名及预设格式的码值进行数据校验,获得数据校验结果;及Perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain the data verification result; and
当数据校验结果为符合要求时,将预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object of the preset format is mapped to the corresponding domain object.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率 SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art may understand that all or part of the process in the method of the foregoing embodiments may be completed by instructing relevant hardware through computer-readable instructions, and the computer-readable instructions may be stored in a non-volatile computer In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the foregoing method embodiments. Wherein, any reference to the memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be arbitrarily combined. In order to simplify the description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered as the scope described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementations of the present application, and their descriptions are more specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that, for those of ordinary skill in the art, without departing from the concept of the present application, a number of modifications and improvements can also be made, which all fall within the protection scope of the present application. Therefore, the protection scope of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种接口对接方法,包括:An interface docking method, including:
    接收访问方发送的访问请求;Receive the access request sent by the visitor;
    将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
    将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
    对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
    当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
  2. 根据权利要求1所述的接口对接方法,其特征在于,所述将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值,包括:The interface docking method according to claim 1, wherein the field name and code value in the received access request are subjected to data standardization processing to obtain the field name and code value in a preset format, include:
    获取所述访问请求中的字段名和码值;及Obtaining the field name and code value in the access request; and
    将所述字段名和所述码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化处理,获得预设格式的字段名和预设格式的码值。The field name and the code value are subjected to data standardization processing according to the conversion rule corresponding to the channel type and interface type of the access request to obtain the field name in the preset format and the code value in the preset format.
  3. 根据权利要求1所述的接口对接方法,其特征在于,所述将所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果,包括:The interface docking method according to claim 1, wherein the request object of the preset format, the field name of the preset format, and the code value of the preset format are data verified to obtain Data verification results, including:
    将所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值基于数据库中的数据字典进行验证;及Verify the request object in the preset format, the field name in the preset format, and the code value in the preset format based on the data dictionary in the database; and
    当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据对应时,数据校验结果为符合要求。When the request object in the preset format, the field name in the preset format, and the code value in the preset format correspond to the data in the data dictionary, the data verification result meets the requirements.
  4. 根据权利要求3所述的接口对接方法,其特征在于,当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据不对应时,校验结果为不符合要求;及The interface connection method according to claim 3, wherein when the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary When the verification result is not in compliance with the requirements; and
    当数据校验结果为不符合要求时,拒绝所述访问请求。When the data verification result does not meet the requirements, the access request is rejected.
  5. 根据权利要求1所述的接口对接方法,其特征在于,在所述接收访问方发送的访问请求之后,所述将接收到的所述访问请求中的请求报文进行格式转换之前,所述方法还包括:当接收的所述访问请求的请求报文为加密的请求报文时,对所述加密的请求报文进行解密,获得请求报文。The interface docking method according to claim 1, wherein after the access request sent by the access party is received, before the format conversion of the received request message in the access request is performed, the method The method further includes: when the received request message of the access request is an encrypted request message, decrypting the encrypted request message to obtain the request message.
  6. 根据权利要求5所述的接口对接方法,其特征在于,所述方法还包括:The interface docking method according to claim 5, wherein the method further comprises:
    当接收的所述访问请求的请求报文为加密的请求报文时,将与访问方格式对应的返回对象根据访问方的加密规则进行加密,获得加密后的返回对象,将加密后的返回对象发送至访问方。When the received request message of the access request is an encrypted request message, the return object corresponding to the format of the access party is encrypted according to the encryption rules of the access party, to obtain the encrypted return object, and the encrypted return object Send to the visitor.
  7. 根据权利要求1-6所述的接口对接方法,其特征在于,在所述当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中之后,还包括:The interface docking method according to claims 1-6, wherein after the data verification result meets the requirements, after mapping the request object of the preset format to the corresponding domain object, the method further includes :
    将所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值根据对应的领域对象,进行数据持久化后保存至数据库。The request object in the preset format, the field name in the preset format, and the code value in the preset format are persisted to the database after the data is persisted according to the corresponding domain object.
  8. 一种接口对接装置,所述装置包括:An interface docking device, the device includes:
    访问请求接收模块,用于接收访问方发送的访问请求;Access request receiving module, used to receive the access request sent by the visitor;
    格式转换模块,用于将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;A format conversion module, used for format conversion of the received request message in the access request to obtain a request object in a preset format;
    数据处理模块,用于将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;A data processing module, configured to standardize the field names and code values in the received access request to obtain field names and code values in a preset format;
    数据校验模块,用于对所述预设格式的请求对象、所述预设格式的字段名和所述预设格式的码值进行数据校验,获得数据校验结果;及A data verification module, configured to perform data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
    当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
  9. 根据权利要求8所述的装置,所述数据处理模块330包括:数据获取单元,用于获取访问请求中的字段名和码值;数据处理单元,用于将字段名和码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化 处理,获得预设格式的字段名和预设格式的码值。According to the apparatus of claim 8, the data processing module 330 includes: a data acquisition unit for acquiring the field name and code value in the access request; a data processing unit for comparing the field name and code value according to the channel type of the access request The conversion rules corresponding to the interface type are subjected to data standardization processing to obtain the field names in the preset format and the code values in the preset format.
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    接收访问方发送的访问请求;Receive the access request sent by the visitor;
    将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
    将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
    对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
    当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions:
    获取所述访问请求中的字段名和码值;及Obtaining the field name and code value in the access request; and
    将所述字段名和所述码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化处理,获得预设格式的字段名和预设格式的码值。The field name and the code value are subjected to data standardization processing according to the conversion rule corresponding to the channel type and interface type of the access request to obtain the field name in the preset format and the code value in the preset format.
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions:
    将所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值基于数据库中的数据字典进行验证;及Verify the request object in the preset format, the field name in the preset format, and the code value in the preset format based on the data dictionary in the database; and
    当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据对应时,数据校验结果为符合要求。When the request object in the preset format, the field name in the preset format, and the code value in the preset format correspond to the data in the data dictionary, the data verification result meets the requirements.
  13. 根据权利要求12所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 12, wherein the processor further executes the following steps when executing the computer-readable instructions:
    当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据不对应时,校验结果为不符合要求;及When the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary, the verification result is that the requirements are not met; and
    当数据校验结果为不符合要求时,拒绝所述访问请求。When the data verification result does not meet the requirements, the access request is rejected.
  14. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instructions:
    当接收的所述访问请求的请求报文为加密的请求报文时,对所述加密的请求报文进行解密,获得请求报文。When the received request message of the access request is an encrypted request message, the encrypted request message is decrypted to obtain the request message.
  15. 根据权利要求14所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 14, wherein the processor further executes the following steps when executing the computer-readable instructions:
    当接收的所述访问请求的请求报文为加密的请求报文时,将与访问方格式对应的返回对象根据访问方的加密规则进行加密,获得加密后的返回对象,将加密后的返回对象发送至访问方。When the received request message of the access request is an encrypted request message, the return object corresponding to the format of the access party is encrypted according to the encryption rules of the access party, to obtain the encrypted return object, and the encrypted return object Send to the visitor.
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:One or more non-volatile computer-readable storage media storing computer-readable instructions, which when executed by one or more processors, cause the one or more processors to perform the following steps:
    接收访问方发送的访问请求;Receive the access request sent by the visitor;
    将接收到的所述访问请求中的请求报文进行格式转换,获得预设格式的请求对象;Performing format conversion on the received request message in the access request to obtain a request object in a preset format;
    将接收到的所述访问请求中的字段名和码值进行数据标准化处理,获得预设格式的字段名和预设格式的码值;Perform standardization processing on the field names and code values in the received access request to obtain field names and code values in a preset format;
    对所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值进行数据校验,获得数据校验结果;及Performing data verification on the request object in the preset format, the field name in the preset format, and the code value in the preset format to obtain a data verification result; and
    当数据校验结果为符合要求时,将所述预设格式的请求对象映射到对应的领域对象中。When the data verification result meets the requirements, the request object in the preset format is mapped to the corresponding domain object.
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed:
    获取所述访问请求中的字段名和码值;及Obtaining the field name and code value in the access request; and
    将所述字段名和所述码值根据访问请求的渠道类型及接口类型对应的转换规则进行数据标准化处理,获得预设格式的字段名和预设格式的码值。The field name and the code value are subjected to data standardization processing according to the conversion rule corresponding to the channel type and interface type of the access request to obtain the field name in the preset format and the code value in the preset format.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed:
    将所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值基于数据库中的数据字典进行验证;及Verify the request object in the preset format, the field name in the preset format, and the code value in the preset format based on the data dictionary in the database; and
    当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据对应时,数据校验结果为符合要求。When the request object in the preset format, the field name in the preset format, and the code value in the preset format correspond to the data in the data dictionary, the data verification result meets the requirements.
  19. 根据权利要求18所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 18, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed:
    当所述预设格式的请求对象、所述预设格式的字段名及所述预设格式的码值与数据字典中的数据不对应时,校验结果为不符合要求;及When the request object in the preset format, the field name in the preset format, and the code value in the preset format do not correspond to the data in the data dictionary, the verification result is that the requirements are not met; and
    当数据校验结果为不符合要求时,拒绝所述访问请求。When the data verification result does not meet the requirements, the access request is rejected.
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein when the computer-readable instructions are executed by the processor, the following steps are further performed:
    当接收的所述访问请求的请求报文为加密的请求报文时,对所述加密的请求报文进行解密,获得请求报文。When the received request message of the access request is an encrypted request message, the encrypted request message is decrypted to obtain the request message.
PCT/CN2019/123228 2019-01-03 2019-12-05 Interface docking method and apparatus, computer device and storage medium WO2020140679A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910003487.1 2019-01-03
CN201910003487.1A CN109802957B (en) 2019-01-03 2019-01-03 Interface docking method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020140679A1 true WO2020140679A1 (en) 2020-07-09

Family

ID=66558425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/123228 WO2020140679A1 (en) 2019-01-03 2019-12-05 Interface docking method and apparatus, computer device and storage medium

Country Status (2)

Country Link
CN (1) CN109802957B (en)
WO (1) WO2020140679A1 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953540A (en) * 2020-08-04 2020-11-17 中国建设银行股份有限公司 Message generation method and device, electronic equipment and storage medium
CN112511591A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Method, device, equipment and medium for realizing hospital interface data interaction
CN112702173A (en) * 2020-12-23 2021-04-23 上海芯钛信息科技有限公司 Method for realizing high-speed cryptographic operation of vehicle-mounted communication gateway based on batch operation mechanism
CN112783581A (en) * 2021-01-21 2021-05-11 上海哔哩哔哩科技有限公司 Data processing method and device
CN113360556A (en) * 2021-05-25 2021-09-07 北京京东振世信息技术有限公司 Data processing method, device, equipment and storage medium
CN113837584A (en) * 2021-09-17 2021-12-24 平安养老保险股份有限公司 Service processing system and abnormal data processing method based on service processing system
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium
CN114710237A (en) * 2022-03-25 2022-07-05 湖南鼎一致远科技发展有限公司 Data processing method and device of communication interface, electronic equipment and storage medium
CN115118792A (en) * 2022-06-27 2022-09-27 中国银行股份有限公司 Message interface format conversion method, device and system
CN115292624A (en) * 2022-10-08 2022-11-04 成都同步新创科技股份有限公司 Universal message processing method and device based on HTTP (hyper text transport protocol)
CN115866087A (en) * 2022-11-29 2023-03-28 广发银行股份有限公司 Message mapping and HTTP request message conversion method and device
CN116781256A (en) * 2023-06-02 2023-09-19 深圳大道云科技有限公司 Compatible interaction method, device, equipment and storage medium of mechanism data

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109802957B (en) * 2019-01-03 2022-05-31 深圳壹账通智能科技有限公司 Interface docking method and device, computer equipment and storage medium
CN110636071B (en) * 2019-09-26 2020-07-07 光大兴陇信托有限责任公司 Interface docking method
CN110806945B (en) * 2019-11-05 2022-03-22 浪潮云信息技术股份公司 Interface docking method, device and computer readable medium
CN111104191B (en) * 2019-12-17 2024-04-02 深圳前海环融联易信息科技服务有限公司 Interface docking method, device, computer equipment and storage medium
CN111338819A (en) * 2020-02-24 2020-06-26 政采云有限公司 Method, system, equipment and readable storage medium for processing business object
CN111680086A (en) * 2020-05-25 2020-09-18 泰康保险集团股份有限公司 Data processing method and system, computer device and computer readable storage medium
CN111835710B (en) * 2020-05-29 2023-08-15 中国平安财产保险股份有限公司 Method, device, computer equipment and storage medium for verifying request body
CN111737527A (en) * 2020-06-29 2020-10-02 中国南方电网有限责任公司 Data processing method and device for heterogeneous terminal, electronic equipment and storage medium
CN112053208A (en) * 2020-09-04 2020-12-08 苏宁云计算有限公司 Order access method, system, computer equipment and storage medium
CN112416597A (en) * 2020-12-01 2021-02-26 太平金融科技服务(上海)有限公司 System calling method and device, computer equipment and storage medium
CN112860463B (en) * 2021-03-22 2024-06-14 平安商业保理有限公司 Service request forwarding method, device, computer equipment and readable storage medium
CN113760749A (en) * 2021-08-06 2021-12-07 招银云创信息技术有限公司 Test message generation method and device, computer equipment and storage medium
CN114500690B (en) * 2022-02-15 2023-08-18 平安科技(深圳)有限公司 Interface data processing method and device, electronic equipment and storage medium
CN115361446A (en) * 2022-08-17 2022-11-18 吉林亿联银行股份有限公司 Transaction message processing method and device, storage medium and electronic equipment
CN115102829B (en) * 2022-08-25 2022-11-29 平安银行股份有限公司 Request message processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100287188A1 (en) * 2009-05-04 2010-11-11 Samir Kakar Method and system for publishing a document, method and system for verifying a citation, and method and system for managing a project
CN103139251A (en) * 2011-11-29 2013-06-05 神州数码信息***有限公司 Method of city-level data sharing exchange platform technology
CN104618182A (en) * 2015-01-21 2015-05-13 ***通信集团广东有限公司 Simulation testing system supporting a plurality of mobile service protocols
CN106685982A (en) * 2017-01-13 2017-05-17 中国工商银行股份有限公司 External message processing method and system
CN109802957A (en) * 2019-01-03 2019-05-24 深圳壹账通智能科技有限公司 Interface butt joint method, device, computer equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050240600A1 (en) * 2004-04-21 2005-10-27 Hill David A Methods, systems, and storage mediums for integrating service request generation systems with a service order control system
CN100574236C (en) * 2007-06-22 2009-12-23 华中科技大学 Heterogeneous medical information integrated system based on the HL7 acting server
CN101471928A (en) * 2007-12-28 2009-07-01 ***通信集团公司 Access device, system and method for electronic channel
CN102722540B (en) * 2012-05-23 2018-08-17 南京中兴新软件有限责任公司 Data processing method and device in real-time memory database system
CN103428184A (en) * 2012-05-24 2013-12-04 ***股份有限公司 Method and system for converting communication messages
CN104915383B (en) * 2015-05-19 2018-03-02 中国电子科技集团公司第二十八研究所 A kind of method of automatic adaptation object during Universal Database accesses
CN105472044B (en) * 2016-01-26 2019-11-12 云南电网有限责任公司电力科学研究院 A kind of DL/T645 based on XML and GOOSE mapping method
CN109086444B (en) * 2018-08-17 2020-12-29 吉林亿联银行股份有限公司 Data standardization method and device and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100287188A1 (en) * 2009-05-04 2010-11-11 Samir Kakar Method and system for publishing a document, method and system for verifying a citation, and method and system for managing a project
CN103139251A (en) * 2011-11-29 2013-06-05 神州数码信息***有限公司 Method of city-level data sharing exchange platform technology
CN104618182A (en) * 2015-01-21 2015-05-13 ***通信集团广东有限公司 Simulation testing system supporting a plurality of mobile service protocols
CN106685982A (en) * 2017-01-13 2017-05-17 中国工商银行股份有限公司 External message processing method and system
CN109802957A (en) * 2019-01-03 2019-05-24 深圳壹账通智能科技有限公司 Interface butt joint method, device, computer equipment and storage medium

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953540B (en) * 2020-08-04 2022-12-13 中国建设银行股份有限公司 Message generation method and device, electronic equipment and storage medium
CN111953540A (en) * 2020-08-04 2020-11-17 中国建设银行股份有限公司 Message generation method and device, electronic equipment and storage medium
CN112511591A (en) * 2020-10-30 2021-03-16 福建亿能达信息技术股份有限公司 Method, device, equipment and medium for realizing hospital interface data interaction
CN112511591B (en) * 2020-10-30 2024-04-05 福建亿能达信息技术股份有限公司 Method, device, equipment and medium for realizing hospital interface data interaction
CN112702173B (en) * 2020-12-23 2023-11-10 上海芯钛信息科技有限公司 Method for realizing high-speed password operation of vehicle-mounted communication gateway based on batch operation mechanism
CN112702173A (en) * 2020-12-23 2021-04-23 上海芯钛信息科技有限公司 Method for realizing high-speed cryptographic operation of vehicle-mounted communication gateway based on batch operation mechanism
CN112783581A (en) * 2021-01-21 2021-05-11 上海哔哩哔哩科技有限公司 Data processing method and device
CN113360556A (en) * 2021-05-25 2021-09-07 北京京东振世信息技术有限公司 Data processing method, device, equipment and storage medium
CN113360556B (en) * 2021-05-25 2023-08-08 北京京东振世信息技术有限公司 Data processing method, device, equipment and storage medium
CN113837584A (en) * 2021-09-17 2021-12-24 平安养老保险股份有限公司 Service processing system and abnormal data processing method based on service processing system
CN113837584B (en) * 2021-09-17 2024-04-12 平安养老保险股份有限公司 Service processing system and abnormal data processing method based on service processing system
CN114070886A (en) * 2021-11-17 2022-02-18 深圳壹账通智能科技有限公司 Message conversion method, device, equipment and medium
CN114710237B (en) * 2022-03-25 2024-01-26 湖南鼎一致远科技发展有限公司 Data processing method and device of communication interface, electronic equipment and storage medium
CN114710237A (en) * 2022-03-25 2022-07-05 湖南鼎一致远科技发展有限公司 Data processing method and device of communication interface, electronic equipment and storage medium
CN115118792A (en) * 2022-06-27 2022-09-27 中国银行股份有限公司 Message interface format conversion method, device and system
CN115292624A (en) * 2022-10-08 2022-11-04 成都同步新创科技股份有限公司 Universal message processing method and device based on HTTP (hyper text transport protocol)
CN115292624B (en) * 2022-10-08 2023-08-04 成都同步新创科技股份有限公司 General message processing method and device based on HTTP protocol
CN115866087A (en) * 2022-11-29 2023-03-28 广发银行股份有限公司 Message mapping and HTTP request message conversion method and device
CN115866087B (en) * 2022-11-29 2023-11-17 广发银行股份有限公司 Message mapping and message conversion method, device and transmission system
CN116781256A (en) * 2023-06-02 2023-09-19 深圳大道云科技有限公司 Compatible interaction method, device, equipment and storage medium of mechanism data

Also Published As

Publication number Publication date
CN109802957B (en) 2022-05-31
CN109802957A (en) 2019-05-24

Similar Documents

Publication Publication Date Title
WO2020140679A1 (en) Interface docking method and apparatus, computer device and storage medium
WO2021003980A1 (en) Blacklist sharing method and apparatus, computer device and storage medium
USRE49673E1 (en) Systems and methods for secure data exchange
US11196561B2 (en) Authorized data sharing using smart contracts
US11546348B2 (en) Data service system
US11829502B2 (en) Data sharing via distributed ledgers
WO2019200755A1 (en) Data obtaining method and apparatus, and computer device and storage medium
US11962576B2 (en) Enclave interactions
CN109510840B (en) Method and device for sharing unstructured data, computer equipment and storage medium
US9225721B2 (en) Distributing overlay network ingress information
US11811950B1 (en) Dynamic response signing capability in a distributed system
WO2021003977A1 (en) Default information query method and apparatus, and computer device and storage medium
CN112511599B (en) Civil air defense data sharing system and method based on block chain
WO2020233012A1 (en) Distributed smart api asynchronous callback method, device, client terminal, service terminal, and storage medium
US20210158301A1 (en) Systems and methods for message transmission and retrieval using blockchain
US20230103712A1 (en) Data gateway system and data intercommunication method
WO2022193494A1 (en) Permission control method, server, terminal, storage medium, and computer program
CN115037521B (en) Service data verification method, device, computer equipment and storage medium
CN117749527B (en) Safety protection method and system based on big data analysis and cloud computing
WO2024007855A1 (en) Data processing method and device based on blockchain, and readable storage medium
CN116595080A (en) Interface management method, device, computer equipment and storage medium
GB2610072A (en) Data sharing via distributed ledgers
CN117395138A (en) Device point table configuration method, device, computer device and readable storage medium
CN117081782A (en) Network access method, system, computer equipment and storage medium
CN117938549A (en) User non-perception decryption method for TLS and SSL encryption connection

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19907697

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 22/10/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19907697

Country of ref document: EP

Kind code of ref document: A1