Application program interface editing method, device, electronic device and medium
Through visual API programming methods, the visual engine and component drag and drop operations are used to generate application program interfaces, which solves the problem of time-consuming and labor-consuming traditional API programming, improves development efficiency and code reuse rate, and reduces costs.
Patent Information
- Application Number
- CN202111650861.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In front-end separation technology, traditional application program interface (API) programming methods require a lot of time and labor costs, and due to inconsistent development cycles, it is easy to cause disconnection in docking time points and affect project progress.
By obtaining project configuration information and basic interface information, loading the visualization engine, creating a visual container, and dragging and adding data instance components, data processing components and code block components, connecting each component to generate a target application program interface according to the execution process, realizing a visual API programming.
It improves the time efficiency of API development, reduces attention to code implementation, automatically transforms the stream processing process into code logic, improves code reuse rate and development efficiency, and reduces costs.
Smart Images

Figure CN114327428B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an application program interface editing method, an application program interface editing device, an electronic device, and a computer-readable storage medium. Background Art
[0002] At present, with the development of Internet technology and the increasing number of terminal devices, front-end and back-end separation technology has become an indispensable technology in the field of mobile Internet. The continuous improvement of front-end and back-end separation technology has made the division of labor and system boundary division between the front-end and back-end increasingly clear. It is precisely because of this increasingly strict boundary definition that the application program interface (API) has become an important bridge between the two. The focus of the back-end work falls on the programming of the API interface. The traditional programming method requires a lot of time and manpower costs. In addition, due to the inconsistency of the front-end and back-end development cycles, it is easy to cause the docking time point to be out of sync, affecting the normal progress of the project. Summary of the invention
[0003] In view of this, embodiments of the present application provide an application program interface editing method, an application program interface editing device, an electronic device, and a computer-readable storage medium.
[0004] The application program interface editing method of the embodiment of the present application includes:
[0005] Get project configuration information and basic interface information;
[0006] Loading a visualization engine according to the project configuration information and the basic interface information, and creating a visualization container;
[0007] Drag and drop at least one data instance component to the visualization container, wherein the data instance component is used to define a data instance;
[0008] Drag and drop a data processing component and / or a code block component to the visualization container, wherein the data processing component and / or the code block component is used to process the data instance;
[0009] Connect components according to the execution flow to generate the target application interface.
[0010] In some embodiments, the application program interface editing method includes:
[0011] Create a project to be edited according to user operations to obtain the project configuration information according to user input, and the project configuration information includes: project name, project description, construction language and underlying framework, data source, cache, message middleware and / or third-party integration.
[0012] In some embodiments, the application program interface editing method includes:
[0013] The interface to be edited is created according to the user operation to obtain the basic information of the interface according to the user input, and the basic information of the interface includes: a calling method.
[0014] In some embodiments, the application program interface editing method includes:
[0015] After creating the visualization container, drag and drop a configuration component to add it to the visualization container. The configuration component is used to configure the external interface business parameters and verification conditions of the interface operation, the interface return data instance and the return format.
[0016] In some embodiments, dragging and adding at least one data instance component to the visualization container includes:
[0017] Modify the component properties of the data instance component to configure the data source of the data instance component and set the output field of the data instance component.
[0018] In some embodiments, dragging and adding the data processing component and / or the code block component to the visualization container includes:
[0019] After dragging and adding the data processing component to the visualization container, modify the component properties of the data processing component according to the type of the data processing component to configure the parameters of the data processing component. The type of the data processing component includes: one or more of connection, merging, splitting, sorting, deduplication, type conversion, missing value filling, screening, regression, verification, analysis or extraction.
[0020] In some embodiments, dragging and adding the data processing component and / or the code block component to the visualization container includes:
[0021] After the code block component is dragged and added to the visualization container, the preset operation is performed on the data instance using code in the code block component.
[0022] In some embodiments, the application program interface editing method includes:
[0023] In the case where the interface to be edited is a business interface, adding a general business component to the visualization container;
[0024] Modify the component attributes of the general service component to configure the general service interface to input the data instance.
[0025] In some embodiments, connecting the components according to the execution process to generate a target application program interface includes:
[0026] Connect components according to the execution flow to generate target files;
[0027] Parsing the target file by an application program interface parser to generate a preview interface for interface debugging;
[0028] After the interface debugging is completed, the target application program interface is generated according to the target file.
[0029] In some implementations, generating the target application program interface according to the target file includes:
[0030] The target file is sent to the cloud, so that the cloud constructs the target application program interface according to the target file.
[0031] In some implementations, generating the target application program interface according to the target file includes:
[0032] An application program interface executable file is downloaded according to the target file, and the target application program interface is run according to the application executable file.
[0033] The application program interface editing device of the embodiment of the present application includes:
[0034] The acquisition module is used to obtain project configuration information and basic interface information;
[0035] A creation module is used to load a visualization engine according to the project configuration information and the basic interface information, and to create a visualization container;
[0036] A first adding module, used to drag and add at least one data instance component to the visualization container, wherein the data instance component is used to define a data instance;
[0037] A second adding module, used to drag and add a data processing component and / or a code block component to the visualization container, wherein the data processing component and / or the code block component is used to process the data instance; and
[0038] The generation module is used to connect the components according to the execution process to generate the target application program interface.
[0039] The electronic device of the embodiment of the present application includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the application program interface editing method is implemented.
[0040] The non-volatile computer-readable storage medium of the embodiment of the present application includes a computer program, and when the computer program is executed by one or more processors, the above-mentioned application program interface editing method is implemented.
[0041] In the application program interface editing method, application program interface editing device, electronic device and computer-readable storage medium of the present application, the visualization engine is loaded by obtaining the project configuration information and basic interface information input by the user, and a visualization container is created, and then at least one data instance component is dragged and added to the visualization container, and the data processing component and / or the code block component is dragged and added to the visualization container, so that the data processing component and / or the code block component processes the data instance, thereby connecting each component according to the execution process to generate the target application program interface. In this way, visual application program interface programming is realized, and the time efficiency of application program interface development is improved. In addition, the user does not need to pay attention to how the code is implemented, but only needs to design the stream processing process according to the requirements. The stream processing system will automatically convert the stream processing process configuration information into code logic. In addition, the data processing component can be reused, which improves the reuse rate and code quality of the same function code, and has high development efficiency, fast iteration speed and low development cost.
[0042] Additional aspects and advantages of the embodiments of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0044] Figure 1 is a flowchart of an application program interface editing method of certain implementation modes of the present application;
[0045] Figure 2 It is a module schematic diagram of an application program interface editing device of certain embodiments of the present application;
[0046] Figure 3 is a scenario diagram of a data processing component of certain embodiments of the present application;
[0047] Figure 4 It is a scene schematic diagram of the application program interface editing method of certain embodiments of the present application;
[0048] Figure 5-9 is a flowchart of an application program interface editing method of certain implementation modes of the present application;
[0049] Fig.10 It is a module schematic diagram of an application program interface editing device of certain embodiments of the present application;
[0050] Figure 11-13 It is a flowchart of the application program interface editing method of certain embodiments of the present application. DETAILED DESCRIPTION
[0051] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.
[0052] See also Figure 1 The present application provides an application program interface editing method, the application program interface editing method comprising:
[0053] 01: Get project configuration information and basic interface information;
[0054] 02: Load the visualization engine according to the project configuration information and basic interface information, and create a visualization container;
[0055] 03: Drag and drop at least one data instance component into the visualization container. The data instance component is used to define the data instance.
[0056] 04: Drag and drop a data processing component and / or a code block component into the visualization container, where the data processing component and / or the code block component is used to process the data instance; and
[0057] 05: Connect components according to the execution flow to generate the target application interface.
[0058] Please combine Figure 2 Accordingly, the embodiment of the present application also provides an application interface editing device 100, which includes an acquisition module 110, a creation module 120, a first adding module 130, a second adding module 140, a second adding module 150 and a generation module 150, wherein step 01 can be implemented by the acquisition module 110, step 02 can be implemented by the creation module 120, step 03 can be implemented by the first adding module 130, step 04 can be implemented by the second adding module 140, and step 05 can be implemented by the generation module 150.
[0059] In other words, the acquisition module 110 can be used to acquire project configuration information and basic interface information; the creation module 120 can be used to load the visualization engine according to the project configuration information and basic interface information, and create a visualization container; the first adding module 130 can be used to drag and add at least one data instance component to the visualization container, and the data instance component is used to define the data instance; the second adding module 140 can be used to drag and add the data processing component and / or the code block component to the visualization container, and the data processing component and / or the code block component is used to process the data instance; the generation module 150 can be used to connect the components according to the execution process to generate the target application interface.
[0060] The present application also provides an electronic device, which includes a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the above-mentioned application interface editing method is implemented, or in other words, the processor is used to obtain project configuration information and basic interface information, and load the visualization engine according to the project configuration information and basic interface information, and create a visualization container; the processor can also be used to drag and add at least one data instance component to the visualization container, the data instance component is used to define the data instance, and drag and add the data processing component and / or the code block component to the visualization container, the data processing component and / or the code block component is used to process the data instance, and connect the components according to the execution process to generate the target application interface.
[0061] In the application program interface editing method, application program interface editing device and electronic device of the present application, the visualization engine is loaded by acquiring the project configuration information and basic interface information input by the user, and a visualization container is created, and then at least one data instance component is dragged and added to the visualization container, and the data processing component and / or the code block component is dragged and added to the visualization container, so that the data processing component and / or the code block component processes the data instance, thereby connecting each component according to the execution process to generate the target application program interface. In this way, visual application program interface programming is realized, and the time efficiency of application program interface development is improved. In addition, the user does not need to pay attention to how the code is implemented, but only needs to design the stream processing process according to the requirements. The stream processing system will automatically convert the stream processing process configuration information into code logic. In addition, the data processing component can be reused, which improves the reuse rate and code quality of the same function code, and has high development efficiency, fast iteration speed and low development cost.
[0062] It should be noted that Application Programming Interface (API) refers to some predefined interfaces (such as functions, HTTP interfaces), or agreements for connecting different components of a software system. It is used to provide a set of routines that applications and developers can access based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism.
[0063] The visualization engine can be the G6 graph visualization engine, which is a simple, easy-to-use, and complete graph visualization engine. Based on its high customization capability, it provides a series of graph visualization solutions designed to be easy to use. It can help developers build their own graph visualization, graph analysis, or graph editor applications.
[0064] Specifically, the project configuration information includes: project name, project description, construction language and underlying framework, data source, cache, message middleware and / or third-party integration components, etc.
[0065] The construction language and underlying framework can be Springboot based on Java, Diesel based on Python, or Gin based on Go. The data source can be relational or non-relational data sources such as Mysql, Oracle, Mongodb or Redis. The message middleware can be Kafuka, ActiveMq, etc. The third-party integration components can be maps, messages, payments, voice, video or big data, etc.
[0066] Project configuration information is generated by user input. For example, in step 01, after the project to be edited is created according to the user operation, the project configuration information such as the project name can be obtained according to the user input. Specifically, the user first creates a project, and then fills in the basic information of the project (project name and project description) after creating the project, and then selects the implementation language and underlying framework of the project, and then turns on the message middleware, and then enables the third-party integration component.
[0067] The interface configuration information may include a calling method, wherein the calling method may be a calling method by an object name, a method name, a calling method by a NEW keyword, or a calling method by a class name, a method name. The interface configuration information is generated by user input. For example, in step 01, after the interface to be edited is created according to user operation, basic interface information may be obtained according to user input. In this way, the interface configuration information may be generated.
[0068] The data instance component may include multiple data instance components, and the data instance component is used to configure component data and define the configured component data as a data instance.
[0069] Data processing components refer to the code (function or service) that performs real-time logical processing on data. The sum of all data processing components is called a component set. Figure 3 In the application editor, data processing components may include but are not limited to connection (JOIN), merging, splitting, deduplication, type conversion, missing value filling, screening, regression, verification, analysis and extraction. Each type of data processing component corresponds to a processing method. For example, the type conversion processing component is used to convert the type of data instance, and the screening processing component is used to screen the data instance. The missing value filling processing component is used to fill the missing values of the data instance. In this way, the user can drag any data processing component into the visualization container to perform the corresponding data processing, which simplifies the user development process.
[0070] In step 04, according to the business needs of the application program interface, the user can drag one or more types of data processing components into the visualization container. For example, according to business needs, data processing components such as merge processing components, split processing components, sort processing components, type conversion processing components, missing value filling processing components, and verification processing components can be added to the visualization container to process the data instance. In this way, through the setting of data processing components, when developing related application program interfaces, users only need to add data processing components related to the business to the visualization window to process the corresponding data instances, thereby improving the reuse rate of the same functional code and the quality of the code.
[0071] The code block component is used by users to generate codes, where the codes are used to implement editing operations on data instances.
[0072] In addition, it should be noted that in step 04, according to business needs, the data processing component can be dragged and added to the visualization container, and only the data processing component can process the data instance. According to business needs, only the code block component can be dragged and added to the visualization container, and the code block component can process the data instance. According to business needs, the data processing component and the code block component can be dragged and added to the visualization container, and the data instance can be processed by the data processing component and the code block component.
[0073] For example, please combine Figure 4In building an online application interface project, developers first drag and drop data instance components to the visualization container to generate a read data table containing data instances. Developers can add data processing components such as JOIN processing components, merge processing components, standardization processing components, type conversion components, missing value filling processing components, deduplication processing components, and screening processing components to the visualization container in sequence, and add code block components used for custom preprocessing of data instances to the visualization container, so as to connect each component in sequence according to the execution process to generate the target application interface.
[0074] Please combine Figure 5 In some embodiments, after step 02, the application program interface editing method further includes:
[0075] 06: After creating a visualization container, drag and drop the configuration component to the visualization container. The configuration component is used to configure the external interface business parameters and verification conditions of the interface operation, the interface return data instance and return format.
[0076] Please refer to further Figure 2 In some implementations, step 06 can be implemented by the first adding module 120, or in other words, the first adding module 120 can also be used to drag and add the configuration component to the visualization container after creating the visualization container, and the configuration component is used to configure the external interface business parameters and verification conditions of the interface operation, the interface return data instance and the return format.
[0077] In some embodiments, the processor may also be used to drag and add a configuration component to the visualization container after creating the visualization container, where the configuration component is used to configure external interface business parameters and verification conditions for interface operation, interface return data instances, and return formats.
[0078] In this way, by adding the configuration component to the visualization container, the configuration of the external interface business parameters and verification conditions of the application interface operation, the interface return data instance and the return format is realized.
[0079] See also Figure 6 In some embodiments, step 03 includes:
[0080] 031: Modify the component properties of the data instance component to configure the data source of the data instance component and set the output fields of the data instance component.
[0081] In some embodiments, sub-step 031 may be implemented by the first adding module 130 , or in other words, the first adding module 130 is also used to modify the component properties of the data instance component to configure the data source of the data instance component and set the output field of the data instance component.
[0082] In some embodiments, the processor may also be configured to modify component properties of the data instance component to configure the data source of the data instance component and set output fields of the data instance component.
[0083] The data source configured by the data instance component can be any one of Mysql, Oracle and Mongodb, and the component output field can be set to field1 or field2. In this way, the data instance component can be defined as a data instance, so that the qualified data can be filtered out according to the application interface business parameters.
[0084] Furthermore, according to the needs of the interface business, you can repeatedly drag the data instance components to the container, and after dragging the data instance components into the visualization container, modify the component properties of each data instance component to configure the data source and component output fields of each data instance component, thereby obtaining a data instance set, and define data cache instances and data message instances according to the needs of the interface business processing scenarios.
[0085] See also Figure 7 In some embodiments, step 04 includes:
[0086] 041: After dragging and dropping the data processing component into the visualization container, modify the component properties of the data processing component according to the type of the data processing component to configure the parameters of the data processing component.
[0087] In some embodiments, sub-step 041 can be implemented by the second adding module 140, or in other words, the second adding module 140 is also used to drag and add the data processing component to the visualization container, and then modify the component properties of the data processing component according to the type of the data processing component to configure the parameters of the data processing component.
[0088] In some embodiments, the processor may be further configured to modify component properties of the data processing component according to the type of the data processing component after dragging and adding the data processing component to the visualization container, so as to configure parameters of the data processing component.
[0089] For example, when building an online application interface project, users can add data processing components such as merging, splitting, sorting, type conversion, and missing value filling to the visualization container, and configure the parameters of the data processing components to meet the business needs of the online application interface.
[0090] See also Figure 8 In some embodiments, step 04 includes:
[0091] 042: After dragging the code block component to the visualization container, use code in the code block component to perform preset operations on the data instance.
[0092] In some embodiments, sub-step 042 may be implemented by the second adding module 140 , or in other words, the second adding module 140 is also used to drag and add the code block component to the visualization container, and then use code in the code block component to perform preset operations on the data instance.
[0093] In some implementations, the processor may also be configured to drag and drop a code block component into the visualization container, and then use code in the code block component to perform a preset operation on the data instance.
[0094] The preset operation may be operations such as adding a data instance, deleting a data instance, modifying a data instance, and / or checking a data instance. For example, the preset operation may be a check operation, that is, the data instance is checked using code in the code block component. For another example, the preset operation may be a delete data instance and a modify data instance operation, that is, the deletion and modification of some or all data instances may be implemented using code in the code block component. In this way, it is convenient for users to directly edit the data instance, which greatly improves efficiency.
[0095] Please combine Fig. 9 In some embodiments, before step 05, the application program interface editing method further includes:
[0096] 07: When the interface to be edited is a business interface, add the general business component to the visualization container;
[0097] 08: Modify the component properties of the general business component to configure the general business interface input data instance.
[0098] Please refer to further Fig.10 In some embodiments, the application program interface editing device 100 further includes a third adding module 160 and a modifying module 170, wherein step 07 can be implemented by the third adding module 160, and step 08 can be implemented by the modifying module 170. In other words, the third adding module 160 is used to add the general business component to the visualization container when the interface to be edited is a business interface; the modifying module 170 can be used to modify the component properties of the general business component to configure the general business interface input data instance.
[0099] In some implementations, the processor is configured to, when the interface to be edited is a business interface, add a general business component to the visualization container and modify component properties of the general business component to configure the general business interface input data instance.
[0100] It should be noted that the general business interface may include a login business interface, a list business interface, a delete business interface, etc. In this way, by adding the general business component to the visualization container, the construction of the general business interface is achieved.
[0101] See also Fig.11 In some embodiments, step 05 includes:
[0102] 051: Connect components according to the execution process to generate target files;
[0103] 052: Parse the target file through the application interface parser to generate a preview interface for interface debugging;
[0104] 053: After the interface debugging is completed, the target application interface is generated according to the target file.
[0105] Please refer to further Figure 2 In some embodiments, sub-steps 051-053 can be implemented by the generation module 150, or in other words, the generation module 150 is also used to connect the components according to the execution process to generate a target file; and parse the target file through the application interface parser to generate a preview interface for interface debugging, and after the interface debugging is completed, generate a target application interface according to the target file.
[0106] In some embodiments, the processor is used to connect the components according to the execution process to generate a target file; and parse the target file through an application interface parser to generate a preview interface for interface debugging, and after the interface debugging is completed, generate a target application interface according to the target file.
[0107] The target file may be, but is not limited to, an Abstract Syntax Tree (AST) file or a JSON file. As those skilled in the art will appreciate, AST is an abstract representation of the syntax structure of a source code, which represents the syntax structure of a programming language in a tree-like form, and each node on the tree represents a structure in the source code. The parsing and verification logic of the AST file is separated from the implementation part, and the AST parser is indeed easier to understand and maintain.
[0108] In this embodiment, the target file may be an AST file, and the application program interface parser may be an AST parser, that is, the processor connects the components according to the execution process to generate an AST file, and parses the AST file through the AST parser, thereby generating a preview interface in the AST parser. When the interface debugging of the preview interface determines that the preview interface is correct, the target application program interface can be generated from the AST file.
[0109] See also Fig.12 In some embodiments, sub-step 05 includes:
[0110] 0531: Send the target file to the cloud so that the cloud builds a target application program interface according to the target file.
[0111] Please refer to further Figure 2 In some implementations, sub-step 0531 can be implemented by the generation module 150, or in other words, the generation module 150 is also used to send the target file to the cloud so that the cloud builds a target application program interface based on the target file.
[0112] In some embodiments, the processor is used to send the target file to the cloud, so that the cloud builds a target application program interface according to the target file.
[0113] In this embodiment, the cloud may include a semantic converter, wherein the semantic converter can perform semantic conversion on the target file to generate a target application program interface based on the set underlying framework and construction semantics. In this way, the target application program interface is generated according to the target file through the cloud server, and the electronic device can obtain the target application program interface from the cloud server, avoiding the need for the electronic device to set up a semantic converter to construct the target application program interface, reducing the data processing amount of the electronic device, and improving the efficiency of the electronic device.
[0114] See also Fig.13 In some embodiments, sub-step 05 includes:
[0115] 0532: Download the application program interface executable file according to the target file, and run the target application program interface according to the application executable file.
[0116] Please refer to further Figure 2 In some implementations, sub-step 0532 can be implemented by the generation module 150, or in other words, the generation module 150 is also used to download the application program interface executable file according to the target file, and run the target application program interface according to the application executable file.
[0117] In some embodiments, the processor is used to download an application program interface executable file according to the target file, and run the target application program interface according to the application executable file.
[0118] In this way, after the electronic device downloads the API executable file according to the target file, when the electronic device executes the API executable file, the electronic device can run the target API.
[0119] The present application also provides a non-volatile computer-readable storage medium containing a computer program. When the computer program is executed by one or more processors, the application program interface editing method of any of the above embodiments is implemented.
[0120] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related software through a computer program. The program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM), etc.
[0121] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in combination with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction. At the same time, the description with reference to the terms "first", "second" etc. is intended to distinguish the same or similar operations. In some embodiments, there is a logical relationship between "first" and "second", but in some embodiments, there is not necessarily a logical or circumstantial relationship. It needs to be determined according to the actual embodiment and should not be determined only by the literal meaning.
[0122] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0123] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. An application program interface editing method, characterized in that: The application program interface editing method comprises: Get project configuration information and basic interface information; Loading a visualization engine according to the project configuration information and the basic interface information, and creating a visualization container; Drag and drop at least one data instance component to the visualization container, wherein the data instance component is used to define a data instance; Drag and drop a data processing component and / or a code block component to the visualization container, wherein the data processing component and / or the code block component is used to process the data instance; Connect components according to the execution flow to generate a target application interface; The application program interface editing method also includes: Creating a project to be edited according to user operations to obtain the project configuration information according to user input, the project configuration information including: project name, project description, construction language and underlying framework, data source, cache, message middleware and third-party integration components; The application program interface editing method also includes: Create an interface to be edited according to user operation to obtain basic information of the interface according to user input, wherein the basic information of the interface includes: calling method; The step of dragging and dropping at least one data instance component to the visualization container comprises: Modify the component properties of the data instance component to configure the data source of the data instance component and set the output field of the data instance component.
2. The method for editing an application program interface according to claim 1, characterized in that: The application program interface editing method also includes: After creating the visualization container, drag and drop a configuration component to add it to the visualization container. The configuration component is used to configure the external interface business parameters and verification conditions of the interface operation, the interface return data instance and the return format.
3. The method for editing an application program interface according to claim 1, characterized in that: The step of dragging and adding the data processing component and / or the code block component to the visualization container includes: After dragging and adding the data processing component to the visualization container, modify the component properties of the data processing component according to the type of the data processing component to configure the parameters of the data processing component. The type of the data processing component includes: one or more of connection, merging, splitting, sorting, deduplication, type conversion, missing value filling, screening, regression, verification, analysis or extraction.
4. The method for editing an application program interface according to claim 1, characterized in that: The step of dragging and dropping the data processing component and / or the code block component to the visualization container further includes: After the code block component is dragged and added to the visualization container, the preset operation is performed on the data instance using code in the code block component.
5. The method for editing an application program interface according to claim 1, characterized in that: The application program interface editing method also includes: In the case where the interface to be edited is a business interface, adding a general business component to the visualization container; Modify the component attributes of the general service component to configure the general service interface to input the data instance.
6. The method for editing an application program interface according to claim 1, characterized in that: The step of connecting the components according to the execution process to generate a target application program interface includes: Connect components according to the execution flow to generate target files; Parsing the target file by an application program interface parser to generate a preview interface for interface debugging; After the interface debugging is completed, the target application program interface is generated according to the target file.
7. The method for editing an application program interface according to claim 6, characterized in that: Generating the target application program interface according to the target file includes: The target file is sent to the cloud, so that the cloud constructs the target application program interface according to the target file.
8. The method for editing an application program interface according to claim 6, characterized in that: Generating the target application program interface according to the target file includes: An application program interface executable file is downloaded according to the target file, and the target application program interface is run according to the application executable file.
9. An application program interface editing device, characterized in that: The application program interface editing device comprises: The acquisition module is used to obtain project configuration information and basic interface information; A creation module is used to load a visualization engine according to the project configuration information and the basic interface information, and to create a visualization container; A first adding module, used to drag and add at least one data instance component to the visualization container, wherein the data instance component is used to define a data instance; A second adding module, used to drag and add a data processing component and / or a code block component to the visualization container, wherein the data processing component and / or the code block component is used to process the data instance; and A generation module, used for connecting various components according to the execution process to generate a target application program interface; The acquisition module is further used to create a project to be edited according to user operations to acquire the project configuration information according to user input, wherein the project configuration information includes: project name, project description, construction language and underlying framework, data source, cache, message middleware and third-party integration components; The acquisition module is further used to create an interface to be edited according to user operations to acquire basic information of the interface according to user input, wherein the basic information of the interface includes: a calling method; The first adding module is further used to modify the component properties of the data instance component to configure the data source of the data instance component and set the output field of the data instance component.
10. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the application program interface editing method according to any one of claims 1 to 8 is implemented.
11. A non-volatile computer-readable storage medium containing a computer program, characterized in that: When the computer program is executed by one or more processors, the application program interface editing method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Automatic generation method for RESTful API (Application Program Interface) code on the basis of ontology
CN108170426A
Multi-person cooperative visual data mining system
CN112632146A