Data Processing Method, System, Device, Electronic Device, and Storage Medium
By obtaining the meta information of the API to generate a target form and debugging the interface on the page, the interface is solved due to the many API interface fields and the difficulty of debugging is difficult, and the efficiency and simplicity of interface debugging are achieved.
Patent Information
- Application Number
- CN202111648757.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-12-29
AI Technical Summary
During the interface call process, due to the large number of interface fields in the API, the interface call fails, which increases the developer's maintenance cost and debugging difficulty.
By determining the target interface to be debugged, data in the target format is obtained to characterize the meta information of the interface, a target form is generated, and the interface is debugged on the rendered page to achieve efficient debugging of the interface.
By automatically generating data charts and transmitting them to the front-end, the front-end generates target forms based on the data chart and dynamically renders the page, simplifying the interface debugging process, improving debugging efficiency, and reducing the maintenance costs of developers.
Smart Images

Figure CN114328055B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers, and in particular, to a data processing method, system, device, electronic device, and storage medium in the field of interface debugging. Background Art
[0002] Currently, when developers make interface calls, they usually use relevant tools (such as Postman or Curl). However, due to the large number of interface fields in the application programming interface (API), it is easy to cause interface call failures, resulting in additional maintenance costs for developers. Summary of the Invention
[0003] The present disclosure provides a data processing method, system, device, equipment, and storage medium.
[0004] According to one aspect of the present disclosure, a data processing method is provided. The method may include: determining a target interface to be debugged; obtaining data in a target format based on the target interface, where the data in the target format is used to represent the meta-information of the target interface; generating a target form based on the data in the target format; rendering a first target page based on the target form, and debugging the target interface on the first target page.
[0005] According to another aspect of the present disclosure, another data processing method is further provided. The method may include: obtaining a first request sent by a client, where the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta-information of the target interface to be debugged; in response to the first request, generating data in the target format based on the target interface; returning the data in the target format to the client, so that the client renders a first target page based on a target form generated from the data in the target format, and debugs the target interface on the first target page.
[0006] According to another aspect of the present disclosure, a data processing system is further provided. The system may include: a client and a server. The client is used to determine a target interface to be debugged and send a first request to the server, where the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta-information of the target interface to be debugged; the server is used to, in response to the first request, generate data in the target format based on the target interface; where the client is used to generate a target form based on the data in the target format returned by the server, render a first target page based on the target form, and debug the target interface on the first target page.
[0007] According to another aspect of the present disclosure, a data processing apparatus is also provided. The apparatus may include: a determination unit configured to determine a target interface to be debugged; a first acquisition unit configured to acquire data in a target format based on the target interface, where the data in the target format is used to characterize the meta information of the target interface; a first generation unit configured to generate a target form based on the data in the target format; and a debugging unit configured to render a first target page based on the target form and debug the target interface on the first target page.
[0008] According to another aspect of the present disclosure, another data processing apparatus is also provided. The apparatus may include: a second acquisition unit configured to acquire a first request sent by a client, where the first request is used to request to acquire data in a target format, and the data in the target format is used to characterize the meta information of the target interface to be debugged; a second generation unit configured to, in response to the first request, generate data in the target format based on the target interface; and a return unit configured to return the data in the target format to the client, so that the client renders a first target page based on a target form generated from the data in the target format and debugs the target interface on the first target page.
[0009] According to another aspect of the present disclosure, an electronic device is also provided. The electronic device may include: at least one processor; and a memory communicatively connected to the at least one processor; where the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data processing method of the embodiments of the present disclosure.
[0010] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, where the computer instructions are used to cause a computer to execute the data processing method of the embodiments of the present disclosure.
[0011] According to another aspect of the present disclosure, a computer program product is also provided, which may include a computer program that, when executed by a processor, implements the data processing method of the embodiments of the present disclosure.
[0012] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. Description of the Drawings
[0013] The drawings are used to better understand the solution and do not constitute a limitation to the present disclosure. Among them:
[0014] Figure 1 is a flowchart of a data processing method according to an embodiment of the present disclosure;
[0015] Figure 2It is a flowchart of another data processing method according to an embodiment of the present disclosure;
[0016] Figure 3 It is a flowchart of an application programming interface call in the related art of the present disclosure;
[0017] Figure 4 It is a flowchart of parsing an application programming interface compressed package according to an embodiment of the present disclosure;
[0018] Figure 5 It is a schematic diagram of the working principle of a form according to an embodiment of the present disclosure;
[0019] Figure 6 It is a working flowchart of a visualization debugging tool according to an embodiment of the present disclosure;
[0020] Figure 7 It is a schematic diagram of the mapping relationship between a visualization API and components according to an embodiment of the present disclosure;
[0021] Figure 8 It is a schematic diagram of a data processing method project demonstration according to an embodiment of the present disclosure;
[0022] Figure 9 It is a schematic diagram of a data processing system according to an embodiment of the present disclosure;
[0023] Figure 10 It is a schematic diagram of a data processing device according to an embodiment of the present disclosure;
[0024] Figure 11 It is a schematic diagram of another data processing device according to an embodiment of the present disclosure;
[0025] Figure 12 It is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners
[0026] The following makes an explanation of exemplary embodiments of the present disclosure with reference to the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted below.
[0027] The data processing method according to the embodiment of the present disclosure is introduced from the client side below, including an interface debugging method mainly executed by the client.
[0028] Figure 1 It is a flowchart of a data processing method according to an embodiment of the present disclosure. AsFigure 1 As shown, the method may include the following steps:
[0029] Step S102, determining a target interface to be debugged.
[0030] In the technical solution provided in step S102 of the present disclosure, the client determines the target interface to be debugged, where the target interface may be an Application Programming Interface (API for short).
[0031] Optionally, the application programming interface is a pre-defined interface or an agreement for the connection of different components of a software system. The application programming interface can be used to provide a set of routines for an application program and developers to access based on a certain software or hardware, and there is no need to access the source code or understand the details of the internal working mechanism.
[0032] Step S104, obtaining data in a target format based on the target interface, where the data in the target format is used to represent the meta-information of the target interface.
[0033] In the technical solution provided in step S104 of the present disclosure, the meta-information may be the basic information of the interface. The target format is determined according to the determined target interface to be tested, and the meta-information used to represent the target interface is extracted.
[0034] Optionally, the meta-information may include the class name, method name, and request parameters.
[0035] Optionally, the meta-information is generated by parsing the interface compressed package, and then the meta-information is stored classified by module, interface information, and version.
[0036] For example, parsing the service source code may include: annotating the interface that needs to generate a chart (Josn schema), and then obtaining the service to be parsed through the annotation of the application programming interface service source code (@API Service); the parsing method may include: annotating the method that needs to generate a chart (Josn schema), and then obtaining the method to be parsed through the annotation of the application programming interface method source code (@API Method).
[0037] Step S106, generating a target form based on the data in the target format.
[0038] In the technical solution provided in step S106 of the present disclosure, the target form may be a form component. The front end develops multiple different components according to the chart, and then integrates these components to construct a target form.
[0039] For example, the front end develops an interface (one-ui) component based on a basic data chart (Json Schema), and then constructs a target form (One Form) according to different interface components.
[0040] Step S108: Render a first target page based on the target form, and debug the target interface on the first target page.
[0041] In the technical solution provided in step S108 of the present disclosure above, the first target page is rendered according to the constructed target form, and after the rendering is completed, the target interface is debugged to obtain a debugging result.
[0042] Optionally, developers can adjust the input parameters in real time according to the obtained debugging results, thereby improving the debugging efficiency of the interface.
[0043] Through the above steps S102 to S108, the target interface to be debugged is determined; target format data is obtained based on the target interface, where the target format data is used to represent the meta-information of the target interface; a target form is generated based on the target format data; a first target page is rendered based on the target form, and the target interface is debugged on the first target page. That is to say, in the present disclosure, a data chart is automatically generated by the back end and transmitted to the front end, and the front end generates a corresponding target form based on the data chart to dynamically render the page, and then the behavior of calling the interface can be completed through simple interface operations, thereby improving the debugging efficiency of the interface and solving the technical problem of low debugging efficiency of the interface.
[0044] The above method of this embodiment will be further introduced in detail below.
[0045] As an alternative implementation, the method further includes: generating a target form based on the target format data includes: generating a plurality of target components based on the target format data; combining the plurality of target components to obtain a target form.
[0046] In this embodiment, the target format data may be meta-information used to represent the target interface to be debugged, where the meta-information may include a class name, a method name, and request parameters.
[0047] Optionally, a plurality of target components can be generated according to the obtained target format data, and a target form is constructed according to the generated plurality of target components to achieve the effect of dynamic rendering.
[0048] As an alternative implementation, the method further includes: generating a plurality of target components based on the target format data includes: determining the target type of the target format data; obtaining a corresponding plurality of target components in the target database according to the target type.
[0049] In this embodiment, the target database can be Widgets. First, the target type of the data in the target format is determined, and then in the target database, a plurality of target components corresponding to the target type of the data in the target format are obtained.
[0050] Optionally, the target database can include select, Date Picker, Object Box, Switch, Input, etc.
[0051] As an alternative embodiment, the method further includes: determining that the target type of the data in the target format includes: generating target parameters corresponding to the data structure of the target form from the data in the target format; determining the type of the target parameters as the target type.
[0052] In this embodiment, target parameters corresponding to the data structure of the target form are generated from the data in the target format, and the type of the target parameters is determined. The obtained type of the target parameters is the target type of the data in the target format.
[0053] Optionally, the target type of the data in the target format can include simple type, object type, or array type.
[0054] Optionally, form rendering is performed according to the constructed target form data type. If it is simple type data, the corresponding component is found from the database; if it is object or array type, the components in the database are recursively called.
[0055] As an alternative embodiment, the method further includes: generating target parameters corresponding to the data structure of the target form from the data in the target format includes: in response to the data in the target format being predetermined data, configuring corresponding component attributes for the data in the target format; generating target parameters from the component attributes.
[0056] In this embodiment, when the data in the target format is predetermined data, corresponding component attributes are configured for the data in the target format, and target parameters corresponding to the data structure of the target form are generated according to the component attributes.
[0057] For example, the data in the target format is judged to analyze whether it is a standard basic data chart (JsonSchema) or custom data conforming to the One Form standard. If it is a standard basic data chart, corresponding interface component (UI Component) attributes are configured for each field according to the rules.
[0058] As an alternative implementation, the method further includes: determining a target identifier for each target component; generating return data corresponding to the target identifier based on data in a target format, where the return data is the default return value of the target component.
[0059] In this embodiment, the target identifier may be the code (id) value set for each target component when generating the target component, and a default return value is generated according to the default parameters of the target format data.
[0060] Optionally, when generating a form component, the user can operate the form, and the return data can be the return value input by the user.
[0061] As an alternative implementation, the method further includes: obtaining interface debugging parameters; validating the interface debugging parameters based on data in a target format; debugging a target interface on a first target page includes: on the first target page, debugging the target interface based on the validated interface debugging parameters.
[0062] In this embodiment, the interface debugging parameters can be directly validated according to the data in the target format. After passing the validation, the target interface is debugged on the first target page.
[0063] As an alternative implementation, the method further includes: navigating from a second target page to a third target page on a graphical user interface, where the second target page is used to display text information of the target interface, and the text information is used to describe the target interface; determining the target interface to be debugged includes: determining the target interface to be debugged on the third target page.
[0064] In this embodiment, the text information of the target interface may include fields and limiting conditions, etc. Navigate from the second target page to the third target page on the graphical user interface, and the target interface to be debugged can be determined on the third target page.
[0065] For example, the visual debugging tool and the application programming interface document are linked to each other, so that it is possible to directly jump from the document page to the visual debugging tool page and bring in the corresponding interface information.
[0066] As an alternative implementation, debugging the target interface on the first target page includes: in response to a debugging operation instruction acting on the first target page, debugging the target interface to obtain a debugging result, and displaying the debugging result on the first target page.
[0067] In this embodiment, the debugging result may be feedback information for debugging the target interface. The target interface is debugged on the first target page, and the debugging result is displayed.
[0068] Optionally, the debugging result may include explicit prompt messages such as successful interface calls and failed interface calls.
[0069] Optionally, the developer may adjust the request parameters in real time according to the debugging result.
[0070] The data processing method of the embodiments of the present disclosure is introduced from the server side below, including the interface debugging method mainly executed by the client.
[0071] Figure 2 is a flowchart of another data processing method according to the embodiments of the present disclosure. As Figure 2 shown, the method may include the following steps:
[0072] Step S202, obtain a first request sent by the client, where the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta information of the target interface to be debugged.
[0073] In the technical solution provided in step S202 of the present disclosure above, the client sends a first request, and the server accepts the first request. Among them, the first request obtained by the server may be the target interface to be debugged.
[0074] Step S204, in response to the first request, generate data in a target format based on the target interface.
[0075] In the technical solution provided in step S204 of the present disclosure above, the server receives the first request from the client, then obtains the data in the target format based on the target interface, and sends the data in the target format to the client.
[0076] Step S206, return the data in the target format to the client, so that the client renders a first target page based on the target form generated from the data in the target format, and debugs the target interface on the first target page.
[0077] In the technical solution provided in step S206 of the present disclosure above, the server returns the data in the target format to the client, and the client renders a first target page based on the target form generated from the data in the target format, and debugs the target interface on the first target page.
[0078] Optionally, debugging the target interface on the first target page includes: in response to a debugging operation instruction acting on the first target page, debugging the target interface to obtain a debugging result, and displaying the debugging result on the first target page. The developer may adjust the request parameters in real time according to the debugging result.
[0079] Through the above steps S202 to S206, a first request sent by the client is obtained. The first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta-information of the target interface to be debugged. In response to the first request, data in the target format is generated based on the target interface. The data in the target format is returned to the client, so that the client renders the first target page based on the target form generated from the data in the target format, and debugs the target interface on the first target page. Thus, the behavior of calling the interface can be completed through simple interface operations, thereby improving the efficiency of debugging the interface and solving the technical problem of low efficiency in debugging the interface.
[0080] The above method of this embodiment will be further introduced in detail below.
[0081] As an alternative implementation, the method further includes: generating data in the target format based on the data packet corresponding to the target interface includes: generating data in the target format based on the data packet corresponding to the target interface.
[0082] In this embodiment, the data packet can be a data compression packet of the target interface, and the data in the target format can be used to represent the meta-information of the target interface, where the meta-information can include class name, method name, and request parameters.
[0083] Optionally, the data packet of the target interface is parsed to generate data in the target format.
[0084] As an alternative implementation, the method further includes: generating data in the target format based on the data packet corresponding to the target interface includes: sending a second request to the interface management system, where the second request is used to request to obtain data in the target format; obtaining the data in the target format obtained by the interface management system in response to the second request and parsing the data packet.
[0085] In this embodiment, the interface management system obtains data in the target format by parsing the data packet.
[0086] For example, parsing the service source code can include: annotating the interface that needs to generate a diagram (Josn schema), and then obtaining the service to be parsed through the application programming interface service source code (@API Service) annotation; the parsing method can include: annotating the method that needs to generate a diagram (Josn schema), and then obtaining the method to be parsed through the application programming interface method source code (@API Method) annotation.
[0087] The above technical solutions of the embodiments of the present disclosure will be further exemplified below in conjunction with preferred embodiments.
[0088] Currently, developers can help advertisers place ads through the Baidu Marketing Application Programming Interface (API). Information such as the API information, request parameter formats, and return parameter examples of the Baidu Marketing API is disclosed through the Commercial Developer Center. However, the Commercial Developer Center only provides relevant API documentation for the Baidu Marketing API and does not provide developers with relevant auxiliary tools. If developers need to make API calls, they need to do so through other tools on their own. If the API call fails, developers need to wait for the API to return and adjust the request parameters according to the returned information before they can continue debugging. This method not only reduces the access efficiency of developers but also wastes backend service resources.
[0089] In related technologies, developers use some small tools to test API calls (such as Postman and Curl), as Figure 3 shown, Figure 3 is a flowchart of an application programming interface call according to related technologies of the present disclosure, which may include the following steps:
[0090] S301, search for the application programming interface documentation;
[0091] S302, view the interface fields & limitations;
[0092] S302, construct an interface test tool request or initiate an interface access;
[0093] S304, determine whether the call is successful. If the call is successful, proceed to step S305; otherwise,
[0094] return to step S303;
[0095] S305, return the result.
[0096] Since the interface request and the application programming interface documentation are separated, each call requires a request to be sent to the server, and then the problem can only be exposed after being verified and returned by the backend. Moreover, there are many interface fields and many limitations, so the first API call requires repeated adjustment of request parameters. Therefore, in this mode, developers will choose to retain the call sample (Demo). However, after the interface is iteratively upgraded, the call sample also needs to be manually updated. Therefore, the above application programming interface call method is not only likely to cause API call failures but also imposes additional maintenance costs on developers.
[0097] In view of the above situation, this embodiment proposes a technical solution for building a visual debugging tool based on front-end and back-end collaboration. The tool can be linked with the application interface document to realize the collaborative viewing of the document and calling the interface. Moreover, the tool can interface the description and restrictions of each field, and complete the behavior of calling the interface through simple interface operations. In addition, the tool also has clear prompt information to prompt developers to adjust request parameters, helping developers to quickly complete the interface call in the commercial developer center, saving developers' labor costs and effectively improving access efficiency. The method of this embodiment is further introduced below.
[0098] The first step is to generate chart data on the backend.
[0099] The backend service corresponding to the visual debugging tool is based on the Hypertext Transfer (HTTP) protocol and connects to the Application Programming Interface (API) management system. The API management system pulls the API jar and parses it to generate chart data, which is then pushed to the backend service corresponding to the visual debugging tool in an active push manner. The API management system has formulated API publishing specifications, which use annotations to identify meta-information such as services and methods that need to be published. The meta-information can be the basic information of the interface, including: class name, method name, and request parameters.
[0100] The process of the application program interface management system pulling the application program interface compressed package (API jar) and parsing it is as follows Figure 4 As shown, Figure 4 It is a flowchart of parsing an application program interface compressed package according to an embodiment of the present disclosure, which may include the following steps: S401, parsing the compressed package; S402, parsing the service source code; S403, parsing the method; S404, parsing the interface parameter (request or return); S405, parsing the programming language class; S406, parsing the attribute; S407, judging whether the above-parsed attribute is a basic type, if so, the parsing ends, if not, returning to step S406, and only parsing is required.
[0101] Optionally, in step S402, parsing the service source code may include: marking the interface for which a diagram (Josn schema) needs to be generated, and then obtaining the service (Service) that needs to be parsed through the application program interface service source code (@API Service) annotation.
[0102] Optionally, in step S403, the parsing method may include: marking the method for which a schema (Josn schema) needs to be generated, and then obtaining the method (Method) that needs to be parsed through the application program interface method source code (@API Method) annotation.
[0103] Optionally, in step S403, the parsing method may further include: annotating the method parameters for which a chart (JSON schema) needs to be generated, and then obtaining the request type and return type of the method annotated with the application programming interface method source code (@API Method) as entity parsing.
[0104] Optionally, in step S404, parsing the interface parameters (request or return) may include: obtaining the attribute fields annotated with the application programming interface parameters (@API Param) in the request type and return type as entity recursive parsing. If the entity is a basic type of an object (such as Integer, Long, etc.), the recursive parsing ends.
[0105] Optionally, for the attribute fields in the request type or return type, as an entity, if the entity is still an object (such as a Java class) inside, then the attribute fields in the object need to be parsed until the attribute field type is the basic type of the object, and the parsing stops.
[0106] Optionally, after parsing, the above metadata is stored classified by module, interface information, and version.
[0107] Before the front-end renders the page, a request is sent to the back-end to obtain chart data. The back-end module requests the application programming interface management system according to information such as interface information and version. The application programming interface management system dynamically generates a chart according to the metadata information to ensure the accuracy of the chart and finally returns it to the front-end.
[0108] The second step is that the front-end uses the chart to render the page.
[0109] The front-end develops an interface (one-ui) component according to the chart, and constructs a form (OneForm) form component according to different interface components to achieve the effect of dynamic rendering. The main working principle of the form form is as Figure 5 、 Figure 6 shown, Figure 5 is a schematic diagram of the working principle of a form form according to an embodiment of the present disclosure, Figure 6 is a working flow chart of a visual debugging tool according to an embodiment of the present disclosure.
[0110] Judge whether it is a standard chart or a custom data chart that conforms to the form standard based on the incoming data. If it is a standard chart, configure the corresponding interface component (UI Component) attributes for each field according to the rules.
[0111] The form renders the form according to the passed data. If it is a simple type of data, the corresponding component is found from the widget. If it is an object or array type, the component in the widget is recursively called.
[0112] When generating components, the account (id) value is set for each component, and the default return value is generated according to the default parameters of the data chart.
[0113] The return value generated by the form can be obtained in the application interface exposed to the outside world.
[0114] Figure 7 FIG. 1 is a schematic diagram of a visual application program interface and component mapping relationship according to an embodiment of the present disclosure. Figure 7 As shown, the user selects the corresponding application program interface, the back-end interface returns an object in a chart format, and the front-end generates a corresponding form based on the object in a data chart format.
[0115] A data processing method software operation interface of the present disclosure is as follows Figure 8 As shown, Figure 8 It is a schematic diagram of a data processing method project demonstration according to an embodiment of the present disclosure.
[0116] The present invention opens up the application program interface management system through a back-end module, and the application program interface management system pulls the application program interface compressed package and parses it, and initiates a request to the back-end to obtain chart data. The back-end module requests the application program interface management system according to the interface information, version and other information, and the application program interface management system dynamically generates charts according to the metadata information. The front-end develops interface components according to the charts, and constructs a formal form component according to different interface components to achieve a dynamic rendering effect, thereby achieving the technical effect of improving the calling efficiency of the interface and solving the technical problem of low calling efficiency of the interface. The behavior of calling the interface can be completed through simple interface operations, thereby improving the efficiency of debugging the interface and solving the technical problem of low debugging efficiency of the interface.
[0117] The embodiment of the present disclosure also provides a data processing system for executing the data processing method embodiment.
[0118] Figure 9 Schematic diagram of a data processing system according to an embodiment of the present disclosure. Figure 9 As shown, the data processing system may include: a client and a server.
[0119] The client is used to determine the target interface to be debugged and send a first request to the server, wherein the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta information of the target interface to be debugged.
[0120] A server for generating data in a target format in response to a first request; wherein, a client is used to generate a target form based on the data in the target format returned by the server, render a first target page based on the target form, and debug the target interface on the first target page.
[0121] In the data processing system of this embodiment, the client determines the target interface to be debugged, sends a first request to the server, the server responds to the first request and generates data in the target format based on the target interface, and then the client generates a target form based on the data in the target format returned by the server, renders the first target page, and debugs the target interface on the first target page. Thus, the behavior of calling the interface can be completed through simple interface operations, thereby improving the efficiency of debugging the interface and solving the technical problem of low efficiency in debugging the interface.
[0122] The embodiment of the present disclosure also provides a data processing device for executing Figure 1 the data processing device shown in the illustrated embodiment.
[0123] Figure 10 is a schematic diagram of a data processing device according to an embodiment of the present disclosure. As Figure 10 shown, the data processing device 100 may include: a determination unit 1001, a first acquisition unit 1002, a first generation unit 1003, and a debugging unit 1004.
[0124] The determination unit 1001 is used to determine the target interface to be debugged.
[0125] The first acquisition unit 1002 is used to acquire data in the target format based on the target interface, wherein the data in the target format is used to represent the meta-information of the target interface.
[0126] The first generation unit 1003 is used to generate a target form based on the data in the target format.
[0127] The debugging unit 1004 is used to render a first target page based on the target form and debug the target interface on the first target page.
[0128] Optionally, the first generation unit 1003 includes: a first generation module for generating a plurality of target components based on the data in the target format; a first combination module for combining the plurality of target components to obtain a target form.
[0129] Optionally, the first generation module includes: a first determination sub-module for determining the target type of the data in the target format; a first acquisition sub-module for acquiring the corresponding plurality of target components in the target database according to the target type.
[0130] Optionally, the first determination sub-module is further configured to determine the target type of the data in the target format through the following steps: generate target parameters corresponding to the data structure of the target form for the data in the target format; determine the type of the target parameters as the target type.
[0131] Optionally, the first generation module further includes: a first generation sub-module, configured to generate target parameters corresponding to the data structure of the target form for the data in the target format, including: in response to the data in the target format being predetermined data, configuring corresponding component attributes for the data in the target format; generating target parameters from the component attributes.
[0132] Optionally, the first combination module further includes: a first determination sub-module, configured to determine the target identifier of each target component; a first generation sub-module, configured to generate return data corresponding to the target identifier based on the data in the target format, where the return data is the default return value of the target component.
[0133] Optionally, the debugging unit 1004 includes: an acquisition module, configured to acquire interface debugging parameters; a verification module, configured to verify the interface debugging parameters based on the data in the target format; a debugging module: configured to debug the target interface on the first target page, including: on the first target page, debugging the target interface based on the verified interface debugging parameters.
[0134] Optionally, the debugging unit 1004 further includes: a display module, configured to jump from a second target page to a third target page on the graphical user interface, where the second target page is used to display text information of the target interface, and the text information is used to describe the target interface; a determination module, configured to determine the target interface to be debugged, including: determining the target interface to be debugged on the third target page.
[0135] Optionally, the debugging module is further configured to debug the target interface on the first target page through the following steps: in response to a debugging operation instruction acting on the first target page, debugging the target interface to obtain a debugging result, and displaying the debugging result on the first target page.
[0136] In the data processing apparatus of this embodiment, a determination unit is configured to determine the target interface to be debugged; a first acquisition unit is configured to acquire data in the target format based on the target interface, where the data in the target format is used to represent the meta-information of the target interface; a first generation unit is configured to generate a target form based on the data in the target format; a debugging unit is configured to render the first target page based on the target form and debug the target interface on the first target page, thereby completing the behavior of calling the interface through simple interface operations, thus improving the efficiency of debugging the interface and solving the technical problem of low efficiency in debugging the interface.
[0137] The embodiments of the present disclosure also provide a data processing device for executing Figure 2 the data processing device shown in the embodiments.
[0138] Figure 11 FIG. is a schematic diagram of another data processing device according to an embodiment of the present disclosure. As Figure 11 shown, the data processing device 110 may include: a second acquisition unit 1101, a second generation unit 1102, and a return unit 1103.
[0139] The second acquisition unit 1101 is configured to acquire a first request sent by a client, where the first request is used to request to acquire data in a target format, and the data in the target format is used to represent meta information of a target interface to be debugged.
[0140] The second generation unit 1102 is configured to, in response to the first request, generate data in a target format based on the target interface.
[0141] The return unit 1103 is configured to return the data in the target format to the client, so that the client renders a first target page based on a target form generated from the data in the target format, and debugs the target interface on the first target page.
[0142] Optionally, the second generation unit 1102 includes: a generation module, configured to generate data in a target format based on a data packet corresponding to the target interface.
[0143] Optionally, the generation module includes: a sending sub-module, configured to send a second request to an interface management system, where the second request is used to request to acquire data in a target format; an acquisition sub-module, configured to acquire the data in the target format obtained by the interface management system by parsing the data in response to the second request.
[0144] In the data processing device of this embodiment, the second acquisition unit is configured to acquire a first request sent by a client, where the first request is used to request to acquire data in a target format, and the data in the target format is used to represent meta information of a target interface to be debugged; the second generation unit is configured to, in response to the first request, generate data in a target format based on the target interface; the return unit is configured to return the data in the target format to the client, so that the client renders a first target page based on a target form generated from the data in the target format, and debugs the target interface on the first target page, thereby completing the behavior of calling an interface through simple interface operations, thus improving the efficiency of debugging the interface and solving the technical problem of low efficiency in debugging the interface.
[0145] In the technical solution of the present disclosure, the acquisition, storage, and application of user personal information involved all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0146] Embodiments of the present disclosure provide an electronic device, which may include: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the data processing method of the embodiments of the present disclosure.
[0147] Optionally, the above-mentioned electronic device may further include a transmission device and an input / output device, wherein, the transmission device is connected to the above-mentioned processor, and the input / output device is connected to the above-mentioned processor.
[0148] According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the data processing method of the embodiments of the present disclosure.
[0149] Optionally, in this embodiment, the above-mentioned non-volatile storage medium may be configured to store a computer program for executing the following steps:
[0150] S1, determine a target interface to be debugged;
[0151] S2, obtain data in a target format based on the target interface, wherein the data in the target format is used to characterize the meta-information of the target interface;
[0152] S3, generate a target form based on the data in the target format;
[0153] S4, render a first target page based on the target form, and debug the target interface on the first target page.
[0154] Optionally, in this embodiment, the above-mentioned non-volatile storage medium may also be configured to store a computer program for executing the following steps:
[0155] S1, determine a target interface to be debugged;
[0156] S2, obtain data in a target format based on the target interface, wherein the data in the target format is used to characterize the meta-information of the target interface;
[0157] S3, generate a target form based on the data in the target format;
[0158] S4, render a first target page based on the target form, and debug the target interface on the first target page.
[0159] Optionally, in this embodiment, the non-transitory computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or apparatuses, or any suitable combination of the foregoing. More specific examples of the readable storage medium would include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0160] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, including a computer program, which when executed by a processor, implements the following steps:
[0161] S1, determining a target interface to be debugged;
[0162] S2, obtaining data in a target format based on the target interface, where the data in the target format is used to characterize meta-information of the target interface;
[0163] S3, generating a target form based on the data in the target format;
[0164] S4, rendering a first target page based on the target form and debugging the target interface on the first target page.
[0165] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0166] Figure 12 A schematic block diagram of an example electronic device 1200 that can be used to implement the embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0167] As Figure 12As shown, device 1200 includes a computing unit 1201 which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1202 or a computer program loaded from a storage unit 12012 into a random access memory (RAM) 1203. In the RAM 1203, various programs and data required for the operation of device 1200 can also be stored. The computing unit 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.
[0168] Multiple components in device 1200 are connected to the I / O interface 1205, including: an input unit 1206, such as a keyboard, a mouse, etc.; an output unit 1207, such as various types of displays, speakers, etc.; a storage unit 12012, such as a magnetic disk, an optical disc, etc.; and a communication unit 1209, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1209 allows device 1200 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0169] The computing unit 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 1201 executes the various methods and processes described above, such as a data processing method. For example, in some embodiments, the data processing method can be implemented as a computer software program which is tangibly contained in a machine-readable medium, such as the storage unit 12012. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 1200 via the ROM1202 and / or the communication unit 1209. When the computer program is loaded into the RAM 1203 and executed by the computing unit 1201, one or more steps of the data processing method described above can be executed. Alternatively, in other embodiments, the computing unit 1201 can be configured to execute the method data processing method by any other appropriate means (e.g., by means of firmware).
[0170] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0171] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0172] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0173] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0174] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.
[0175] A computer system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, or a server of a distributed system, or a server incorporating blockchain.
[0176] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0177] The above specific embodiments do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.
Claims
1. A data processing method, applied to a client, including: determining a target interface to be debugged; obtaining data in a target format based on the target interface, where the data in the target format is used to represent meta-information of the target interface; generating a target form based on the data in the target format; rendering a first target page based on the target form, and debugging the target interface on the first target page; wherein, the method further includes: jumping from a second target page to a third target page on a graphical user interface, where the second target page is used to display text information of the target interface, and the text information is used to describe the target interface; the determining the target interface to be debugged includes: determining the target interface to be debugged on the third target page; wherein, the obtaining the data in the target format based on the target interface includes: obtaining the data in the target format based on a data packet corresponding to the target interface; wherein, the generating the target form based on the data in the target format includes: generating a plurality of target components based on the data in the target format; combining the plurality of target components to obtain the target form.
2. The method according to claim 1, wherein, the generating a plurality of target components based on the data in the target format includes: determining a target type of the data in the target format; obtaining the corresponding plurality of target components in a target database according to the target type.
3. The method according to claim 2, wherein, the determining the target type of the data in the target format includes: generating target parameters corresponding to a data structure of the target form from the data in the target format; determining the type of the target parameters as the target type.
4. The method according to claim 3, wherein, the generating target parameters corresponding to a data structure of the target form from the data in the target format includes: in response to the data in the target format being predetermined data, configuring corresponding component attributes for the data in the target format; generating the target parameters from the component attributes.
5. The method according to claim 1, further including: determining a target identifier for each of the target components; generating return data corresponding to the target identifier based on the data in the target format, where the return data is a default return value of the target component.
6. The method according to claim 1, wherein, the method further includes: obtaining interface debugging parameters; validating the interface debugging parameters based on the data in the target format; debugging the target interface on the first target page includes: debugging the target interface on the first target page based on the interface debugging parameters that pass the validation.
7. The method according to any one of claims 1 to 6, wherein, debugging the target interface on the first target page includes: responding to a debugging operation instruction acting on the first target page, debugging the target interface to obtain a debugging result, and displaying the debugging result on the first target page.
8. A data processing method, including: Obtain a first request sent by the client, where the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta-information of the target interface to be debugged; Respond to the first request and generate the data in the target format based on the target interface; Return the data in the target format to the client, so that the client generates multiple target components based on the data in the target format; combine the multiple target components to obtain a target form, render the target form to a first target page, and debug the target interface on the first target page; Among them, generating the data in the target format based on the target interface includes: sending a second request to the interface management system, where the second request is used to request to obtain the data in the target format; obtaining the data in the target format obtained by the interface management system parsing the data in response to the second request.
9. A data processing system, including: A client and a server, where the client is used to determine the target interface to be debugged and send a first request to the server, where the first request is used to request to obtain data in a target format, and the data in the target format is used to represent the meta-information of the target interface to be debugged; the server is used to respond to the first request and obtain the data in the target format based on the data packet corresponding to the target interface; Among them, the client is used to generate multiple target components based on the data in the target format returned by the server; combine the multiple target components to obtain a target form, render a first target page based on the target form, and debug the target interface on the first target page; Among them, the client is further used to jump from a second target page to a third target page on the graphical user interface, where the second target page is used to display the text information of the target interface, and the text information is used to describe the target interface; The client determines the target interface to be debugged through the following steps: determining the target interface to be debugged on the third target page.
10. A data processing device, applied to a client including: A determination unit, used to determine the target interface to be debugged; A first acquisition unit, used to obtain data in a target format based on the target interface, where the data in the target format is used to represent the meta-information of the target interface; A first generation unit, used to generate a target form based on the data in the target format; A debugging unit, used to render a first target page based on the target form and debug the target interface on the first target page; Among them, the device is further used to jump from a second target page to a third target page on the graphical user interface, where the second target page is used to display the text information of the target interface, and the text information is used to describe the target interface; The determination unit is used to determine the target interface to be debugged through the following steps: determining the target interface to be debugged on the third target page; The first acquisition unit is configured to obtain data in a target format based on the target interface through the following steps: obtaining the data in the target format based on the data packet corresponding to the target interface; The first generation unit is configured to generate the target form based on the data in the target format through the following steps, including: generating a plurality of target components based on the data in the target format; combining the plurality of target components to obtain the target form.
11. A data processing device comprising: A second acquisition unit, configured to acquire a first request sent by a client, where the first request is used to request to acquire data in a target format, and the data in the target format is used to represent meta-information of a target interface to be debugged; A second generation unit, configured to respond to the first request and generate the data in the target format based on the target interface; A return unit, configured to return the data in the target format to the client, so that the client generates a plurality of target components based on the data in the target format; combines the plurality of target components to obtain a target form, renders the target form to a first target page, and debugs the target interface on the first target page; wherein, the second generation unit is configured to generate the data in the target format based on the target interface through the following steps: sending a second request to an interface management system, where the second request is used to request to acquire the data in the target format; acquiring the data in the target format obtained by the interface management system in response to the second request and parsing the data included.
12. An electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-8.
13. A non-transitory computer-readable storage medium storing computer instructions wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
14. A computer program product comprising a computer program, where the computer program, when executed by a processor, implements the method according to any one of claims 1-8.
Citation Information
Patent Citations
Mobile terminal cross-platform application development framework and method based on front-end framework
CN106990966A
Interface testing method and interface testing device
CN110032511A