WO2021217846A1 - Interface data processing method and apparatus, and computer device and storage medium - Google Patents

Interface data processing method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2021217846A1
WO2021217846A1 PCT/CN2020/098683 CN2020098683W WO2021217846A1 WO 2021217846 A1 WO2021217846 A1 WO 2021217846A1 CN 2020098683 W CN2020098683 W CN 2020098683W WO 2021217846 A1 WO2021217846 A1 WO 2021217846A1
Authority
WO
WIPO (PCT)
Prior art keywords
parameter
interface
identifier
return
request
Prior art date
Application number
PCT/CN2020/098683
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 WO2021217846A1 publication Critical patent/WO2021217846A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The present application relates to a data warehouse in big data. Provided are an interface data processing method and apparatus, a computer device, and a storage medium. The method comprises: acquiring an interface identifier and a parameter identification statement; parsing the parameter identification statement according to a preset target parsing rule script, so as to obtain an interface request parameter identifier and an interface return parameter identifier; acquiring a corresponding request parameter statement according to the interface request parameter identifier, parsing the request parameter statement to obtain a data table field corresponding to the request parameter identifier, and generating a corresponding request parameter attribute by using the data table field; acquiring a corresponding return parameter statement according to the interface return parameter identifier, parsing the return parameter statement to obtain a data table field corresponding to the return parameter identifier, and generating a corresponding return parameter attribute by using the data table field; and generating, according to the request parameter attribute and the return parameter attribute, a parameter list corresponding to the interface identifier, and storing the interface identifier and the parameter list in an associative manner. By utilizing the present method, the interface parameter configuration efficiency can be improved.

Description

接口数据处理方法、装置、计算机设备和存储介质Interface data processing method, device, computer equipment and storage medium
相关申请的交叉引用Cross-references to related applications
本申请要求于2020年04月28日提交中国专利局,申请号为2020103494884,申请名称为“接口参数确定方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the Chinese Patent Office on April 28, 2020, the application number is 2020103494884, and the application title is "Interface parameter determination method, device, computer equipment and storage medium", the entire content of which is incorporated by reference Incorporated in this application.
技术领域Technical field
本申请涉及一种接口数据处理方法、装置、计算机设备和存储介质。This application relates to an interface data processing method, device, computer equipment and storage medium.
背景技术Background technique
随着互联网技术的发展,通常在进行互联网项目开发时,都涉及到接口的开发,每个接口都需要进行参数的配置。当参数配置完成时,才能使用接口,通过使用接口来进行数据之间的传递。With the development of Internet technology, the development of interfaces is usually involved in the development of Internet projects, and each interface needs to be configured with parameters. When the parameter configuration is completed, the interface can be used, and the data can be transferred by using the interface.
然而,发明人意识到,当遇到复杂项目时,同时需要进行多个项目,每个项目都需要配置多个接口,每个接口都有不同的参数,导致接口参数配置的效率低下,从而影响接口的使用,降低了接口之间的数据传递效率。However, the inventor realized that when a complex project is encountered, multiple projects need to be carried out at the same time. Each project needs to be configured with multiple interfaces, and each interface has different parameters, resulting in low efficiency in the configuration of interface parameters, thereby affecting The use of interfaces reduces the efficiency of data transfer between interfaces.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种接口数据处理方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, an interface data processing method, device, computer equipment, and storage medium are provided.
一种接口数据处理方法,所述方法包括:An interface data processing method, the method includes:
接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;Receive interface parameter determination instructions, and obtain interface identification and parameter identification sentences according to the parameter determination instructions;
根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;Analyze the parameter identification statement according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement, obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。According to the request parameter attribute and the return parameter attribute, a parameter list corresponding to the interface identifier is generated, and the interface identifier and the parameter list are associated and saved.
一种接口数据处理装置,所述装置包括:An interface data processing device, the device comprising:
语句获取模块,用于接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;The sentence acquisition module is used to receive interface parameter determination instructions, and acquire interface identification and parameter identification sentences according to the parameter determination instructions;
解析模块,用于根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;The parsing module is used to parse the parameter recognition statement according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
属性生成模块,用于根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;及The attribute generation module is used to obtain the corresponding request parameter statement according to the interface request parameter identification, parse the request parameter statement, and obtain the data table field corresponding to the request parameter identification, and use the data table field to generate the corresponding request parameter attribute; obtain according to the interface return parameter identification The corresponding return parameter statement, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
参数生成模块,用于根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。The parameter generation module is used to generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device, including a memory and one or more processors, the memory stores computer readable instructions, and when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;Receive interface parameter determination instructions, and obtain interface identification and parameter identification sentences according to the parameter determination instructions;
根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;Analyze the parameter identification statement according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement, obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。According to the request parameter attribute and the return parameter attribute, a parameter list corresponding to the interface identifier is generated, and the interface identifier and the parameter list are associated and saved.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:One or more 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 interface parameter determination instructions, and obtain interface identification and parameter identification sentences according to the parameter determination instructions;
根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;Analyze the parameter identification statement according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement, obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。According to the request parameter attribute and the return parameter attribute, a parameter list corresponding to the interface identifier is generated, and the interface identifier and the parameter list are associated and saved.
上述接口数据处理方法、装置、计算机设备和存储介质,通过接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字 段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存,通过使用参数识别语句得到参数标识,根据参数标识使用对应的参数语句来生成参数属性,根据参数属性得到参数列表,即使用参数识别语句来配置接口参数,提高了接口参数配置的效率,使能够更快的生成接口并进行使用,从而提高了接口之间的数据传递效率。The above-mentioned interface data processing method, device, computer equipment and storage medium receive the interface parameter determination instruction, and obtain the interface identification and parameter identification sentence according to the parameter determination instruction; the parameter identification sentence is parsed according to the preset target parsing rule script to obtain the interface request parameter identification And the interface returns the parameter identification; obtain the corresponding request parameter statement according to the interface request parameter identification, parse the request parameter statement, obtain the data table field corresponding to the request parameter identification, use the data table field to generate the corresponding request parameter attribute; obtain according to the interface return parameter identification Corresponding return parameter statement, parse the return parameter statement, get the data table field corresponding to the return parameter identifier, use the data table field to generate the corresponding return parameter attribute; generate the parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and set the interface The identification is saved in association with the parameter list. The parameter identification is obtained by using the parameter identification statement, and the corresponding parameter statement is used to generate the parameter attribute according to the parameter identification. The parameter list is obtained according to the parameter attribute, that is, the parameter identification statement is used to configure the interface parameters, which improves the interface parameters. The efficiency of configuration enables faster generation and use of interfaces, thereby improving the efficiency of data transfer between interfaces.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the present application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the description, drawings and claims.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. A person of ordinary skill in the art can obtain other drawings based on these drawings without creative work.
图1为根据一个或多个实施例中接口数据处理方法的应用环境图;Fig. 1 is an application environment diagram of the interface data processing method according to one or more embodiments;
图2为根据一个或多个实施例中接口数据处理方法的流程示意图;FIG. 2 is a schematic flowchart of an interface data processing method according to one or more embodiments;
图3为根据一个或多个实施例中生成脚本的流程示意图;FIG. 3 is a schematic diagram of a flow of generating a script according to one or more embodiments;
图4为根据一个或多个实施例中解析参数识别语句的流程示意图;FIG. 4 is a schematic diagram of a process of parsing a parameter recognition sentence according to one or more embodiments;
图5为根据一个或多个实施例中读取参数标识的流程示意图;FIG. 5 is a schematic diagram of a flow of reading parameter identifiers according to one or more embodiments;
图6为根据一个或多个实施例中匹配参数名称的流程示意图;Fig. 6 is a schematic diagram of a process of matching parameter names according to one or more embodiments;
图7为根据一个或多个实施例中生成接口参数文档的流程示意图;FIG. 7 is a schematic diagram of a flow of generating an interface parameter document according to one or more embodiments;
图8为根据一个或多个具体实施例中接口数据处理方法的流程示意图;FIG. 8 is a schematic flowchart of an interface data processing method according to one or more specific embodiments;
图9为根据一个或多个实施例中接口参数确定装置的框图;Figure 9 is a block diagram of a device for determining interface parameters according to one or more embodiments;
图10为根据一个或多个实施例中计算机设备的框图。Figure 10 is a block diagram of a computer device according to one or more embodiments.
具体实施方式Detailed ways
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application clearer, the following further describes the present application in 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进行通信。终端102接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;终端102根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;终端102根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;终端102根据接口返回参数标识获取对应的返回参数语句,解析 返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;终端102根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存,终端102可以将保存的接口标识与对应的参数列表上传到服务器104中进行保存。终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The interface data processing method provided in this application can be applied to the application environment as shown in FIG. 1. The terminal 102 communicates with the server 104 through the network. The terminal 102 receives the interface parameter determination instruction, and obtains the interface identification and parameter identification sentence according to the parameter determination instruction; the terminal 102 parses the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identification and the interface return parameter identification; the terminal 102 according to the interface request The parameter identification obtains the corresponding request parameter statement, parses the request parameter statement, and obtains the data table field corresponding to the request parameter identification, and uses the data table field to generate the corresponding request parameter attribute; the terminal 102 obtains the corresponding return parameter statement according to the interface return parameter identification, and parses Return parameter statement to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; the terminal 102 generates the parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and associates the interface identifier with the parameter list For saving, the terminal 102 may upload the saved interface identifier and the corresponding parameter list to the server 104 for saving. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在其中一个实施例中,如图2所示,提供了一种接口数据处理方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one of the embodiments, as shown in FIG. 2, an interface data processing method is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
S202,接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句。S202: Receive an interface parameter determination instruction, and obtain an interface identifier and a parameter identification statement according to the parameter determination instruction.
接口标识用于唯一标识接口,可以是名称,编号等等。接口是指对协定进行定义的引用类型。其他类型实现接口,以保证它们支持某些操作。接口指定必须由类提供的成员或实现它的其他接口。参数识别语句是指数据库的SQL(结构化查询语言,Structured Query Language)语句,用于对接口进行参数自动化配置。不同的数据库有不同的SQL语句,比如,mysql、oracle、DM、Hive、SQLSever和postgresql等的SQL语句。The interface identifier is used to uniquely identify the interface, which can be a name, a number, and so on. Interface refers to the reference type that defines the contract. Other types implement interfaces to ensure that they support certain operations. The interface specifies the members that must be provided by the class or other interfaces that implement it. The parameter identification statement refers to the SQL (Structured Query Language) statement of the database, which is used to automatically configure the parameters of the interface. Different databases have different SQL statements, such as mysql, oracle, DM, Hive, SQLSever, and postgresql.
具体地,终端接收到开发者的接口参数确定指令,根据参数确定指令从命令行界面中获取到接口标识和接口标识对应的参数识别语句。其中,命令行界面是指用于接收到参数确定命令的界面,开发者可以通过命令行界面输入待配置的接口标识和接口标识对应的参数识别语句。Specifically, the terminal receives the developer's interface parameter determination instruction, and obtains the interface identifier and the parameter identification sentence corresponding to the interface identifier from the command line interface according to the parameter determination instruction. Among them, the command line interface refers to the interface used to receive the parameter determination command, and the developer can input the interface identification to be configured and the parameter identification statement corresponding to the interface identification through the command line interface.
S204,根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识。S204: Parse the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier.
预设目标解析规则脚本预先设置好的能够统一解析不同数据库SQL语句的脚本。接口请求参数标识和接口返回参数标识用于唯一标识接口参数的类型,包括接口请求参数和接口返回参数。即可以使用不同的字符来区分待配置的参数是接口请求参数或者是接口返回参数。比如,${@param}用于标识接口请求参数。#{@param}用于标识接口返回参数。Preset target parsing rule scripts Pre-set scripts that can uniformly parse SQL statements of different databases. The interface request parameter identifier and the interface return parameter identifier are used to uniquely identify the type of the interface parameter, including the interface request parameter and the interface return parameter. That is, different characters can be used to distinguish whether the parameter to be configured is an interface request parameter or an interface return parameter. For example, ${@param} is used to identify interface request parameters. #{@param} is used to identify interface return parameters.
具体地,终端使用预设设置好的目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识。Specifically, the terminal uses a preset target parsing rule script to parse the parameter identification sentence to obtain the interface request parameter identifier and the interface return parameter identifier.
S206,根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性。S206: Obtain a corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement to obtain a data table field corresponding to the request parameter identifier, and use the data table field to generate a corresponding request parameter attribute.
请求参数语句是指配置请求参数所需要的SQL语句,其中,不同类型的接口有不同的请求参数语句,即每个接口请求参数标识有对应的请求参数语句,接口返回参数标识有对应的返回参数语句。数据表字段是指参数列表所包含的字段。请求参数属性是指按照数据字段得到的接口中请求参数所具有的属性,可以包括:参数名、参数类型、参数长度、默认值、传参规则等等。The request parameter statement refers to the SQL statement required to configure the request parameter. Different types of interfaces have different request parameter statements, that is, each interface request parameter identifier has a corresponding request parameter statement, and the interface return parameter identifier has a corresponding return parameter. Statement. Data table fields refer to the fields included in the parameter list. The request parameter attribute refers to the attribute of the request parameter in the interface obtained according to the data field, which can include: parameter name, parameter type, parameter length, default value, parameter transmission rules, and so on.
具体地,终端根据接口请求参数标识获取到对应的请求参数语句,该请求参数语句可以是通过命令行界面输入的。解析请求参数语句,得到请求参数标识对应的数据表字段, 使用数据表字段生成对应的请求参数属性。在一个实施例中,还可以获取通过解析请求参数语句,得到请求参数对应的配置条件,索引、主键、是否脱敏等信息。Specifically, the terminal obtains the corresponding request parameter statement according to the interface request parameter identifier, and the request parameter statement may be input through a command line interface. Parse the request parameter statement to obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute. In an embodiment, it is also possible to obtain information such as configuration conditions corresponding to the request parameters, index, primary key, and whether to desensitize, etc., by parsing the request parameter statement.
S208,根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性。S208: Obtain a corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement to obtain a data table field corresponding to the return parameter identifier, and use the data table field to generate a corresponding return parameter attribute.
返回参数语句是指配置返回参数所需要的SQL语句,其中,不同类型的接口有不同的返回参数语句,即每个接口返回参数标识有对应的返回参数语句。数据表字段是指参数列表所包含的字段。返回参数属性是指按照数据字段得到的接口中返回参数所具有的属性,可以包括:参数名、参数类型、参数长度、默认值、是否必须输出等等。The return parameter statement refers to the SQL statement required to configure the return parameter. Among them, different types of interfaces have different return parameter statements, that is, each interface return parameter identifier has a corresponding return parameter statement. Data table fields refer to the fields included in the parameter list. The return parameter attribute refers to the attribute of the return parameter in the interface obtained according to the data field, which can include: parameter name, parameter type, parameter length, default value, whether to output, etc.
具体地,终端根据接口返回参数标识获取对应的返回参数语句,该返回参数语句是通过命令行界面输入到的SQL语句。可以使用预设设置好的解析脚本解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性。在一个实施例中,还可以获取通过解析返回参数语句,得到返回参数对应的配置条件,索引、主键、是否脱敏等信息。Specifically, the terminal obtains a corresponding return parameter statement according to the interface return parameter identifier, and the return parameter statement is a SQL statement input through a command line interface. You can use the preset parsing script to parse the return parameter statement to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute. In one embodiment, it is also possible to obtain information such as the configuration condition corresponding to the returned parameter, index, primary key, whether desensitization, etc., by parsing the return parameter statement.
S210,根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。S210: Generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the returned parameter attribute, and store the interface identifier in association with the parameter list.
参数列表是指保存已配置的接口参数的列表。The parameter list refers to a list that saves the configured interface parameters.
具体地,终端根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。Specifically, the terminal generates a parameter list corresponding to the interface identifier according to the request parameter attribute and the returned parameter attribute, and stores the interface identifier in association with the parameter list.
在上述接口数据处理方法中,通过接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存,通过使用参数识别语句得到参数标识,根据参数标识使用对应的参数语句来生成参数属性,根据参数属性得到参数列表,即使用参数识别语句来配置接口参数,提高了接口参数配置的效率,使能够更快的生成接口并进行使用,从而提高了接口之间的数据传递效率。In the above interface data processing method, by receiving the interface parameter determination instruction, the interface identification and the parameter identification statement are obtained according to the parameter identification instruction; the parameter identification statement is parsed according to the preset target parsing rule script to obtain the interface request parameter identification and the interface return parameter identification; Obtain the corresponding request parameter statement according to the interface request parameter identification, parse the request parameter statement, and obtain the data table field corresponding to the request parameter identification, use the data table field to generate the corresponding request parameter attribute; obtain the corresponding return parameter statement according to the interface return parameter identification, Analyze the return parameter statement to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; generate the parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and save the interface identifier and the parameter list associatively , Obtain the parameter identification by using the parameter identification statement, use the corresponding parameter statement to generate the parameter attribute according to the parameter identification, and obtain the parameter list according to the parameter attribute, that is, use the parameter identification statement to configure the interface parameters, which improves the efficiency of interface parameter configuration and enables Generate and use interfaces faster, thereby improving the efficiency of data transfer between interfaces.
在其中一个实施例中,可以启用并行线程同时对多个接口进行接口参数确定,通过使用并行线程合理利用了终端的运行内存资源,进一步提高效率。In one of the embodiments, parallel threads can be enabled to determine interface parameters for multiple interfaces at the same time. By using parallel threads, the running memory resources of the terminal are rationally utilized, and efficiency is further improved.
在其中一个实施例中,如图3所示,在步骤S202之前,即在接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句之前,还包括步骤:In one of the embodiments, as shown in FIG. 3, before step S202, that is, before receiving the interface parameter determination instruction, and before obtaining the interface identification and parameter identification sentence according to the parameter determination instruction, the method further includes the following steps:
S302,获取各个数据库参数解析规则,根据各个数据库参数解析规则建立目标解析规则。S302: Obtain each database parameter parsing rule, and establish a target parsing rule according to each database parameter parsing rule.
数据库参数解析规则是指数据库设置的用于解析SQL语句的规则。Database parameter parsing rules refer to the rules set by the database for parsing SQL statements.
具体地,终端获取到各个数据库参数解析规则,将各个数据库参数解析规则进行统一,比如,统一使用int整数型来解析int参数类型。得到统一的数据库参数解析规则,即得到了目标解析规则。Specifically, the terminal obtains each database parameter parsing rule, and unifies each database parameter parsing rule, for example, uniformly uses the int integer type to parse the int parameter type. A unified database parameter parsing rule is obtained, that is, a target parsing rule is obtained.
S304,根据目标解析规则生成目标解析规则脚本,部署目标解析规则脚本。S304: Generate a target parsing rule script according to the target parsing rule, and deploy the target parsing rule script.
具体地,终端将目标解析规则使用脚本语言编写成目标解析规则脚本,并将目标解析规则脚本进行部署使用。Specifically, the terminal writes the target parsing rule into a target parsing rule script using a scripting language, and deploys the target parsing rule script for use.
在上述实施例中,通过将各个数据库解析规则进行统一,建立目标解析规则,使得能够更方便的解析参数识别语句,提高参数配置的效率。In the above embodiment, by unifying the analysis rules of each database, the target analysis rules are established, so that the parameter recognition sentence can be parsed more conveniently, and the efficiency of parameter configuration is improved.
在其中一个实施例中,如图4所示,步骤S204,即根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识,包括步骤:In one of the embodiments, as shown in FIG. 4, step S204, that is, parsing the parameter recognition sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier, includes the steps:
S402,确定参数识别语句对应的数据库类型。S402: Determine the database type corresponding to the parameter identification sentence.
S404,根据数据库类型获取对应的正则表达式,使用正则表达式解析参数识别语句,得到接口请求参数标识和接口返回参数标识。S404: Obtain the corresponding regular expression according to the database type, and use the regular expression to parse the parameter identification sentence to obtain the interface request parameter identifier and the interface return parameter identifier.
数据库类型是指参数识别语句的语法对应的数据库的类型,该数据库类型包括mysql数据库、oracle数据库、DM数据库、Hive数据库、SQLSever数据库和postgresql数据库等。正则表达式是对字符串操作的一种逻辑公式,就是用事先定义好的一些特定字符、及这些特定字符的组合,组成一个“规则字符串”,这个“规则字符串”用来表达对字符串的一种过滤逻辑。The database type refers to the type of database corresponding to the syntax of the parameter recognition statement. The database type includes mysql database, oracle database, DM database, Hive database, SQLSever database, and postgresql database. Regular expression is a kind of logical formula for string manipulation. It uses some pre-defined specific characters and the combination of these specific characters to form a "rule string". This "rule string" is used to express the pair of characters. A kind of filtering logic for strings.
具体地,终端根据参数识别语句识别得到对应的数据库类型,不同的数据库的语句的语法不同,可以根据语法的特点来确定对应的数据库类型。然后根据设置好的数据库类型对应的正则表达式对相应的参数识别语句进行解析,得到接口请求参数标识和接口返回参数标识。Specifically, the terminal recognizes the corresponding database type according to the parameter recognition sentence, and the syntax of the sentence of different databases is different, and the corresponding database type can be determined according to the characteristics of the syntax. Then, the corresponding parameter identification sentence is parsed according to the regular expression corresponding to the set database type, and the interface request parameter identifier and the interface return parameter identifier are obtained.
在上述实施例中,通过使用正则表达式来解析参数识别语句,能够提高解析的准确性。In the above embodiment, by using regular expressions to parse the parameter recognition sentence, the accuracy of the analysis can be improved.
在其中一个实施例中,如图5所示,步骤S204,即根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识,包括:In one of the embodiments, as shown in FIG. 5, step S204, which is to parse the parameter recognition sentence according to the preset target parsing rule script, to obtain the interface request parameter identifier and the interface return parameter identifier, including:
S502,使用预设目标解析规则脚本从参数识别语句中确定目标标识字符。S502: Use the preset target parsing rule script to determine the target identification character from the parameter recognition sentence.
S504,根据目标标识字符确定接口请求参数标识和接口返回参数标识在参数识别语句中的位置,从位置读取接口请求参数标识和接口返回参数标识。S504: Determine the position of the interface request parameter identifier and the interface return parameter identifier in the parameter identification sentence according to the target identifier character, and read the interface request parameter identifier and the interface return parameter identifier from the position.
目标标识字符是指预先在参数识别语句中设置好的字符,该字符用于指示接口请求参数标识和接口返回参数标识的位置。比如,接口请求参数标识和接口返回参数标识的位置可以是目标标识字符之后。接口请求参数标识和接口返回参数标识分别有对应的目标标识字符,比如,接口请求参数标识对应的字符可以是${@param}。接口返回参数标识对应的字符可以是#{#param}。The target identification character refers to the character set in the parameter recognition sentence in advance, and the character is used to indicate the position of the interface request parameter identification and the interface return parameter identification. For example, the position of the interface request parameter identification and the interface return parameter identification may be after the target identification character. The interface request parameter identifier and the interface return parameter identifier respectively have corresponding target identification characters. For example, the character corresponding to the interface request parameter identifier can be ${@param}. The character corresponding to the interface return parameter identifier can be #{#param}.
具体地,终端使用预先设置好的目标解析规则脚本解析参数识别语句,当解析得到目标标识字符时,就得到接口请求参数标识和接口返回参数标识在参数识别语句中的位置, 从对应的位置处读取到接口请求参数标识和接口返回参数标识。Specifically, the terminal uses the preset target parsing rule script to parse the parameter recognition sentence, and when the target identification character is parsed, it obtains the position of the interface request parameter identifier and the interface return parameter identifier in the parameter recognition sentence, from the corresponding position The interface request parameter identifier and the interface return parameter identifier are read.
在其中一个实施例中,参数识别语句中还可以包括有请求参数语句和返回参数语句。即也可以根据目标标识字符确定请求参数语句和返回参数语句在参数识别语句中的位置,根据该位置读取到请求参数语句和返回参数语句。In one of the embodiments, the parameter identification statement may also include a request parameter statement and a return parameter statement. That is, the position of the request parameter statement and the return parameter statement in the parameter identification statement can also be determined according to the target identification character, and the request parameter statement and the return parameter statement can be read according to the position.
在上述实施例中,通过使用目标标识字符来对接口请求参数标识和接口返回参数标识的位置进行确认,能够更加快速的获取到接口请求参数标识和接口返回参数标识,提高解析参数识别语句的效率。In the above embodiment, by using target identification characters to confirm the position of the interface request parameter identification and the interface return parameter identification, the interface request parameter identification and the interface return parameter identification can be obtained more quickly, and the efficiency of parsing the parameter identification statement is improved. .
在其中一个实施例中,如图6所示,在步骤S210之后,即在根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存之后,还包括步骤:In one of the embodiments, as shown in FIG. 6, after step S210, that is, after generating a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and after associating and saving the interface identifier with the parameter list, the method further includes the following steps:
S602,获取参数列表中的常量参数对应的参数名称,将常量参数对应的参数名称与已有参数名称进行匹配。S602: Obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name.
S604,当匹配一致时,获取目标参数名称,将目标参数名称作为常量参数对应的参数名称。S604: When the matches are consistent, the target parameter name is obtained, and the target parameter name is used as the parameter name corresponding to the constant parameter.
参数名称是指该常量参数对应的名称,可以使用字符作为参数的名称,比如,参数名称为NameId。已有参数名称是指参数列表中除过该常量参数以外所有参数的名称。The parameter name refers to the name corresponding to the constant parameter. Characters can be used as the name of the parameter. For example, the parameter name is NameId. The existing parameter name refers to the names of all parameters in the parameter list except the constant parameter.
具体地,终端获取到获取参数列表中的常量参数对应的参数名称,将常量参数对应的参数名称与已有参数名称进行匹配,即判断参数名称是否与已有参数名称一致,当存在一致的已有参数名称时,说明该常量参数对应的参数名称不符合要求,需要进行更新,此时,将获取目标参数名称,即该常量参数对应的更新后的参数名称,将目标参数名称作为常量参数对应的参数名称。Specifically, the terminal obtains the parameter name corresponding to the constant parameter in the acquired parameter list, and matches the parameter name corresponding to the constant parameter with the existing parameter name, that is, judges whether the parameter name is consistent with the existing parameter name, and when there is a consistent parameter name, When there is a parameter name, it means that the parameter name corresponding to the constant parameter does not meet the requirements and needs to be updated. At this time, the target parameter name will be obtained, that is, the updated parameter name corresponding to the constant parameter, and the target parameter name will be used as the constant parameter. The parameter name.
在上述实施例中,当常量参数对应的参数名称与已有参数名称一致时,将目标参数名称作为常量参数对应的参数名称,避免了接口参数名称之间的冲突,提高了参数配置的准确性。In the above embodiment, when the parameter name corresponding to the constant parameter is consistent with the existing parameter name, the target parameter name is used as the parameter name corresponding to the constant parameter, which avoids conflicts between interface parameter names and improves the accuracy of parameter configuration .
在其中一个实施例中,如图7所示,在步骤S210之后,在根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存之后,还包括:In one of the embodiments, as shown in FIG. 7, after step S210, after generating a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and after associating and saving the interface identifier with the parameter list, the method further includes:
S702,获取各个接口标识对应的参数列表和接口参数文档模板;S702: Obtain a parameter list and an interface parameter document template corresponding to each interface identifier;
S704,使用接口参数文档模板和各个接口标识对应的参数列表生成接口参数文档,将接口参数文档保存。S704: Use the interface parameter document template and the parameter list corresponding to each interface identifier to generate an interface parameter document, and save the interface parameter document.
接口参数文档模板是预先设置的生成接口参数文档的模板。The interface parameter document template is a preset template for generating interface parameter documents.
具体地,终端获取到各个接口标识对应的参数列表和预先设置好的接口参数文档模板,将所述参数列表写入接口参数文档模板中,得到接口参数文档,将接口参数文档保存。在其中一个实施例中,可以将接口参数文档上传的服务器中进行共享。Specifically, the terminal obtains a parameter list corresponding to each interface identifier and a preset interface parameter document template, writes the parameter list into the interface parameter document template, obtains the interface parameter document, and saves the interface parameter document. In one of the embodiments, the interface parameter file can be uploaded to the server for sharing.
在上述实施例中,可以将各个接口对应的参数列表生成参数文档进行保存,方便后续使用。In the above embodiment, the parameter list corresponding to each interface can be generated and saved as a parameter file, which is convenient for subsequent use.
在一个具体的实施例中,该接口数据处理方法应用到接口生成平台中,如图8所示,具体包括:In a specific embodiment, the interface data processing method is applied to the interface generation platform, as shown in FIG. 8, which specifically includes:
通过将mysql、oracle、DM、Hive、SQLSever和postgresql等数据库的参数解析规则进行统一,建立统一解析规则,根据统一解析规则生成SQL解析脚本。当接收到接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;使用SQL解析脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识。根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性。根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性。对返回参数中常量参数的参数名称和已有的参数名称进行一致性验证,并对请求参数中常量参数的参数名称和已有的参数名称进行一致性验证,当验证通过时,即对返回参数中常量参数的参数名称和已有的参数名称不一致,并且对请求参数中常量参数的参数名称和已有的参数名称不一致。此时就得到了请求参数属性包括参数名称、参数别名、参数类型和传参规则等等,并且得到了返回参数属性包括参数名称、参数别名和参数类型等等。然后生成该接口标识对应的参数列表,将将接口标识与参数列表关联保存。By unifying the parameter parsing rules of databases such as mysql, oracle, DM, Hive, SQLSever, and postgresql, a unified parsing rule is established, and SQL parsing scripts are generated according to the unified parsing rule. When the receiving interface parameter determination instruction is received, the interface identification and parameter identification statement are obtained according to the parameter identification instruction; the SQL parsing script is used to parse the parameter identification statement to obtain the interface request parameter identification and the interface return parameter identification. Obtain the corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement, obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute. Obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute. Verify the consistency between the parameter name of the constant parameter in the return parameter and the existing parameter name, and verify the consistency between the parameter name of the constant parameter in the request parameter and the existing parameter name. When the verification is passed, the return parameter is The parameter name of the constant parameter in the parameter is inconsistent with the existing parameter name, and the parameter name of the constant parameter in the request parameter is inconsistent with the existing parameter name. At this point, the request parameter attributes including parameter name, parameter alias, parameter type, and parameter passing rules are obtained, and the return parameter attributes include parameter name, parameter alias, parameter type, and so on. Then, a parameter list corresponding to the interface identifier is generated, and the interface identifier and the parameter list are associated and saved.
应该理解的是,虽然图2-7的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-7中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowcharts of FIGS. 2-7 are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless specifically 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 part of the steps in Figures 2-7 can include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with other steps or at least a part of the steps or stages in other steps.
在其中一个实施例中,如图9所示,提供了一种接口参数确定装置900,包括:语句获取模块902、解析模块904、属性生成模块906和参数生成模块908,其中:In one of the embodiments, as shown in FIG. 9, an interface parameter determination device 900 is provided, which includes: a sentence acquisition module 902, a parsing module 904, an attribute generation module 906, and a parameter generation module 908, wherein:
语句获取模块902,用于接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;The sentence acquisition module 902 is configured to receive an interface parameter determination instruction, and acquire the interface identification and parameter identification sentence according to the parameter determination instruction;
解析模块904,用于根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;The parsing module 904 is configured to parse the parameter identification statement according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
属性生成模块906,用于根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;The attribute generation module 906 is used to obtain the corresponding request parameter statement according to the interface request parameter identifier, parse the request parameter statement, and obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute; return the parameter identifier according to the interface Obtain the corresponding return parameter statement, parse the return parameter statement, obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute;
参数生成模块908,用于根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。The parameter generation module 908 is configured to generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
在其中一个实施例中,接口参数确定装置900,还包括:In one of the embodiments, the interface parameter determining device 900 further includes:
规则建立模块,用于获取各个数据库参数解析规则,根据各个数据库参数解析规则建立目标解析规则;The rule establishment module is used to obtain the parsing rules of each database parameter, and establish target parsing rules according to the parsing rules of each database parameter;
脚本生成模块,用于根据目标解析规则生成目标解析规则脚本,部署目标解析规则脚本。The script generation module is used to generate target parsing rule scripts according to target parsing rules, and deploy target parsing rule scripts.
在其中一个实施例中,解析模块904还用于确定参数识别语句对应的数据库类型;根据数据库类型获取对应的正则表达式,使用正则表达式解析参数识别语句,得到接口请求参数标识和接口返回参数标识。In one of the embodiments, the parsing module 904 is also used to determine the database type corresponding to the parameter recognition sentence; obtain the corresponding regular expression according to the database type, use the regular expression to parse the parameter recognition sentence, and obtain the interface request parameter identifier and the interface return parameter Logo.
在其中一个实施例中,解析模块904还用于使用预设目标解析规则脚本从参数识别语句中确定目标标识字符;根据目标标识字符确定接口请求参数标识和接口返回参数标识在参数识别语句中的位置,从位置读取接口请求参数标识和接口返回参数标识。In one of the embodiments, the parsing module 904 is further configured to use the preset target parsing rule script to determine the target identification character from the parameter recognition statement; determine the interface request parameter identification and the interface return parameter identification in the parameter identification statement according to the target identification character Location, read the interface request parameter identification and the interface return parameter identification from the location.
在其中一个实施例中,接口参数确定装置900,还包括:In one of the embodiments, the interface parameter determining device 900 further includes:
常量验证模块,用于获取参数列表中的常量参数对应的参数名称,将常量参数对应的参数名称与已有参数名称进行匹配;当匹配一致时,获取目标参数名称,将目标参数名称作为常量参数对应的参数名称。The constant verification module is used to obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name; when the match is consistent, obtain the target parameter name, and use the target parameter name as the constant parameter The corresponding parameter name.
在其中一个实施例中,接口参数确定装置900,还包括:In one of the embodiments, the interface parameter determining device 900 further includes:
文档生成模块,用于获取各个接口标识对应的参数列表和接口参数文档模板;使用接口参数文档模板和各个接口标识对应的参数列表生成接口参数文档,将接口参数文档保存。The document generation module is used to obtain the parameter list corresponding to each interface identifier and the interface parameter document template; use the interface parameter document template and the parameter list corresponding to each interface identifier to generate the interface parameter document, and save the interface parameter document.
关于接口参数确定装置的具体限定可以参见上文中对于接口数据处理方法的限定,在此不再赘述。上述接口参数确定装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the device for determining interface parameters, please refer to the above limitation on the interface data processing method, which will not be repeated here. Each module in the above interface parameter determination device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
在其中一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图9所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机可读指令被处理器执行时以实现一种接口数据处理方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one of the embodiments, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 9. The computer equipment includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide calculation 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 and computer readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, an operator's network, NFC (near field communication) or other technologies. The computer readable instruction is executed by the processor to realize an interface data processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, or it can be a button, trackball or touch pad set on the housing of the computer equipment , It can also be an external keyboard, touchpad, or mouse.
本领域技术人员可以理解,图9中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可 以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 9 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 device to which the solution of the present application is applied. The specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。A computer device, including a memory and one or more processors, in which computer readable instructions are stored. When the computer readable instructions are executed by the processor, one or more processors are caused to perform the following steps: receiving an interface parameter determination instruction , Obtain the interface identification and parameter identification statement according to the parameter determination instruction; parse the parameter identification statement according to the preset target analysis rule script to obtain the interface request parameter identification and the interface return parameter identification; obtain the corresponding request parameter statement according to the interface request parameter identification, and parse the request Parameter statement, obtain the data table field corresponding to the request parameter identifier, use the data table field to generate the corresponding request parameter attribute; obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, and obtain the data table field corresponding to the return parameter identifier , Use the data table fields to generate the corresponding return parameter attributes; generate the parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and save the interface identifier and the parameter list in association.
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:获取各个数据库参数解析规则,根据各个数据库参数解析规则建立目标解析规则;根据目标解析规则生成目标解析规则脚本,部署目标解析规则脚本。In one of the embodiments, the processor further implements the following steps when executing the computer-readable instructions: acquiring each database parameter parsing rule, establishing a target parsing rule according to each database parameter parsing rule; generating a target parsing rule script according to the target parsing rule, and deploying the target Parse the rule script.
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:确定参数识别语句对应的数据库类型;根据数据库类型获取对应的正则表达式,使用正则表达式解析参数识别语句,得到接口请求参数标识和接口返回参数标识。In one of the embodiments, the processor further implements the following steps when executing the computer-readable instructions: determining the database type corresponding to the parameter recognition sentence; obtaining the corresponding regular expression according to the database type, using the regular expression to parse the parameter recognition sentence, and obtaining the interface Request parameter identification and interface return parameter identification.
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:使用预设目标解析规则脚本从参数识别语句中确定目标标识字符;根据目标标识字符确定接口请求参数标识和接口返回参数标识在参数识别语句中的位置,从位置读取接口请求参数标识和接口返回参数标识。In one of the embodiments, the processor further implements the following steps when executing the computer-readable instruction: using the preset target parsing rule script to determine the target identification character from the parameter recognition sentence; and determining the interface request parameter identification and the interface return parameter according to the target identification character Identify the position in the parameter identification statement, read the interface request parameter identifier and the interface return parameter identifier from the position.
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:获取参数列表中的常量参数对应的参数名称,将常量参数对应的参数名称与已有参数名称进行匹配;当匹配一致时,获取目标参数名称,将目标参数名称作为常量参数对应的参数名称。In one of the embodiments, the processor further implements the following steps when executing the computer-readable instruction: obtaining the parameter name corresponding to the constant parameter in the parameter list, and matching the parameter name corresponding to the constant parameter with the existing parameter name; when the match is consistent When, get the target parameter name, and use the target parameter name as the parameter name corresponding to the constant parameter.
在其中一个实施例中,处理器执行计算机可读指令时还实现以下步骤:获取各个接口标识对应的参数列表和接口参数文档模板;使用接口参数文档模板和各个接口标识对应的参数列表生成接口参数文档,将接口参数文档保存。In one of the embodiments, the processor further implements the following steps when executing the computer-readable instructions: obtaining the parameter list and the interface parameter document template corresponding to each interface identifier; generating the interface parameters using the interface parameter document template and the parameter list corresponding to each interface identifier Document, save the interface parameter document.
一个或多个存储有计算机可读指令的计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:接收接口参数确定指令,根据参数确定指令获取接口标识和参数识别语句;根据预设目标解析规则脚本解析参数识别语句,得到接口请求参数标识和接口返回参数标识;根据接口请求参数标识获取对应的请求参数语句,解析请求参数语句,得到请求参数标识对应的数据表字段,使用数据表字段生成对应的请求参数属性;根据接口返回参数标识获取对应的返回参数语句,解析返回参数语句,得到返回参数标识对应的数据表字段,使用数据表字段生成对应的返回参数属性;根据请求参数属性和返回参数属性生成接口标识对应的参数列表,将接口标识与参数列表关联保存。其中,该计算机可读存储介质可以是非易失性,也可以是易失性的。One or more 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: receiving interface parameter determination instructions, Determine the instruction to obtain the interface identification and parameter identification statement; parse the parameter identification statement according to the preset target analysis rule script to obtain the interface request parameter identification and the interface return parameter identification; obtain the corresponding request parameter statement according to the interface request parameter identification, and parse the request parameter statement, Obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute; obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement, and obtain the data table field corresponding to the return parameter identifier. Use the data The table fields generate corresponding return parameter attributes; generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list. Wherein, the computer-readable storage medium may be non-volatile or volatile.
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取各个数据库参数解析规则,根据各个数据库参数解析规则建立目标解析规则;根据目标解析规则生成目标解析规则脚本,部署目标解析规则脚本。In one of the embodiments, when the computer-readable instructions are executed by the processor, the following steps are also implemented: obtain each database parameter analysis rule, establish target analysis rules according to each database parameter analysis rule; generate target analysis rule scripts according to the target analysis rules, and deploy Target resolution rule script.
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:确定参数识别语句对应的数据库类型;根据数据库类型获取对应的正则表达式,使用正则表达式解析参数识别语句,得到接口请求参数标识和接口返回参数标识。In one of the embodiments, when the computer-readable instruction is executed by the processor, the following steps are also implemented: determine the database type corresponding to the parameter recognition sentence; obtain the corresponding regular expression according to the database type, and use the regular expression to parse the parameter recognition sentence to obtain Interface request parameter identification and interface return parameter identification.
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:使用预设目标解析规则脚本从参数识别语句中确定目标标识字符;根据目标标识字符确定接口请求参数标识和接口返回参数标识在参数识别语句中的位置,从位置读取接口请求参数标识和接口返回参数标识。In one of the embodiments, when the computer-readable instruction is executed by the processor, the following steps are also implemented: use the preset target parsing rule script to determine the target identification character from the parameter recognition sentence; determine the interface request parameter identification and interface return according to the target identification character The position of the parameter identifier in the parameter identification statement, the interface request parameter identifier and the interface return parameter identifier are read from the position.
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取参数列表中的常量参数对应的参数名称,将常量参数对应的参数名称与已有参数名称进行匹配;当匹配一致时,获取目标参数名称,将目标参数名称作为常量参数对应的参数名称。In one of the embodiments, when the computer-readable instruction is executed by the processor, the following steps are also implemented: obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name; When they are consistent, the target parameter name is obtained, and the target parameter name is used as the parameter name corresponding to the constant parameter.
在其中一个实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取各个接口标识对应的参数列表和接口参数文档模板;使用接口参数文档模板和各个接口标识对应的参数列表生成接口参数文档,将接口参数文档保存。In one of the embodiments, when the computer-readable instruction is executed by the processor, the following steps are also implemented: obtaining the parameter list and interface parameter document template corresponding to each interface identifier; generating the interface using the interface parameter document template and the parameter list corresponding to each interface identifier Parameter file, save the interface parameter file.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage. In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical storage. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM may be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, 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 range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it should not be understood as a limitation on the scope of the invention patent. It should be pointed out that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can be made, and these all fall within the protection scope of this application. Therefore, the scope of protection of the patent of this application shall be subject to the appended claims.

Claims (20)

  1. 一种接口数据处理方法,其中,所述方法包括:An interface data processing method, wherein the method includes:
    接收接口参数确定指令,根据所述参数确定指令获取接口标识和参数识别语句;Receiving an interface parameter determination instruction, and acquiring an interface identification and a parameter identification sentence according to the parameter determination instruction;
    根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识;Parse the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
    根据所述接口请求参数标识获取对应的请求参数语句,解析所述请求参数语句,得到所述请求参数标识对应的数据表字段,使用所述数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter sentence according to the interface request parameter identifier, parse the request parameter sentence to obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
    根据所述接口返回参数标识获取对应的返回参数语句,解析所述返回参数语句,得到所述返回参数标识对应的数据表字段,使用所述数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter sentence according to the interface return parameter identifier, parse the return parameter sentence to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
    根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存。Generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
  2. 根据权利要求1所述的方法,其中,在所述接收接口参数确定指令,根据所述参数确定指令获取接口标识和参数识别语句之前,还包括:The method according to claim 1, wherein, before said receiving the interface parameter determination instruction, acquiring the interface identification and the parameter identification sentence according to the parameter determination instruction, further comprising:
    获取各个数据库参数解析规则,根据所述各个数据库参数解析规则建立目标解析规则;及Acquiring each database parameter parsing rule, and establishing a target parsing rule according to each database parameter parsing rule; and
    根据所述目标解析规则生成目标解析规则脚本,部署所述目标解析规则脚本。A target parsing rule script is generated according to the target parsing rule, and the target parsing rule script is deployed.
  3. 根据权利要求1所述的方法,其中,所述根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识,包括:The method according to claim 1, wherein the parsing the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier comprises:
    确定所述参数识别语句对应的数据库类型;及Determine the database type corresponding to the parameter recognition sentence; and
    根据所述数据库类型获取对应的正则表达式,使用所述正则表达式解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识。A corresponding regular expression is obtained according to the database type, and the parameter identification sentence is parsed using the regular expression to obtain an interface request parameter identifier and an interface return parameter identifier.
  4. 根据权利要求1所述的方法,其中,所述根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识,包括:The method according to claim 1, wherein the parsing the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier comprises:
    使用预设目标解析规则脚本从所述参数识别语句中确定目标标识字符;及Use a preset target parsing rule script to determine target identification characters from the parameter recognition sentence; and
    根据所述目标标识字符确定所述接口请求参数标识和接口返回参数标识在所述参数识别语句中的位置,从位置读取所述接口请求参数标识和接口返回参数标识。The position of the interface request parameter identifier and the interface return parameter identifier in the parameter identification sentence is determined according to the target identification character, and the interface request parameter identifier and the interface return parameter identifier are read from the position.
  5. 根据权利要求1所述的方法,其中,在所述根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存之后,还包括:The method according to claim 1, wherein after said generating a parameter list corresponding to said interface identifier according to said request parameter attribute and said return parameter attribute, and storing said interface identifier in association with said parameter list, Also includes:
    获取所述参数列表中的常量参数对应的参数名称,将所述常量参数对应的参数名称与已有参数名称进行匹配;及Obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name; and
    当匹配一致时,获取目标参数名称,将所述目标参数名称作为所述常量参数对应的参数名称。When the matches are consistent, the target parameter name is obtained, and the target parameter name is used as the parameter name corresponding to the constant parameter.
  6. 根据权利要求1所述的方法,其中,在所述根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存之 后,还包括:The method according to claim 1, wherein after said generating a parameter list corresponding to said interface identifier according to said request parameter attribute and said return parameter attribute, and storing said interface identifier in association with said parameter list, Also includes:
    获取各个接口标识对应的参数列表和接口参数文档模板;及Obtain the parameter list and interface parameter document template corresponding to each interface identifier; and
    使用所述接口参数文档模板和所述各个接口标识对应的参数列表生成接口参数文档,将所述接口参数文档保存。The interface parameter document template and the parameter list corresponding to each interface identifier are used to generate an interface parameter document, and the interface parameter document is saved.
  7. 一种接口参数确定装置,其中,所述装置包括:An interface parameter determination device, wherein the device includes:
    语句获取模块,用于接收接口参数确定指令,根据所述参数确定指令获取接口标识和参数识别语句;The sentence acquisition module is configured to receive an interface parameter determination instruction, and acquire the interface identification and parameter identification sentence according to the parameter determination instruction;
    解析模块,用于根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识;The parsing module is used to parse the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
    属性生成模块,用于根据所述接口请求参数标识获取对应的请求参数语句,解析所述请求参数语句,得到所述请求参数标识对应的数据表字段,使用所述数据表字段生成对应的请求参数属性;根据所述接口返回参数标识获取对应的返回参数语句,解析所述返回参数语句,得到所述返回参数标识对应的数据表字段,使用所述数据表字段生成对应的返回参数属性;及The attribute generation module is used to obtain the corresponding request parameter sentence according to the interface request parameter identifier, parse the request parameter sentence to obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter Attributes; obtain the corresponding return parameter statement according to the interface return parameter identifier, parse the return parameter statement to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
    参数生成模块,用于根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存。The parameter generation module is configured to generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
  8. 根据权利要求7所述的装置,其中,所述装置,还包括:The device according to claim 7, wherein the device further comprises:
    规则建立模块,用于获取各个数据库参数解析规则,根据所述各个数据库参数解析规则建立目标解析规则;及The rule establishment module is used to obtain various database parameter analysis rules, and establish target analysis rules according to the various database parameter analysis rules; and
    脚本生成模块,用于根据所述目标解析规则生成目标解析规则脚本,部署所述目标解析规则脚本。The script generation module is used to generate a target parsing rule script according to the target parsing rule, and deploy the target parsing rule script.
  9. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤: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:
    接收接口参数确定指令,根据所述参数确定指令获取接口标识和参数识别语句;Receiving an interface parameter determination instruction, and acquiring an interface identification and a parameter identification sentence according to the parameter determination instruction;
    根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识;Parse the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
    根据所述接口请求参数标识获取对应的请求参数语句,解析所述请求参数语句,得到所述请求参数标识对应的数据表字段,使用所述数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter sentence according to the interface request parameter identifier, parse the request parameter sentence to obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
    根据所述接口返回参数标识获取对应的返回参数语句,解析所述返回参数语句,得到所述返回参数标识对应的数据表字段,使用所述数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter sentence according to the interface return parameter identifier, parse the return parameter sentence to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
    根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存。Generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
  10. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    获取各个数据库参数解析规则,根据所述各个数据库参数解析规则建立目标解析规则;及Acquiring each database parameter parsing rule, and establishing a target parsing rule according to each database parameter parsing rule; and
    根据所述目标解析规则生成目标解析规则脚本,部署所述目标解析规则脚本。A target parsing rule script is generated according to the target parsing rule, and the target parsing rule script is deployed.
  11. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    确定所述参数识别语句对应的数据库类型;及Determine the database type corresponding to the parameter recognition sentence; and
    根据所述数据库类型获取对应的正则表达式,使用所述正则表达式解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识。A corresponding regular expression is obtained according to the database type, and the parameter identification sentence is parsed using the regular expression to obtain an interface request parameter identifier and an interface return parameter identifier.
  12. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    使用预设目标解析规则脚本从所述参数识别语句中确定目标标识字符;及Use a preset target parsing rule script to determine target identification characters from the parameter recognition sentence; and
    根据所述目标标识字符确定所述接口请求参数标识和接口返回参数标识在所述参数识别语句中的位置,从位置读取所述接口请求参数标识和接口返回参数标识。The position of the interface request parameter identifier and the interface return parameter identifier in the parameter identification sentence is determined according to the target identification character, and the interface request parameter identifier and the interface return parameter identifier are read from the position.
  13. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    获取所述参数列表中的常量参数对应的参数名称,将所述常量参数对应的参数名称与已有参数名称进行匹配;及Obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name; and
    当匹配一致时,获取目标参数名称,将所述目标参数名称作为所述常量参数对应的参数名称。When the matches are consistent, the target parameter name is obtained, and the target parameter name is used as the parameter name corresponding to the constant parameter.
  14. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 9, wherein the processor further executes the following steps when executing the computer readable instruction:
    获取各个接口标识对应的参数列表和接口参数文档模板;及Obtain the parameter list and interface parameter document template corresponding to each interface identifier; and
    使用所述接口参数文档模板和所述各个接口标识对应的参数列表生成接口参数文档,将所述接口参数文档保存。The interface parameter document template and the parameter list corresponding to each interface identifier are used to generate an interface parameter document, and the interface parameter document is saved.
  15. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤: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 execute the following steps:
    接收接口参数确定指令,根据所述参数确定指令获取接口标识和参数识别语句;Receiving an interface parameter determination instruction, and acquiring an interface identification and a parameter identification sentence according to the parameter determination instruction;
    根据预设目标解析规则脚本解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识;Parse the parameter identification sentence according to the preset target parsing rule script to obtain the interface request parameter identifier and the interface return parameter identifier;
    根据所述接口请求参数标识获取对应的请求参数语句,解析所述请求参数语句,得到所述请求参数标识对应的数据表字段,使用所述数据表字段生成对应的请求参数属性;Obtain the corresponding request parameter sentence according to the interface request parameter identifier, parse the request parameter sentence to obtain the data table field corresponding to the request parameter identifier, and use the data table field to generate the corresponding request parameter attribute;
    根据所述接口返回参数标识获取对应的返回参数语句,解析所述返回参数语句,得到所述返回参数标识对应的数据表字段,使用所述数据表字段生成对应的返回参数属性;及Obtain the corresponding return parameter sentence according to the interface return parameter identifier, parse the return parameter sentence to obtain the data table field corresponding to the return parameter identifier, and use the data table field to generate the corresponding return parameter attribute; and
    根据所述请求参数属性和所述返回参数属性生成所述接口标识对应的参数列表,将所述接口标识与所述参数列表关联保存。Generate a parameter list corresponding to the interface identifier according to the request parameter attribute and the return parameter attribute, and store the interface identifier in association with the parameter list.
  16. 根据权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 15, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    获取各个数据库参数解析规则,根据所述各个数据库参数解析规则建立目标解析规则;及Acquiring each database parameter parsing rule, and establishing a target parsing rule according to each database parameter parsing rule; and
    根据所述目标解析规则生成目标解析规则脚本,部署所述目标解析规则脚本。A target parsing rule script is generated according to the target parsing rule, and the target parsing rule script is deployed.
  17. 根据权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 15, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    确定所述参数识别语句对应的数据库类型;及Determine the database type corresponding to the parameter recognition sentence; and
    根据所述数据库类型获取对应的正则表达式,使用所述正则表达式解析所述参数识别语句,得到接口请求参数标识和接口返回参数标识。A corresponding regular expression is obtained according to the database type, and the parameter identification sentence is parsed using the regular expression to obtain an interface request parameter identifier and an interface return parameter identifier.
  18. 根据权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 15, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    使用预设目标解析规则脚本从所述参数识别语句中确定目标标识字符;及Use a preset target parsing rule script to determine target identification characters from the parameter recognition sentence; and
    根据所述目标标识字符确定所述接口请求参数标识和接口返回参数标识在所述参数识别语句中的位置,从位置读取所述接口请求参数标识和接口返回参数标识。The position of the interface request parameter identifier and the interface return parameter identifier in the parameter identification sentence is determined according to the target identification character, and the interface request parameter identifier and the interface return parameter identifier are read from the position.
  19. 根据权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 15, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    获取所述参数列表中的常量参数对应的参数名称,将所述常量参数对应的参数名称与已有参数名称进行匹配;及Obtain the parameter name corresponding to the constant parameter in the parameter list, and match the parameter name corresponding to the constant parameter with the existing parameter name; and
    当匹配一致时,获取目标参数名称,将所述目标参数名称作为所述常量参数对应的参数名称。When the matches are consistent, the target parameter name is obtained, and the target parameter name is used as the parameter name corresponding to the constant parameter.
  20. 根据权利要求15所述的存储介质,其中,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 15, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    获取各个接口标识对应的参数列表和接口参数文档模板;及Obtain the parameter list and interface parameter document template corresponding to each interface identifier; and
    使用所述接口参数文档模板和所述各个接口标识对应的参数列表生成接口参数文档,将所述接口参数文档保存。The interface parameter document template and the parameter list corresponding to each interface identifier are used to generate an interface parameter document, and the interface parameter document is saved.
