[go: up one dir, main page]

CN114598750B - Data request processing method, device and storage medium - Google Patents

Data request processing method, device and storage medium Download PDF

Info

Publication number
CN114598750B
CN114598750B CN202210043415.1A CN202210043415A CN114598750B CN 114598750 B CN114598750 B CN 114598750B CN 202210043415 A CN202210043415 A CN 202210043415A CN 114598750 B CN114598750 B CN 114598750B
Authority
CN
China
Prior art keywords
data
target
interface
calling
request processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210043415.1A
Other languages
Chinese (zh)
Other versions
CN114598750A (en
Inventor
李捷
吴克望
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Original Assignee
Zhejiang Geely Holding Group Co Ltd
Hangzhou Youxing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Geely Holding Group Co Ltd, Hangzhou Youxing Technology Co Ltd filed Critical Zhejiang Geely Holding Group Co Ltd
Priority to CN202210043415.1A priority Critical patent/CN114598750B/en
Publication of CN114598750A publication Critical patent/CN114598750A/en
Application granted granted Critical
Publication of CN114598750B publication Critical patent/CN114598750B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses a data request processing method, a data request processing device and a storage medium, relates to the technical field of data processing, and can unify interface specifications during remote data call. The specific scheme comprises the following steps: acquiring a data call request, wherein the data call request is used for requesting target data of a target service; analyzing the data call request to obtain a data call address, a call method name and a service parameter of a target service, wherein the data call address, the call method name and the service parameter are included in the data call request; determining a target interface corresponding to the data call address based on a first mapping relation between the call address and the interface; determining a calling method corresponding to the target interface based on a second mapping relation among the interfaces, the method names and the methods; converting the business parameters and the calling method from a first format to a second format to generate target interface parameters; sending target interface parameters to a service server through a target interface; receiving target data sent by a service server; the target data is converted from the second format to the first format.

Description

一种数据请求处理方法、装置及存储介质A data request processing method, device and storage medium

技术领域Technical field

本发明涉及数据处理技术领域,尤其涉及一种数据请求处理方法、装置及存储介质。The present invention relates to the field of data processing technology, and in particular, to a data request processing method, device and storage medium.

背景技术Background technique

业务服务器具有多个接口,每个接口可以对应一个服务。通常业务服务器中的服务都是进行内部调用的,因此当数据调用设备需要调用业务服务器中的一个服务时,需要针对每个服务对应的接口编写样板化的应用层代码,且数据调用设备的请求参数和业务服务器的响应参数都需要自定义,这样不利于统一接口规范。The business server has multiple interfaces, and each interface can correspond to a service. Usually the services in the business server are called internally, so when the data calling device needs to call a service in the business server, it is necessary to write boilerplate application layer code for the interface corresponding to each service, and the request of the data calling device Both the parameters and the response parameters of the business server need to be customized, which is not conducive to unified interface specifications.

发明内容Contents of the invention

本发明提供一种数据请求处理方法、装置及存储介质,在远程数据调用时,能够统一接口规范。The present invention provides a data request processing method, device and storage medium, which can unify interface specifications when remote data is called.

为达到上述目的,本发明采用如下技术方案:In order to achieve the above objects, the present invention adopts the following technical solutions:

第一方面,本发明提供一种数据请求处理方法,该方法包括:In a first aspect, the present invention provides a data request processing method, which method includes:

获取数据调用请求,数据调用请求用于请求目标业务的目标数据;Obtain the data call request, which is used to request the target data of the target business;

对数据调用请求进行解析,得到数据调用请求包括的数据调用地址、调用方法名称和目标业务的业务参数;Parse the data calling request and obtain the data calling address, calling method name and business parameters of the target business included in the data calling request;

基于调用地址与接口的第一映射关系,确定数据调用地址对应的目标接口;Based on the first mapping relationship between the calling address and the interface, determine the target interface corresponding to the data calling address;

基于接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法;Based on the second mapping relationship between the interface, method name, and methods, determine the calling method corresponding to the target interface;

将业务参数和调用方法从第一格式转换为第二格式,生成目标接口参数;Convert business parameters and calling methods from the first format to the second format, and generate target interface parameters;

通过目标接口向业务服务器发送目标接口参数;Send target interface parameters to the business server through the target interface;

接收业务服务器发送的目标数据;Receive target data sent by the business server;

将目标数据从第二格式转换为第一格式。Convert target data from the second format to the first format.

采用本发明提供的数据请求处理方法,当网关接收到数据调用设备发送的数据调用请求时,通过对数据调用请求进行处理,得到目标接口参数。然后,网关将目标接口参数发送至业务服务器,并接收业务服务器发送的目标数据。最后,网关将目标数据从第二格式转换为第一格式,以便于数据调用设备能够识别目标数据,从而得到需要调用的数据。与现有技术中当网关需要调用业务服务器中的一个服务时,需要针对每个服务对应的接口编写样板化的应用层代码,且网关的请求参数和业务服务器的响应参数都需要自定义相比,本发明提供的数据请求处理方法在调用过程中能够统一接口规范。且,网关可以提供可定制化的参数转换,提高了接口管理的便捷性以及安全性。Using the data request processing method provided by the present invention, when the gateway receives the data calling request sent by the data calling device, the target interface parameters are obtained by processing the data calling request. Then, the gateway sends the target interface parameters to the business server and receives the target data sent by the business server. Finally, the gateway converts the target data from the second format to the first format so that the data calling device can identify the target data and obtain the data that needs to be called. Compared with the existing technology, when the gateway needs to call a service in the business server, it needs to write boilerplate application layer code for the interface corresponding to each service, and the request parameters of the gateway and the response parameters of the business server need to be customized. , the data request processing method provided by the present invention can unify the interface specifications during the calling process. Moreover, the gateway can provide customized parameter conversion, which improves the convenience and security of interface management.

在一种可能的实现方式中,上述在对数据调用请求进行解析后,还得到数据调用请求包括的身份标识;In a possible implementation, after parsing the data calling request, the identity identifier included in the data calling request is also obtained;

基于身份标识和预存的身份验证策略,确定身份标识指示的账户是否具有数据调用权限;Based on the identity identifier and the pre-stored authentication policy, determine whether the account indicated by the identity identifier has data call permission;

基于调用地址与接口的第一映射关系,确定数据调用地址对应的目标接口,包括:Based on the first mapping relationship between the calling address and the interface, determine the target interface corresponding to the data calling address, including:

在确定身份标识指示的账户具有数据调用权限的情况下,基于第一映射关系,确定目标接口。When it is determined that the account indicated by the identity identifier has the data calling authority, the target interface is determined based on the first mapping relationship.

在一种可能的实现方式中,上述数据请求处理方法还包括:In a possible implementation, the above data request processing method also includes:

向注册服务器发送订阅信息;Send subscription information to the registration server;

接收注册服务器发送的第一映射关系和第二映射关系。Receive the first mapping relationship and the second mapping relationship sent by the registration server.

第二方面,本发明提供一种数据请求处理方法,应用于业务服务器,该方法包括:In a second aspect, the present invention provides a data request processing method, which is applied to a business server. The method includes:

获取被标识的预设接口,预设接口用于调用目标业务的目标数据;Obtain the identified default interface, which is used to call the target data of the target business;

向注册服务器发送预设接口,以及预设接口对应的方法信息,方法信息包括预设接口对应的调用地址,以及预设接口对应的至少一种方法名称和方法。Send a preset interface and method information corresponding to the preset interface to the registration server. The method information includes a calling address corresponding to the preset interface, and at least one method name and method corresponding to the preset interface.

第三方面,本发明提供一种数据请求处理装置,该数据请求处理装置包括:In a third aspect, the present invention provides a data request processing device, which includes:

获取单元,用于获取数据调用请求,数据调用请求用于请求目标业务的目标数据;The acquisition unit is used to obtain the data call request, and the data call request is used to request the target data of the target business;

解析单元,用于对获取单元获取到的调用请求进行解析,得到数据调用请求包括的数据调用地址、调用方法名称和目标业务的业务参数;The parsing unit is used to parse the call request obtained by the acquisition unit, and obtain the data call address, call method name and business parameters of the target business included in the data call request;

确定单元,用于基于数据调用地址与接口的第一映射关系,确定解析单元得到的数据调用地址对应的目标接口,并基于接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法;The determining unit is configured to determine the target interface corresponding to the data calling address obtained by the parsing unit based on the first mapping relationship between the data calling address and the interface, and determine the corresponding target interface based on the second mapping relationship between the interface, method name, and method. The calling method;

生成单元,用于将解析单元得到的业务参数,以及确定单元得到的调用方法从第一格式转换为第二格式,生成目标接口参数;The generation unit is used to convert the business parameters obtained by the parsing unit and the calling method obtained by the determination unit from the first format to the second format, and generate the target interface parameters;

获取单元,还用于通过目标接口向业务服务器发送目标接口参数,并接收业务服务器发送的目标数据;The acquisition unit is also used to send target interface parameters to the business server through the target interface, and receive target data sent by the business server;

生成单元,还用于将获取单元获取到的目标数据从第二格式转换为第一格式。The generating unit is also used to convert the target data acquired by the acquiring unit from the second format to the first format.

在一种可能的实现方式中,上述解析单元对数据调用请求进行解析后,还得到数据调用请求包括的身份标识;In a possible implementation, after the above parsing unit parses the data call request, it also obtains the identity included in the data call request;

确定单元,还用于基于身份标识和预存的身份验证策略,确定身份标识指示的账户是否具有数据调用权限;The determination unit is also used to determine whether the account indicated by the identity identifier has data calling permission based on the identity identifier and the pre-stored authentication policy;

确定单元,具体用于:Determine the unit, specifically used for:

在确定身份标识指示的账户具有数据调用权限的情况下,基于第一映射关系,确定目标接口。When it is determined that the account indicated by the identity identifier has the data calling authority, the target interface is determined based on the first mapping relationship.

在一种可能的实现方式中,获取单元,还用于向注册服务器发送订阅信息,并接收注册服务器发送的第一映射关系和第二映射关系。In a possible implementation, the acquisition unit is also configured to send subscription information to the registration server, and receive the first mapping relationship and the second mapping relationship sent by the registration server.

第四方面,本发明提供一种数据请求处理装置,该数据请求处理装置包括:In a fourth aspect, the present invention provides a data request processing device, which includes:

获取单元,用于获取被标识的预设接口,预设接口用于调用目标业务的目标数据;The acquisition unit is used to obtain the identified preset interface, and the preset interface is used to call the target data of the target business;

发送单元,用于向注册服务器发送预设接口,以及预设接口对应的方法信息,方法信息包括预设接口对应的调用地址,以及预设接口对应的至少一种方法名称和方法。A sending unit, configured to send a preset interface and method information corresponding to the preset interface to the registration server. The method information includes a calling address corresponding to the preset interface, and at least one method name and method corresponding to the preset interface.

第五方面,本发明提供一种数据请求处理装置,该数据请求处理装置包括:处理器和存储器。存储器用于存储计算机程序代码,计算机程序代码包括计算机指令。当处理器执行计算机指令时,数据请求处理装置执行如第一方面及其任一种可能的实现方式的数据请求处理方法,或执行如第二方面所述的数据请求处理方法。In a fifth aspect, the present invention provides a data request processing device, which includes: a processor and a memory. Memory is used to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the data request processing device performs the data request processing method as described in the first aspect and any possible implementation thereof, or performs the data request processing method as described in the second aspect.

第六方面,本发明提供一种计算机可读存储介质,其上存储有计算机指令,当计算机指令在数据请求处理装置上运行时,使得数据请求处理装置执行如第一方面或第一方面的可能的实现方式中任意一项的数据请求处理方法,或执行如第二方面所述的数据请求处理方法。In a sixth aspect, the present invention provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are run on a data request processing device, the data request processing device performs the first aspect or the possibility of the first aspect. implement any one of the data request processing methods, or execute the data request processing method as described in the second aspect.

附图说明Description of the drawings

图1为本发明实施例提供的数据请求处理系统的一种结构示意图;Figure 1 is a schematic structural diagram of a data request processing system provided by an embodiment of the present invention;

图2为本发明实施例提供的计算装置的一种结构示意图;Figure 2 is a schematic structural diagram of a computing device provided by an embodiment of the present invention;

图3为本发明实施例提供的数据请求处理方法的流程示意图之一;Figure 3 is one of the flow diagrams of the data request processing method provided by the embodiment of the present invention;

图4为本发明实施例提供的数据请求处理方法的流程示意图之二;Figure 4 is a second schematic flowchart of the data request processing method provided by the embodiment of the present invention;

图5为本发明实施例提供的数据请求处理方法的流程示意图之三;Figure 5 is a schematic flowchart 3 of the data request processing method provided by the embodiment of the present invention;

图6为本发明实施例提供的数据请求处理装置的结构示意图之一;Figure 6 is one of the structural schematic diagrams of a data request processing device provided by an embodiment of the present invention;

图7为本发明实施例提供的数据请求处理装置的结构示意图之二。Figure 7 is a second structural schematic diagram of a data request processing device provided by an embodiment of the present invention.

具体实施方式Detailed ways

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

以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本公开实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。另外,“基于”或“根据”的使用意味着开放和包容性,因为“基于”或“根据”一个或多个所述条件或值的过程、步骤、计算或其他动作在实践中可以基于额外条件或超出所述的值。Hereinafter, the terms “first” and “second” are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of indicated technical features. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present disclosure, unless otherwise specified, "plurality" means two or more. In addition, the use of "based on" or "according to" is meant to be open and inclusive, since a process, step, calculation or other action "based on" or "according to" one or more stated conditions or values may in practice be based on additional condition or exceeds the stated value.

为了在远程数据调用时,能够统一接口规范,本发明实施例提供了一种数据请求处理方法、装置及存储介质。当网关接收到数据调用设备发送的数据调用请求时,通过对数据调用请求进行处理,得到目标接口参数。然后,网关将目标接口参数发送至业务服务器,接收业务服务器发送的目标数据,并将目标数据从第二格式转换为第一格式,以便于数据调用设备能够识别目标数据,从而得到需要调用的数据。In order to unify interface specifications during remote data invocation, embodiments of the present invention provide a data request processing method, device and storage medium. When the gateway receives the data calling request sent by the data calling device, it processes the data calling request to obtain the target interface parameters. Then, the gateway sends the target interface parameters to the business server, receives the target data sent by the business server, and converts the target data from the second format to the first format so that the data calling device can identify the target data and obtain the data that needs to be called. .

本发明实施例提供的数据请求处理方法可以适用于数据请求处理系统。图1示出了该数据请求处理系统的一种结构。如图1所示,该数据请求处理系统可以包括:数据调用设备11、网关12、注册服务器13和业务服务器14。数据调用设备11与网关12通过有线通信或无线通信的方式建立连接。网关12、注册服务器13、业务服务器14三者之间通过有线通信或无线通信的方式建立连接。The data request processing method provided by the embodiment of the present invention can be applied to a data request processing system. Figure 1 shows a structure of the data request processing system. As shown in Figure 1, the data request processing system may include: data calling device 11, gateway 12, registration server 13 and business server 14. The data calling device 11 establishes a connection with the gateway 12 through wired communication or wireless communication. Connections are established between the gateway 12, the registration server 13, and the business server 14 through wired communication or wireless communication.

数据调用设备11,用于向网关12发送数据调用请求,数据调用请求用于请求目标数据,并接收网关12发送的数据格式为第一格式的目标数据。The data calling device 11 is used to send a data calling request to the gateway 12. The data calling request is used to request target data and receive the target data sent by the gateway 12 in a first format.

示例性的,数据调用设备11可以是智能手机、平板电脑或台式电脑等网关。For example, the data calling device 11 may be a gateway such as a smartphone, a tablet computer, or a desktop computer.

网关12,用于对接收到的数据调用请求进行解析,得到数据调用地址、调用方法名称和业务参数。网关12还用于基于数据调用地址与接口的第一映射关系,确定数据调用地址对应的目标接口,基于接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法。网关12还用于将业务参数、调用方法从第一格式转换为第二格式,生成目标接口参数,并通过目标接口向业务服务器发送该目标接口参数,在接收到业务服务器发送的目标数据后,将目标数据从第二格式转换为第一格式。网关12还用于将数据格式为第一格式的目标数据发送至数据调用设备11。The gateway 12 is used to parse the received data calling request and obtain the data calling address, calling method name and business parameters. The gateway 12 is also configured to determine the target interface corresponding to the data calling address based on the first mapping relationship between the data calling address and the interface, and determine the calling method corresponding to the target interface based on the second mapping relationship between the interface, method name, and method. The gateway 12 is also used to convert business parameters and calling methods from the first format to the second format, generate target interface parameters, and send the target interface parameters to the business server through the target interface. After receiving the target data sent by the business server, Convert target data from the second format to the first format. The gateway 12 is also used to send the target data in the first format to the data calling device 11 .

注册服务器13,用于接收业务服务器14发送的标识接口,以及标识接口对应的方法信息,并根据标识接口和标识接口对应的方法信息,生成第一映射关系和第二映射关系。The registration server 13 is configured to receive the identification interface sent by the business server 14 and the method information corresponding to the identification interface, and generate the first mapping relationship and the second mapping relationship based on the identification interface and the method information corresponding to the identification interface.

业务服务器14,用于向网关12提供数据格式为第二格式的目标数据。业务服务器14还用于向注册服务器发送标识接口,以及标识接口对应的方法信息。The business server 14 is configured to provide target data in the second format to the gateway 12 . The business server 14 is also used to send the identification interface and method information corresponding to the identification interface to the registration server.

上述数据调用设备11、网关12、注册服务器13和业务服务器14的基本硬件结构类似,都包括图2所示计算装置所包括的元件。下面以图2所示的计算装置为例,介绍数据调用设备、网关、注册服务器和业务服务器的硬件结构。The basic hardware structures of the above-mentioned data calling device 11, gateway 12, registration server 13 and business server 14 are similar, and all include elements included in the computing device shown in Figure 2. The following takes the computing device shown in Figure 2 as an example to introduce the hardware structure of the data calling device, gateway, registration server and business server.

如图2所示,计算装置可以包括:处理器21、存储器22、通信接口23和总线24。处理器21、存储器22和通信接口23之间可以通过通信总线24连接。As shown in FIG. 2 , the computing device may include: a processor 21 , a memory 22 , a communication interface 23 and a bus 24 . The processor 21, the memory 22 and the communication interface 23 may be connected through a communication bus 24.

处理器21是计算装置的控制中心,可以是一个处理器21,也可以是多个处理元件的统称。例如,处理器21可以是一个通用的中央处理器(central processing unit,CPU),也可以是其他通用处理器21等。其中,通用处理器21可以是微处理器21或者是任何常规的处理器21等。The processor 21 is the control center of the computing device, and may be one processor 21 or a collective name for multiple processing elements. For example, the processor 21 may be a general-purpose central processing unit (CPU) or other general-purpose processor 21 or the like. The general processor 21 may be a microprocessor 21 or any conventional processor 21 or the like.

作为一种实施例,处理器21可以包括一个或多个CPU,例如,图2所示的CPU0和CPU1。As an embodiment, the processor 21 may include one or more CPUs, such as CPU0 and CPU1 shown in FIG. 2 .

存储器22可以是只读存储器22(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器22(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器22(electrically erasable programmable read-only memory,EEPROM)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。The memory 22 may be a read-only memory 22 (ROM) or other type of static storage device that can store static information and instructions, a random access memory 22 (random access memory, RAM) or a ROM that can store information and instructions. Other types of dynamic storage devices may also be electrically erasable programmable read-only memory 22 (EEPROM), disk storage media or other magnetic storage devices, or may be used to carry or store instructions or Without limitation, any other medium that represents the desired program code in the form of a data structure and can be accessed by a computer.

一种可能的实现方式中,存储器22可以独立于处理器21存在,存储器22可以通过总线24与处理器21相连接,用于存储指令或者程序代码。处理器21调用并执行存储器22中存储的指令或程序代码时,能够实现本发明下述实施例提供的数据请求处理方法。In a possible implementation, the memory 22 may exist independently of the processor 21, and the memory 22 may be connected to the processor 21 through the bus 24 for storing instructions or program codes. When the processor 21 calls and executes instructions or program codes stored in the memory 22, it can implement the data request processing method provided by the following embodiments of the present invention.

另一种可能的实现方式中,存储器22也可以和处理器21集成在一起。In another possible implementation, the memory 22 can also be integrated with the processor 21 .

通信接口23,用于计算装置与其他设备通过通信网络连接,所述通信网络可以是以太网,无线接入网(radio access network,RAN),无线局域网(wireless localareanetworks,WLAN)等。通信接口23可以包括用于接收数据的接收单元,以及用于发送数据的发送单元。The communication interface 23 is used to connect the computing device to other devices through a communication network. The communication network may be Ethernet, a radio access network (radio access network, RAN), wireless local area networks (WLAN), etc. The communication interface 23 may include a receiving unit for receiving data, and a transmitting unit for transmitting data.

总线24,可以是工业标准体系结构(Industry StandardArchitecture,ISA)总线24、外部设备互连(Peripheral Component Interconnect,PCI)总线24或扩展工业标准体系结构(Extended Industry StandardArchitecture,EISA)总线24等。该总线24可以分为地址总线24、数据总线24、控制总线24等。为便于表示,图2中仅用一条粗线表示,但并不表示仅有一根总线24或一种类型的总线24。The bus 24 may be an Industry Standard Architecture (Industry Standard Architecture, ISA) bus 24, a Peripheral Component Interconnect (PCI) bus 24 or an Extended Industry Standard Architecture (Extended Industry Standard Architecture, EISA) bus 24, etc. The bus 24 can be divided into an address bus 24, a data bus 24, a control bus 24, etc. For ease of presentation, only one thick line is used in FIG. 2 , but this does not mean that there is only one bus 24 or one type of bus 24 .

需要指出的是,图2中示出的结构并不构成对该计算装置的限定,除图2所示部件之外,该计算装置可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。It should be noted that the structure shown in Figure 2 does not constitute a limitation of the computing device. In addition to the components shown in Figure 2, the computing device may include more or less components than shown in the figure, or a combination of certain components. components, or different component arrangements.

下面结合附图对本发明实施例提供的数据请求处理方法进行描述。The data request processing method provided by the embodiment of the present invention is described below with reference to the accompanying drawings.

如图3所示,本发明实施例提供的数据请求处理方法包括以下步骤301-步骤308。As shown in Figure 3, the data request processing method provided by the embodiment of the present invention includes the following steps 301 to 308.

301、网关获取数据调用请求,数据调用请求用于请求目标业务的目标数据。301. The gateway obtains a data call request, which is used to request target data of the target business.

在一种场景中,当用户通过数据调用设备调用业务服务器中的目标业务的目标数据时,数据调用设备向网关方数据调用请求,该数据调用请求用于请求目标业务的目标数据。示例性的,数据调用请求可以为http请求。In one scenario, when the user calls the target data of the target service in the service server through the data calling device, the data calling device makes a data calling request to the gateway, and the data calling request is used to request the target data of the target service. For example, the data calling request can be an http request.

302、网关对数据调用请求进行解析,得到数据调用请求包括的数据调用地址、调用方法名称和目标业务的业务参数。302. The gateway parses the data calling request and obtains the data calling address, calling method name and business parameters of the target business included in the data calling request.

可选的,当网关接收到数据调用设备发送的数据调用请求后,采用预设的解析规则,对数据调用请求进行解析,以得到数据调用请求包括的数据调用地址、调用方法名称和目标业务的业务参数。其中,目标业务的业务参数为数据调用设备调用的目标数据所必须的参数。Optionally, when the gateway receives the data calling request sent by the data calling device, it uses the preset parsing rules to parse the data calling request to obtain the data calling address, calling method name and target business included in the data calling request. business parameters. Among them, the service parameters of the target service are necessary parameters for the target data called by the data calling device.

示例性的,以数据调用请求为http请求为例。当网关接收到数据调用设备发送的http请求后,对http请求进行解析,得到http请求的统一资源定位符(Uniform ResourceLocator,URL)。网关还用于根据http请求的URL进行路径匹配,确定http请求中包括的数据调用地址、调用方法名称和目标业务的业务参数。As an example, take the data invocation request as an http request. When the gateway receives the http request sent by the data calling device, it parses the http request and obtains the Uniform Resource Locator (Uniform ResourceLocator, URL) of the http request. The gateway is also used to perform path matching based on the URL of the http request, and determine the data calling address, calling method name and business parameters of the target business included in the http request.

例如,数据调用设备中安装有运维应用,目标业务为调取运维设备11月份的运维数据。当运维人员想要调用运维设备在11月份整个月的运维数据时,运维人员通过数据调用设备向网关发送调用11月份的运维数据的http请求。该调用11月份的运维数据的http请求包括数据调用地址、调用方法名称,以及日期等业务参数。网关接收到该http请求后,对http请求进行解析处理,确定数据调用地址、调用方法名称,以及日期等业务参数。For example, the data calling device has an operation and maintenance application installed, and the target business is to retrieve the operation and maintenance data of the operation and maintenance device in November. When the operation and maintenance personnel want to call the operation and maintenance data of the operation and maintenance equipment for the entire month of November, the operation and maintenance personnel send an http request to the gateway through the data calling device to call the operation and maintenance data of November. The http request for calling the operation and maintenance data in November includes the data calling address, calling method name, and date and other business parameters. After receiving the http request, the gateway parses the http request and determines the data calling address, calling method name, date and other business parameters.

可选的,在对数据调用请求进行解析后,还可以得到数据调用请求包括的身份标识。网关基于身份标识和预存的身份验证策略,确定身份标识指示的账户是否具有数据调用权限。只有在确定数据调用设备登录的账户具有调用目标数据的权限的情况下,网关才会继续执行以下步骤。Optionally, after parsing the data calling request, the identity included in the data calling request can also be obtained. Based on the identity and the pre-stored authentication policy, the gateway determines whether the account indicated by the identity has the data call permission. Only if it is determined that the account logged in to the data calling device has the permission to call the target data, the gateway will continue to perform the following steps.

303、网关基于调用地址与接口的第一映射关系,确定数据调用地址对应的目标接口。303. The gateway determines the target interface corresponding to the data calling address based on the first mapping relationship between the calling address and the interface.

可选的,在网关确定身份标识指示的账户具有数据调用权限的情况下,基于第一映射关系,确定目标接口。数据调用地址与业务服务器中的接口一一对应,当网关确定了数据调用地址后,会根据调用地址与接口的第一映射关系,确定数据调用地址对应的目标接口。该目标接口为调用目标数据时,业务服务器对应的接口。Optionally, when the gateway determines that the account indicated by the identity identifier has the data calling authority, the target interface is determined based on the first mapping relationship. The data calling address corresponds to the interface in the business server one-to-one. When the gateway determines the data calling address, it will determine the target interface corresponding to the data calling address based on the first mapping relationship between the calling address and the interface. The target interface is the interface corresponding to the business server when calling target data.

304、网关基于接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法。304. The gateway determines the calling method corresponding to the target interface based on the second mapping relationship between the interface, method name, and methods.

可选的,一个接口可以包括多个方法,一个方法具有一个名称。当网关确定了调用方法名称后,会根据接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法。Optionally, an interface can contain multiple methods, each method having a name. After the gateway determines the calling method name, it will determine the calling method corresponding to the target interface based on the second mapping relationship between the interface, method name, and method.

305、网关将业务参数、调用方法从第一格式转换为第二格式,生成目标接口参数。305. The gateway converts the business parameters and calling methods from the first format to the second format, and generates target interface parameters.

可选的,由于数据调用设备使用的数据的数据格式为第一格式,业务服务器使用的数据的数据格式为第二格式。因此,当网关确定了调用上述目标数据时对应的目标接口,以及目标接口对应的调用方法后,需要将业务参数和调用方法从第一格式转换为业务服务器能够识别的第二格式,并生成目标接口参数。Optionally, since the data format used by the data calling device is the first format, the data format used by the business server is the second format. Therefore, when the gateway determines the target interface corresponding to the above target data and the calling method corresponding to the target interface, it needs to convert the business parameters and calling method from the first format to the second format that can be recognized by the business server, and generate the target interface parameters.

306、网关通过目标接口向业务服务器发送目标接口参数。306. The gateway sends the target interface parameters to the business server through the target interface.

307、网关接收业务服务器发送的目标数据。307. The gateway receives the target data sent by the business server.

308、网关将目标数据从第二格式转换为第一格式。308. The gateway converts the target data from the second format to the first format.

网关接收到的目标数据的数据格式为第二数据格式,为了数据调用设备能够识别出该目标数据,网关还需要将目标数据从第二格式转换为第一格式。The data format of the target data received by the gateway is the second data format. In order for the data calling device to recognize the target data, the gateway also needs to convert the target data from the second format to the first format.

采用本发明提供的数据请求处理方法,当网关接收到数据调用设备发送的数据调用请求时,通过对数据调用请求进行处理,得到目标接口参数。然后,网关将目标接口参数发送至业务服务器,接收业务服务器发送的目标数据,并将目标数据从第二格式转换为第一格式,以便于数据调用设备能够获取到需要调用的数据。与现有技术中当网关需要调用业务服务器中的一个服务时,需要针对每个服务对应的接口编写样板化的应用层代码,且网关的请求参数和业务服务器的响应参数都需要自定义相比,能够统一接口规范。且,网关可以提供可定制化的参数转换,提高了接口管理的便捷性以及安全性。Using the data request processing method provided by the present invention, when the gateway receives the data calling request sent by the data calling device, the target interface parameters are obtained by processing the data calling request. Then, the gateway sends the target interface parameters to the business server, receives the target data sent by the business server, and converts the target data from the second format to the first format, so that the data calling device can obtain the data that needs to be called. Compared with the existing technology, when the gateway needs to call a service in the business server, it needs to write boilerplate application layer code for the interface corresponding to each service, and the request parameters of the gateway and the response parameters of the business server need to be customized. , can unify interface specifications. Moreover, the gateway can provide customized parameter conversion, which improves the convenience and security of interface management.

结合图3,如图4所示,本发明实施例提供的数据请求处理方法还可以包括以下步骤401和步骤402。In conjunction with Figure 3, as shown in Figure 4, the data request processing method provided by the embodiment of the present invention may also include the following steps 401 and 402.

401、网关向注册服务器发送订阅信息。401. The gateway sends subscription information to the registration server.

402、网关接收注册服务器发送的第一映射关系和第二映射关系。402. The gateway receives the first mapping relationship and the second mapping relationship sent by the registration server.

可选的,网关启动时,会主动向注册服务器发送订阅信息。注册服务器接收到订阅信息后,向网关发送调用地址与接口的第一映射关系,以及接口、方法名称、方法之间的第二映射关系。网关接收到第一映射关系和第二映射关系后,采用缓存策略,对两个进行缓存。当注册服务器中的第一映射关系和第二映射关系发生变更时,注册服务器会主动将变更信息发送至网关。Optionally, when the gateway starts, it will actively send subscription information to the registration server. After receiving the subscription information, the registration server sends the first mapping relationship between the calling address and the interface, and the second mapping relationship between the interface, method name, and method to the gateway. After receiving the first mapping relationship and the second mapping relationship, the gateway adopts a caching strategy to cache the two. When the first mapping relationship and the second mapping relationship in the registration server change, the registration server will actively send the change information to the gateway.

结合图4,如图5所示,本发明实施例提供的数据请求处理方法还可以包括以下步骤501和步骤502。In conjunction with Figure 4, as shown in Figure 5, the data request processing method provided by the embodiment of the present invention may also include the following steps 501 and 502.

501、业务服务器获取被标识的预设接口。其中,预设接口用于调用目标业务的目标数据。501. The business server obtains the identified default interface. Among them, the preset interface is used to call the target data of the target business.

502、业务服务器向注册服务器发送预设接口,以及预设接口对应的方法信息。其中,方法信息包括预设接口对应的调用地址,以及预设接口对应的至少一种方法名称和方法。502. The business server sends the preset interface and the method information corresponding to the preset interface to the registration server. The method information includes a calling address corresponding to the preset interface, and at least one method name and method corresponding to the preset interface.

可选的,当业务服务器启动后,自动扫描数据调用设备调用数据时需要暴露的接口,以及需要暴露的接口对应的具体的方法信息。当业务服务器确定了需要暴露的接口后,通过在需要暴露的接口以实现类打注解的方式对需要暴露的接口进行标识,并获取被标识的预设接口,预设接口用于调用目标业务的目标数据。业务服务器生成标识接口后,向注册服务器发送预设接口,以及预设接口对应的方法信息,这样可以使业务服务器中的接口自动暴露,并被注册服务器发现,可以避免对业务服务器中的接口进行重复标识。Optionally, after the business server is started, it automatically scans the interfaces that need to be exposed when the data calling device calls data, and the specific method information corresponding to the interfaces that need to be exposed. When the business server determines the interfaces that need to be exposed, it identifies the interfaces that need to be exposed by annotating the interfaces that need to be exposed, and obtains the identified preset interfaces. The preset interfaces are used to call the target business. target data. After the business server generates the identification interface, it sends the preset interface and the method information corresponding to the preset interface to the registration server. This allows the interface in the business server to be automatically exposed and discovered by the registration server, and avoids modification of the interface in the business server. Duplicate identification.

可选的,当注册服务器获取到预设接口,以及预设接口对应的方法信息后,根据预设接口,以及预设接口对应的方法信息,生成上述第一映射关系和第二映射关系。Optionally, after the registration server obtains the preset interface and the method information corresponding to the preset interface, it generates the above-mentioned first mapping relationship and the second mapping relationship based on the preset interface and the method information corresponding to the preset interface.

上述主要从数据请求处理装置的角度对本发明实施例提供的方案进行了介绍。可以理解的是,数据请求处理装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the data request processing device. It can be understood that, in order to implement the above functions, the data request processing device includes hardware structures and/or software modules corresponding to each function. Those skilled in the art will readily appreciate that, in conjunction with the algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered to be beyond the scope of the present invention.

图6示出了上述实施例中涉及的数据请求处理装置600的一种可能的组成示意图,如图6所示,该数据请求处理装置600可以包括:获取单元601、解析单元602、确定单元603和生成单元604。Figure 6 shows a possible composition diagram of the data request processing device 600 involved in the above embodiment. As shown in Figure 6, the data request processing device 600 may include: an acquisition unit 601, an analysis unit 602, and a determination unit 603 and generation unit 604.

其中,获取单元601,用于获取数据调用请求,数据调用请求用于请求目标业务的目标数据。解析单元602,用于对获取单元获取到的数据调用请求进行解析,得到数据调用请求包括的数据调用地址、调用方法名称和目标业务的业务参数。确定单元603,用于基于调用地址与接口的第一映射关系,确定解析单元得到的数据调用地址对应的目标接口,并基于接口、方法名称、方法之间的第二映射关系,确定目标接口对应的调用方法。生成单元604,用于将解析单元得到的业务参数、确定单元得到的调用方法从第一格式转换为第二格式,生成目标接口参数。获取单元601,还用于通过目标接口向业务服务器发送目标接口参数,并接收业务服务器发送的目标数据。生成单元604,还用于将获取单元获取到的目标数据从第二格式转换为第一格式。Among them, the obtaining unit 601 is used to obtain a data calling request, and the data calling request is used to request target data of the target service. The parsing unit 602 is configured to parse the data calling request obtained by the acquisition unit, and obtain the data calling address, calling method name and business parameters of the target service included in the data calling request. The determining unit 603 is configured to determine the target interface corresponding to the data calling address obtained by the parsing unit based on the first mapping relationship between the calling address and the interface, and determine the corresponding target interface based on the second mapping relationship between the interface, method name, and method. calling method. The generating unit 604 is configured to convert the service parameters obtained by the parsing unit and the calling method obtained by the determining unit from the first format to the second format, and generate target interface parameters. The acquisition unit 601 is also used to send target interface parameters to the business server through the target interface, and receive target data sent by the business server. The generating unit 604 is also used to convert the target data acquired by the acquiring unit from the second format to the first format.

上述解析单元602对数据调用请求进行解析后,还可以得到数据调用请求包括的身份标识。After the above parsing unit 602 parses the data calling request, it can also obtain the identity included in the data calling request.

可选的,确定单元603,还用于基于身份标识和预存的身份验证策略,确定身份标识指示的账户是否具有数据调用权限。Optionally, the determining unit 603 is also configured to determine whether the account indicated by the identity identifier has data calling permission based on the identity identifier and the pre-stored identity verification policy.

可选的,确定单元603,具体用于:Optional, determining unit 603 is specifically used for:

在确定身份标识指示的账户具有数据调用权限的情况下,基于第一映射关系,确定目标接口。When it is determined that the account indicated by the identity identifier has the data calling authority, the target interface is determined based on the first mapping relationship.

可选的,获取单元601,还用于向注册服务器发送订阅信息,并接收注册服务器发送的第一映射关系和第二映射关系。Optionally, the acquisition unit 601 is also configured to send subscription information to the registration server, and receive the first mapping relationship and the second mapping relationship sent by the registration server.

图7示出了上述实施例涉及的数据请求处理装置的一种可能的组成示意图,如图7所示,该数据请求处理装置700可以包括:获取单元701和发送单元702。Figure 7 shows a possible composition diagram of the data request processing device involved in the above embodiment. As shown in Figure 7, the data request processing device 700 may include: an acquisition unit 701 and a sending unit 702.

其中,获取单元701,用于获取被标识的预设接口,预设接口用于调用目标业务的目标数据。发送单元702,用于向注册服务器发送预设接口,以及预设接口对应的方法信息,方法信息包括预设接口对应的调用地址,以及预设接口对应的至少一种方法名称和方法。Among them, the obtaining unit 701 is used to obtain the identified preset interface, and the preset interface is used to call the target data of the target service. The sending unit 702 is configured to send a preset interface and method information corresponding to the preset interface to the registration server. The method information includes a calling address corresponding to the preset interface, and at least one method name and method corresponding to the preset interface.

当然,本发明实施例提供的数据请求处理装置包括但不仅限于上述模块。Of course, the data request processing device provided by the embodiment of the present invention includes but is not limited to the above modules.

在实际实现时,获取单元、解析单元、确定单元、生成单元和发送单元可以由图2所示的处理器21调用存储器22中的程序代码来实现。其具体的执行过程可参考图3至图6所示的数据请求处理方法部分的描述,这里不再赘述。In actual implementation, the acquisition unit, analysis unit, determination unit, generation unit and sending unit can be implemented by the processor 21 shown in Figure 2 calling the program code in the memory 22. For its specific execution process, please refer to the description of the data request processing method shown in Figures 3 to 6, and will not be described again here.

本发明另一实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机指令,当计算机指令在数据请求处理装置上运行时,使得数据请求处理装置执行上述方法实施例所示的方法流程中数据请求处理装置执行的各个步骤。Another embodiment of the present invention also provides a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions are run on the data request processing device, the data request processing device executes the above method embodiment. Each step performed by the data request processing device in the method flow shown.

本发明另一实施例还提供一种芯片系统,该芯片系统应用于数据请求处理装置。所述芯片系统包括一个或多个接口电路,以及一个或多个处理器21。接口电路和处理器21通过线路互联。接口电路用于从数据请求处理装置的存储器22接收信号,并向处理器21发送所述信号,所述信号包括所述存储器22中存储的计算机指令。当处理器21执行计算机指令时,数据请求处理装置执行上述方法实施例所示的方法流程中数据请求处理装置执行的各个步骤。Another embodiment of the present invention also provides a chip system, which is applied to a data request processing device. The chip system includes one or more interface circuits and one or more processors 21 . The interface circuit and the processor 21 are interconnected via lines. The interface circuit is used to receive signals from the memory 22 of the data request processing device and send the signals to the processor 21 , where the signals include computer instructions stored in the memory 22 . When the processor 21 executes computer instructions, the data request processing device executes each step performed by the data request processing device in the method flow shown in the above method embodiment.

在本发明另一实施例中,还提供一种计算机程序产品,该计算机程序产品包括指令,当指令在数据请求处理装置上运行时,使得数据请求处理装置执行上述方法实施例所示的方法流程中数据请求处理装置执行的各个步骤。In another embodiment of the present invention, a computer program product is also provided. The computer program product includes instructions. When the instructions are run on a data request processing device, the data request processing device executes the method flow shown in the above method embodiment. Each step performed by the data request processing device.

在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件程序实现时,可以全部或部分地以计算机程序产品的形式来实现。该计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机执行指令时,全部或部分地产生按照本发明实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或者数据中心通过有线(例如同轴电缆、光纤、数字用户线(digitalsubscriber line,DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可以用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质(例如,软盘、硬盘、磁带),光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When computer execution instructions are loaded and executed on a computer, processes or functions according to embodiments of the present invention are generated in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable device. Computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, e.g., computer instructions may be transmitted from a website, computer, server or data center via a wired link (e.g. Coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) means to transmit to another website, computer, server or data center. Computer-readable storage media can be any available media that can be accessed by a computer or include one or more data storage devices such as servers and data centers that can be integrated with the media. Available media may be magnetic media (eg, floppy disk, hard disk, magnetic tape), optical media (eg, DVD), or semiconductor media (eg, solid state disk (SSD)), etc.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何在本发明揭露的技术范围内的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present invention should be covered by the protection scope of the present invention. . Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (9)

1.一种数据请求处理方法,其特征在于,包括:1. A data request processing method, characterized by including: 获取数据调用请求,所述数据调用请求用于请求目标业务的目标数据;Obtain a data call request, which is used to request target data of the target business; 对所述数据调用请求进行解析,得到所述数据调用请求包括的数据调用地址、调用方法名称和所述目标业务的业务参数;Parse the data calling request to obtain the data calling address, calling method name and business parameters of the target service included in the data calling request; 基于调用地址与接口的第一映射关系,确定所述数据调用地址对应的目标接口;Based on the first mapping relationship between the calling address and the interface, determine the target interface corresponding to the data calling address; 基于接口、方法名称、方法之间的第二映射关系,确定所述目标接口对应的调用方法;Based on the second mapping relationship between the interface, the method name, and the method, determine the calling method corresponding to the target interface; 将所述业务参数和所述调用方法从第一格式转换为第二格式,生成目标接口参数;Convert the service parameters and the calling method from the first format to the second format, and generate target interface parameters; 通过所述目标接口向业务服务器发送所述目标接口参数;Send the target interface parameters to the business server through the target interface; 接收所述业务服务器发送的所述目标数据;Receive the target data sent by the business server; 将所述目标数据从所述第二格式转换为所述第一格式;converting the target data from the second format to the first format; 其中,对所述数据调用请求进行解析后,还得到所述数据调用请求包括的身份标识;Wherein, after parsing the data calling request, the identity included in the data calling request is also obtained; 基于所述身份标识和预存的身份验证策略,确定所述身份标识指示的账户是否具有数据调用权限;Based on the identity identifier and the pre-stored identity verification policy, determine whether the account indicated by the identity identifier has data calling authority; 所述基于调用地址与接口的第一映射关系,确定所述数据调用地址对应的目标接口,包括:Determining the target interface corresponding to the data calling address based on the first mapping relationship between the calling address and the interface includes: 在确定所述身份标识指示的账户具有数据调用权限的情况下,基于所述第一映射关系,确定所述目标接口。When it is determined that the account indicated by the identity identifier has data calling authority, the target interface is determined based on the first mapping relationship. 2.根据权利要求1所述的数据请求处理方法,其特征在于,所述数据请求处理方法还包括:2. The data request processing method according to claim 1, characterized in that the data request processing method further includes: 向注册服务器发送订阅信息;Send subscription information to the registration server; 接收所述注册服务器发送的所述第一映射关系和所述第二映射关系。Receive the first mapping relationship and the second mapping relationship sent by the registration server. 3.一种数据请求处理方法,其特征在于,包括:3. A data request processing method, characterized by including: 获取被标识的预设接口,所述预设接口用于调用目标业务的目标数据;Obtain the identified preset interface, which is used to call the target data of the target service; 向注册服务器发送所述预设接口,以及所述预设接口对应的方法信息,所述方法信息包括所述预设接口对应的调用地址,以及所述预设接口对应的至少一种方法名称和方法。Send the preset interface and method information corresponding to the preset interface to the registration server. The method information includes the calling address corresponding to the preset interface, and at least one method name and method corresponding to the preset interface. method. 4.一种数据请求处理装置,其特征在于,包括:4. A data request processing device, characterized in that it includes: 获取单元,用于获取数据调用请求,所述数据调用请求用于请求目标业务的目标数据;An acquisition unit, used to acquire a data call request, where the data call request is used to request target data of a target service; 解析单元,用于对所述获取单元获取到的所述数据调用请求进行解析,得到所述数据调用请求包括的数据调用地址、调用方法名称和所述目标业务的业务参数;A parsing unit, configured to parse the data calling request obtained by the obtaining unit, and obtain the data calling address, calling method name and business parameters of the target service included in the data calling request; 确定单元,用于基于调用地址与接口的第一映射关系,确定所述解析单元得到的数据调用地址对应的目标接口,并基于接口、方法名称、方法之间的第二映射关系,确定所述目标接口对应的调用方法;The determining unit is configured to determine the target interface corresponding to the data calling address obtained by the parsing unit based on the first mapping relationship between the calling address and the interface, and determine the target interface based on the second mapping relationship between the interface, method name, and method. The calling method corresponding to the target interface; 生成单元,用于将所述解析单元得到的所述业务参数,以及所述确定单元得到的所述调用方法从第一格式转换为第二格式,生成目标接口参数;A generating unit, configured to convert the service parameters obtained by the parsing unit and the calling method obtained by the determining unit from the first format to the second format, and generate target interface parameters; 所述获取单元,还用于通过所述目标接口向业务服务器发送所述目标接口参数,并接收所述业务服务器发送的所述目标数据;The acquisition unit is also configured to send the target interface parameters to the business server through the target interface, and receive the target data sent by the business server; 所述生成单元,还用于将所述获取单元获取到的所述目标数据从所述第二格式转换为所述第一格式。The generating unit is also configured to convert the target data obtained by the obtaining unit from the second format to the first format. 5.根据权利要求4所述的数据请求处理装置,其特征在于,在所述解析单元对所述数据调用请求进行解析后,还得到所述数据调用请求包括的身份标识;5. The data request processing device according to claim 4, characterized in that, after the parsing unit parses the data call request, the identity identifier included in the data call request is also obtained; 所述确定单元,还用于基于所述身份标识和预存的身份验证策略,确定所述身份标识指示的账户是否具有数据调用权限;The determination unit is also configured to determine whether the account indicated by the identity identifier has data calling authority based on the identity identifier and a pre-stored identity verification policy; 所述确定单元,具体用于:在确定所述身份标识指示的账户具有数据调用权限的情况下,基于所述第一映射关系,确定所述目标接口。The determining unit is specifically configured to: determine the target interface based on the first mapping relationship when it is determined that the account indicated by the identity identifier has data calling authority. 6.根据权利要求4或5所述的数据请求处理装置,其特征在于,所述获取单元,还用于向注册服务器发送订阅信息,并接收所述注册服务器发送的所述第一映射关系和所述第二映射关系。6. The data request processing device according to claim 4 or 5, characterized in that the obtaining unit is further configured to send subscription information to a registration server, and receive the first mapping relationship and the sum of the first mapping relationship sent by the registration server. the second mapping relationship. 7.一种数据请求处理装置,其特征在于,包括:7. A data request processing device, characterized in that it includes: 获取单元,用于获取被标识的预设接口,所述预设接口用于调用目标业务的目标数据;An acquisition unit, configured to acquire the identified preset interface, which is used to call the target data of the target service; 发送单元,用于向注册服务器发送所述预设接口,以及所述预设接口对应的方法信息,所述方法信息包括所述预设接口对应的调用地址,以及所述预设接口对应的至少一种方法名称和方法。A sending unit, configured to send the preset interface and method information corresponding to the preset interface to the registration server. The method information includes a calling address corresponding to the preset interface, and at least A method name and method. 8.一种数据请求处理装置,其特征在于,所述数据请求处理装置包括:处理器和存储器;所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令;当所述处理器执行所述计算机指令时,所述数据请求处理装置执行如权利要求1-2中任意一项所述的数据请求处理方法,或执行如权利要求3所述的数据请求处理方法。8. A data request processing device, characterized in that the data request processing device includes: a processor and a memory; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor When executing the computer instructions, the data request processing device executes the data request processing method as described in any one of claims 1-2, or executes the data request processing method as claimed in claim 3. 9.一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在数据请求处理装置上运行时,使得所述数据请求处理装置执行权利要求1-2中任意一项所述的数据请求处理方法,或执行如权利要求3所述的数据请求处理方法。9. A computer-readable storage medium, characterized in that it includes computer instructions, and when the computer instructions are run on a data request processing device, the data request processing device causes the data request processing device to execute any one of claims 1-2. The data request processing method described in claim 3, or the data request processing method described in claim 3.
CN202210043415.1A 2022-01-14 2022-01-14 Data request processing method, device and storage medium Active CN114598750B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210043415.1A CN114598750B (en) 2022-01-14 2022-01-14 Data request processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210043415.1A CN114598750B (en) 2022-01-14 2022-01-14 Data request processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114598750A CN114598750A (en) 2022-06-07
CN114598750B true CN114598750B (en) 2024-01-30

Family

ID=81804501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210043415.1A Active CN114598750B (en) 2022-01-14 2022-01-14 Data request processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114598750B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885026A (en) * 2022-07-07 2022-08-09 飞狐信息技术(天津)有限公司 Data interface request processing system, method, equipment and storage medium
CN115604333B (en) * 2022-10-12 2023-09-12 江苏赛融科技股份有限公司 Distributed big data analysis service scheduling method and system based on dubbo
CN116366624B (en) * 2023-04-07 2025-12-12 平安银行股份有限公司 A method and system for processing HTTP call addresses
CN117194541A (en) * 2023-09-04 2023-12-08 建信金融科技有限责任公司 A data processing method, device, electronic equipment and computer-readable medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN111930534A (en) * 2020-07-29 2020-11-13 北京字节跳动网络技术有限公司 Data calling method and device and electronic equipment
CN112099964A (en) * 2019-06-18 2020-12-18 北京思源政通科技集团有限公司 Interface calling method, device, storage medium and electronic device
CN112804303A (en) * 2020-12-31 2021-05-14 网银在线(北京)科技有限公司 Service providing method, device, system, transfer platform and storage medium
CN112866177A (en) * 2019-11-26 2021-05-28 浙江大搜车软件技术有限公司 Method, device, storage medium and computer equipment for processing service call request
US11023301B1 (en) * 2020-07-02 2021-06-01 Ryan L. Hornbeck Unified API platform
CN113626223A (en) * 2021-08-12 2021-11-09 北京京东振世信息技术有限公司 Interface calling method and device
CN113806037A (en) * 2021-07-14 2021-12-17 远光软件股份有限公司 Service calling method and device, storage medium and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104660562B (en) * 2013-11-21 2019-10-22 深圳市腾讯计算机系统有限公司 A kind of information inspection method, relevant apparatus and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095479A (en) * 2011-11-04 2013-05-08 华为技术有限公司 Method and device of business configuration
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN112099964A (en) * 2019-06-18 2020-12-18 北京思源政通科技集团有限公司 Interface calling method, device, storage medium and electronic device
CN112866177A (en) * 2019-11-26 2021-05-28 浙江大搜车软件技术有限公司 Method, device, storage medium and computer equipment for processing service call request
US11023301B1 (en) * 2020-07-02 2021-06-01 Ryan L. Hornbeck Unified API platform
CN111930534A (en) * 2020-07-29 2020-11-13 北京字节跳动网络技术有限公司 Data calling method and device and electronic equipment
CN112804303A (en) * 2020-12-31 2021-05-14 网银在线(北京)科技有限公司 Service providing method, device, system, transfer platform and storage medium
CN113806037A (en) * 2021-07-14 2021-12-17 远光软件股份有限公司 Service calling method and device, storage medium and electronic equipment
CN113626223A (en) * 2021-08-12 2021-11-09 北京京东振世信息技术有限公司 Interface calling method and device

Also Published As

Publication number Publication date
CN114598750A (en) 2022-06-07

Similar Documents

Publication Publication Date Title
CN114598750B (en) Data request processing method, device and storage medium
CN111327662B (en) A communication method and management device for a heterogeneous Internet of Things platform
CN111818158B (en) Gateway control method, device, electronic device and storage medium
CN112087644B (en) Pull stream request processing method, device and system, electronic equipment and storage medium
CN114124451A (en) A method, system and computer storage medium for data processing of Internet of Things equipment
CN114025021A (en) Communication method, system, medium and electronic device across Kubernetes cluster
CN111400777B (en) Network storage system, user authentication method, device and equipment
CN107360261A (en) A kind of HTTP request processing method, device and electronic equipment
CN108322530A (en) Context environment information transmission method and device, service gateway and storage medium
CN114090623A (en) Method and device for creating cache resources, electronic equipment and storage medium
US10440099B2 (en) Accessing services provided by computing devices in a network
CN112261111A (en) Method and system for realizing cross-domain access of browser in application program
CN108512903A (en) A kind of exception information processing method, device, storage medium and API gateway
CN117955980B (en) Multi-cluster nano-tube method, platform, equipment and storage medium
CN110661673B (en) Method and device for heartbeat detection
CN108989420B (en) Method and system for registering service, method and system for invoking service
CN108173839A (en) Rights management method and system
CN115412549A (en) Information configuration method and device and request processing method and device
US20150358263A1 (en) Communication between a web application instance connected to a connection server and a calling entity other than said connection server
CN116506500A (en) Multi-channel multi-data structure message forwarding method, device, electronic equipment and storage medium
US7627906B2 (en) Service discovery system, client terminal, service providing device, and service discovery method
CN115412920A (en) Internet of things equipment binding system, method and device and electronic equipment
CN112261051B (en) User registration method, device and system
CN112583611A (en) Method, device, electronic equipment and medium for acquiring fault information
CN109992298A (en) Approval platform extension method, device, approval platform and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant