CN116991370A - System and method for generating application program interface based on data engine and flow engine - Google Patents

System and method for generating application program interface based on data engine and flow engine Download PDF

Info

Publication number
CN116991370A
CN116991370A CN202310894530.4A CN202310894530A CN116991370A CN 116991370 A CN116991370 A CN 116991370A CN 202310894530 A CN202310894530 A CN 202310894530A CN 116991370 A CN116991370 A CN 116991370A
Authority
CN
China
Prior art keywords
data
nodes
return
data set
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310894530.4A
Other languages
Chinese (zh)
Inventor
严伟强
钟宏泽
张春旺
王锦全
施彦
刘伟松
黄盼林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Zhenshu Technology Co ltd
Original Assignee
Zhejiang Zhenshu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Zhenshu Technology Co ltd filed Critical Zhejiang Zhenshu Technology Co ltd
Priority to CN202310894530.4A priority Critical patent/CN116991370A/en
Publication of CN116991370A publication Critical patent/CN116991370A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

The invention relates to the technical field of data processing, in particular to an application program interface generation system and method. The system comprises: the data set acquisition module is used for acquiring a data set to be processed; the data engine comprises a data set storage module for storing the data set to be processed and a data return node for terminating the flow and returning the processed data set; a flow engine comprising a plurality of processing nodes of different data processing types; the node combination module is used for artificially combining the data return nodes and the processing nodes with different data processing types to form a required data processing flow line; and the execution module is used for carrying out data processing on the data set to be processed according to the formed data processing flow line so as to return a corresponding feedback data set, thereby realizing the processing of the business logic in the generation process of the application program interface, improving the efficiency of the business logic development to a certain extent and further improving the generation efficiency of the application program interface.

Description

