WO2020192141A1 - Method and device for simulating interface, computer apparatus, and storage medium - Google Patents

Method and device for simulating interface, computer apparatus, and storage medium Download PDF

Info

Publication number
WO2020192141A1
WO2020192141A1 PCT/CN2019/118071 CN2019118071W WO2020192141A1 WO 2020192141 A1 WO2020192141 A1 WO 2020192141A1 CN 2019118071 W CN2019118071 W CN 2019118071W WO 2020192141 A1 WO2020192141 A1 WO 2020192141A1
Authority
WO
WIPO (PCT)
Prior art keywords
interface
configuration data
request
target
database
Prior art date
Application number
PCT/CN2019/118071
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 WO2020192141A1 publication Critical patent/WO2020192141A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Definitions

  • This application relates to an interface simulation method, device, computer equipment and storage medium.
  • front-end development and back-end development are often involved.
  • front-end development and back-end development are usually developed independently by different developers.
  • the inventor realizes that in the front-end development process, it is often necessary to base on the back-end interface that can be used for business logic. If the back-end interface development is not completed, the front-end cannot be developed, resulting in front-end and back-end work The coupling is very high, which seriously reduces the front-end development efficiency.
  • an interface simulation method, device, computer equipment, and storage medium are provided.
  • An interface simulation method includes: obtaining interface configuration data corresponding to the interface to be simulated, and saving the interface configuration data as an interface configuration data record in a database, and the interface configuration data record includes a configuration interface name field and a request parameter field And return parameter fields; receive the interface simulation request sent by the terminal for the interface to be simulated; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, from Query the configuration interface name field and the request parameter field in the database for interface configuration data records that match the first target interface name and the target request parameter respectively; return the parameter field in the queried interface configuration data record Determining the first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
  • An interface simulation device includes: an interface configuration data acquisition module, used to acquire interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in a database, the interface configuration data record includes Configure the interface name field, request parameter field, and return parameter field; interface simulation request receiving module, used to receive the interface simulation request sent by the terminal for the interface to be simulated; parsing module, used to simulate the received interface request Parse to obtain the first target interface name and target request parameters; the query module is used to traverse the database, and query the configuration interface name field and the request parameter field from the database, respectively, with the first target interface name and the target request parameter.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps: Obtain the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database.
  • the interface configuration data record includes a configuration interface name field, a request parameter field, and a return parameter field ; Receive the interface simulation request for the interface to be simulated sent by the terminal; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, from the database Query the interface configuration data record whose configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter; determine the return parameter field in the queried interface configuration data record as the The first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps: Obtain the interface to be simulated Corresponding interface configuration data, save the interface configuration data as an interface configuration data record in the database, the interface configuration data record includes the configuration interface name field, the request parameter field, and the return parameter field;
  • the interface simulation request of the interface to be simulated is parsed to obtain the first target interface name and target request parameters;
  • the database is traversed, and the configuration interface name field and request are queried from the database Interface configuration data records whose parameter fields respectively match the first target interface name and the target request parameters; determine the return parameter field in the queried interface configuration data record as the first corresponding to the interface simulation request Target return parameter; and sending the first target return parameter to the terminal.
  • Fig. 1 is an application scenario diagram of an interface simulation method according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of an interface simulation method according to one or more embodiments.
  • Fig. 3 is a block diagram of an interface simulation device according to one or more embodiments.
  • Figure 4 is a block diagram of a computer device according to one or more embodiments.
  • the interface simulation 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 server 104 first obtains the interface configuration data from the terminal 102 and saves these interface configuration data as an interface configuration data record in the database.
  • the terminal When subsequently receiving the interface simulation request sent by the terminal, it can analyze the interface simulation request to Get the target interface name and target request parameters carried therein, and then traverse the database according to the target interface name and target request parameters, and query the configuration interface name field and request parameter field from the database for the interface configuration that matches the target interface name and target request parameter respectively
  • the return parameter field in the queried interface configuration data record is determined as the target return parameter corresponding to the interface simulation request, and the target return parameter is sent to the terminal, thereby realizing the simulation of the interface.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • an interface simulation method is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database.
  • the interface to be simulated refers to the interface that needs to be simulated.
  • the interface configuration data is the interface data configured by the front-end developers according to the interface specification.
  • the interface specification can be the interface formulated by the front-end developers and the back-end developers after the requirements are determined.
  • Documents, interface configuration data includes interface name, interface address, request method, request parameter, return parameter, etc.
  • the configuration interface name refers to the interface name corresponding to the interface to be simulated.
  • the request method includes but is not limited to post request and get request, request parameter It refers to the parameters that the interface to be simulated needs to pass in when it is called, and the return parameters refer to the parameters returned by the interface to be simulated when it is called.
  • the server obtains the interface configuration data corresponding to the interface to be simulated from the terminal, and after obtaining the interface configuration data, can save the interface configuration data to the database.
  • interface configuration data record is a row of data in the data table, including configuration Interface name field, request parameter field and return parameter field.
  • the configuration interface name field is used to save the configuration interface name in the interface configuration data
  • the request parameter field is used to save the request parameter in the interface configuration data
  • the return parameter field is used to save the interface configuration. Return parameters in the data.
  • the interface configuration data record may also include other fields, for example, the interface address field, the request mode field, and so on. It is also understandable that for the same interface, there may be multiple interface configuration data records, and each record contains different request parameters and different return parameters. In some embodiments, the interface name and request parameters can be set as the joint primary key to facilitate subsequent data query.
  • obtaining the interface configuration data by the server includes: receiving the interface configuration data obtained through the visual configuration interface sent by the terminal.
  • the terminal can display a visual configuration interface.
  • the visual configuration interface can include an interface name configuration box, a request parameter configuration box, an interface address configuration box, a return parameter configuration box, etc., and front-end developers can check the interface in each configuration box. Configure it.
  • the visual configuration interface displayed by the terminal may also include a custom configuration box, and front-end developers can perform custom data configuration on the interface according to the custom configuration box.
  • Step S204 Receive an interface simulation request sent by the terminal for the interface to be simulated.
  • an interface simulation request can be sent to the server through the terminal.
  • the interface simulation request carries the interface name, request method, and request corresponding to the interface to be simulated. Parameters and other data.
  • Step S206 Parse the received interface simulation request to obtain the first target interface name and target request parameters.
  • the server parses the interface simulation request according to the request mode corresponding to the interface simulation request to obtain the first target interface name and target request parameters. For example, when the request method is a get request, the interface name and request parameters are parsed from the URL corresponding to the interface simulation request, and the parsed interface name and request parameters are determined as the first target interface name and target request parameters; when the request method is post When requesting, the interface name and request parameters are parsed from the request body corresponding to the interface simulation request, and the parsed interface name and request parameters are determined as the first target interface name and target request parameters.
  • step S208 the database is traversed, and the interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter are searched from the database.
  • Step S210 Determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request.
  • Step S212 Send the first target return parameter to the terminal.
  • the server After the server obtains the first target interface name and target request parameters, it traverses the database according to the first target interface name and the current request parameters, and judges whether there are both the configuration interface name field and the request parameter field in each interface configuration data record in the database. An interface configuration data record with the same name and target request parameter as the first target interface. If it exists, it can be determined as the first target return parameter corresponding to the interface simulation request based on the return parameter in the record, and the first target return parameter Send to the terminal.
  • an error prompt message can be sent to the terminal.
  • the database upon receiving the interface simulation request for the interface to be simulated, the database will query the return parameters of the interface to be simulated, and the parameters will be returned. Return to the terminal, thereby realizing the simulation of the interface function, allowing front-end developers to call the interface when the interface has not been developed, realizing the decoupling of front-end and back-end development work, and improving the efficiency of front-end development work.
  • the aforementioned interface configuration data record further includes a dependent interface name field, and after the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request, the aforementioned method It also includes: determining the dependent interface name field in the queried interface configuration data record as the second target interface name; traversing the database, querying the configuration interface name field and request parameter field from the database, respectively, and the second target interface name and target The interface configuration data record matching the request parameter; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; sending the first target return parameter to the terminal, including: The first target return parameter and the second target return parameter are sent to the terminal.
  • the back-end when the back-end is developing interfaces, some functions of some interfaces overlap with other interfaces.
  • dependencies between interfaces for example, For example, if the function of interface B is included in interface A, interface A can be set to depend on interface B. At this time, interface B is a dependent interface of interface A, and the interface name corresponding to interface B is the dependent interface name corresponding to interface A.
  • the front-end developer when configuring the interface to be simulated, the front-end developer can also configure the dependent interface name corresponding to the interface to be simulated. In this way, the interface configuration data of the interface to be simulated received by the server includes the dependent interface name. Save the dependent interface name to the dependent interface name field in the interface configuration data record.
  • the server when the server receives the interface simulation request of the interface to be simulated and queries the interface configuration data record from the database according to the first target interface name and target request parameters carried in the interface simulation request, it can use the queried interface configuration data record Obtain the dependent interface name in, and then determine the dependent interface name as the second target interface name, and continue to traverse the database to find the interface configuration whose configuration interface name field and request parameter field match the second target interface name and target request parameter respectively Data record, the second target return parameter is obtained again from the queried interface configuration data, and the second target return parameter is the first in the interface configuration data record queried from the database according to the first target interface name and target request parameters The target return parameters together constitute the return parameters corresponding to the interface simulation request, and the finally obtained return parameters are sent to the terminal.
  • the above method before saving the interface configuration data as an interface configuration data record in the database, the above method further includes: obtaining a data format corresponding to the interface configuration data; and saving the interface configuration data as a piece of interface configuration data in the database Records include: when the data format is a preset format, save the interface configuration data as an interface configuration data record in the database; when the data format is not a preset format, generate a format modification reminder message, and send the format modification reminder message to terminal.
  • the preset format is a format agreed upon by front-end developers and back-end developers according to requirements, for example, JSON format, XML format, etc.
  • the server after the server obtains the interface configuration data, it first needs to obtain the format of each item in the interface configuration data to determine whether the format of all data in the interface configuration data is a preset format, and if so, configure the interface
  • the data is correspondingly saved to each field in the database. If any of the data is not in the preset format, the server will fail to save the configuration interface data, and the server will generate a format modification reminder message and send it to the terminal, and the terminal will modify the format reminder message Display to remind users to modify the corresponding data.
  • the terminal can again send the modified interface configuration data to the server, and the server again determines whether the format of the interface configuration data is a preset format, and if so, it can be saved to the corresponding field in the database.
  • the format of the interface configuration data is verified before the interface configuration data is saved in the database, which can ensure the correctness and consistency of the data format in the database, thereby improving the accuracy of the interface simulation.
  • the interface configuration data after the interface configuration data is saved in the database, it further includes: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, and querying the configuration interface name field from the database for the query interface name. Matching interface configuration data records; return the queried interface configuration data records to the terminal; receive the terminal's modification request for the queried interface configuration data records, and query the corresponding user authority according to the user ID carried in the modification request; When the received user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
  • the user corresponding to the terminal needs to modify the interface configuration data saved in the database, he can first send a query request to the server through the terminal, and carry the query interface name in the query request.
  • the query interface name refers to the interface to be queried Corresponding interface name.
  • the server traverses the database according to the query interface name. When it finds the interface configuration data record whose configuration interface field matches the query interface name, it returns the queried interface configuration data record to the terminal.
  • the terminal displays the received interface configuration data, and the user corresponding to the terminal can modify the interface configuration data displayed on the terminal and send a modification request to the server.
  • the server After the server receives the modification request, it needs to verify the user authority corresponding to the modification request. When verifying, it can query the corresponding user authority according to the user ID carried in the modification request. , And then determine whether the queried user authority meets the preset conditions, if it is met, replace the interface configuration data before the modification corresponding to the interface to be queried in the database with the modified interface configuration data; if not, return the modification to the terminal Failed prompt message.
  • the preset condition refers to the preset user authority that can modify the data in the database.
  • steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed 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 some of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • an interface simulation device 300 including:
  • the interface configuration data acquisition module 302 is used to acquire the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database.
  • the interface configuration data record includes the configuration interface name field, request parameter field, and return Parameter field
  • the interface simulation request receiving module 304 is configured to receive the interface simulation request sent by the terminal for the interface to be simulated;
  • the parsing module 306 is configured to analyze the received interface simulation request to obtain the first target interface name and target request parameters;
  • the query module 308 is used to traverse the database and query the interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
  • the first target return parameter determination module 310 is configured to determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request;
  • the sending module 312 is configured to send the first target return parameter to the terminal.
  • the interface configuration data record further includes a dependent interface name field;
  • the above device further includes: a second target return parameter determination module, configured to determine the dependent interface name field in the queried interface configuration data record Is the second target interface name; traverse the database, query the interface configuration data records that match the second target interface name and target request parameter in the configuration interface name field and request parameter field from the database; record the queried interface configuration data
  • the return parameter field in is determined as the second target return parameter corresponding to the interface simulation request; the sending module is also used to send the first target return parameter and the second target return parameter to the terminal.
  • the interface configuration data obtaining module is further configured to receive the interface configuration data obtained through the visual configuration interface sent by the terminal.
  • the above-mentioned device further includes: a data format acquisition module for acquiring the data format corresponding to the interface configuration data; the interface configuration data acquisition module is also used for saving the interface configuration data when the data format is a preset format Configure data records for an interface in the database; and when the data format is not a preset format, generate format modification reminder information, and send the format modification reminder information to the terminal.
  • the above-mentioned device further includes: an interface configuration data modification module, configured to receive a query request sent by the terminal, the query request carries the query interface name; traverse the database, and query the configuration interface name field and query interface name from the database Matching interface configuration data records; return the queried interface configuration data records to the terminal; receive the terminal's modification request for the queried interface configuration data record, and query the corresponding user authority based on the user identifier carried in the modification request; and When the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
  • an interface configuration data modification module configured to receive a query request sent by the terminal, the query request carries the query interface name; traverse the database, and query the configuration interface name field and query interface name from the database Matching interface configuration data records; return the queried interface configuration data records to the terminal; receive the terminal's modification request for the queried interface configuration data record, and query the corresponding user authority based on the user identifier carried in the modification request; and When the queried
  • Each module in the above-mentioned interface simulation device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface and a database connected through a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, computer readable instructions, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the computer equipment database is used to store interface configuration data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer-readable instructions are executed by the processor to realize an interface simulation method.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer 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 includes a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors perform the following steps: Obtain the corresponding interface to be simulated Interface configuration data, save the interface configuration data as an interface configuration data record in the database.
  • the interface configuration data record includes the configuration interface name field, request parameter field and return parameter field; receiving the interface simulation request sent by the terminal to simulate the interface Analyze the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, query the configuration interface name field and request parameter field from the database, respectively, and the first target interface name and target request parameters The matched interface configuration data record; the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request; and the first target return parameter is sent to the terminal.
  • the interface configuration data record further includes a dependent interface name field; after determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request, the processor executes
  • the computer-readable instructions also implement the following steps: determine the dependent interface name field in the queried interface configuration data record as the second target interface name; traverse the database, and query the configuration interface name field and the request parameter field from the database respectively An interface configuration data record matching the second target interface name and the target request parameter; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and returning the first target The parameter and the second target return parameter are sent to the terminal.
  • the processor further implements the following steps when executing the computer-readable instructions: receiving interface configuration data sent by the terminal, where the interface configuration data is data acquired by the terminal through a visual configuration interface.
  • the processor before saving the interface configuration data as an interface configuration data record in the database, the processor also implements the following steps when executing the computer-readable instructions: acquiring the data format corresponding to the interface configuration data; when the data format is preset When formatting, save the interface configuration data as an interface configuration data record in the database; and when the data format is not a preset format, generate format modification reminder information, and send the format modification reminder information to the terminal.
  • the processor executes the following steps when executing the computer-readable instructions: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, from the database Query the interface configuration data record whose configuration interface name field matches the query interface name; return the queried interface configuration data record to the terminal; receive the terminal’s modification request for the queried interface configuration data record, according to the modification request carried
  • the user ID queries the corresponding user authority; and when the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps: Obtain the interface to be simulated Corresponding interface configuration data, save the interface configuration data as an interface configuration data record in the database.
  • the interface configuration data record includes the configuration interface name field, request parameter field and return parameter field; the interface simulation sent by the receiving terminal to simulate the interface Request; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, query the configuration interface name field and request parameter field from the database and the first target interface name and target request parameter respectively A matching interface configuration data record; determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
  • the interface configuration data record further includes a dependent interface name field; after the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request, the computer can read
  • the following steps are also implemented: determine the dependent interface name field in the queried interface configuration data record as the second target interface name; traverse the database, query the configuration interface name field and request parameter field from the database, respectively An interface configuration data record matching the second target interface name and target request parameters; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and setting the first target The return parameter and the second target return parameter are sent to the terminal.
  • obtaining the interface configuration data corresponding to the interface to be simulated includes: receiving the interface configuration data sent by the terminal, where the interface configuration data is the data obtained by the terminal through the visual configuration interface.
  • the computer-readable instructions when executed by the processor further implement the following steps: obtain the data format corresponding to the interface configuration data; when the data format is When the format is preset, the interface configuration data is saved as an interface configuration data record in the database; and when the data format is not a preset format, a format modification reminder message is generated, and the format modification reminder message is sent to the terminal.
  • the following steps are also implemented: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, from the database The query configuration interface name field matches the interface configuration data record in the query interface name; returns the queried interface configuration data record to the terminal; receives the terminal’s request for modification of the queried interface configuration data record, according to the modification request carried
  • the user ID inquires the corresponding user authority; and when the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • memory bus Radbus direct RAM
  • RDRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for simulating an interface comprises: acquiring interface configuration data corresponding to an interface awaiting simulation, and storing, in a database, the interface configuration data as an interface configuration data record, wherein the interface configuration data record comprises a configuration interface name field, a request parameter field and a return parameter field; receiving, from a terminal, an interface simulation request to simulate the interface; parsing the received interface simulation request to acquire a first target interface name and a target request parameter; traversing the database to search for an interface configuration data record comprising the configuration interface name field and the request parameter field respectively matching the first target interface name and the target request parameter; determining the return parameter field in the found interface configuration data record to be a first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.

Description

接口模拟方法、装置、计算机设备和存储介质Interface simulation method, device, computer equipment and storage medium
相关申请的交叉引用Cross references to related applications
本申请要求于2019年03月25日提交中国专利局,申请号为2019102283027,申请名称为“接口模拟方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on March 25, 2019. The application number is 2019102283027 and the application name is "Interface simulation method, device, computer equipment and storage medium". The entire content is incorporated by reference. In this application.
技术领域Technical field
本申请涉及一种接口模拟方法、装置、计算机设备和存储介质。This application relates to an interface simulation method, device, computer equipment and storage medium.
背景技术Background technique
在web项目的开发中,经常涉及到前端开发和后端开发,传统技术中,前端开发与后端开发通常由不同的开发人员进行独立开发。然而,发明人意识到,在前端开发过程中,经常要以后端提供的可进行业务逻辑的接口为基础,在后端没有完成接口开发的情况下,前端无法进行开发,导致前端和后端工作的耦合性非常高,严重降低了前端的开发效率。In the development of web projects, front-end development and back-end development are often involved. In traditional technologies, front-end development and back-end development are usually developed independently by different developers. However, the inventor realizes that in the front-end development process, it is often necessary to base on the back-end interface that can be used for business logic. If the back-end interface development is not completed, the front-end cannot be developed, resulting in front-end and back-end work The coupling is very high, which seriously reduces the front-end development efficiency.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种接口模拟方法、装置、计算机设备和存储介质。According to various embodiments disclosed in the present application, an interface simulation method, device, computer equipment, and storage medium are provided.
一种接口模拟方法包括:获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;接收终端发送的对所述待模拟接口的接口模拟请求;对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述 目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及将所述第一目标返回参数发送至终端。An interface simulation method includes: obtaining interface configuration data corresponding to the interface to be simulated, and saving the interface configuration data as an interface configuration data record in a database, and the interface configuration data record includes a configuration interface name field and a request parameter field And return parameter fields; receive the interface simulation request sent by the terminal for the interface to be simulated; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, from Query the configuration interface name field and the request parameter field in the database for interface configuration data records that match the first target interface name and the target request parameter respectively; return the parameter field in the queried interface configuration data record Determining the first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
一种接口模拟装置包括:接口配置数据获取模块,用于获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;接口模拟请求接收模块,用于接收终端发送的对所述待模拟接口的接口模拟请求;解析模块,用于对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;查询模块,用于遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;第一目标返回参数确定模块,用于将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及发送模块,用于将所述第一目标返回参数发送至终端。An interface simulation device includes: an interface configuration data acquisition module, used to acquire interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in a database, the interface configuration data record includes Configure the interface name field, request parameter field, and return parameter field; interface simulation request receiving module, used to receive the interface simulation request sent by the terminal for the interface to be simulated; parsing module, used to simulate the received interface request Parse to obtain the first target interface name and target request parameters; the query module is used to traverse the database, and query the configuration interface name field and the request parameter field from the database, respectively, with the first target interface name and the target request parameter. The interface configuration data record that matches the target request parameter; the first target return parameter determining module is used to determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request And a sending module for sending the first target return parameter to the terminal.
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;接收终端发送的对所述待模拟接口的接口模拟请求;对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及将所述第一目标返回参数发送至终端。A computer device, including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps: Obtain the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes a configuration interface name field, a request parameter field, and a return parameter field ; Receive the interface simulation request for the interface to be simulated sent by the terminal; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, from the database Query the interface configuration data record whose configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter; determine the return parameter field in the queried interface configuration data record as the The first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;接收终端发送的对所述待模拟接口的接口模拟请求;对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及将所述第一目标返回参数发送至终端。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: Obtain the interface to be simulated Corresponding interface configuration data, save the interface configuration data as an interface configuration data record in the database, the interface configuration data record includes the configuration interface name field, the request parameter field, and the return parameter field; The interface simulation request of the interface to be simulated; the received interface simulation request is parsed to obtain the first target interface name and target request parameters; the database is traversed, and the configuration interface name field and request are queried from the database Interface configuration data records whose parameter fields respectively match the first target interface name and the target request parameters; determine the return parameter field in the queried interface configuration data record as the first corresponding to the interface simulation request Target return parameter; and sending the first target return parameter to the terminal.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the 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. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.
图1为根据一个或多个实施例中接口模拟方法的应用场景图。Fig. 1 is an application scenario diagram of an interface simulation method according to one or more embodiments.
图2为根据一个或多个实施例中接口模拟方法的流程示意图。Fig. 2 is a schematic flowchart of an interface simulation method according to one or more embodiments.
图3为根据一个或多个实施例中接口模拟装置的框图。Fig. 3 is a block diagram of an interface simulation device according to one or more embodiments.
图4为根据一个或多个实施例中计算机设备的框图。Figure 4 is a block diagram of a computer device according to one or more embodiments.
具体实施方式detailed description
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以 解释本申请,并不用于限定本申请。In order to make the technical solutions and advantages of the present application 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 application, and not to limit the application.
本申请提供的接口模拟方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104进行通信。服务器104首先从终端102获取接口配置数据,并将这些接口配置数据保存为数据库中的一条接口配置数据记录,当后续接收到终端发送的接口模拟请求时,可以对该接口模拟请求进行解析,以获取其中携带的目标接口名及目标请求参数,然后根据该目标接口名和目标请求参数遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与目标接口名及目标请求参数相匹配的接口配置数据记录,将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的目标返回参数,将目标返回参数发送至终端,从而实现对接口的模拟。The interface simulation 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 server 104 first obtains the interface configuration data from the terminal 102 and saves these interface configuration data as an interface configuration data record in the database. When subsequently receiving the interface simulation request sent by the terminal, it can analyze the interface simulation request to Get the target interface name and target request parameters carried therein, and then traverse the database according to the target interface name and target request parameters, and query the configuration interface name field and request parameter field from the database for the interface configuration that matches the target interface name and target request parameter respectively In the data record, the return parameter field in the queried interface configuration data record is determined as the target return parameter corresponding to the interface simulation request, and the target return parameter is sent to the terminal, thereby realizing the simulation of the interface.
终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, and tablet computers. The server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
在一些实施例中,如图2所示,提供了一种接口模拟方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In some embodiments, as shown in FIG. 2, an interface simulation 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,获取待模拟接口对应的接口配置数据,将接口配置数据保存为数据库中的一条接口配置数据记录。Step S202: Obtain interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database.
待模拟接口指的是需要进行模拟的接口,接口配置数据为前端开发人员根据接口规范所配置的接口数据,接口规范可以是前端开发人员及后端开发人员在需求定下来后根据需求制定的接口文档,接口配置数据包括接口名、接口地址、请求方式、请求参数、返回参数等,配置接口名指的是待模拟接口对应的接口名,请求方式包括但不限于post请求及get请求,请求参数指的待模拟接口在进行调用时所需要传入的参数,返回参数指的是待模拟接口在进行调用时所返回的参数。The interface to be simulated refers to the interface that needs to be simulated. The interface configuration data is the interface data configured by the front-end developers according to the interface specification. The interface specification can be the interface formulated by the front-end developers and the back-end developers after the requirements are determined. Documents, interface configuration data includes interface name, interface address, request method, request parameter, return parameter, etc. The configuration interface name refers to the interface name corresponding to the interface to be simulated. The request method includes but is not limited to post request and get request, request parameter It refers to the parameters that the interface to be simulated needs to pass in when it is called, and the return parameters refer to the parameters returned by the interface to be simulated when it is called.
具体地,服务器从终端获取待模拟接口对应的接口配置数据,在获取到接口配置数据后,可以将接口配置数据保存至数据库。在将接口配置数据保存至数据库时,可以将配置接口名、请求方式、请求参数、返回参数等保存 为数据库中的一条接口配置数据记录,接口配置数据记录为数据表中的一行数据,包括配置接口名字段、请求参数字段及返回参数字段,配置接口名字段用于保存接口配置数据中的配置接口名,请求参数字段用于保存接口配置数据中的请求参数,返回参数字段用于保存接口配置数据中的返回参数。可以理解,接口配置数据记录中还可以包括其他字段,例如,接口地址字段、请求方式字段等等。还可以理解的是,对于同一个接口,可能包含多条接口配置数据记录,每一条记录中包含不同的请求参数及不同的返回参数。在一些实施例中,可以将接口名和请求参数设置为联合主键,便于后续的数据查询。Specifically, the server obtains the interface configuration data corresponding to the interface to be simulated from the terminal, and after obtaining the interface configuration data, can save the interface configuration data to the database. When saving interface configuration data to the database, you can save the configuration interface name, request method, request parameters, return parameters, etc. as an interface configuration data record in the database. The interface configuration data record is a row of data in the data table, including configuration Interface name field, request parameter field and return parameter field. The configuration interface name field is used to save the configuration interface name in the interface configuration data, the request parameter field is used to save the request parameter in the interface configuration data, and the return parameter field is used to save the interface configuration. Return parameters in the data. It can be understood that the interface configuration data record may also include other fields, for example, the interface address field, the request mode field, and so on. It is also understandable that for the same interface, there may be multiple interface configuration data records, and each record contains different request parameters and different return parameters. In some embodiments, the interface name and request parameters can be set as the joint primary key to facilitate subsequent data query.
在一些实施例中,服务器获取接口配置数据包括:接收终端发送的通过可视化配置界面获取的接口配置数据。具体地,终端可展示一个可视化配置界面,该可视化配置界面中可以包括接口名配置框、请求参数配置框、接口地址配置框、返回参数配置框等,前端开发人员可在各个配置框中对接口进行配置。在一些实施例中,终端展示的可视化配置界面中还可以包括自定义配置框,前端开发人员可根据该自定义配置框对接口进行自定义数据配置。In some embodiments, obtaining the interface configuration data by the server includes: receiving the interface configuration data obtained through the visual configuration interface sent by the terminal. Specifically, the terminal can display a visual configuration interface. The visual configuration interface can include an interface name configuration box, a request parameter configuration box, an interface address configuration box, a return parameter configuration box, etc., and front-end developers can check the interface in each configuration box. Configure it. In some embodiments, the visual configuration interface displayed by the terminal may also include a custom configuration box, and front-end developers can perform custom data configuration on the interface according to the custom configuration box.
步骤S204,接收终端发送的对待模拟接口的接口模拟请求。Step S204: Receive an interface simulation request sent by the terminal for the interface to be simulated.
具体地,当前端开发需要对某个未开发或正处于开发中的接口进行模拟时,可通过终端向服务器发送接口模拟请求,接口模拟请求中携带待模拟接口对应的接口名、请求方式、请求参数等数据。Specifically, when front-end development needs to simulate an undeveloped or under development interface, an interface simulation request can be sent to the server through the terminal. The interface simulation request carries the interface name, request method, and request corresponding to the interface to be simulated. Parameters and other data.
步骤S206,对接收到的接口模拟请求进行解析,以获取第一目标接口名及目标请求参数。Step S206: Parse the received interface simulation request to obtain the first target interface name and target request parameters.
具体地,服务器接收到接口模拟请求后,根据接口模拟请求对应的请求方式对接口模拟请求进行解析,以获取第一目标接口名和目标请求参数。例如,当请求方式为get请求时,从接口模拟请求对应的URL中解析得到接口名及请求参数,将解析得到的接口名和请求参数确定为第一目标接口名和目标请求参数;当请求方式为post请求时,从接口模拟请求对应的请求体中解析得到接口名及请求参数,将解析得到的接口名和请求参数确定为第一目标 接口名和目标请求参数。Specifically, after receiving the interface simulation request, the server parses the interface simulation request according to the request mode corresponding to the interface simulation request to obtain the first target interface name and target request parameters. For example, when the request method is a get request, the interface name and request parameters are parsed from the URL corresponding to the interface simulation request, and the parsed interface name and request parameters are determined as the first target interface name and target request parameters; when the request method is post When requesting, the interface name and request parameters are parsed from the request body corresponding to the interface simulation request, and the parsed interface name and request parameters are determined as the first target interface name and target request parameters.
步骤S208,遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第一目标接口名及目标请求参数相匹配的接口配置数据记录。In step S208, the database is traversed, and the interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter are searched from the database.
步骤S210,将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参数。Step S210: Determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request.
步骤S212,将第一目标返回参数发送至终端。Step S212: Send the first target return parameter to the terminal.
具体地,服务器获取到第一目标接口名和目标请求参数后,根据第一目标接口名和目前请求参数遍历数据库,判断数据库的每一条接口配置数据记录中,是否存在配置接口名字段和请求参数字段同时与第一目标接口名和目标请求参数相同的接口配置数据记录,若存在,则可以根据该条记录中的返回参数确定为接口模拟请求对应的第一目标返回参数,并将该第一目标返回参数发送至终端。Specifically, after the server obtains the first target interface name and target request parameters, it traverses the database according to the first target interface name and the current request parameters, and judges whether there are both the configuration interface name field and the request parameter field in each interface configuration data record in the database. An interface configuration data record with the same name and target request parameter as the first target interface. If it exists, it can be determined as the first target return parameter corresponding to the interface simulation request based on the return parameter in the record, and the first target return parameter Send to the terminal.
进一步,若数据库中不存在配置接口名字段和请求参数字段同时与第一目标接口名和目标请求参数相同的接口配置数据记录时,可以向终端发送错误提示信息。Further, if there is no interface configuration data record with the configuration interface name field and the request parameter field in the database that are the same as the first target interface name and the target request parameter, an error prompt message can be sent to the terminal.
上述接口模拟方法中,通过获取待模拟接口的接口配置数据并保存到数据库中,在接收到对该待模拟接口的接口模拟请求时,从数据库中查询该待模拟接口的返回参数,将返回参数返回至终端,从而实现了对接口功能的模拟,使得前端开发人员可以在接口未完成开发时,对接口进行调用,实现了前后端开发工作的解耦,提高了前端开发工作的效率。In the above interface simulation method, by obtaining the interface configuration data of the interface to be simulated and saving it in the database, upon receiving the interface simulation request for the interface to be simulated, the database will query the return parameters of the interface to be simulated, and the parameters will be returned. Return to the terminal, thereby realizing the simulation of the interface function, allowing front-end developers to call the interface when the interface has not been developed, realizing the decoupling of front-end and back-end development work, and improving the efficiency of front-end development work.
在一些实施例中,上述接口配置数据记录中还包括依赖接口名字段,在将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参数之后,上述方法还包括:将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第二目标接口名及目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第二目标返回参数;将第一目标返回参数发送 至终端,包括:将第一目标返回参数及第二目标返回参数发送至终端。In some embodiments, the aforementioned interface configuration data record further includes a dependent interface name field, and after the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request, the aforementioned method It also includes: determining the dependent interface name field in the queried interface configuration data record as the second target interface name; traversing the database, querying the configuration interface name field and request parameter field from the database, respectively, and the second target interface name and target The interface configuration data record matching the request parameter; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; sending the first target return parameter to the terminal, including: The first target return parameter and the second target return parameter are sent to the terminal.
具体地,由于后端在进行接口开发时,有些接口的部分功能与其他接口有重叠,在这种情况下,为了降低开发成本,减少代码冗余,可以设置接口之间的依赖关系,举个例子,若接口A中包含了接口B的功能,则可设置接口A依赖于接口B,此时,接口B为接口A的依赖接口,接口B对应的接口名为接口A对应的依赖接口名。本实施例中,前端开发人员在对待模拟接口进行配置时,还可以配置待模拟接口对应的依赖接口名,这样,服务器接收到的待模拟接口的接口配置数据中即包含了依赖接口名,服务器将依赖接口名保存至接口配置数据记录中的依赖接口名字段。Specifically, when the back-end is developing interfaces, some functions of some interfaces overlap with other interfaces. In this case, in order to reduce development costs and reduce code redundancy, you can set dependencies between interfaces, for example, For example, if the function of interface B is included in interface A, interface A can be set to depend on interface B. At this time, interface B is a dependent interface of interface A, and the interface name corresponding to interface B is the dependent interface name corresponding to interface A. In this embodiment, when configuring the interface to be simulated, the front-end developer can also configure the dependent interface name corresponding to the interface to be simulated. In this way, the interface configuration data of the interface to be simulated received by the server includes the dependent interface name. Save the dependent interface name to the dependent interface name field in the interface configuration data record.
进一步,当服务器接收到对待模拟接口的接口模拟请求并根据接口模拟请求中携带的第一目标接口名及目标请求参数从数据库中查询接口配置数据记录时,可以从所查询到的接口配置数据记录中获取依赖接口名,然后将依赖接口名确定为第二目标接口名,继续遍历数据库,以查询到配置接口名字段及请求参数字段分别与第二目标接口名及目标请求参数相匹配的接口配置数据记录,从所查询到的接口配置数据中再次获取第二目标返回参数,第二目标返回参数与根据第一目标接口名及目标请求参数从数据库中查询到的接口配置数据记录中的第一目标返回参数共同组成了接口模拟请求对应的返回参数,将最终得到的返回参数发送至终端。Further, when the server receives the interface simulation request of the interface to be simulated and queries the interface configuration data record from the database according to the first target interface name and target request parameters carried in the interface simulation request, it can use the queried interface configuration data record Obtain the dependent interface name in, and then determine the dependent interface name as the second target interface name, and continue to traverse the database to find the interface configuration whose configuration interface name field and request parameter field match the second target interface name and target request parameter respectively Data record, the second target return parameter is obtained again from the queried interface configuration data, and the second target return parameter is the first in the interface configuration data record queried from the database according to the first target interface name and target request parameters The target return parameters together constitute the return parameters corresponding to the interface simulation request, and the finally obtained return parameters are sent to the terminal.
在一些实施例中,在将接口配置数据保存为数据库中的一条接口配置数据记录之前,上述方法还包括:获取接口配置数据对应的数据格式;将接口配置数据保存为数据库中的一条接口配置数据记录,包括:当数据格式为预设格式时,将接口配置数据保存为数据库中的一条接口配置数据记录;当数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至终端。In some embodiments, before saving the interface configuration data as an interface configuration data record in the database, the above method further includes: obtaining a data format corresponding to the interface configuration data; and saving the interface configuration data as a piece of interface configuration data in the database Records include: when the data format is a preset format, save the interface configuration data as an interface configuration data record in the database; when the data format is not a preset format, generate a format modification reminder message, and send the format modification reminder message to terminal.
预设的格式为前端开发人员、后端开发人员根据需求约定的格式,例如可以是JSON格式、XML格式等。本实施例中,服务器获取到接口配置数据后,首先需要获取接口配置数据中每一项数据的格式,判断接口配置数据中 所有数据的格式是否都为预设的格式,若是,则将接口配置数据对应保存至数据库中的各个字段,若其中任意一项数据不是预设格式,则服务器对配置接口数据的保存失败,服务器会生成格式修改提醒信息,并发送至终端,终端对格式修改提醒信息进行展示,以提醒用户对相应的数据进行修改。The preset format is a format agreed upon by front-end developers and back-end developers according to requirements, for example, JSON format, XML format, etc. In this embodiment, after the server obtains the interface configuration data, it first needs to obtain the format of each item in the interface configuration data to determine whether the format of all data in the interface configuration data is a preset format, and if so, configure the interface The data is correspondingly saved to each field in the database. If any of the data is not in the preset format, the server will fail to save the configuration interface data, and the server will generate a format modification reminder message and send it to the terminal, and the terminal will modify the format reminder message Display to remind users to modify the corresponding data.
可以理解,在数据修改完成后,终端可再次将修改后的接口配置数据发送至服务器,服务器再次判断接口配置数据的格式是否为预设格式,若是,则可保存至数据库中的对应的字段。It can be understood that after the data modification is completed, the terminal can again send the modified interface configuration data to the server, and the server again determines whether the format of the interface configuration data is a preset format, and if so, it can be saved to the corresponding field in the database.
本实施例中,在将接口配置数据保存至数据库之前对接口配置数据的格式进行校验,可以保证数据库中数据格式的正确性及一致性,从而提高接口模拟时的准确性。In this embodiment, the format of the interface configuration data is verified before the interface configuration data is saved in the database, which can ensure the correctness and consistency of the data format in the database, thereby improving the accuracy of the interface simulation.
在一些实施例中,在将接口配置数据保存至数据库之后,还包括:接收终端发送的查询请求,查询请求中携带查询接口名;遍历数据库,从数据库中查询配置接口名字段与查询接口名相匹配的接口配置数据记录;向终端返回所查询到的接口配置数据记录;接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;当查询到的用户权限符合预设条件时,根据修改请求对应的修改数据更新数据库。In some embodiments, after the interface configuration data is saved in the database, it further includes: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, and querying the configuration interface name field from the database for the query interface name. Matching interface configuration data records; return the queried interface configuration data records to the terminal; receive the terminal's modification request for the queried interface configuration data records, and query the corresponding user authority according to the user ID carried in the modification request; When the received user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
具体地,当终端对应的用户需要对数据库中保存的接口配置数据进行修改时,可首先通过终端向服务器发送查询请求,并在查询请求中携带查询接口名,查询接口名指的是待查询接口对应的接口名,服务器在接收到查询请求后,根据查询接口名遍历数据库,当查询到配置接口字段与查询接口名相匹配的接口配置数据记录时,向终端返回查询到的接口配置数据记录,终端对接收到的接口配置数据进行显示,终端对应的用户可对终端显示的接口配置数据进行修改,并向服务器发送修改请求,Specifically, when the user corresponding to the terminal needs to modify the interface configuration data saved in the database, he can first send a query request to the server through the terminal, and carry the query interface name in the query request. The query interface name refers to the interface to be queried Corresponding interface name. After receiving the query request, the server traverses the database according to the query interface name. When it finds the interface configuration data record whose configuration interface field matches the query interface name, it returns the queried interface configuration data record to the terminal. The terminal displays the received interface configuration data, and the user corresponding to the terminal can modify the interface configuration data displayed on the terminal and send a modification request to the server.
进一步,为保证数据库中数据的准确性,服务器在接收到修改请求后,需要对修改请求对应的用户权限进行校验,进行校验时,可根据修改请求中携带的用户标识查询对应的用户权限,然后判断查询到的用户权限是否满足预设条件,若满足,则用修改后的接口配置数据替换数据库中该待查询接口 对应的修改之前的接口配置数据;若不满足,则向终端返回修改失败的提示信息。预设条件指的预先设置的可对数据库中的数据进行修改的用户权限。Further, in order to ensure the accuracy of the data in the database, after the server receives the modification request, it needs to verify the user authority corresponding to the modification request. When verifying, it can query the corresponding user authority according to the user ID carried in the modification request. , And then determine whether the queried user authority meets the preset conditions, if it is met, replace the interface configuration data before the modification corresponding to the interface to be queried in the database with the modified interface configuration data; if not, return the modification to the terminal Failed prompt message. The preset condition refers to the preset user authority that can modify the data in the database.
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that, although the various steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed 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 some of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
在一些实施例中,如图3所示,提供了一种接口模拟装置300,包括:In some embodiments, as shown in FIG. 3, an interface simulation device 300 is provided, including:
接口配置数据获取模块302,用于获取待模拟接口对应的接口配置数据,将接口配置数据保存为数据库中的一条接口配置数据记录,接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;The interface configuration data acquisition module 302 is used to acquire the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes the configuration interface name field, request parameter field, and return Parameter field
接口模拟请求接收模块304,用于接收终端发送的对待模拟接口的接口模拟请求;The interface simulation request receiving module 304 is configured to receive the interface simulation request sent by the terminal for the interface to be simulated;
解析模块306,用于对接收到的接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;The parsing module 306 is configured to analyze the received interface simulation request to obtain the first target interface name and target request parameters;
查询模块308,用于遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第一目标接口名及目标请求参数相匹配的接口配置数据记录;The query module 308 is used to traverse the database and query the interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
第一目标返回参数确定模块310,用于将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参数;及The first target return parameter determination module 310 is configured to determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and
发送模块312,用于将第一目标返回参数发送至终端。The sending module 312 is configured to send the first target return parameter to the terminal.
在其中一个实施例中,接口配置数据记录中还包括依赖接口名字段;上述装置还包括:第二目标返回参数确定模块,用于将所查询到的接口配置数 据记录中的依赖接口名字段确定为第二目标接口名;遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第二目标接口名及目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第二目标返回参数;发送模块还用于将第一目标返回参数及第二目标返回参数发送至终端。In one of the embodiments, the interface configuration data record further includes a dependent interface name field; the above device further includes: a second target return parameter determination module, configured to determine the dependent interface name field in the queried interface configuration data record Is the second target interface name; traverse the database, query the interface configuration data records that match the second target interface name and target request parameter in the configuration interface name field and request parameter field from the database; record the queried interface configuration data The return parameter field in is determined as the second target return parameter corresponding to the interface simulation request; the sending module is also used to send the first target return parameter and the second target return parameter to the terminal.
在其中一个实施例中,接口配置数据获取模块还用于接收终端发送的通过可视化配置界面获取的接口配置数据。In one of the embodiments, the interface configuration data obtaining module is further configured to receive the interface configuration data obtained through the visual configuration interface sent by the terminal.
在其中一个实施例中,上述装置还包括:数据格式获取模块,用于获取接口配置数据对应的数据格式;接口配置数据获取模块还用于当数据格式为预设格式时,将接口配置数据保存为数据库中的一条接口配置数据记录;及当数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至终端。In one of the embodiments, the above-mentioned device further includes: a data format acquisition module for acquiring the data format corresponding to the interface configuration data; the interface configuration data acquisition module is also used for saving the interface configuration data when the data format is a preset format Configure data records for an interface in the database; and when the data format is not a preset format, generate format modification reminder information, and send the format modification reminder information to the terminal.
在其中一个实施例中,上述装置还包括:接口配置数据修改模块,用于接收终端发送的查询请求,查询请求中携带查询接口名;遍历数据库,从数据库中查询配置接口名字段与查询接口名相匹配的接口配置数据记录;向终端返回所查询到的接口配置数据记录;接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及当查询到的用户权限符合预设条件时,根据修改请求对应的修改数据更新数据库。In one of the embodiments, the above-mentioned device further includes: an interface configuration data modification module, configured to receive a query request sent by the terminal, the query request carries the query interface name; traverse the database, and query the configuration interface name field and query interface name from the database Matching interface configuration data records; return the queried interface configuration data records to the terminal; receive the terminal's modification request for the queried interface configuration data record, and query the corresponding user authority based on the user identifier carried in the modification request; and When the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
关于接口模拟装置的具体限定可以参见上文中对于接口模拟方法的限定,在此不再赘述。上述接口模拟装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the interface simulation device, please refer to the above limitation on the interface simulation method, which will not be repeated here. Each module in the above-mentioned interface simulation device can be implemented in whole or in part by software, hardware, and a combination thereof. The foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
在一些实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。该计算机设备的处理器用于提供计算和控 制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机可读指令和数据库。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的数据库用于存储接口配置数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种接口模拟方法。In some embodiments, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. 4. The computer equipment includes a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer readable instructions, and a database. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium. The computer equipment database is used to store interface configuration data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer-readable instructions are executed by the processor to realize an interface simulation method.
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer 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 includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors perform the following steps: Obtain the corresponding interface to be simulated Interface configuration data, save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes the configuration interface name field, request parameter field and return parameter field; receiving the interface simulation request sent by the terminal to simulate the interface Analyze the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, query the configuration interface name field and request parameter field from the database, respectively, and the first target interface name and target request parameters The matched interface configuration data record; the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request; and the first target return parameter is sent to the terminal.
在一些实施例中,接口配置数据记录中还包括依赖接口名字段;在将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参数之后,处理器执行计算机可读指令时还实现以下步骤:将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第二目标接口名及目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置 数据记录中的返回参数字段确定为接口模拟请求对应的第二目标返回参数;及将第一目标返回参数及第二目标返回参数发送至终端。In some embodiments, the interface configuration data record further includes a dependent interface name field; after determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request, the processor executes The computer-readable instructions also implement the following steps: determine the dependent interface name field in the queried interface configuration data record as the second target interface name; traverse the database, and query the configuration interface name field and the request parameter field from the database respectively An interface configuration data record matching the second target interface name and the target request parameter; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and returning the first target The parameter and the second target return parameter are sent to the terminal.
在一些实施例中,处理器执行计算机可读指令时还实现以下步骤:接收终端发送的接口配置数据,接口配置数据为终端通过可视化配置界面获取的数据。In some embodiments, the processor further implements the following steps when executing the computer-readable instructions: receiving interface configuration data sent by the terminal, where the interface configuration data is data acquired by the terminal through a visual configuration interface.
在一些实施例中,在将接口配置数据保存为数据库中的一条接口配置数据记录之前,处理器执行计算机可读指令时还实现以下步骤:获取接口配置数据对应的数据格式;当数据格式为预设格式时,将接口配置数据保存为数据库中的一条接口配置数据记录;及当数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至终端。In some embodiments, before saving the interface configuration data as an interface configuration data record in the database, the processor also implements the following steps when executing the computer-readable instructions: acquiring the data format corresponding to the interface configuration data; when the data format is preset When formatting, save the interface configuration data as an interface configuration data record in the database; and when the data format is not a preset format, generate format modification reminder information, and send the format modification reminder information to the terminal.
在一些实施例中,在将接口配置数据保存至数据库之后,处理器执行计算机可读指令时还实现以下步骤:接收终端发送的查询请求,查询请求中携带查询接口名;遍历数据库,从数据库中查询配置接口名字段与查询接口名相匹配的接口配置数据记录;向终端返回所查询到的接口配置数据记录;接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及当查询到的用户权限符合预设条件时,根据修改请求对应的修改数据更新数据库。In some embodiments, after the interface configuration data is saved in the database, the processor executes the following steps when executing the computer-readable instructions: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, from the database Query the interface configuration data record whose configuration interface name field matches the query interface name; return the queried interface configuration data record to the terminal; receive the terminal’s modification request for the queried interface configuration data record, according to the modification request carried The user ID queries the corresponding user authority; and when the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取待模拟接口对应的接口配置数据,将接口配置数据保存为数据库中的一条接口配置数据记录,接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;接收终端发送的对待模拟接口的接口模拟请求;对接收到的接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第一目标接口名及目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参 数;及将第一目标返回参数发送至终端。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: Obtain the interface to be simulated Corresponding interface configuration data, save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes the configuration interface name field, request parameter field and return parameter field; the interface simulation sent by the receiving terminal to simulate the interface Request; parse the received interface simulation request to obtain the first target interface name and target request parameters; traverse the database, query the configuration interface name field and request parameter field from the database and the first target interface name and target request parameter respectively A matching interface configuration data record; determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and sending the first target return parameter to the terminal.
在一些实施例中,接口配置数据记录中还包括依赖接口名字段;在将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第一目标返回参数之后,计算机可读指令被处理器执行时还实现以下步骤:将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;遍历数据库,从数据库中查询配置接口名字段及请求参数字段分别与第二目标接口名及目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为接口模拟请求对应的第二目标返回参数;及将第一目标返回参数及第二目标返回参数发送至终端。In some embodiments, the interface configuration data record further includes a dependent interface name field; after the return parameter field in the queried interface configuration data record is determined as the first target return parameter corresponding to the interface simulation request, the computer can read When the instruction is executed by the processor, the following steps are also implemented: determine the dependent interface name field in the queried interface configuration data record as the second target interface name; traverse the database, query the configuration interface name field and request parameter field from the database, respectively An interface configuration data record matching the second target interface name and target request parameters; determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and setting the first target The return parameter and the second target return parameter are sent to the terminal.
在一些实施例中,获取待模拟接口对应的接口配置数据,包括:接收终端发送的接口配置数据,接口配置数据为终端通过可视化配置界面获取的数据。In some embodiments, obtaining the interface configuration data corresponding to the interface to be simulated includes: receiving the interface configuration data sent by the terminal, where the interface configuration data is the data obtained by the terminal through the visual configuration interface.
在一些实施例中,在将接口配置数据保存为数据库中的一条接口配置数据记录之前,计算机可读指令被处理器执行时还实现以下步骤:获取接口配置数据对应的数据格式;当数据格式为预设格式时,将接口配置数据保存为数据库中的一条接口配置数据记录;及当数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至终端。In some embodiments, before the interface configuration data is saved as an interface configuration data record in the database, the computer-readable instructions when executed by the processor further implement the following steps: obtain the data format corresponding to the interface configuration data; when the data format is When the format is preset, the interface configuration data is saved as an interface configuration data record in the database; and when the data format is not a preset format, a format modification reminder message is generated, and the format modification reminder message is sent to the terminal.
在一些实施例中,在将接口配置数据保存至数据库之后,计算机可读指令被处理器执行时还实现以下步骤:接收终端发送的查询请求,查询请求中携带查询接口名;遍历数据库,从数据库中查询配置接口名字段与查询接口名相匹配的接口配置数据记录;向终端返回所查询到的接口配置数据记录;接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及当查询到的用户权限符合预设条件时,根据修改请求对应的修改数据更新数据库。In some embodiments, after the interface configuration data is saved in the database, when the computer-readable instructions are executed by the processor, the following steps are also implemented: receiving a query request sent by the terminal, the query request carrying the query interface name; traversing the database, from the database The query configuration interface name field matches the interface configuration data record in the query interface name; returns the queried interface configuration data record to the terminal; receives the terminal’s request for modification of the queried interface configuration data record, according to the modification request carried The user ID inquires the corresponding user authority; and when the queried user authority meets the preset conditions, the database is updated according to the modification data corresponding to the modification request.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可 读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing relevant hardware through computer-readable instructions, which can be stored in a non-volatile computer. In a readable storage medium, when the computer-readable instructions are executed, they may include the processes of the above-mentioned method embodiments. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and/or volatile memory. Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not a limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be 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 between the combinations of these technical features, they should 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 simulation method, including:
    获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;Obtain the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes a configuration interface name field, a request parameter field, and a return parameter field;
    接收终端发送的对所述待模拟接口的接口模拟请求;Receiving an interface simulation request for the to-be-simulated interface sent by the terminal;
    对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;Parsing the received interface simulation request to obtain the first target interface name and target request parameters;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及Determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and
    将所述第一目标返回参数发送至终端。Send the first target return parameter to the terminal.
  2. 根据权利要求1所述的方法,其特征在于,所述接口配置数据记录中还包括依赖接口名字段;在所述将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数之后,所述方法还包括:The method according to claim 1, wherein the interface configuration data record further includes a dependent interface name field; in the determining that the returned parameter field in the queried interface configuration data record is the interface simulation After requesting the corresponding first target to return parameters, the method further includes:
    将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;Determine the dependent interface name field in the queried interface configuration data record as the second target interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第二目标接口名及所述目标请求参数相匹配的接口配置数据记录;及Traversing the database, and querying the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the second target interface name and the target request parameter; and
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第二目标返回参数;Determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request;
    所述将所述第一目标返回参数发送至终端,包括:The sending the first target return parameter to the terminal includes:
    将所述第一目标返回参数及所述第二目标返回参数发送至终端。The first target return parameter and the second target return parameter are sent to the terminal.
  3. 根据权利要求1所述的方法,其特征在于,所述获取待模拟接口对应的接口配置数据,包括:The method according to claim 1, wherein said obtaining interface configuration data corresponding to the interface to be simulated comprises:
    接收终端发送的接口配置数据,所述接口配置数据为所述终端通过可视化配置界面获取的数据。Receive interface configuration data sent by the terminal, where the interface configuration data is data obtained by the terminal through a visual configuration interface.
  4. 根据权利要求3所述的方法,其特征在于,所述可视化配置界面中包括自定义配置框,所述自定义配置框用于对接口进行自定义数据配置。The method according to claim 3, wherein the visual configuration interface includes a custom configuration box, and the custom configuration box is used for custom data configuration of the interface.
  5. 根据权利要求1至4任意一项所述的方法,其特征在于,在将所述接口配置数据保存为数据库中的一条接口配置数据记录之前,所述方法还包括:The method according to any one of claims 1 to 4, characterized in that, before saving the interface configuration data as an interface configuration data record in a database, the method further comprises:
    获取所述接口配置数据对应的数据格式;Acquiring the data format corresponding to the interface configuration data;
    所述将所述接口配置数据保存为数据库中的一条接口配置数据记录,包括:The saving the interface configuration data as an interface configuration data record in a database includes:
    当所述数据格式为预设格式时,将所述接口配置数据保存为数据库中的一条接口配置数据记录;及When the data format is a preset format, saving the interface configuration data as an interface configuration data record in the database; and
    当所述数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至所述终端。When the data format is not a preset format, a format modification reminder message is generated, and the format modification reminder message is sent to the terminal.
  6. 根据权利要求1所述的方法,其特征在于,在将所述接口配置数据保存至数据库之后,所述方法还包括:The method according to claim 1, wherein after saving the interface configuration data to a database, the method further comprises:
    接收终端发送的查询请求,所述查询请求中携带查询接口名;Receiving a query request sent by the terminal, the query request carrying a query interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段与所述查询接口名相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records whose configuration interface name field matches the query interface name;
    向终端返回所查询到的接口配置数据记录;Return the queried interface configuration data record to the terminal;
    接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及Receiving a modification request from the terminal to the queried interface configuration data record, and querying the corresponding user authority according to the user identifier carried in the modification request; and
    当查询到的用户权限符合预设条件时,根据所述修改请求对应的修改数据更新所述数据库。When the queried user authority meets the preset condition, the database is updated according to the modification data corresponding to the modification request.
  7. 根据权利要求1所述的方法,其特征在于,还包括:The method according to claim 1, further comprising:
    当所述数据库中不存在配置接口名字段和请求参数字段与所述第一目标 接口名和所述目标请求参数匹配的接口配置数据记录时,向终端发送错误提示信息。When there is no interface configuration data record in which the configuration interface name field and the request parameter field match the first target interface name and the target request parameter in the database, an error prompt message is sent to the terminal.
  8. 一种接口模拟装置,包括:An interface simulation device, including:
    接口配置数据获取模块,用于获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;The interface configuration data acquisition module is used to acquire the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes the configuration interface name field and request parameters Fields and return parameter fields;
    接口模拟请求接收模块,用于接收终端发送的对所述待模拟接口的接口模拟请求;An interface simulation request receiving module, configured to receive an interface simulation request sent by the terminal for the interface to be simulated;
    解析模块,用于对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;The parsing module is used to analyze the received interface simulation request to obtain the first target interface name and target request parameters;
    查询模块,用于遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;A query module, configured to traverse the database, and query the interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
    第一目标返回参数确定模块,用于将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及The first target return parameter determination module is configured to determine the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and
    发送模块,用于将所述第一目标返回参数发送至终端。The sending module is used to send the first target return parameter to the terminal.
  9. 根据权利要求8所述的装置,其特征在于,所述接口配置数据记录中还包括依赖接口名字段;所述装置还包括:The device according to claim 8, wherein the interface configuration data record further includes a dependent interface name field; the device further comprises:
    第二目标返回参数确定模块,用于将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第二目标接口名及所述目标请求参数相匹配的接口配置数据记录;将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第二目标返回参数;及The second target return parameter determination module is used to determine the dependent interface name field in the queried interface configuration data record as the second target interface name; traverse the database, query the configuration interface name field and request from the database Interface configuration data records whose parameter fields respectively match the second target interface name and the target request parameters; determine the return parameter field in the queried interface configuration data record as the second corresponding to the interface simulation request Target return parameters; and
    所述发送模块还用于将所述第一目标返回参数及所述第二目标返回参数发送至终端。The sending module is further configured to send the first target return parameter and the second target return parameter to the terminal.
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the one or more Each processor performs the following steps:
    获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;Obtain the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes a configuration interface name field, a request parameter field, and a return parameter field;
    接收终端发送的对所述待模拟接口的接口模拟请求;Receiving an interface simulation request for the to-be-simulated interface sent by the terminal;
    对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;Parsing the received interface simulation request to obtain the first target interface name and target request parameters;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及Determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and
    将所述第一目标返回参数发送至终端。Send the first target return parameter to the terminal.
  11. 根据权利要求10所述的计算机设备,其特征在于,所述接口配置数据记录中还包括依赖接口名字段;所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the interface configuration data record further includes a dependent interface name field; the processor further executes the following steps when executing the computer-readable instruction:
    将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;Determine the dependent interface name field in the queried interface configuration data record as the second target interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第二目标接口名及所述目标请求参数相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the second target interface name and the target request parameter;
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第二目标返回参数;及Determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and
    将所述第一目标返回参数及所述第二目标返回参数发送至终端。The first target return parameter and the second target return parameter are sent to the terminal.
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行 所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    接收终端发送的接口配置数据,所述接口配置数据为所述终端通过可视化配置界面获取的数据。Receive interface configuration data sent by the terminal, where the interface configuration data is data obtained by the terminal through a visual configuration interface.
  13. 根据权利要求10至12中任意一项所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to any one of claims 10 to 12, wherein the processor further executes the following steps when executing the computer-readable instruction:
    获取所述接口配置数据对应的数据格式;Acquiring the data format corresponding to the interface configuration data;
    当所述数据格式为预设格式时,将所述接口配置数据保存为数据库中的一条接口配置数据记录;及When the data format is a preset format, saving the interface configuration data as an interface configuration data record in the database; and
    当所述数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至所述终端。When the data format is not a preset format, a format modification reminder message is generated, and the format modification reminder message is sent to the terminal.
  14. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    接收终端发送的查询请求,所述查询请求中携带查询接口名;Receiving a query request sent by the terminal, the query request carrying a query interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段与所述查询接口名相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records whose configuration interface name field matches the query interface name;
    向终端返回所查询到的接口配置数据记录;Return the queried interface configuration data record to the terminal;
    接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及Receiving a modification request from the terminal to the queried interface configuration data record, and querying the corresponding user authority according to the user identifier carried in the modification request; and
    当查询到的用户权限符合预设条件时,根据所述修改请求对应的修改数据更新所述数据库。When the queried user authority meets the preset condition, the database is updated according to the modification data corresponding to the modification request.
  15. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:The computer device according to claim 10, wherein the processor further executes the following steps when executing the computer-readable instruction:
    当所述数据库中不存在配置接口名字段和请求参数字段与所述第一目标接口名和所述目标请求参数匹配的接口配置数据记录时,向终端发送错误提示信息。When there is no interface configuration data record in which the configuration interface name field and the request parameter field match the first target interface name and the target request parameter in the database, an error prompt message is sent to the terminal.
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质, 所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤: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:
    获取待模拟接口对应的接口配置数据,将所述接口配置数据保存为数据库中的一条接口配置数据记录,所述接口配置数据记录中包括配置接口名字段、请求参数字段及返回参数字段;Obtain the interface configuration data corresponding to the interface to be simulated, and save the interface configuration data as an interface configuration data record in the database. The interface configuration data record includes a configuration interface name field, a request parameter field, and a return parameter field;
    接收终端发送的对所述待模拟接口的接口模拟请求;Receiving an interface simulation request for the to-be-simulated interface sent by the terminal;
    对接收到的所述接口模拟请求进行解析,以获取第一目标接口名及目标请求参数;Parsing the received interface simulation request to obtain the first target interface name and target request parameters;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第一目标接口名及所述目标请求参数相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the first target interface name and the target request parameter;
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第一目标返回参数;及Determining the return parameter field in the queried interface configuration data record as the first target return parameter corresponding to the interface simulation request; and
    将所述第一目标返回参数发送至终端。Send the first target return parameter to the terminal.
  17. 根据权利要求16所述的存储介质,其特征在于,所述接口配置数据记录中还包括依赖接口名字段;所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the interface configuration data record further includes a dependent interface name field; the following steps are further performed when the computer-readable instruction is executed by the processor:
    将所查询到的接口配置数据记录中的依赖接口名字段确定为第二目标接口名;Determine the dependent interface name field in the queried interface configuration data record as the second target interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段及请求参数字段分别与所述第二目标接口名及所述目标请求参数相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records in which the configuration interface name field and the request parameter field respectively match the second target interface name and the target request parameter;
    将所查询到的接口配置数据记录中的返回参数字段确定为所述接口模拟请求对应的第二目标返回参数;及Determining the return parameter field in the queried interface configuration data record as the second target return parameter corresponding to the interface simulation request; and
    将所述第一目标返回参数及所述第二目标返回参数发送至终端。The first target return parameter and the second target return parameter are sent to the terminal.
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    接收终端发送的接口配置数据,所述接口配置数据为所述终端通过可视化配置界面获取的数据。Receive interface configuration data sent by the terminal, where the interface configuration data is data obtained by the terminal through a visual configuration interface.
  19. 根据权利要求16至18中任意一项所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to any one of claims 16 to 18, wherein the following steps are further performed when the computer-readable instructions are executed by the processor:
    获取所述接口配置数据对应的数据格式;Acquiring the data format corresponding to the interface configuration data;
    当所述数据格式为预设格式时,将所述接口配置数据保存为数据库中的一条接口配置数据记录;及When the data format is a preset format, saving the interface configuration data as an interface configuration data record in the database; and
    当所述数据格式不是预设格式时,生成格式修改提醒信息,将格式修改提醒信息发送至所述终端。When the data format is not a preset format, a format modification reminder message is generated, and the format modification reminder message is sent to the terminal.
  20. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:The storage medium according to claim 16, wherein the following steps are further executed when the computer-readable instructions are executed by the processor:
    接收终端发送的查询请求,所述查询请求中携带查询接口名;Receiving a query request sent by the terminal, the query request carrying a query interface name;
    遍历所述数据库,从所述数据库中查询配置接口名字段与所述查询接口名相匹配的接口配置数据记录;Traverse the database, and query the database for interface configuration data records whose configuration interface name field matches the query interface name;
    向终端返回所查询到的接口配置数据记录;Return the queried interface configuration data record to the terminal;
    接收终端对所查询到的接口配置数据记录的修改请求,根据修改请求中携带的用户标识查询对应的用户权限;及Receiving a modification request from the terminal to the queried interface configuration data record, and querying the corresponding user authority according to the user identifier carried in the modification request; and
    当查询到的用户权限符合预设条件时,根据所述修改请求对应的修改数据更新所述数据库。When the queried user authority meets the preset condition, the database is updated according to the modification data corresponding to the modification request.