PCT/CN2020/098683 2020-04-28 2020-06-29 Interface data processing method and apparatus, and computer device and storage medium WO2021217846A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010349488.4A CN111581271A (en) 2020-04-28 2020-04-28 Interface parameter determination method and device, computer equipment and storage medium
CN202010349488.4 2020-04-28

Publications (1)

Publication Number Publication Date
WO2021217846A1 true WO2021217846A1 (en) 2021-11-04

Family

ID=72111880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/098683 WO2021217846A1 (en) 2020-04-28 2020-06-29 Interface data processing method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN111581271A (en)
WO (1) WO2021217846A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157501A (en) * 2021-12-08 2022-03-08 北京天融信网络安全技术有限公司 Parameter analysis method and device based on Tianri database
CN115146604A (en) * 2022-07-01 2022-10-04 广州高专资讯科技有限公司 Interface technology document generation method, device, equipment and storage medium
CN116401089A (en) * 2023-04-23 2023-07-07 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112445811A (en) * 2020-11-09 2021-03-05 广东华兴银行股份有限公司 Data service method, device, storage medium and component based on SQL configuration
CN117667046B (en) * 2024-01-31 2024-04-12 英诺达(成都)电子科技有限公司 Command analysis method, device, electronic equipment, storage medium and program product

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107798098A (en) * 2017-10-27 2018-03-13 链家网(北京)科技有限公司 A kind of method and device for realizing dynamic socket field
US20190098056A1 (en) * 2017-09-28 2019-03-28 Oracle International Corporation Rest-based declarative policy management
CN110704521A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Interface data access method and system
CN111026797A (en) * 2019-12-02 2020-04-17 卫盈联信息技术(深圳)有限公司 Service data processing method, server and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190098056A1 (en) * 2017-09-28 2019-03-28 Oracle International Corporation Rest-based declarative policy management
CN107798098A (en) * 2017-10-27 2018-03-13 链家网(北京)科技有限公司 A kind of method and device for realizing dynamic socket field
CN110704521A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Interface data access method and system
CN111026797A (en) * 2019-12-02 2020-04-17 卫盈联信息技术(深圳)有限公司 Service data processing method, server and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114157501A (en) * 2021-12-08 2022-03-08 北京天融信网络安全技术有限公司 Parameter analysis method and device based on Tianri database
CN114157501B (en) * 2021-12-08 2024-01-23 北京天融信网络安全技术有限公司 Parameter analysis method and device based on TianRui database
CN115146604A (en) * 2022-07-01 2022-10-04 广州高专资讯科技有限公司 Interface technology document generation method, device, equipment and storage medium
CN115146604B (en) * 2022-07-01 2023-06-13 广州高专资讯科技有限公司 Method, device, equipment and storage medium for generating interface technical document
CN116401089A (en) * 2023-04-23 2023-07-07 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment
CN116401089B (en) * 2023-04-23 2024-01-26 中航信移动科技有限公司 Interface fusing method based on increment iteration, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111581271A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
WO2021217846A1 (en) Interface data processing method and apparatus, and computer device and storage medium
CN108519967B (en) Chart visualization method and device, terminal and storage medium
WO2019085474A1 (en) Calculation engine implementing method, electronic device, and storage medium
WO2019019769A1 (en) Service function implementation method, device, computer apparatus and storage medium
US10235685B2 (en) Method and system for two-dimensional charting using live queries
US9485306B2 (en) Methods, apparatuses, and computer program products for facilitating a data interchange protocol
US11733990B2 (en) Generating software artifacts from a conceptual data model
CN111177113B (en) Data migration method, device, computer equipment and storage medium
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
US11580294B2 (en) Techniques for web framework detection
CN111414350B (en) Service generation method and device
CN108563694B (en) SQL execution method and device for logic deletion, computer equipment and storage medium
WO2020192141A1 (en) Method and device for simulating interface, computer apparatus, and storage medium
CN106648569B (en) Target serialization realization method and device
WO2020155771A1 (en) Spreadsheet data processing method and apparatus, computer device, and storage medium
US11308060B2 (en) Method, apparatus, device and storage medium for managing index
WO2021051501A1 (en) Sql extraction method and apparatus, computer device, and storage medium
US10073852B2 (en) Computer-readable storage medium, file management apparatus, and file management method
US10872085B2 (en) Recording lineage in query optimization
US9201937B2 (en) Rapid provisioning of information for business analytics
US9317553B2 (en) Declarative partitioning for data collection queries
CN115203339A (en) Multi-data source integration method and device, computer equipment and storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN110852077A (en) Method, device, medium and electronic equipment for dynamically adjusting Word2Vec model dictionary
US20230367586A1 (en) Web application generation

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

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 200223)

122 Ep: pct application non-entry in european phase

Ref document number: 20932904

Country of ref document: EP

Kind code of ref document: A1