[go: up one dir, main page]

CN112416419A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN112416419A
CN112416419A CN202011280281.2A CN202011280281A CN112416419A CN 112416419 A CN112416419 A CN 112416419A CN 202011280281 A CN202011280281 A CN 202011280281A CN 112416419 A CN112416419 A CN 112416419A
Authority
CN
China
Prior art keywords
interface
data
response data
response
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011280281.2A
Other languages
Chinese (zh)
Other versions
CN112416419B (en
Inventor
陈丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing 58 Information Technology Co Ltd
Original Assignee
Beijing 58 Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing 58 Information Technology Co Ltd filed Critical Beijing 58 Information Technology Co Ltd
Priority to CN202011280281.2A priority Critical patent/CN112416419B/en
Publication of CN112416419A publication Critical patent/CN112416419A/en
Application granted granted Critical
Publication of CN112416419B publication Critical patent/CN112416419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • User Interface Of Digital Computer (AREA)
  • Input From Keyboards Or The Like (AREA)

Abstract

The embodiment of the invention provides a data processing method and a device, by acquiring interface data of an interface to be configured, if the interface to be configured is a target interface, acquiring account information aiming at the interface to be configured, the target interface is a historical configuration interface, and if the interface type of the interface to be configured is the target type, acquiring first response data matched with the interface data when the account information is successfully authenticated, and recording the interface data and the first response data to complete the configuration of the interface to be configured, wherein the target type is the interface type set by support information, so that when the interface to be configured is detected to be the historical configuration interface, the response data matched with the interface data is automatically acquired according to the interface type of the existing interface, the interface data and the response data are recorded in different modes, and the repeated configuration of the existing interface is avoided, the efficiency of data entry is improved, and through the mode of automatic entry, avoided the data entry mistake, and then guaranteed the management of interface.

Description

Data processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method and a data processing apparatus.
Background
For the interface management platform, development, product and tester can create, release and maintain the http interface on the interface management platform, and the development personnel can realize the management of the interface only by using an interface data writing tool and simple clicking operation provided by the platform. However, in the current interface management process, each interface data processing needs to be manually input by a developer, which easily increases unnecessary operation flow and time, increases the labor cost of the developer, and greatly reduces the efficiency of interface management.
Disclosure of Invention
The embodiment of the invention provides a data processing method, and aims to solve the problems that in the prior art, interface data entry efficiency is low, errors are easy to occur, and interface management is not facilitated.
Correspondingly, the embodiment of the invention also provides a data processing device, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a data processing method, including:
acquiring interface data of an interface to be configured;
if the interface to be configured is a target interface, acquiring account information aiming at the interface to be configured, wherein the target interface is a historical configuration interface;
if the interface type of the interface to be configured is a target type, when the account information authentication is successful, acquiring first response data matched with the interface data, and inputting the interface data and the first response data, wherein the target type is an interface type set by support information.
Optionally, when the account information is successfully authenticated, acquiring response data matched with the interface data, and entering the interface data and the response data, including:
when the account information is authenticated successfully, responding to user operation acting on a preset interface data entry control, and entering the interface data;
and acquiring first response data matched with the interface data, and recording the first response data.
Optionally, the method further comprises:
if the interface to be configured is not the target interface, responding to a preset interface data entry control and entering the interface data;
and responding to a preset response data entry control, acquiring second response data matched with the interface data, and entering the second response data.
Optionally, the entering of the interface data by the response acting on a preset interface data entry control includes:
responding to a preset interface data entry control, and performing data format conversion on the interface data to obtain target interface data;
and inputting the target interface data.
Optionally, the response acts on a preset response data entry control, obtains second response data matched with the interface data, and enters the second response data, including:
responding to a preset response data entry control, and acquiring second response data matched with the interface data;
and performing data format conversion on the second response data to obtain target response data, and recording the target response data.
Optionally, the data format of the interface data and the second response data at least includes at least one of a json format and a URL format.
Optionally, the interface data includes interface information and request parameters, where the interface information at least includes an interface name, an interface address, a request type, an interface status code, and a first profile; the request parameters at least comprise parameter names, parameter types, first initial values and second profiles; the first response data includes at least a data name, a data type, a second initial value, and a third profile.
The embodiment of the invention also discloses a data processing device, which comprises:
the interface data acquisition module is used for acquiring interface data of an interface to be configured;
the account information acquisition module is used for acquiring account information aiming at the interface to be configured if the interface to be configured is a target interface, and the target interface is a historical configuration interface;
and the first data entry module is used for acquiring first response data matched with the interface data and entering the interface data and the first response data if the interface type of the interface to be configured is a target type, and the target type is an interface type set by the support information when the account information is successfully authenticated.
Optionally, the first data entry module is specifically configured to:
when the account information is authenticated successfully, responding to user operation acting on a preset interface data entry control, and entering the interface data;
and acquiring first response data matched with the interface data, and recording the first response data.
Optionally, the method further comprises:
the first interface data entry module is used for responding to a preset interface data entry control and entering the interface data if the interface to be configured is not the target interface;
and the second data entry module is used for responding to a preset response data entry control, acquiring second response data matched with the interface data and entering the second response data.
Optionally, the first interface data entry module is specifically configured to:
responding to a preset interface data entry control, and performing data format conversion on the interface data to obtain target interface data;
and inputting the target interface data.
Optionally, the second data entry module is specifically configured to:
responding to a preset response data entry control, and acquiring second response data matched with the interface data;
and performing data format conversion on the second response data to obtain target response data, and recording the target response data.
Optionally, the data format of the interface data and the second response data at least includes at least one of a json format and a URL format.
Optionally, the interface data includes interface information and request parameters, where the interface information at least includes an interface name, an interface address, a request type, an interface status code, and a first profile; the request parameters at least comprise parameter names, parameter types, first initial values and second profiles; the first response data includes at least a data name, a data type, a second initial value, and a third profile.
The embodiment of the invention also discloses electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory finish mutual communication through the communication bus;
the memory is used for storing a computer program;
the processor is configured to implement the above-described method steps when executing the program stored in the memory.
The embodiment of the invention also discloses a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program realizes the method when being executed by a processor.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the interface data of the interface to be configured is acquired, if the interface to be configured is a target interface, the account information aiming at the interface to be configured is acquired, the target interface is a historical configuration interface, and then if the interface type of the interface to be configured is the target type, when the account information authentication is successful, the first response data matched with the interface data is acquired, and the interface data and the first response data are recorded to complete the configuration of the interface to be configured, wherein the target type is the interface type set by the support information, so that when the interface to be configured is detected to be the historical configuration interface, the interface to be configured is an existing interface, the response data matched with the interface data can be automatically acquired according to the interface type of the existing interface, and the interface data and the response data are recorded in different modes, thereby avoiding repeated configuration of the existing interface, the efficiency of data entry is improved, and through the mode of automatic entry, avoided the data entry mistake, and then guaranteed the management of interface.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a method of processing data of the present invention;
FIG. 2 is a flow chart of the steps of one embodiment of a method of processing data of the present invention;
FIG. 3 is a schematic diagram of an interface configuration in an embodiment of the invention;
FIG. 4 is a block diagram of an embodiment of a data processing apparatus according to the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
For the interface management platform, development, product and tester can create, release and maintain the http interface on the interface management platform, and the development personnel can realize the management of the interface only by using an interface data writing tool and simple clicking operation provided by the platform. Wherein:
the interface mock is data responded by a server when the interface is simulated to request;
the interface information is information describing the interface, and may include interface name, interface address, request type, interface status code, brief introduction and other contents;
the request parameter may be data that needs to be transmitted to the server when requesting the interface, and may include parameter name, whether the parameter is a parameter to be filled, parameter type, initial value, and profile, etc.;
the response data may be data responded by the server when the interface is requested, and may include data name, parameters whether the interface is necessary to be filled, data type, initial value, profile and the like.
The interface management platform can be used for recording interface information, request parameters, response data and rules of the interface mock, so that the unified management and the multi-user sharing of the interface information are facilitated.
In the current interface management process, for the processing of each interface data, developers are required to manually enter each piece of data, so that unnecessary operation processes and time are easily increased, and the efficiency of data entry is very low.
Therefore, one of the core invention points of the embodiment of the present invention is that after the interface data of the interface to be configured and the response data matched with the interface data are obtained, the interface to be configured is identified, if the interface is an existing interface, the authentication is further performed, and after the authentication is successful, the interface data and the response data are automatically entered, so that the existing interface is prevented from being configured repeatedly, the efficiency of data entry is improved, and a data entry error is avoided by an automatic entry mode, thereby ensuring the management of the interface.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a data processing method according to the present invention is shown, which may specifically include the following steps:
step 101, acquiring interface data of an interface to be configured;
in the embodiment of the present invention, for different http interfaces (interfaces described below), a developer may configure interface data and response data, so as to determine an interface function of the http interface. The interface data can comprise interface information and request parameters, and the interface data and the request parameters are spliced, so that the data entry process is simplified and the data entry efficiency is improved in the subsequent data entry process.
In a specific implementation, the interface information may be used to define an interface, the request parameter may be used to describe data transmitted to the server when the interface is requested, and the response data may be used to describe data responded by the server when the interface is requested, so that a user may obtain corresponding data through the configured interface. Specifically, after the interface data is input in the interface management system, what manner is subsequently required to be adopted to input the response data, such as manual input or automatic input, may be determined, and the response data may be input in different manners for different interfaces to be configured.
In one example, the interface information may include interface name, interface address, request type, interface status code, and profile, for example, interface name: "get used-car post list", interface address: "http:// cheapi.11. com/getcarpicild ═ 1& price ═ 10_ 20", request type: "GET", interface status code: "200", profile: a "get used vehicle post list" or the like, wherein the interface information may be spliced with the request parameter so as to simplify the flow of subsequent data entry; the response data may be data corresponding to the interface data, so that the corresponding interface is configured in the interface management system by establishing a mapping relationship between the interface data and the response data, so that a user may obtain the corresponding data through the configured interface.
Step 102, if the interface to be configured is a target interface, acquiring account information aiming at the interface to be configured, wherein the target interface is a historical configuration interface;
in the embodiment of the present invention, a developer may configure interface data in an interface management system, where the interface management system may be an application program running on a terminal device, and the interface management system may provide different controls for a user to enter different data, so as to implement configuration of an interface.
In a specific implementation, for the interface to be configured, a historical configuration interface in which data has been previously entered and a new interface in which data is first entered in development may be included, and for different interfaces to be configured, data may be entered in different manners to complete configuration of the interface. Specifically, after the interface management system obtains the interface data and the response data input by the developer, the interface to be configured may be identified first, and the type of the interface to be configured is determined, and if the interface to be configured is the target interface, that is, the interface to be configured is the historical configuration interface, the account information for the interface to be configured may be obtained, so as to process the interface data and the response data of the interface to be configured according to the account information. The account information may be account information that is input by the developer when the interface data and the response data are input, such as a test account cookie, and the like, which is not limited in the present invention.
Step 103, if the interface type of the interface to be configured is a target type, when the account information authentication is successful, obtaining first response data matched with the interface data, and inputting the interface data and the first response data, wherein the target type is an interface type set by support information.
In the embodiment of the invention, if the interface to be configured is determined to be the historical configuration interface, it indicates that one-to-one input of each interface data and response data of the interface to be configured is not required, the first response data matched with the interface data can be acquired, and the response data is automatically input in an automatic input mode, so that repeated configuration of the existing interface is avoided, and the data input efficiency is improved.
In the specific implementation, for an interface, the interface may be divided into different types of interfaces such as an interface supporting information setting, an interface supporting information browsing, and the like according to the type of the interface, wherein for the interface supporting information setting, a user may set related information through the type of the interface, and for the configuration of the type of the interface, login and verification related authentication is often required, and after the authentication is completed, the setting of the related information may be performed through the interface; for an interface supporting information browsing, a user may browse relevant information through the interface, such as a relevant interface browsing used-car posts, and the like. Specifically, when the interface to be configured is determined to belong to the historical configuration interface, the interface type of the interface to be configured can be further identified, if the interface to be configured is the interface type set by the support information, account information can be authenticated, after the authentication is successful, first response data matched with the interface data is obtained, and the interface data and the response data of the interface to be configured are automatically input into an interface management system to complete the configuration of the interface to be configured, so that repeated configuration of the existing interface is avoided, the efficiency of data input is improved, and through an automatic input mode, data input errors are avoided, and further the management of the interface is ensured.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art can set the method according to practical situations, and the present invention is not limited to this.
In the embodiment of the invention, the interface data of the interface to be configured is acquired, if the interface to be configured is a target interface, the account information aiming at the interface to be configured is acquired, the target interface is a historical configuration interface, and then if the interface type of the interface to be configured is the target type, when the account information authentication is successful, the first response data matched with the interface data is acquired, and the interface data and the first response data are recorded to complete the configuration of the interface to be configured, wherein the target type is the interface type set by the support information, so that when the interface to be configured is detected to be the historical configuration interface, the interface to be configured is an existing interface, the response data matched with the interface data can be automatically acquired according to the interface type of the existing interface, and the interface data and the response data are recorded in different modes, thereby avoiding repeated configuration of the existing interface, the efficiency of data entry is improved, and through the mode of automatic entry, avoided the data entry mistake, and then guaranteed the management of interface.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a data processing method according to the present invention is shown, and specifically may include the following steps:
step 201, acquiring interface data of an interface to be configured;
as an example, a developer may input data related to an interface in an operation interface provided by the interface management system, where the interface data may include interface information and request parameters, and the request parameters may include data in data formats such as json format and URL format. Specifically, after the interface data is input in the interface management system, what manner is subsequently required to be adopted to input the response data, such as manual input or automatic input, may be determined, and the response data may be input in different manners for different interfaces to be configured.
Step 202, if the interface to be configured is a target interface, acquiring account information for the interface to be configured, wherein the target interface is a historical configuration interface;
in a specific implementation, for the interface to be configured, a historical configuration interface in which data has been previously entered and a new interface in which data is first entered in development may be included, and for different interfaces to be configured, data may be entered in different manners to complete configuration of the interface. Specifically, after the interface management system obtains the interface data and the response data input by the developer, the interface to be configured may be identified first, and the type of the interface to be configured is determined, and if the interface to be configured is the target interface, that is, the interface to be configured is the historical configuration interface, the account information for the interface to be configured may be obtained, so as to process the interface data and the response data of the interface to be configured according to the account information.
The interface management system can provide an interface data entry control and a response data entry control, and if the interface to be configured is not the target interface, the interface management system responds to the preset interface data entry control, enters interface data, responds to the preset response data entry control, acquires second response data matched with the interface data, and enters the second response data. Specifically, if the interface to be configured is not a historical configuration interface, a developer needs to manually enter the response data through the interface management system, that is, the developer can input the interface data through the interface data entry control first, the interface management system recognizes that the corresponding interface to be configured is a new interface in development, the developer needs to input the response data, and the developer can manually input second response data matched with 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.
In an optional embodiment of the present invention, the interface management system may respond to a preset interface data entry control, perform data format conversion on the interface data to obtain target interface data, and enter the target interface data, and respond to a preset response data entry control, perform data format conversion on the response data to obtain target response data, and enter the target response data.
In a specific implementation, the interface data and the response data may include data in data formats such as json format and URL format, and the interface management system may automatically convert the data formats and store the converted data formats in the system database during the entry process, so as to achieve the purpose of fast entry. Wherein, the developer can input the interface data through different data formats, for example, the request parameters for json format can include { "key 1": val1 "," key2 ": val 2" }; request parameters for url (search) format may include key1 val1& key2 val 2; response data for the json format may include: { "status": 0), "data": success "}, and the developer can also adjust individual request parameters or response data information according to business needs, such as adding mock rules, supplementing profiles, etc.
Step 203, if the interface type of the interface to be configured is a target type, when the account information is authenticated successfully, responding to a user operation acting on a preset interface data entry control to enter the interface data, wherein the target type is an interface type set by the support information;
and 204, acquiring first response data matched with the interface data, and recording the first response data.
In the specific implementation, for an interface, the interface may be divided into different types of interfaces such as an interface supporting information setting, an interface supporting information browsing, and the like according to the type of the interface, wherein for the interface supporting information setting, a user may set related information through the type of the interface, and for the configuration of the type of the interface, login and verification related authentication is often required, and after the authentication is completed, the setting of the related information may be performed through the interface; for an interface supporting information browsing, a user may browse relevant information through the interface, such as a relevant interface browsing used-car posts, and the like.
Specifically, when the interface to be configured is determined to belong to the historical configuration interface, the interface type of the interface to be configured can be further identified, if the interface to be configured is the interface type set by the support information, account information can be authenticated, after the authentication is successful, first response data matched with the interface data is obtained, and the interface data and the response data of the interface to be configured are automatically input into an interface management system to complete the configuration of the interface to be configured, so that repeated configuration of the existing interface is avoided, the efficiency of data input is improved, and through an automatic input mode, data input errors are avoided, and further the management of the interface is ensured.
In one example, the interface management system identifies that the interface to be configured is a historical configuration interface according to interface data input by a developer, that is, the interface data of the interface is input in advance, then whether account authentication is required or not can be determined according to the interface type of the interface to be configured, if authentication is required, second response data corresponding to the interface data is obtained after the authentication is successful, and request parameters and the second response data in the interface data are described by using corresponding fields (including converting the request parameters and the response data in a json or URL data format into corresponding fields), and then the fields are stored in a database of the interface management system and are associated with interface information so as to complete the configuration of the interface, so that when the interface to be configured is detected to be the historical configuration interface, the interface to be configured is an existing interface, interface data and response data can be input in different modes according to the interface types of the existing interfaces, repeated configuration of the existing interfaces is avoided, data input efficiency is improved, data input errors are avoided through an automatic input mode, and management of the interfaces is guaranteed. Alternatively, the database may be a relational database such as a mysql database, which is not limited in the present invention.
It should be noted that the embodiment of the present invention includes but is not limited to the above examples, and it is understood that, under the guidance of the idea of the embodiment of the present invention, a person skilled in the art can set the method according to practical situations, and the present invention is not limited to this.
In the embodiment of the invention, by acquiring the interface data of the interface to be configured and the response data matched with the interface data, if the interface to be configured is a target interface, the account information aiming at the interface to be configured is acquired, the target interface is a historical configuration interface, and then if the interface type of the interface to be configured is the target type, when the account information authentication is successful, the interface data and the response data are entered to complete the configuration of the interface to be configured, wherein the target type is the interface type set by the support information, so that when the interface to be configured is detected to be the historical configuration interface, the interface to be configured is an existing interface, the interface data and the response data can be entered by adopting different modes according to the interface type of the existing interface, the repeated configuration of the existing interface is avoided, the efficiency of data entry is improved, and by adopting an automatic entry mode, data entry errors are avoided, and therefore management of the interface is guaranteed.
In order to enable a person skilled in the art to better understand the embodiments of the present invention, the following description is given by way of an example:
referring to fig. 3, which is a schematic diagram illustrating interface configuration in an embodiment of the present invention, a user may enter interface information and a request parameter in a URL search format when entering related data of an existing interface (i.e., a historical configuration interface), where the interface information and the request parameter may be spliced to simplify a data entry process and improve data entry efficiency in a subsequent data entry process. For the response data entry of the existing interface, whether the account needs to be authenticated can be judged according to the interface type, if the existing interface is an interface supporting information setting, the cookie account input by the user is authenticated, and after the authentication is successful, the interface management system can simulate the interface address input by the user and obtain the corresponding response data. Specifically, the interface management system may store the interface information in a database, then perform data format conversion on the request parameter and the response data after simulating the request interface to obtain the response data, obtain the request parameter and the response data of the corresponding field, then store the fields in the database, and associate the fields with the interface information to complete configuration of the interface, and further indicate that the interface to be configured is an existing interface when detecting that the interface to be configured is a historical configuration interface, and may enter the interface data and the response data in different manners according to the interface type of the existing interface, thereby avoiding repeated configuration of the existing interface, improving the efficiency of data entry, and avoiding data entry errors through an automatic entry manner, thereby ensuring management of the interface.
For a new interface in development, a developer needs to manually input response data through an interface management system, namely the developer can input interface data through an interface data input control firstly, the interface management system recognizes that a corresponding interface to be configured is the new interface in development, the developer needs to input the response data, and the developer can manually input second response data matched with the interface data through the response data input control so that the interface management system can input and store the interface data and the second response data.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 4, a block diagram of an embodiment of a data processing apparatus according to the present invention is shown, and may specifically include the following modules:
an interface data obtaining module 401, configured to obtain interface data of an interface to be configured;
an account information obtaining module 402, configured to obtain account information for the interface to be configured if the interface to be configured is a target interface, where the target interface is a history configuration interface;
a first data entry module 403, configured to, if the interface type of the interface to be configured is a target type, obtain, when the account information is successfully authenticated, first response data matched with the interface data, and enter the interface data and the first response data, where the target type is an interface type set by the support information.
In an optional embodiment of the present invention, the first data entry module 403 is specifically configured to:
when the account information is authenticated successfully, responding to user operation acting on a preset interface data entry control, and entering the interface data;
and acquiring first response data matched with the interface data, and recording the first response data.
In an optional embodiment of the present invention, further comprising:
the first interface data entry module is used for responding to a preset interface data entry control and entering the interface data if the interface to be configured is not the target interface;
and the second data entry module is used for responding to a preset response data entry control, acquiring second response data matched with the interface data and entering the second response data.
In an optional embodiment of the present invention, the first interface data entry module is specifically configured to:
responding to a preset interface data entry control, and performing data format conversion on the interface data to obtain target interface data;
and inputting the target interface data.
In an optional embodiment of the present invention, the second data entry module is specifically configured to:
responding to a preset response data entry control, and acquiring second response data matched with the interface data;
and performing data format conversion on the second response data to obtain target response data, and recording the target response data.
In an optional embodiment of the present invention, a data format of the interface data and the second response data at least includes at least one of a json format and a URL format.
In an optional embodiment of the present invention, the interface data includes interface information and request parameters, the interface information at least includes an interface name, an interface address, a request type, an interface status code, and a first profile; the request parameters at least comprise parameter names, parameter types, first initial values and second profiles; the first response data includes at least a data name, a data type, a second initial value, and a third profile.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In addition, an embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501, when executing the program stored in the memory 503, implements the following steps:
acquiring interface data of an interface to be configured;
if the interface to be configured is a target interface, acquiring account information aiming at the interface to be configured, wherein the target interface is a historical configuration interface;
if the interface type of the interface to be configured is a target type, when the account information authentication is successful, acquiring first response data matched with the interface data, and inputting the interface data and the first response data, wherein the target type is an interface type set by support information.
Optionally, when the account information is successfully authenticated, acquiring response data matched with the interface data, and entering the interface data and the response data, including:
when the account information is authenticated successfully, responding to user operation acting on a preset interface data entry control, and entering the interface data;
and acquiring first response data matched with the interface data, and recording the first response data.
Optionally, the method further comprises:
if the interface to be configured is not the target interface, responding to a preset interface data entry control and entering the interface data;
and responding to a preset response data entry control, acquiring second response data matched with the interface data, and entering the second response data.
Optionally, the entering of the interface data by the response acting on a preset interface data entry control includes:
responding to a preset interface data entry control, and performing data format conversion on the interface data to obtain target interface data;
and inputting the target interface data.
Optionally, the response acts on a preset response data entry control, obtains second response data matched with the interface data, and enters the second response data, including:
responding to a preset response data entry control, and acquiring second response data matched with the interface data;
and performing data format conversion on the second response data to obtain target response data, and recording the target response data.
Optionally, the data format of the interface data and the second response data at least includes at least one of a json format and a URL format.
Optionally, the interface data includes interface information and request parameters, where the interface information at least includes an interface name, an interface address, a request type, an interface status code, and a first profile; the request parameters at least comprise parameter names, parameter types, first initial values and second profiles; the first response data includes at least a data name, a data type, a second initial value, and a third profile.
The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the terminal and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In another embodiment of the present invention, a computer-readable storage medium is further provided, which stores instructions that, when executed on a computer, cause the computer to execute the method for processing data described in any of the above embodiments.
In a further embodiment of the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of processing data as described in any of the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, 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, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A method for processing data, comprising:
acquiring interface data of an interface to be configured;
if the interface to be configured is a target interface, acquiring account information aiming at the interface to be configured, wherein the target interface is a historical configuration interface;
if the interface type of the interface to be configured is a target type, when the account information authentication is successful, acquiring first response data matched with the interface data, and inputting the interface data and the first response data, wherein the target type is an interface type set by support information.
2. The method according to claim 1, wherein when the account information authentication is successful, acquiring response data matched with the interface data, and entering the interface data and the response data comprises:
when the account information is authenticated successfully, responding to user operation acting on a preset interface data entry control, and entering the interface data;
and acquiring first response data matched with the interface data, and recording the first response data.
3. The method of claim 1, further comprising:
if the interface to be configured is not the target interface, responding to a preset interface data entry control and entering the interface data;
and responding to a preset response data entry control, acquiring second response data matched with the interface data, and entering the second response data.
4. The method according to claim 3, wherein the response acts on a preset interface data entry control to enter the interface data, comprising:
responding to a preset interface data entry control, and performing data format conversion on the interface data to obtain target interface data;
and inputting the target interface data.
5. The method according to claim 3, wherein 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:
responding to a preset response data entry control, and acquiring second response data matched with the interface data;
and performing data format conversion on the second response data to obtain target response data, and recording the target response data.
6. The method of claim 4 or 5, wherein the data format of the interface data and the second response data comprises at least one of json format and URL format.
7. The method of claim 2, wherein the interface data includes interface information and request parameters, the interface information including at least an interface name, an interface address, a request type, an interface status code, and a first profile; the request parameters at least comprise parameter names, parameter types, first initial values and second profiles; the first response data includes at least a data name, a data type, a second initial value, and a third profile.
8. An apparatus for processing data, comprising:
the interface data acquisition module is used for acquiring interface data of an interface to be configured;
the account information acquisition module is used for acquiring account information aiming at the interface to be configured if the interface to be configured is a target interface, and the target interface is a historical configuration interface;
and the first data entry module is used for acquiring first response data matched with the interface data and entering the interface data and the first response data if the interface type of the interface to be configured is a target type, and the target type is an interface type set by the support information when the account information is successfully authenticated.
9. 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;
the memory is used for storing a computer program;
the processor, when executing a program stored on the memory, is adapted to carry out the method steps of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202011280281.2A 2020-11-16 2020-11-16 Data processing method and device Active CN112416419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011280281.2A CN112416419B (en) 2020-11-16 2020-11-16 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011280281.2A CN112416419B (en) 2020-11-16 2020-11-16 Data processing method and device

Publications (2)

Publication Number Publication Date
CN112416419A true CN112416419A (en) 2021-02-26
CN112416419B CN112416419B (en) 2024-09-13

Family

ID=74831333

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011280281.2A Active CN112416419B (en) 2020-11-16 2020-11-16 Data processing method and device

Country Status (1)

Country Link
CN (1) CN112416419B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168578A1 (en) * 2005-10-27 2007-07-19 International Business Machines Corporation System and method for data collection interface creation and data collection administration
CN106445824A (en) * 2016-09-30 2017-02-22 南京途牛科技有限公司 Interface comprehensiveness management system based on character
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
CN109902026A (en) * 2019-03-27 2019-06-18 北京奇艺世纪科技有限公司 A kind of processing method and test platform of interface testing information
US20190327238A1 (en) * 2018-04-20 2019-10-24 EMC IP Holding Company LLC Method, apparatus and computer program product for executing an application in clouds
CN110704328A (en) * 2019-10-15 2020-01-17 北京城市网邻信息技术有限公司 Interface testing method and device, electronic equipment and readable storage medium
CN111158644A (en) * 2019-12-06 2020-05-15 苏宁云计算有限公司 Prototype graph and interface interaction method and device
US20200265840A1 (en) * 2019-02-19 2020-08-20 Samsung Electronics Co., Ltd. Electronic device and system for processing user input and method thereof
WO2020192141A1 (en) * 2019-03-25 2020-10-01 平安科技(深圳)有限公司 Method and device for simulating interface, computer apparatus, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070168578A1 (en) * 2005-10-27 2007-07-19 International Business Machines Corporation System and method for data collection interface creation and data collection administration
CN106445824A (en) * 2016-09-30 2017-02-22 南京途牛科技有限公司 Interface comprehensiveness management system based on character
US20190327238A1 (en) * 2018-04-20 2019-10-24 EMC IP Holding Company LLC Method, apparatus and computer program product for executing an application in clouds
CN109308266A (en) * 2018-11-30 2019-02-05 北京微播视界科技有限公司 Construction method, test method, device, equipment and the medium of test case
CN109766262A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Interface data processing method, automated testing method, device, equipment and medium
US20200265840A1 (en) * 2019-02-19 2020-08-20 Samsung Electronics Co., Ltd. Electronic device and system for processing user input and method thereof
WO2020192141A1 (en) * 2019-03-25 2020-10-01 平安科技(深圳)有限公司 Method and device for simulating interface, computer apparatus, and storage medium
CN109902026A (en) * 2019-03-27 2019-06-18 北京奇艺世纪科技有限公司 A kind of processing method and test platform of interface testing information
CN110704328A (en) * 2019-10-15 2020-01-17 北京城市网邻信息技术有限公司 Interface testing method and device, electronic equipment and readable storage medium
CN111158644A (en) * 2019-12-06 2020-05-15 苏宁云计算有限公司 Prototype graph and interface interaction method and device

Also Published As

Publication number Publication date
CN112416419B (en) 2024-09-13

Similar Documents

Publication Publication Date Title
CN109656807B (en) Information security-based interface mock testing method, device, equipment and storage medium
CN108268635B (en) Method and apparatus for acquiring data
US20130054792A1 (en) Cloud-based performance testing of functionality of an application prior to completion of development
CN113268336B (en) Service acquisition method, device, equipment and readable medium
US9645914B1 (en) Apps store with integrated test support
CN111209202A (en) Terminal application testing method and device
US9811605B2 (en) Methods, apparatuses and computer program products for automated learning of data models
US20200125713A1 (en) Adaptive authentication in spreadsheet interface integrated with web service
CN108829838B (en) Batch processing method of account information and server
CN113505895B (en) Machine learning engine service system, model training method and configuration method
CN110162464A (en) Mcok test method and system, electronic equipment and readable storage medium storing program for executing
CN107018138A (en) Method and apparatus for defining the competence
CN111488095A (en) User login management method and device
CN112835808A (en) Interface testing method, device, computer equipment and storage medium
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN114880306A (en) Database management and control method, device, computer equipment and storage medium
CN111008059A (en) Control method and device for popup window display, terminal and storage medium
CN112947959B (en) An update method, device, server and storage medium for an AI service platform
CN117193751A (en) Service code generation method, device, equipment and storage medium
CN112433935A (en) Test method, test device, electronic equipment and storage medium
CN119759767A (en) Test case acquisition method, device, equipment, storage medium and program product
CN113010587B (en) Data source configuration method, device, terminal, server and medium
CN118964182A (en) An interface testing method and related device
CN112882948A (en) Stability testing method, device and system for application and storage medium
CN113285915A (en) Registration management method and device and private cloud control server

Legal Events

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