PCT/CN2019/118071 2019-03-25 2019-11-13 Method and device for simulating interface, computer apparatus, and storage medium WO2020192141A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910228302.7A CN110109656A (en) 2019-03-25 2019-03-25 Interface analogy method, device, computer equipment and storage medium
CN201910228302.7 2019-03-25

Publications (1)

Publication Number Publication Date
WO2020192141A1 true WO2020192141A1 (en) 2020-10-01

Family

ID=67484566

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118071 WO2020192141A1 (en) 2019-03-25 2019-11-13 Method and device for simulating interface, computer apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN110109656A (en)
WO (1) WO2020192141A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110109656A (en) * 2019-03-25 2019-08-09 平安科技(深圳)有限公司 Interface analogy method, device, computer equipment and storage medium
CN110955712A (en) * 2019-11-26 2020-04-03 北京天元创新科技有限公司 Development API processing method and device based on multiple data sources
CN111352610A (en) * 2020-03-03 2020-06-30 五八有限公司 Interface return value modification method and device, electronic equipment and storage medium
CN112035282B (en) * 2020-09-01 2023-07-25 北京百度网讯科技有限公司 API management method, device and equipment applied to cloud platform and storage medium
CN113779468A (en) * 2021-01-15 2021-12-10 北京沃东天骏信息技术有限公司 Method and device for processing page interface data
CN112925803A (en) * 2021-04-09 2021-06-08 泰康保险集团股份有限公司 Data processing method and device of interface

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment
CN108268570A (en) * 2017-01-04 2018-07-10 武汉斗鱼网络科技有限公司 A kind of method and device of development interface
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium
CN109446063A (en) * 2018-09-18 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, device, computer equipment and storage medium
CN110109656A (en) * 2019-03-25 2019-08-09 平安科技(深圳)有限公司 Interface analogy method, device, computer equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104881343B (en) * 2014-02-27 2017-03-15 北京京东尚科信息技术有限公司 A kind of method of testing and test system
CN106155891B (en) * 2015-04-02 2019-07-05 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN108427631B (en) * 2017-02-14 2022-04-12 北京京东尚科信息技术有限公司 Application test system, method, electronic equipment and readable storage medium
CN108268253B (en) * 2017-05-05 2020-01-03 平安科技(深圳)有限公司 Interface code generation method and terminal equipment
CN107480053B (en) * 2017-07-21 2021-08-17 销冠网络科技有限公司 Software test data generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268570A (en) * 2017-01-04 2018-07-10 武汉斗鱼网络科技有限公司 A kind of method and device of development interface
CN108255905A (en) * 2017-05-04 2018-07-06 平安科技(深圳)有限公司 Interface calls data processing method, device and computer equipment
CN108804336A (en) * 2018-06-15 2018-11-13 深圳壹账通智能科技有限公司 Interactive system test method, device, computer equipment and storage medium
CN109446063A (en) * 2018-09-18 2019-03-08 深圳壹账通智能科技有限公司 Interface test method, device, computer equipment and storage medium
CN110109656A (en) * 2019-03-25 2019-08-09 平安科技(深圳)有限公司 Interface analogy method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110109656A (en) 2019-08-09