System and method for generating application program interface based on data engine and flow engine
Technical Field
The invention relates to the technical field of data processing, in particular to an application program interface generation system and method.
Background
The application program interface (Application Programming Interface, API), also known as an application programming interface, is a convention for the joining of different components of a software system. Because of the ever-increasing size of software in recent years, it is often necessary to divide complex systems into small components, and thus the design of application programming interfaces is important. The main purpose of the application program interface is to provide the application program with the developer the ability to access a set of routines without having to access the source code or understand the details of the internal operating mechanisms. Wherein a routine is a collection of functional interfaces or services that a certain system provides externally. The application program interface itself is abstract and defines only one interface and does not involve specific operations of the application program in the actual implementation. In the practice of application programming, the programming interface is designed to divide the responsibilities of the software system reasonably. The good application program interface design can reduce the mutual dependence of all parts of the system, improve the cohesion of the constituent units and reduce the coupling degree among the constituent units, thereby improving the maintainability and expansibility of the system.
However, conventional application program interface design and development have problems such as low development efficiency, waste of test resources, high subsequent maintenance cost, and the like. Thus, a solution for automatically generating an application program interface has been developed. The technical scheme of automatic generation of the application program interfaces in the market at present adopts a mode of directly generating the application program interfaces by SQL, thereby realizing the automation of data acquisition by interaction with a database. However, an application program interface needs to not only achieve data acquisition, but also have a certain service logic processing capability. However, the manner of directly generating the application program interface by using SQL in the prior art does not relate to the processing of business logic, and a professional back-end development engineer is still required to write back-end codes (such as Java, golang, C language) matched with the business logic in the part related to the processing of the business logic. And because of the tight coupling relation between the back-end codes, the modification of the whole set of back-end codes can be pulled by the change of business logic, so that the consistency and the correctness of the whole set of back-end codes are ensured, the development efficiency of the business logic is reduced to a certain extent, the generation efficiency of an application program interface is further reduced, bug is easy to generate in the writing process of the back-end codes of the business logic, the bug can be subjected to targeted test by wasting test resources, and the development cost of the whole application program interface is further higher.
Disclosure of Invention
Aiming at the technical problems in the design and development of the application program interfaces, the invention provides an application program interface generation system and method based on a data engine and a flow engine, aiming at improving the generation efficiency of the application program interfaces.
The invention adopts the following technical scheme: an application programming interface generation system based on a data engine and a flow engine, comprising:
the data set acquisition module is used for acquiring a data set to be processed;
the data engine comprises a data set storage module and a data return node, wherein the data set storage module is used for storing a data set to be processed, and the data return node is used for terminating a flow and returning the processed data set;
a flow engine comprising a plurality of processing nodes of different data processing types;
the node combination module is used for manually combining the data return nodes and the processing nodes with different data processing types to form a required data processing flow line;
and the execution module is used for carrying out data processing on the data set to be processed according to the formed data processing flow line so as to return the corresponding feedback data set.
The technical conception of the invention is as follows: an application program interface generating system based on a data engine and a flow engine is designed, in the generating process of the application program interface, the data engine is adopted to store a data set, the output of the data set processing result is abstracted into a data return node, the flow engine is adopted to abstract business logic into a plurality of processing nodes with different data processing types, a node combination module is further arranged for manually combining the data return node and the processing nodes with all the data processing types in the flow engine to form a data processing flow line related to the business logic, and finally, an execution module carries out data processing on the data set to be processed according to the formed data processing flow line so as to return a corresponding feedback data set, so that the business logic is processed in the generating process of the application program interface.
The prior art still requires professional back-end development engineers to additionally write back-end code (e.g., java, golang, C language, etc.) that matches the business logic with respect to the portion of the business logic process generated by the application program interface. And because of the tight coupling relation between the back-end codes, the change of a business logic can drive the modification of the whole set of back-end codes so as to ensure the consistency and the correctness of the whole set of back-end codes, but the invention can realize the modification of the data processing flow line of the related business logic only by manually modifying and adjusting the combination of the processing nodes of each data processing type by the node combination module in the system, namely the modification of the business logic processing part of the application program interface, and the consistency modification of the whole set of back-end codes is not required.
Preferably, the processing nodes of the different data processing types comprise data nodes, the data nodes are associated with data sets stored in the data set storage module, the data nodes are used for screening required return data from the associated data sets according to the downward attribute configured by people and the weight value, and the finally screened return data set of all the data nodes forms a feedback data set.
Preferably, the processing nodes with different data processing types further comprise logic nodes, and the logic nodes are used for manually configuring execution conditions and/or execution circulation paths of each data node according to business logic.
The data engine is adopted to abstract the output of the data set processing result into a data return node, the flow engine is adopted to abstract the business logic into a plurality of processing nodes with different data processing types, and the node combination module is further used for manually combining the data return nodes for terminating the flow and returning the processed data set, the data nodes associated with the data set and the logic nodes configured with the execution conditions and/or the execution circulation paths of all the data nodes so as to form a data processing flow line related to the business logic, namely the node combination module provides a visual tool to configure the processing flow of the business logic. The method and the system enable the processing flow of the business logic to be easier to understand and communicate, even non-technicians can participate in the definition and adjustment of the processing flow of the business logic, and the dependence on professional back-end development engineers is reduced.
Preferably, the data return node comprises a data return structural model, and the data return structural model is used for carrying out structural processing on a feedback data set returned in the execution module according to a preset structural rule so as to return the data set of the required data structure.
The method for generating the application program interface based on the data engine and the flow engine comprises the following steps:
step S1, acquiring a data set to be processed and storing the data set to be processed;
step S2, introducing a data return node and a plurality of processing nodes with different data processing types, and combining the data return node and the processing nodes with different data processing types to form a required data processing flow line, wherein the data return node is used for terminating the flow and returning a processed data set;
and step S3, carrying out data processing on the data set to be processed according to the formed data processing flow line, and returning to the corresponding feedback data set.
Preferably, the processing nodes of different data processing types include data nodes and logic nodes, and in step S2, the method for combining the data return node and the processing nodes of different data processing types to form a required data processing flow line includes:
associating the data nodes with a stored data set, and configuring a downward attribute and a weight value for each data node;
configuring corresponding logic nodes according to the execution conditions and/or the execution circulation paths of the business logic on each data node;
And combining the data nodes, the logic nodes and the data return nodes to form a data processing flow matched with the business logic, and marking the data processing flow as a required data processing flow line.
Preferably, in step S3, the method for performing data processing on the data set to be processed according to the formed data processing flow line and returning the corresponding feedback data set includes:
and when the data nodes are transferred, the return data required by the current data node is screened out from the data sets associated with the data nodes according to the configured downward attribute and the weight value and continues to be transferred downwards until the data return nodes are transferred, the process is terminated, and the finally screened set of the return data by all the data nodes forms a feedback data set and is returned to the feedback data set.
Preferably, the data return node comprises a data return structured model, and after returning the corresponding feedback data set in step S3, further comprises the steps of:
Formulating a structuring rule of the data return structuring model according to a data structure required by business logic;
and inputting the returned feedback data set into the data return structural model, carrying out structural processing on the returned feedback data set by the data return structural model according to the structural rule, converting the feedback data set into a data set of a data structure required by service logic, and returning the processed data set.
A computer device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the aforementioned data engine and flow engine based application program interface generation method via execution of the executable instructions.
A computer-readable storage medium comprising a memory, a storage medium, and a memory,
the computer readable storage medium stores a computer program which when executed by a processor implements the aforementioned data engine and flow engine based application program interface generation method.
The beneficial technical effects of the application include: the application innovatively provides an application program interface generating system and method based on a data engine and a flow engine, in the generating system of the application program interface, the data engine is adopted to store a data set and abstract the output of the processing result of the data set into a data return node, the flow engine is adopted to abstract the business logic into a plurality of processing nodes with different data processing types, a node combination module is further arranged for manually combining the data return nodes for terminating the flow and returning the processed data set and the processing nodes with different data processing types in the flow engine to form a data processing flow line related to the business logic, finally, an execution module carries out data processing on the data set to be processed according to the formed data processing flow line so as to return a corresponding feedback data set, thereby realizing the processing of the business logic in the generating process of the application program interface, namely, the application program interface generating system provided by the embodiment of the application provides a visual tool to configure the processing flow of the business logic, the processing flow of the business logic is easier to understand and even a non-technical staff can participate in the definition and adjustment of the business logic processing, the application reduces the definition and the adjustment of the special engineering back end data set and the processing logic, and the application can realize the improvement of the corresponding to the processing logic on the development of the system by modifying the corresponding data processing logic on the system, compared with the prior art that the application has the need of modifying the processing logic has a certain degree of the processing logic, and the system has the improvement of the processing logic is more convenient to realize the improvement of the processing logic, and further improves the generation efficiency of the application program interface.
Other features and advantages of the present invention will be disclosed in the following detailed description of the invention and the accompanying drawings.
Drawings
The invention is further described with reference to the accompanying drawings:
fig. 1 is a schematic diagram of an overall structure of an application program interface generating system according to an embodiment of the present invention.
Fig. 2 is an exemplary diagram of an interface of a data node configuration according to an embodiment of the present invention.
FIG. 3 is a diagram illustrating an exemplary interface for configuration of a downward attribute field according to an embodiment of the present invention.
Fig. 4 is an exemplary diagram of an interface of a node assembly module according to an embodiment of the present invention.
FIG. 5 is an interface diagram of a data return structured model according to an embodiment of the present invention.
FIG. 6 is a flowchart of an application program interface generating method according to an embodiment of the present invention.
FIG. 7 is a schematic diagram of data processing of a data set according to a formed data processing flow line in accordance with an embodiment of the present invention.
Fig. 8 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Wherein: 1. the system comprises a data set acquisition module 2, a data engine 3, a flow engine 4, a node combination module 5, an execution module 6, a processor 7 and a memory.
Detailed Description
The technical solutions of the embodiments of the present invention will be explained and illustrated below with reference to the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, and not all embodiments. Based on the examples in the implementation manner, other examples obtained by a person skilled in the art without making creative efforts fall within the protection scope of the present invention.
In the following description, directional or positional relationships such as the terms "inner", "outer", "upper", "lower", "left", "right", etc., are presented for convenience in describing the embodiments and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore should not be construed as limiting the invention.
Embodiment one:
the present embodiment provides an application program interface generating system based on a data engine 2 and a flow engine 3, please refer to fig. 1, which includes:
a data set acquisition module 1, configured to acquire a data set to be processed;
the data engine 2 comprises a data set storage module and a data return node, wherein the data set storage module is used for storing a data set to be processed, and the data return node is used for terminating the flow and returning the processed data set;
a flow engine 3 comprising a plurality of processing nodes of different data processing types;
the node combination module 4 is used for artificially combining the data return nodes and the processing nodes with different data processing types to form a required data processing flow line;
and the execution module 5 is used for carrying out data processing on the data set to be processed according to the formed data processing flow line so as to return the corresponding feedback data set.
The implementation manner of the data set obtaining module 1 is similar to the implementation manner of using SQL to interact with a database and obtain data in the prior art, and the embodiments of the present application are not described herein again.
In this embodiment, the data set storage module mainly stores the data set to be processed through the data source configuration unit, the data set configuration unit and the dynamic parameter configuration unit. The data source configuration unit is used for selecting the type of the database, filling in the connection mode of the database, and then generating different database links. The data set configuration unit is used for storing SQL which is required to be executed and interacts with the database and acquires data and some dynamic parameters, and the dynamic parameter configuration unit is used for deleting the content in the SQL statement stored by the data set configuration unit according to the pre-negotiated rule.
The technical concept of this embodiment is as follows: an application program interface generating system based on a data engine 2 and a flow engine 3 is designed, in the process of generating an application program interface, the data engine 2 is adopted to store a data set, the output of the processing result of the data set is abstracted into a data return node, the flow engine 3 is adopted to abstract business logic into a plurality of processing nodes with different data processing types, a node combining module 4 is further arranged for manually combining the data return node and the processing nodes with all the data processing types in the flow engine 3 to form a data processing flow line related to the business logic, and finally, an executing module 5 carries out data processing on the data set to be processed according to the formed data processing flow line to return a corresponding feedback data set, so that the business logic is processed in the process of generating the application program interface.
The prior art still requires professional back-end development engineers to additionally write back-end code (e.g., java, golang, C language, etc.) that matches the business logic with respect to the portion of the business logic process generated by the application program interface. And because of the close coupling relation between the back-end codes, a change of business logic may drive the modification of the whole set of back-end codes so as to ensure the consistency and correctness of the whole set of back-end codes, but the invention can realize the modification of the data processing flow line of the related business logic only by manually modifying and adjusting the combination of processing nodes of each data processing type in the node combination module 4 in the system, namely, the modification of the business logic processing part of the application program interface, without carrying out the consistency modification on the whole set of back-end codes, compared with the prior art, the invention can modify and expand the business logic more conveniently, improves the efficiency of the business logic development to a certain extent, and further improves the generation efficiency of the application program interface.
On the other hand, in this embodiment, the processing nodes of different data processing types include data nodes, where the data nodes are associated with data sets stored in the data set storage module, and the data nodes are configured to screen the required return data from the associated data sets according to the downward attribute and the weight value configured by people, and the finally screened set of return data by all the data nodes forms a feedback data set.
The function of the data nodes is mainly to associate the data set stored in the data engine 2 with a data processing flow line formed later, so that when the data processing flow line flows to a certain data node, the data set associated with the data node is inquired and screened, return data obtained after the data set is inquired and screened is obtained, and then the data processing flow line continues to flow downwards.
Illustratively, the data node performs query screening on the associated data set, and obtains the returned data obtained after the data set is queried and screened, and then the implementation of continuing to flow downwards is an abstract embodiment of the following code:
Statement stmt=connection.createStatement( );
ResultSetrs=stmt.executeQuery(sql);
ResultSetMetaData metaData=rs.getMetaData( );
for example, referring to fig. 2, in the data processing flow line formed by the node combination module 4, the boxes represent data nodes, and take service logic of three-level registration information processing of district, city and province as an example, the specific configuration mode of the data nodes is as follows: clicking one of the data nodes in the data processing flow line, popping up a configuration frame of the data node, wherein the configuration frame comprises a node name field, a data set association field, a downward attribute field and a weight configuration field, and firstly setting the node name field of the current data node as 'provincial processing'; selecting a data set of 'provincial query' from the data sets stored in the data set storage module to be associated with the current data node; then clicking the downward attribute field, popping up a configuration frame of the downward attribute field, referring to fig. 3, wherein the configuration frame of the downward attribute field comprises an unselected frame, a screening key and a selected frame, the unselected frame enumerates attribute names of all arrays in a 'provincial query' dataset associated with a current data node, the attribute name of each array is associated with the content of a corresponding array in the 'provincial query' dataset, the attribute names of the arrays needing to be screened are selected by selecting the current data node, the attribute names of the arrays needing to be screened are transferred to the selected frame by the screening key, the attribute names of the arrays in the selected frame are also associated with the content of the corresponding arrays in the 'provincial query' dataset, the arrays in the selected frame are return data needing to be screened by the current data node, and after clicking the 'determination' key, the content of the downward attribute field is the attribute name of each array in the selected frame; and finally, configuring the weight of the current data node to be 1, and completing the configuration of the current data node. After the configuration of all the data nodes is completed, the execution module 5 performs data processing on the data set to be processed according to the formed data processing flow line, when the data processing flow line flows to the data node of the "provincial processing", the array associated with the content of the downward attribute field in the configuration frame of the data node of the "provincial processing" is the required return data screened from the associated data set of the "provincial query", namely, the array with the attribute names of "id", "name" value "in the data set of the" provincial query ", and then the downward flow is continued.
By associating the stored data sets with the data nodes, a data basis is provided for subsequent systems to make the required query screening of the stored data sets according to business logic. Meanwhile, the downward attribute is configured on the data node, so that the data node is helped to screen the required return data from the associated data set, the weight value is configured on the data node, the influence of the upper data node on the return data output by the lower data node is determined by the weight value, the complexity of the system on the service logic processing is helped to be improved, and the development of related service logic is further perfected.
On the other hand, in this embodiment, the processing nodes of different data processing types further include a logic node, where the logic node is configured to manually configure, according to the service logic, an execution condition and/or an execution circulation path of each data node.
Wherein the logical nodes include, but are not limited to, mutex nodes, conditional nodes, connection lines, and the like. Specifically, the condition node is used for representing the execution condition of each data node, namely judging to which next-stage data node the data processing flow line flows when a certain condition is met; the connecting line is used for representing an execution circulation path of the data processing flow line, namely connecting each processing node; the mutex node is a bifurcation point for executing a flow path, i.e., when there are multiple choices, only flows to one of the subordinate processing nodes. The main function of the logic nodes is to connect the returned data of the data set processed by each data node in series in order to complete the circulation work of the data processing flow line, thereby realizing the writing of the back end code of the flow instead of the business logic.
By way of example, taking service logic of three-level registration information processing of district, city and province as an example, dragging a logic node, a data node and a data return node after visualization in a system to a data processing flow line formed by specific combination in a node combination module 4, please refer to fig. 4, wherein in the data processing flow line formed by the node combination module 4, a rounded rectangle frame represents a flow starting node, an oval frame represents a mutex node, a diamond frame represents a condition node, a square frame represents a data node, a hexagon frame represents a data return node, and a unidirectional dashed arrow represents a connecting line.
In the embodiment, the data engine 2 is adopted to abstract the output of the data set processing result into a data return node, the flow engine 3 is adopted to abstract the business logic into a plurality of processing nodes with different data processing types, and the node combination module 4 is further arranged for manually combining the data return node for terminating the flow and returning the processed data set, the data nodes associated with the data set and the logic nodes configured with the execution conditions and/or the execution circulation paths of the data nodes so as to form a data processing flow line related to the business logic, namely the application program interface generating system provided by the embodiment of the application provides a visual tool for configuring the processing flow of the business logic. The method and the system enable the processing flow of the business logic to be easier to understand and communicate, even non-technicians can participate in the definition and adjustment of the processing flow of the business logic, and the dependence on professional back-end development engineers is reduced.
On the other hand, in this embodiment, the data return node includes a data return structural model, where the data return structural model is configured to perform structural processing on the feedback data set returned in the execution module 5 according to a predetermined structural rule, so as to return the data set of the required data structure.
Illustratively, the data return structuring model performs structuring processing on the feedback data set returned in the execution module 5 according to a predetermined structuring rule, so as to return the data set of the required data structure, where the implementation of the data set is an abstract representation of the following code:
in this embodiment, the data return structured model is implemented by JSON objects and placeholders. Wherein, "$ { name }" represents obtaining an attribute value of which the attribute name is "name" in the feedback data set; "value" represents the attribute value of the column of which the attribute name is "value" in the feedback data set is obtained, and returned in the form of an array; in addition to this is the return format of the JOSN array. For example, referring to fig. 5, the data structure returned by the "return format" field in the interface of the data return structured model is a JSON array whose attribute names include "name" and "value".
The embodiment of the application adds the concept of the data return structural model in the data engine 2, prepares the structural rule of the data return structural model in advance according to the data structure required by the business logic, carries out structural processing on the feedback data set returned in the execution module 5 to return the data set of the required data structure, and compared with the mode of directly generating the application program interface by adopting SQL, the embodiment of the application ensures that a developer does not need to write SQL sentences for specific returned data structure in the generation process of the application program interface, and reduces the development cost of the application program interface to a certain extent.
On the other hand, in this embodiment, one data processing flow line may correspond to only one application program interface, or may correspond to a plurality of application program interfaces, where each application program interface may structure the return data structure of the feedback data set through the data return structural model when generating.
On the other hand, in this embodiment, the application program interface generating system further includes an interface basic configuration module, where the interface basic configuration module includes an interface request path configuration, an interface request mode configuration, and a security configuration. In this embodiment, the security configuration includes ip whitelist verification and token verification, which, while greatly guaranteeing the security of the application program interface generation system, avoids the cumbersome operation of accessing other login systems by the user.
Embodiment two:
based on the same technical concept as the embodiment, the present embodiment provides an application program interface generating method based on the data engine 2 and the flow engine 3, please refer to fig. 6, which includes the following steps:
step S1, acquiring a data set to be processed and storing the data set to be processed;
step S2, introducing a data return node and a plurality of processing nodes with different data processing types, and combining the data return node and the processing nodes with different data processing types to form a required data processing flow line, wherein the data return node is used for terminating the flow and returning the processed data set;
and step S3, carrying out data processing on the data set to be processed according to the formed data processing flow line, and returning to the corresponding feedback data set.
On the other hand, in this embodiment, the processing nodes of different data processing types include data nodes and logic nodes, and in step S2, the method for combining the data return node and the processing nodes of different data processing types to form the required data processing flow line includes:
step S201, associating the data nodes with the stored data sets, and configuring downward attribute and weight value for each data node;
Step S202, configuring corresponding logic nodes according to the execution conditions and/or the execution circulation paths of the business logic on each data node;
in step S203, the data nodes, the logic nodes and the data return nodes are combined to form a data processing flow matched with the service logic, and the data processing flow is recorded as a required data processing flow line.
On the other hand, in the embodiment, in step S3, the method for performing data processing on the data set to be processed according to the formed data processing flow line and returning the corresponding feedback data set includes:
and when the data nodes are transferred, the return data required by the current data node is screened from the data set associated with the data node according to the configured downward attribute and the weight value, and the downward transfer is continued.
By configuring the data node with the downward attribute, the data node is facilitated to screen the required return data from the associated data set, and development of related business logic is perfected. The specific implementation of the return data required for the data node screening with respect to the configuration of the downward attribute is described in detail in the first embodiment, which is not described in detail herein.
The influence of the upper data node on the return data output by the lower data node is determined by the weight value through the configuration of the weight value to the data node, so that the complexity of the system on the service logic processing is improved, and the development of related service logic is further perfected.
For example, referring to fig. 7, the following describes in detail the effect that the weight value determines the effect of the upper level data node on the return data output by the lower level data node, where the return data required by the current data node is selected from the data sets associated with the data nodes and continues to flow downwards until the flow goes to the data return node, and the flow is terminated, and the finally selected set of return data by all the data nodes forms a feedback data set, and the specific implementation manner of the feedback data set is as follows:
assuming that the formed data processing flow line includes only a flow start node ("start" block), a data node ("process a" block, "process B" block, "process C" block), a connection line (unidirectional solid arrow), and a data return node ("end" block), the downward attributes of the data nodes A, B and C are both set to "id", the weight value of the data node a is set to 3, the weight value of the data node B is set to 2, and the weight value of the data node C is set to 2. According to the formed data processing flow line, circulation is carried out along an execution circulation path represented by a connecting line, when circulation is carried out to the data node A, return data 'id (A)' required by the data node A is screened from a data set associated with the data node A, and the circulation is continued downwards to the data node B; since the weight value of the data node a is greater than that of the data node B, even if the return data required for screening the data node B from the data set associated with the data node B is "id (B)", the return data that is finally screened by the data node B is still "id (a)", and continues to flow down to the data node C; since the weight value of the data node a is greater than that of the data node C, even if the return data required for screening the data node C from the data set associated with the data node C is "id (C)", the return data that the data node C finally screens is still "id (a)"; and continuing to circulate along an execution circulation path represented by the connecting line, and circulating to the data return nodes, ending the flow, wherein the return data finally screened by all the data nodes is 'id (A)', so that the return data 'id (A)' forms a feedback data set. This example is only for illustrating the feasibility of determining, by the weight value, the influence of the upper level data node on the return data output by the lower level data node, which helps to increase the complexity of processing the service logic in this embodiment, such as some service logic that needs to implement the return data "from end to end", so as to further refine the development of the related service logic.
The prior art still requires professional back-end development engineers to additionally write back-end code (e.g., java, golang, C language, etc.) that matches the business logic with respect to the portion of the business logic process generated by the application program interface. And because of the tight coupling relation between the back-end codes, the change of a business logic can drive the modification of the whole set of back-end codes so as to ensure the consistency and the correctness of the whole set of back-end codes, and the application can realize the modification of the data processing flow line of the related business logic only by manually modifying and adjusting the combination of processing nodes of each data processing type in the system, namely the modification of the business logic processing part of the application program interface, without the need of carrying out the consistency modification on the whole set of back-end codes, and compared with the prior art, the application can modify and expand the business logic more conveniently, improves the efficiency of the business logic development to a certain extent, and further improves the generation efficiency of the application program interface.
Meanwhile, the embodiment abstracts the output of the data set processing result into the data return node, abstracts the business logic into a plurality of processing nodes with different data processing types, and combines the data return node for stopping the flow and returning the processed data set, the data node associated with the data set and the logic node configured with the execution condition and/or the execution circulation path of each data node to form a data processing flow line of the related business logic.
On the other hand, in this embodiment, the data return node includes a data return structural model, and after returning the corresponding feedback data set in step S3, the method further includes the following steps:
formulating a structuring rule of a data return structuring model according to a data structure required by business logic;
and inputting the returned feedback data set into a data return structural model, carrying out structural processing on the returned feedback data set by the data return structural model according to the structural rule, converting the feedback data set into a data set of a data structure required by service logic, and returning the processed data set.
The embodiment of the application adds the concept of the data return structural model in the data return node, prepares the structural rule of the data return structural model in advance according to the data structure required by the business logic, carries out structural processing on the feedback data set returned in the execution module 5 to return the data set of the required data structure, and compared with the mode of directly generating the application program interface by adopting SQL in the prior art, the embodiment of the application ensures that developers do not need to write SQL sentences for specific returned data structure in the generation process of the application program interface, and reduces the development cost of the application program interface to a certain extent.
Embodiment III:
the present embodiment provides a computer device, please refer to fig. 8, including:
a processor 6;
a memory 7 for storing executable instructions of the processor 6;
wherein the processor 6 is configured to perform the aforementioned method of generating an application program interface based on the data engine 2 and the flow engine 3 via execution of executable instructions.
It should be noted that the description of the embodiment of the method for the computer device described above may also include other implementations. Specific implementation may refer to descriptions of related method embodiments, which are not described herein in detail.
The application program interface generating system or the computer device based on the data engine 2 and the flow engine 3 provided in the present specification can also be applied to various data analysis processing systems. The computer device may be a separate server, or may include a server cluster, a system (including a distributed system), software (application), an actual operating device, a logic gate device, a quantum computer, or the like using the method or system of the embodiment of the present specification, and a terminal device that incorporates necessary implementation hardware.
The processor 6 may be a central processing unit (Central Processing Unit, CPU), and the processor 6 may be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. The general purpose processor may be a microprocessor or may be any conventional processor.
Wherein the memory 7 stores program code executable by the processor 6 to cause the processor 6 to perform a deep learning based operation policy triggering method according to any of the above description. The memory 7 may in some embodiments be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. The memory 7 may in other embodiments also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device. Further, the memory 7 may also include both an internal storage unit and an external storage device of the computer device.
Embodiment four:
the present embodiment provides a computer-readable storage medium,
the computer readable storage medium stores a computer program which, when executed by a processor, implements the aforementioned method of generating an application program interface based on the data engine 2 and the flow engine 3.
The computer readable storage medium of the present disclosure may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having 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. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (Hyper Text Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable storage medium may be contained in the computer device; or may exist alone without being fitted into the computer device.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The modules involved in the embodiments of the present application may be implemented in software or in hardware. The name of a module does not in some cases define the module itself.
In the foregoing, the preferred embodiments of the present disclosure and the description of the technical principles applied thereto are only preferred embodiments, and it should be understood by those skilled in the art that the scope of the disclosure is not limited to the specific combination of the technical features described above, but also encompasses other technical solutions formed by any combination of the technical features described above or the equivalent thereof without departing from the concept of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

Claims (10)

1. An application programming interface generation system based on a data engine and a flow engine, comprising:
the data set acquisition module is used for acquiring a data set to be processed;
the data engine comprises a data set storage module and a data return node, wherein the data set storage module is used for storing a data set to be processed, and the data return node is used for terminating a flow and returning the processed data set;
a flow engine comprising a plurality of processing nodes of different data processing types;
the node combination module is used for manually combining the data return nodes and the processing nodes with different data processing types to form a required data processing flow line;
and the execution module is used for carrying out data processing on the data set to be processed according to the formed data processing flow line so as to return the corresponding feedback data set.
2. The data engine and flow engine based application program interface generation system of claim 1,
the processing nodes of the different data processing types comprise data nodes, the data nodes are associated with the data sets stored in the data set storage module, the data nodes are used for screening the needed return data from the associated data sets according to the downward attribute and the weight value configured by people, and the finally screened return data sets of all the data nodes form a feedback data set.
3. The data engine and flow engine based application program interface generation system of claim 2,
the processing nodes with different data processing types further comprise logic nodes, and the logic nodes are used for manually configuring the execution conditions and/or the execution circulation paths of the data nodes according to service logic.
4. The data engine and flow engine based application program interface generation system of claim 1,
the data return node comprises a data return structural model, and the data return structural model is used for carrying out structural processing on a feedback data set returned in the execution module according to a preset structural rule so as to return the data set of a required data structure.
5. The method for generating the application program interface based on the data engine and the flow engine is characterized by comprising the following steps:
step S1, acquiring a data set to be processed and storing the data set to be processed;
step S2, introducing a data return node and a plurality of processing nodes with different data processing types, and combining the data return node and the processing nodes with different data processing types to form a required data processing flow line, wherein the data return node is used for terminating the flow and returning a processed data set;
And step S3, carrying out data processing on the data set to be processed according to the formed data processing flow line, and returning to the corresponding feedback data set.
6. The method for generating an application program interface based on a data engine and a flow engine according to claim 5,
in step S2, the method for combining the data return node and the processing nodes of different data processing types to form the required data processing flow line includes:
associating the data nodes with a stored data set, and configuring a downward attribute and a weight value for each data node;
configuring corresponding logic nodes according to the execution conditions and/or the execution circulation paths of the business logic on each data node;
and combining the data nodes, the logic nodes and the data return nodes to form a data processing flow matched with the business logic, and marking the data processing flow as a required data processing flow line.
7. The method for generating an application program interface based on a data engine and a flow engine according to claim 6,
in step S3, the method for processing data of the data set to be processed according to the formed data processing flow line and returning the corresponding feedback data set includes:
And when the data nodes are transferred, the return data required by the current data node is screened out from the data sets associated with the data nodes according to the configured downward attribute and the weight value and continues to be transferred downwards until the data return nodes are transferred, the process is terminated, and the finally screened set of the return data by all the data nodes forms a feedback data set and is returned to the feedback data set.
8. The method for generating an application program interface based on a data engine and a flow engine according to claim 7,
the data return node comprises a data return structured model, and after returning the corresponding feedback data set, in step S3, further comprises the steps of:
formulating a structuring rule of the data return structuring model according to a data structure required by business logic;
and inputting the returned feedback data set into the data return structural model, carrying out structural processing on the returned feedback data set by the data return structural model according to the structural rule, converting the feedback data set into a data set of a data structure required by service logic, and returning the processed data set.
9. A computer device, comprising:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the data engine and flow engine based application program interface generation method of any of claims 5 to 8 via execution of the executable instructions.
10. A computer-readable storage medium comprising,
the computer-readable storage medium stores a computer program which, when executed by a processor, implements the data engine and flow engine-based application program interface generation method according to any one of claims 5 to 8.
CN202310894530.4A 2023-07-20 2023-07-20 System and method for generating application program interface based on data engine and flow engine Pending CN116991370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310894530.4A CN116991370A (en) 2023-07-20 2023-07-20 System and method for generating application program interface based on data engine and flow engine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310894530.4A CN116991370A (en) 2023-07-20 2023-07-20 System and method for generating application program interface based on data engine and flow engine

Publications (1)

Publication Number Publication Date
CN116991370A true CN116991370A (en) 2023-11-03

Family

ID=88529380

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310894530.4A Pending CN116991370A (en) 2023-07-20 2023-07-20 System and method for generating application program interface based on data engine and flow engine

Country Status (1)

Country Link
CN (1) CN116991370A (en)

Similar Documents

Publication Publication Date Title
US11669503B2 (en) Building and managing data-processing attributes for modeled data sources
US20220035600A1 (en) API Specification Generation
CA2915619C (en) Method and apparatus for customized software development kit (sdk) generation
US8751558B2 (en) Mashup infrastructure with learning mechanism
CN109542556B (en) Method and system for interaction between process and form based on Activiti
US9251222B2 (en) Abstracted dynamic report definition generation for use within information technology infrastructure
WO2017156916A1 (en) Data access method and device
US11531914B2 (en) Artificial intelligence (AI) based automatic rule generation
CN113238740B (en) Code generation method, code generation device, storage medium and electronic device
US8296723B2 (en) Configurable unified modeling language building blocks
CN111190929A (en) Data storage query method and device, electronic equipment and storage medium
Eichelberger et al. Using IVML to model the topology of big data processing pipelines
CN114254606A (en) Microservice framework model
CN106600226A (en) Method and device used for optimizing flow management system
CN113836454A (en) Content display page display method, device, medium and equipment
CN116483344A (en) Code generation method and device, terminal equipment and computer readable storage medium
CN116360735A (en) Form generation method, device, equipment and medium
CN116991370A (en) System and method for generating application program interface based on data engine and flow engine
CN108829968A (en) Circuit diagram checking method based on Python spread function
CN109814916B (en) IVR flow configuration method, device, storage medium and server
Alshraiedeh et al. An approach to extend WSDL-based data types specification to enhance web services understandability
JP2016146022A (en) Model base development support device, model base development support method, and model base development support program
CN117435177B (en) Application program interface construction method, system, equipment and storage medium
US10146804B2 (en) Computer implemented systems and methods to augment data from data sources by simultaneously adding enhancements generated by different technologies
US11972357B2 (en) Application programming interface enablement of consistent ontology model instantiation

Legal Events

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