A method and device for processing data
By automatically entering interface data and response data, the interface type is identified and authenticated, which solves the problem of low data entry efficiency in the interface management platform, improves efficiency and accuracy, and reduces development costs.
Patent Information
- Application Number
- CN202011280281.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-16
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-11-16
AI Technical Summary
The existing interface management platform is inefficient and prone to errors during the data entry process, which increases the workload and cost of developers.
By obtaining the interface data and response data of the interface to be configured, the interface type is identified and authenticated, and the interface data and response data are automatically entered to avoid repeated configuration and manual errors.
It improves data entry efficiency, reduces errors, simplifies the interface management process, and reduces labor costs.
Smart Images

Figure CN112416419B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data processing method and a data processing device. Background Art
[0002] For the interface management platform, developers, product developers, and testers can create, publish, and maintain http interfaces on the interface management platform. Developers only need to use the interface data writing tool provided by the platform and simple click operations to manage the interface. However, in the current interface management process, developers need to manually input each interface data, which easily increases unnecessary operation processes and time, and increases the labor cost of developers, greatly reducing the efficiency of interface management. Summary of the invention
[0003] The embodiment of the present invention provides a data processing method to solve the problem in the prior art that interface data entry is inefficient, prone to errors, and unfavorable for interface management.
[0004] Correspondingly, an embodiment of the present invention further provides a data processing device to ensure the implementation and application of the above method.
[0005] In order to solve the above problem, an embodiment of the present invention discloses a data processing method, including:
[0006] Get the interface data of the interface to be configured;
[0007] If the interface to be configured is a target interface, acquiring account information for the interface to be configured, and the target interface is a historically configured interface;
[0008] If the interface type of the interface to be configured is a target type, then when the account information authentication is successful, the first response data matching the interface data is obtained, and the interface data and the first response data are entered, and the target type is an interface type that supports information setting.
[0009] Optionally, when the account information authentication is successful, obtaining response data matching the interface data, and entering the interface data and the response data, includes:
[0010] When the account information authentication is successful, the interface data is entered in response to a user operation on a preset interface data entry control;
[0011] Acquire first response data matching the interface data, and enter the first response data.
[0012] Optionally, it also includes:
[0013] If the interface to be configured is not the target interface, responding to the preset interface data entry control to enter the interface data;
[0014] The response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data.
[0015] Optionally, the response acts on a preset interface data entry control to enter the interface data, including:
[0016] In response to acting on a preset interface data entry control, the interface data is converted into a data format to obtain target interface data;
[0017] Enter the target interface data.
[0018] Optionally, the response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data, including:
[0019] In response to acting on a preset response data entry control, second response data matching the interface data is obtained;
[0020] The second response data is converted into a data format to obtain target response data, and the target response data is entered.
[0021] Optionally, the data format of the interface data and the second response data includes at least one of a JSON format and a URL format.
[0022] Optionally, the interface data includes interface information and request parameters, the interface information includes at least interface name, interface address, request type, interface status code and a first introduction; the request parameters include at least parameter name, parameter type, a first initial value and a second introduction; the first response data includes at least data name, data type, a second initial value and a third introduction.
[0023] The embodiment of the present invention further discloses a data processing device, including:
[0024] An interface data acquisition module, used to acquire interface data of the interface to be configured;
[0025] An account information acquisition module, used for acquiring account information for the interface to be configured if the interface to be configured is a target interface, and the target interface is a historically configured interface;
[0026] The first data entry module is used to obtain first response data matching the interface data and enter the interface data and the first response data if the interface type of the interface to be configured is a target type and when the account information authentication is successful, the target type is an interface type that supports information setting.
[0027] Optionally, the first data entry module is specifically used for:
[0028] When the account information authentication is successful, the interface data is entered in response to a user operation on a preset interface data entry control;
[0029] Acquire first response data matching the interface data, and enter the first response data.
[0030] Optionally, it also includes:
[0031] A first interface data entry module, configured to enter the interface data in response to acting on a preset interface data entry control if the interface to be configured is not the target interface;
[0032] The second data entry module is used to respond to the preset response data entry control, obtain the second response data matching the interface data, and enter the second response data.
[0033] Optionally, the first interface data entry module is specifically used for:
[0034] In response to acting on a preset interface data entry control, the interface data is converted into a data format to obtain target interface data;
[0035] Enter the target interface data.
[0036] Optionally, the second data entry module is specifically used for:
[0037] In response to acting on a preset response data entry control, second response data matching the interface data is obtained;
[0038] The second response data is converted into a data format to obtain target response data, and the target response data is entered.
[0039] Optionally, the data format of the interface data and the second response data includes at least one of a JSON format and a URL format.
[0040] Optionally, the interface data includes interface information and request parameters, the interface information includes at least interface name, interface address, request type, interface status code and a first introduction; the request parameters include at least parameter name, parameter type, a first initial value and a second introduction; the first response data includes at least data name, data type, a second initial value and a third introduction.
[0041] The embodiment of the present invention further discloses an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0042] The memory is used to store computer programs;
[0043] The processor is used to implement the above-mentioned method steps when executing the program stored in the memory.
[0044] The embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0045] The embodiments of the present invention include the following advantages:
[0046] In an embodiment of the present invention, by obtaining interface data of the interface to be configured, if the interface to be configured is a target interface, account information for the interface to be configured is obtained, and the target interface is a historical configuration interface. Then, if the interface type of the interface to be configured is a target type, when the account information authentication is successful, first response data matching the interface data is obtained, and the interface data and the first response data are entered to complete the configuration of the interface to be configured, wherein the target type is an interface type that supports information settings, so that when it is detected that the interface to be configured is a historical configuration interface, it indicates that the interface to be configured is an existing interface, and response data matching the interface data can be automatically obtained according to the interface type of the existing interface, and the interface data and the response data are entered in different ways, thereby avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of steps of an embodiment of a data processing method of the present invention;
[0048] Figure 2 It is a flow chart of steps of an embodiment of a data processing method of the present invention;
[0049] Figure 3 is a schematic diagram of interface configuration in an embodiment of the present invention;
[0050] Figure 4 is a structural block diagram of an embodiment of a data processing device of the present invention;
[0051] Figure 5 It is a block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0053] For the interface management platform, developers, product and testers can create, publish and maintain http interfaces on the interface management platform. Developers only need to use the interface data writing tool provided by the platform and simple click operations to manage the interface. Among them:
[0054] The interface mock is the data that the server responds to when simulating the request interface;
[0055] The interface information is information describing the interface, which may include the interface name, interface address, request type, interface status code, and introduction;
[0056] Request parameters can be data that needs to be passed to the server when requesting an interface, and can include parameter name, whether it is a required parameter, parameter type, initial value, and introduction;
[0057] The response data may be the data that the server responds to when requesting the interface, and may include the data name, whether it is a required parameter, data type, initial value, and introduction.
[0058] For the interface management platform, it can be used to record interface information, request parameters, response data, and interface mock rules, thereby facilitating unified management and multi-person sharing of interface information.
[0059] In the current interface management process, for the processing of each interface data, developers are required to manually enter each piece of data, which not only easily increases unnecessary operation processes and time, but also makes data entry very inefficient.
[0060] Therefore, one of the core inventive points of the embodiment of the present invention is to identify the interface to be configured after obtaining the interface data of the interface to be configured and the response data matching the interface data. If it is an existing interface, further authentication is performed, and after the authentication is successful, the interface data and response data are automatically entered, thereby avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface.
[0061] Reference Figure 1 , shows a flowchart of a data processing method embodiment of the present invention, which may specifically include the following steps:
[0062] Step 101, obtaining interface data of the interface to be configured;
[0063] In the embodiment of the present invention, for different http interfaces (the following interfaces), developers can configure interface data and response data to determine the interface function of the http interface. The interface data may include interface information and request parameters. By splicing the interface data and request parameters, the data entry process is simplified and the data entry efficiency is improved in the subsequent data entry process.
[0064] In a specific implementation, the interface information can be used to define the interface, the request parameters can be used to describe the data transmitted to the server when requesting the interface, and the response data can be used to describe the data responded by the server when requesting the interface, so that the user can obtain the corresponding data through the configured interface. Specifically, after inputting the interface data in the interface management system, it can be determined what method is needed to input the response data later, such as manual input or automatic input, etc. Different methods can be used to input the response data for different interfaces to be configured.
[0065] In one example, the interface information may include interface name, interface address, request type, interface status code, and introduction, for example, interface name: "Get a list of used car posts", interface address: "http: / / cheapi.11.com / getCarList?cityId=1&price=10_20", request type: "GET", interface status code: "200", introduction: "Get a list of used car posts", etc., wherein the interface information can be spliced with the request parameters to simplify the subsequent data entry process; the response data can be data corresponding to the interface data, so as to establish a mapping relationship between the interface data and the response data, so as to configure the corresponding interface in the interface management system, so that the user can obtain the corresponding data through the configured interface.
[0066] Step 102, if the interface to be configured is a target interface, then obtaining account information for the interface to be configured, and the target interface is a historically configured interface;
[0067] In an embodiment of the present invention, developers can configure interface data in an interface management system, where the interface management system can be an application running on a terminal device, etc., which can provide users with different controls so that users can enter different data to implement interface configuration.
[0068] In a specific implementation, for the interface to be configured, it can include a historical configuration interface that has previously entered data, and a new interface that is being developed and entering data for the first time. For different interfaces to be configured, data can be entered in different ways to complete the configuration of the interface. Specifically, after the interface management system obtains the interface data and response data input by the developer, it can first identify the interface to be configured and determine what type of interface it belongs to. If the interface to be configured is the target interface, that is, the interface to be configured is a historical configuration interface, the account information for the interface to be configured can be obtained, so that the interface data and response data of the interface to be configured can be processed according to the account information. Among them, the account information can be the account information entered by the developer when entering the interface data and response data, such as a test account cookie, etc., and the present invention does not limit this.
[0069] Step 103, if the interface type of the interface to be configured is a target type, then when the account information authentication is successful, obtain the first response data matching the interface data, and enter the interface data and the first response data, and the target type is the interface type set by the support information.
[0070] In an embodiment of the present invention, if it is determined that the interface to be configured is a historical configuration interface, it means that there is no need to input each interface data and response data of the interface to be configured one by one. The first response data matching the interface data can be obtained, and the response data can be automatically entered in an automatic input manner, thereby avoiding repeated configuration of existing interfaces and improving the efficiency of data entry.
[0071] In a specific implementation, for an interface, according to the interface type, it can be divided into different types of interfaces such as interfaces supporting information setting and interfaces supporting information browsing. Among them, for interfaces supporting information setting, users can set relevant information through this type of interface. At the same time, for the configuration of this type of interface, it is often necessary to log in and verify the relevant authentication. After the authentication is completed, relevant information can be set through the interface; for interfaces supporting information browsing, users can browse relevant information through the interface, such as browsing the relevant interface of second-hand car posts, etc. Specifically, when it is determined that the interface to be configured belongs to the historical configuration interface, its interface type can be further identified. If the interface to be configured is an interface type that supports information setting, the account information can be authenticated, and after the authentication is successful, the first response data matching the interface data is obtained, and the interface data and response data of the interface to be configured are automatically entered into the interface management system to complete the configuration of the interface to be configured, thereby avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface.
[0072] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that under the guidance of the ideas of the embodiments of the present invention, those skilled in the art can make settings according to actual conditions, and the present invention is not limited to this.
[0073] In an embodiment of the present invention, by obtaining interface data of the interface to be configured, if the interface to be configured is a target interface, account information for the interface to be configured is obtained, and the target interface is a historical configuration interface. Then, if the interface type of the interface to be configured is a target type, when the account information authentication is successful, first response data matching the interface data is obtained, and the interface data and the first response data are entered to complete the configuration of the interface to be configured, wherein the target type is an interface type that supports information settings, so that when it is detected that the interface to be configured is a historical configuration interface, it indicates that the interface to be configured is an existing interface, and response data matching the interface data can be automatically obtained according to the interface type of the existing interface, and the interface data and the response data are entered in different ways, thereby avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface.
[0074] Reference Figure 2 , shows a flowchart of a data processing method embodiment of the present invention, which may specifically include the following steps:
[0075] Step 201, obtaining interface data of the interface to be configured;
[0076] As an example, developers can input the relevant data of the interface in the operation interface provided by the interface management system, where the interface data can include interface information and request parameters, and the request parameters can include data in data formats such as json format and URL format. Specifically, after inputting the interface data in the interface management system, it can be determined what method is needed to input the response data later, such as manual input or automatic input, etc. Different methods can be used to input the response data for different interfaces to be configured.
[0077] Step 202: if the interface to be configured is a target interface, then obtain account information for the interface to be configured, and the target interface is a historically configured interface;
[0078] In a specific implementation, the interface to be configured may include a historical configuration interface that has previously entered data, and a new interface that is being developed and entering data for the first time. For different interfaces to be configured, data may be entered in different ways to complete the configuration of the interface. Specifically, after the interface management system obtains the interface data and response data input by the developer, it may first identify the interface to be configured and determine what type of interface it belongs to. If the interface to be configured is the target interface, that is, the interface to be configured is a historical configuration interface, the account information for the interface to be configured may be obtained so that the interface data and response data of the interface to be configured may be processed according to the account information.
[0079] Among them, the interface management system can provide an interface data entry control and a response data entry control. If the interface to be configured is not the target interface, the response acts on the preset interface data entry control to enter the interface data, and the response acts on the preset response data entry control to obtain the second response data matching the interface data, and enter the second response data. Specifically, if the interface to be configured is not a historical configuration interface, the developer is required to manually enter the response data through the interface management system, that is, the developer can first input the interface data through the interface data entry control, and the interface management system recognizes that the corresponding interface to be configured is a new interface under development, and the developer is required to input the response data. The developer can manually input the second response data matching the interface data through the response data entry control, so that the interface management system can enter and store the interface data and the second response data.
[0080] In an optional embodiment of the present invention, the interface management system can respond to a preset interface data entry control, convert the interface data format, obtain target interface data, and enter the target interface data, and respond to a preset response data entry control, convert the response data format, obtain target response data, and enter the target response data.
[0081] In a specific implementation, the interface data and response data may include data in data formats such as json format and URL format. The interface management system can automatically convert these data formats during the input process and store them in the system database to achieve the purpose of fast input. Among them, developers can input interface data in different data formats. For example, request parameters in json format may include {"key1":"val1","key2":"val2"}; request parameters in URL (search) format may include key1=val1&key2=val2; response data in json format may include: {"status":"0","data":"success"}, and developers can also adjust individual request parameters or response data information according to business needs, such as adding mock rules, supplementing introductions, etc.
[0082] Step 203, if the interface type of the interface to be configured is a target type, then when the account information authentication is successful, in response to the user operation acting on the preset interface data entry control, the interface data is entered, and the target type is an interface type that supports information setting;
[0083] Step 204: Acquire first response data matching the interface data, and enter the first response data.
[0084] In the specific implementation, for the interface, it can be divided into different types of interfaces according to the interface type, such as interfaces that support information setting and interfaces that support information browsing. Among them, for the interface that supports information setting, the user can set the relevant information through this type of interface. At the same time, for the configuration of this type of interface, it is often necessary to log in and verify the relevant authentication. After the authentication is completed, the relevant information can be set through the interface; for the interface that supports information browsing, the user can browse the relevant information through the interface, such as the relevant interface for browsing used car posts.
[0085] Specifically, when it is determined that the interface to be configured belongs to a historical configuration interface, its interface type can be further identified. If the interface to be configured is an interface type that supports information setting, the account information can be authenticated. After the authentication is successful, the first response data matching the interface data can be obtained, and the interface data and response data of the interface to be configured are automatically entered into the interface management system to complete the configuration of the interface to be configured, thereby avoiding repeated configuration of existing interfaces, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface.
[0086] In one example, the interface management system identifies that the interface to be configured is a historical configuration interface according to the interface data input by the developer, that is, the interface data of the interface has been entered in advance, and then it can be determined whether account authentication is required according to the interface type of the interface to be configured. If authentication is required, after the authentication is successful, the second response data corresponding to the interface data is obtained, and the request parameters and the second response data in the interface data are described using corresponding fields (including converting the request parameters and response data in json or URL data format into corresponding fields), and then these fields are stored in the database of the interface management system and associated with the interface information, so as to complete the configuration of the interface, and then when it is detected that the interface to be configured is a historical configuration interface, it indicates that the interface to be configured is an existing interface, and the interface data and response data can be entered in different ways according to the interface type of the existing interface, avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through automatic entry, thereby ensuring the management of the interface. Optionally, the database can be a relational database such as mysql database, and the present invention is not limited to this.
[0087] It should be noted that the embodiments of the present invention include but are not limited to the above examples. It is understandable that under the guidance of the ideas of the embodiments of the present invention, those skilled in the art can make settings according to actual conditions, and the present invention is not limited to this.
[0088] In an embodiment of the present invention, by obtaining interface data of the interface to be configured and response data matching the interface data, if the interface to be configured is a target interface, account information for the interface to be configured is obtained, and the target interface is a historical configuration interface. Then, if the interface type of the interface to be configured is a target type, when the account information authentication is successful, the interface data and response data are entered to complete the configuration of the interface to be configured, wherein the target type is an interface type that supports information settings, so that when it is detected that the interface to be configured is a historical configuration interface, it indicates that the interface to be configured is an existing interface, and the interface data and response data can be entered in different ways according to the interface type of the existing interface, thereby avoiding repeated configuration of the existing interface and improving the efficiency of data entry. In addition, data entry errors are avoided through automatic entry, thereby ensuring the management of the interface.
[0089] In order to enable those skilled in the art to better understand the embodiments of the present invention, the embodiments of the present invention are described below by using an example:
[0090] refer to Figure 3, showing a schematic diagram of the interface configuration in an embodiment of the present invention, the user can enter the interface information and the URL search format request parameters when entering the relevant data of the existing interface (i.e., the historical configuration interface), wherein the interface information and the request parameters can be spliced to simplify the data entry process and improve the data entry efficiency in the subsequent data entry process. For the entry of response data of the existing interface, it can be determined whether the account needs to be authenticated according to the interface type. If the existing interface is an interface that supports information setting, the cookie account entered by the user is authenticated. After the authentication is successful, the interface management system can simulate the interface address entered by the requesting user and obtain the corresponding response data. Specifically, the interface management system can first store the interface information in a database, and then after simulating the request interface to obtain the response data, convert the request parameters and response data into data formats to obtain the request parameters and response data of the corresponding fields, and then save these fields in the database and associate them with the interface information to complete the configuration of the interface. When it is detected that the interface to be configured is a historical configuration interface, it indicates that the interface to be configured is an existing interface. According to the interface type of the existing interface, the interface data and response data can be entered in different ways, thereby avoiding repeated configuration of the existing interface and improving the efficiency of data entry. In addition, data entry errors can be avoided through automatic entry, thereby ensuring the management of the interface.
[0091] For a new interface under development, the developer needs to manually enter the response data through the interface management system, that is, the developer can first input the interface data through the interface data entry control, and the interface management system recognizes that the corresponding interface to be configured is a new interface under development, and the developer needs to input the response data. The developer can manually input the second response data that matches the interface data through the response data entry control, so that the interface management system can enter and store the interface data and the second response data.
[0092] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0093] Reference Figure 4 , shows a structural block diagram of an embodiment of a data processing device of the present invention, which may specifically include the following modules:
[0094] The interface data acquisition module 401 is used to acquire the interface data of the interface to be configured;
[0095] An account information acquisition module 402 is used to acquire account information for the interface to be configured if the interface to be configured is a target interface, and the target interface is a historically configured interface;
[0096] The first data entry module 403 is used to obtain first response data matching the interface data and enter the interface data and the first response data if the interface type of the interface to be configured is a target type and when the account information authentication is successful, the target type is an interface type that supports information settings.
[0097] In an optional embodiment of the present invention, the first data entry module 403 is specifically used for:
[0098] When the account information authentication is successful, the interface data is entered in response to a user operation on a preset interface data entry control;
[0099] Acquire first response data matching the interface data, and enter the first response data.
[0100] In an optional embodiment of the present invention, it also includes:
[0101] A first interface data entry module, configured to enter the interface data in response to acting on a preset interface data entry control if the interface to be configured is not the target interface;
[0102] The second data entry module is used to respond to the preset response data entry control, obtain the second response data matching the interface data, and enter the second response data.
[0103] In an optional embodiment of the present invention, the first interface data entry module is specifically used for:
[0104] In response to acting on a preset interface data entry control, the interface data is converted into a data format to obtain target interface data;
[0105] Enter the target interface data.
[0106] In an optional embodiment of the present invention, the second data entry module is specifically used for:
[0107] In response to acting on a preset response data entry control, second response data matching the interface data is obtained;
[0108] The second response data is converted into a data format to obtain target response data, and the target response data is entered.
[0109] In an optional embodiment of the present invention, the data format of the interface data and the second response data includes at least one of a JSON format and a URL format.
[0110] In an optional embodiment of the present invention, the interface data includes interface information and request parameters, the interface information includes at least interface name, interface address, request type, interface status code and a first introduction; the request parameters include at least parameter name, parameter type, a first initial value and a second introduction; the first response data includes at least data name, data type, a second initial value and a third introduction.
[0111] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0112] In addition, an embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0113] Memory 503, used for storing computer programs;
[0114] The processor 501 is used to execute the program stored in the memory 503, and implements the following steps:
[0115] Get the interface data of the interface to be configured;
[0116] If the interface to be configured is a target interface, acquiring account information for the interface to be configured, and the target interface is a historically configured interface;
[0117] If the interface type of the interface to be configured is a target type, then when the account information authentication is successful, the first response data matching the interface data is obtained, and the interface data and the first response data are entered, and the target type is an interface type that supports information setting.
[0118] Optionally, when the account information authentication is successful, obtaining response data matching the interface data, and entering the interface data and the response data, includes:
[0119] When the account information authentication is successful, the interface data is entered in response to a user operation on a preset interface data entry control;
[0120] Acquire first response data matching the interface data, and enter the first response data.
[0121] Optionally, it also includes:
[0122] If the interface to be configured is not the target interface, responding to the preset interface data entry control to enter the interface data;
[0123] The response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data.
[0124] Optionally, the response acts on a preset interface data entry control to enter the interface data, including:
[0125] In response to acting on a preset interface data entry control, the interface data is converted into a data format to obtain target interface data;
[0126] Enter the target interface data.
[0127] Optionally, the response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data, including:
[0128] In response to acting on a preset response data entry control, second response data matching the interface data is obtained;
[0129] The second response data is converted into a data format to obtain target response data, and the target response data is entered.
[0130] Optionally, the data format of the interface data and the second response data includes at least one of a JSON format and a URL format.
[0131] Optionally, the interface data includes interface information and request parameters, the interface information includes at least interface name, interface address, request type, interface status code and a first introduction; the request parameters include at least parameter name, parameter type, a first initial value and a second introduction; the first response data includes at least data name, data type, a second initial value and a third introduction.
[0132] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0133] The communication interface is used for communication between the above terminal and other devices.
[0134] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0135] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0136] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the data processing method described in any of the above embodiments.
[0137] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the data processing method described in any one of the above embodiments.
[0138] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0139] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0140] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0141] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A data processing method, characterized in that: include: Get the interface data of the interface to be configured; If the interface to be configured is a target interface, then obtaining account information for the interface to be configured, the target interface is a historically configured interface, and the types of the interface to be configured include a historically configured interface for which data has been entered and a new interface for which data is entered for the first time; If the interface type of the interface to be configured is a target type, then when the account information authentication is successful, the first response data matching the interface data is obtained, and the interface data and the first response data are automatically entered in an automatic input manner. The target type is an interface type that supports information setting, and the interface type includes an interface that supports information setting and an interface that supports information browsing, wherein the interface that supports information setting is set by the user who has completed the authentication.
2. The method according to claim 1, characterized in that When the account information authentication is successful, obtaining first response data matching the interface data, and automatically entering the interface data and the first response data in an automatic input manner, includes: When the account information authentication is successful, the interface data is entered in response to a user operation on a preset interface data entry control; Acquire first response data matching the interface data, and enter the first response data.
3. The method according to claim 1, characterized in that Also includes: If the interface to be configured is not the target interface, responding to the preset interface data entry control to enter the interface data; The response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data.
4. The method according to claim 3, characterized in that The response acts on a preset interface data entry control to enter the interface data, including: In response to acting on a preset interface data entry control, the interface data is converted into a data format to obtain target interface data; Enter the target interface data.
5. The method according to claim 3, characterized in that: The response acts on a preset response data entry control, obtains second response data matching the interface data, and enters the second response data, including: In response to acting on a preset response data entry control, second response data matching the interface data is obtained; The second response data is converted into a data format to obtain target response data, and the target response data is entered.
6. The method according to claim 4 or 5, characterized in that: The data format of the interface data and the second response data includes at least one of a JSON format and a URL format.
7. The method according to claim 2, characterized in that The interface data includes interface information and request parameters, wherein the interface information includes at least interface name, interface address, request type, interface status code and a first introduction; the request parameters include at least parameter name, parameter type, a first initial value and a second introduction; the first response data includes at least data name, data type, a second initial value and a third introduction.
8. A data processing device, characterized in that: include: An interface data acquisition module, used to acquire interface data of the interface to be configured; An account information acquisition module, used for acquiring account information for the interface to be configured if the interface to be configured is a target interface, the target interface is a historically configured interface, and the types of the interface to be configured include a historically configured interface for which data has been entered and a new interface for which data is entered for the first time; The first data entry module is used to obtain first response data matching the interface data if the interface type of the interface to be configured is a target type, and automatically enter the interface data and the first response data by automatic input when the account information authentication is successful. The target type is an interface type that supports information setting, and the interface type includes an interface that supports information setting and an interface that supports information browsing, wherein the interface that supports information setting is set by the user who has completed the authentication.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory is used to store computer programs; The processor is used to implement the method steps as described in any one of claims 1 to 7 when executing the program stored in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Interface comprehensiveness management system based on character
CN106445824A
Test Case Construction Method, Test Method, Apparatus, Equipment and Media
CN109308266A
Interface data processing method, automatic testing method and device, equipment and medium
CN109766262A
An interface test information processing method and a test platform
CN109902026A
Interface test method and device, electronic equipment and readable storage medium
CN110704328A