Similar Documents

Publication Publication Date Title
WO2020192141A1 (en) Method and device for simulating interface, computer apparatus, and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
WO2020151333A1 (en) Page loading method, apparatus, computer device and storage medium
US11537606B2 (en) Solution for implementing computing service based on structured query language statement
WO2021164161A1 (en) Image data labeling method and apparatus, and computer device and storage medium
WO2020192134A1 (en) Exception handling method and apparatus based on spring mvc, and computer device and storage medium
WO2021217846A1 (en) Interface data processing method and apparatus, and computer device and storage medium
TW201439792A (en) System and method for accessing database
US10795882B2 (en) Blockchain-based data compression and searching
CN111309593A (en) JSON interface verification method, device and equipment and computer readable storage medium
WO2019037418A1 (en) Code management method and apparatus, computer device and computer-readable storage medium
CN109190353B (en) Method and computing device for automatically generating certificate document
WO2022001625A1 (en) Data query method and apparatus, computer device, and storage medium
US10289620B1 (en) Reporting and data governance management
CN115599359A (en) Code generation method, device, equipment and medium
CN112214456B (en) House property data processing method and device and electronic equipment
WO2021036681A1 (en) Data verification method and apparatus, computer device and storage medium
CN111522881A (en) Service data processing method, device, server and storage medium
US10318524B2 (en) Reporting and data governance management
CN108196921B (en) Document development method and device, computer equipment and storage medium
CA3151209A1 (en) Data enquiring method, device, computer equipment and storage medium
CN111897728B (en) Interface debugging method and related equipment
CN105989021A (en) Document processing method and device
CN108984543B (en) Data processing method and equipment

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

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

122 Ep: pct application non-entry in european phase

Ref document number: 19921151

Country of ref document: EP

Kind code of ref document: A1