CN111736930B - Program front-back end interface calling method and device, computer equipment and storage medium - Google Patents
Program front-back end interface calling method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111736930B CN111736930B CN202010701163.8A CN202010701163A CN111736930B CN 111736930 B CN111736930 B CN 111736930B CN 202010701163 A CN202010701163 A CN 202010701163A CN 111736930 B CN111736930 B CN 111736930B
- Authority
- CN
- China
- Prior art keywords
- interface
- end module
- calling
- instruction
- call
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a method and a device for calling front and back end interfaces of a program, computer equipment and a storage medium, wherein the method comprises the following steps: configuring an initialization interface of a back-end module; generating a first interface according to an input instruction of a user, wherein the first interface has a calling association with an initialization interface of the back-end module; and calling the back-end module through the first interface according to the service requirement instruction of the front-end module. According to the embodiment of the invention, the interfaces of the front-end module and the back-end module are separated, the new interface is newly established, and the association with the interface of the back-end module is established, so that the front-end module completes the calling of the back-end module through the new interface, the operation and management difficulty when the interface of the front-end module and the back-end module is frequently changed and called through the interface is reduced, and the effective management and calling of the interface of the front-end module and the back-end module can be realized under the condition of not modifying and increasing the interfaces.
Description
Technical Field
The invention relates to the technical field of computers, in particular to a method and a device for calling front and back end interfaces of a program, computer equipment and a storage medium.
Background
In the existing program development process, the definition of a front-end module and a back-end module calling interface is generally carried out firstly, then the back-end module generates an interface through an online document or manually inputs the interface into an application interface management platform by a developer, and the front-end module can call the back-end module to carry out development design and modification through simulating test data.
If the requirements of the front-end module are not changed greatly, and the modification range of the front-end module is smaller, the modification and adjustment range of the rear-end module according to the requirement change of the front-end module is also in a controllable range, but the fact is just opposite, the change cannot be always achieved by planning, the requirements of the front-end module are changed frequently, the front-end module needs to be modified according to the requirement change, and therefore a new interface needs to be added to the rear-end module, or the parameters of the interface need to be added or deleted. The change of the interface of the back-end module means that the service method of the back-end module is also adjusted, and the service method of the back-end module is often used by a plurality of interfaces, so that the adjustment of the service method of the back-end module can cause a situation of triggering the whole body, so that the adjustment of the service method of the back-end module for adapting to the change of the requirement of the front-end module can cause a fault which is difficult to predict on other parts of the system.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a computer device and a storage medium for calling a front-back interface of a program, which can implement effective management and calling of the front-back interface without modifying or increasing the interface when the interface is frequently changed.
Firstly, in order to achieve the above object, the present invention provides a method for calling a front-back interface of a program, where the method for calling the front-back interface of the program includes:
configuring an initialization interface of a back-end module;
generating a first interface according to an input instruction of a user, wherein the first interface has a calling association with an initialization interface of the back-end module;
and calling the back-end module through the first interface according to the service requirement instruction of the front-end module.
Further, the generating the first interface according to the input instruction of the user includes:
generating a visual design page of a front-end module;
configuring a plurality of front-end components in the visualization design page;
and moving the front-end component to a preset position according to the dragging operation of the user to generate the first interface.
Further, the front-end component includes a plurality of node elements and a connection element, and the moving the front-end component to a preset position according to a dragging operation of a user to generate the first interface includes:
connecting the node elements through the connecting elements to generate a call chain relation graph;
acquiring interface list information of a back-end module, wherein the interface list information is used for calling an initialization interface of the back-end module;
configuring the interface list information for the node element to generate the first interface;
and saving the first interface to the back-end module.
Further, the calling the back-end module through the first interface according to the service requirement instruction of the front-end module includes:
according to the service requirement instruction of the front-end module, starting preprocessing to generate a calling instruction;
transmitting the calling instruction according to the calling chain relation diagram of the first interface;
requesting a response to a corresponding node element of the first interface according to the calling instruction, and executing a corresponding service process;
and when all the node elements are monitored to finish the service flow, the calling of the back-end module is finished.
Further, the method further comprises:
and the front-end module completes the simulation call of the rear-end module according to the first interface through the test data.
Further, before the completing, by the test data, the simulation call of the front-end module to the back-end module according to the first interface, the method further includes:
and generating random test data according to the return information of the first interface, or acquiring field data from a database through a network to generate the test data.
Further, the acquiring the interface list information of the back-end module includes:
and acquiring code annotation to automatically generate the interface list information by scanning the code file.
In order to achieve the above object, the present invention further provides a program front-back end interface calling device, including:
the configuration module is used for configuring an initialization interface of the back-end module;
the interface generation module is used for generating a first interface according to an input instruction of a user, and the first interface has a calling association with an initialization interface of the rear-end module;
and the calling module is used for calling the back-end module through the first interface according to the service requirement instruction of the front-end module.
To achieve the above object, the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
To achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above method.
Compared with the prior art, the program front-end and back-end interface calling method, the program front-end and back-end interface calling device, the computer equipment and the storage medium in the embodiment of the invention have the advantages that the front-end module interface and the back-end module interface are separated, the new interface is newly established, the association with the back-end module interface is established, the front-end module completes calling of the back-end module through the new interface, the operation and management difficulty when the front-end and back-end module interfaces are frequently changed through interface calling is reduced, and the effective management and calling of the front-end and back-end interfaces can be realized under the condition that the interfaces are not modified or increased.
Drawings
FIG. 1 is a schematic diagram of an application environment of an embodiment of the present invention;
FIG. 2 is a timing diagram of a method for calling a front-end interface and a back-end interface of a program according to a first embodiment of the present invention;
fig. 3 is a flowchart illustrating a method for calling a front-end interface and a back-end interface of a program according to a first embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating the generation of the first interface according to the input command of the user in FIG. 2;
FIG. 5 is a schematic flow chart illustrating the process of FIG. 3 for moving the front-end component to a predetermined position according to a dragging operation of a user to generate the first interface;
fig. 6 is a schematic flowchart of the process of calling the back-end module through the first interface according to the service requirement instruction of the front-end module in fig. 2;
fig. 7 is a timing diagram of calling the back-end module through the first interface according to a service requirement instruction of the front-end module in the first embodiment of the present invention;
fig. 8 is a flowchart illustrating a method for calling a front-back interface of a program according to a first embodiment of the present invention;
FIG. 9 is a diagram illustrating program modules of a second embodiment of the device for calling the front-end and back-end interfaces according to the present invention;
FIG. 10 is a diagram of a hardware structure of a third embodiment of the computer apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Referring to fig. 1, a schematic diagram of an implementation environment of the embodiment of the invention is shown. The implementation environment includes: a user terminal 10 and a server 12.
The user terminal 10 is an electronic device with network access function, and the device may be a smart phone, a tablet computer, a personal computer, or the like.
The user terminal 10 is installed with a program 11 that can access the server 12, and after the program 11 logs in to access the server 12 through an account and a password, the user can perform specific operations and inputs on the server 12.
The server 120 is a server, a server cluster formed by a plurality of servers, or a cloud computing center. The server 120 stores the program 13, the program 13 includes a front end module 131 and a back end module 132, the front end module 131 and the back end module 132 can call each other through an interface, and after the program 11 logs in to the program 13 of the server 12 through an account and a password or logs in through an account and a password, a user can perform specific operations and inputs on the program 13.
Example one
The method for calling the front-end and back-end interfaces of the program enables the front end to freely combine the simple and stable interfaces of the back end, selects different interface methods, configures input parameters and calling modes for nodes and sets an associated calling link relation for the nodes through a draggable front-end component and a visual flow diagram display method, builds an interface which the nodes want to issue, and realizes calling and management of the front-end and back-end interfaces through the associated calling link relation between the nodes.
Referring to fig. 2, a procedure of a program front-back interface calling method according to this embodiment is roughly as follows:
firstly, after the development of the back end is completed, interface information which can be freely configured by the front end is released, and a user assembles a new interface on the development platform based on a background interface.
A user compiles a call chain relation graph in a design page of a front end by dragging elements and connecting arrows, a background is requested to obtain an interface list when a rear-end interface method is selected for a node, parameters, a call mode and the like are configured for the method of each node, and the user can issue and submit on the front-end page after checking that no errors exist.
After submission, the front-end page transfers all data on the page to the background for storage. For the published interface, the service end can be used, the service system calls the development platform interface, and the development platform requests the back end to call.
The back end starts a transaction when the request starts, performs unified transaction management on a plurality of call chain methods, such as submission, rollback and the like, and returns the result to the service system, the front end and the user after completion.
Specifically, referring to fig. 3, the method for calling the front-end and back-end interfaces of the front-end and back-end programs in this embodiment includes the following steps:
step S100, an initialization interface of the back-end module is configured.
The bridge of the front-end module and the back-end module is an Application Programming Interface (API), and the independence and flexibility of the development of the front-end module and the back-end module can be improved by decoupling the dependency of the front end and the back end in an API development platform, the development of the front-end module is extremely dependent on the Interface of the back-end module, and the front-end module is constructed into a desired Interface to be released like building blocks by freely combining the interfaces of the back end, so that the initialization Interface of the back-end module is simple and stable enough, and the initialization Interface is not required to be changed randomly, and only the initialization Interface can be increased. That is to say, the front module page arranges the combined interface in a dragging manner, and the back interface needs to ensure the atomicity of operation.
Step S200: generating a new first interface according to an input instruction of a user;
and assembling a new interface on the development platform by the user based on the background interface, wherein the input instruction can be specifically dragging operation of the user in the visual page. Referring to fig. 4, the specific step S200 includes:
s210: and generating a visual design page of the front-end module.
Specifically, a visual design page is generated, and the visual design page configures a plurality of dragged node elements and connected elements, such as wire frame nodes and arrows.
The method comprises the following steps of supporting the operation of drawing a flow diagram through a draggable front-end component, selecting different interface methods for nodes, configuring input parameters and calling modes, wherein the calling modes comprise: serial and parallel.
S220: configuring a plurality of front-end components in the visualization design page.
S230: and moving the front-end component to a preset position according to the dragging operation of the user to generate the first interface.
Wherein the front-end component includes a plurality of node elements and connection elements, please refer to fig. 5, step S230: moving the front-end component to a preset position according to a dragging operation of a user to generate the first interface comprises:
s231: and connecting the node elements through the connecting elements to generate a call chain relation graph.
Specifically, a correlation call link relationship is set for the nodes, different nodes are connected together through arrow connection, and the arrow direction represents the next method needing to call the nodes.
S232: the method comprises the steps of obtaining interface list information of a back-end module, wherein the interface list information is used for calling an initialization interface of the back-end module.
In the present embodiment, step S232: the specific steps for acquiring the interface list information of the back-end module are as follows:
and acquiring code annotation to automatically generate the interface list information by scanning the code file. And scanning a code file under a specified project, automatically generating an interface list according to the above annotation, and adding the interface list into a table corresponding to the API development platform. Such as interface lists, parameter tables, etc.
S233: configuring the interface list information for the node element to generate the first interface.
And configuring a back-end initialization interface list, configuration parameters, a calling mode and the like which need to be acquired when the back-end module interface is called for the node.
Specifically, after the configuration of the call flow between the interfaces, global parameters may be set, for example: global variables, whether to use global transactions, new method names, idempotent operations, etc.
S234: and saving the first interface to the back-end module.
And finally, issuing the interface as a new interface, namely the first interface, wherein the input parameters adopt the parameters of the method configured by the first node.
And after the check is correct, the page can be issued, and after the issue, all data on the page can be transmitted to a background for storage.
The service end can use the issued first interface.
Wherein, each node and wire frame of the flow chart are stored, and the coordinate position, the style and the size of each element are recorded in a character string mode.
The interface link records the multilevel calling link relation of the corresponding interface of each node, and the parameter configuration of each interface. The interface list contains combined interfaces and simple interfaces.
Step S300: calling a back-end module through a first interface according to a service requirement instruction of the front-end module;
specifically, in this embodiment, the calling of the back-end module through the first interface is realized by the global transaction management module.
The global transaction management module includes three sub-modules:
the transaction coordinator sub-module, i.e. the transaction coordinator TC: the method is used for maintaining the state of the global transaction and the branch transaction and driving the global commit or rollback.
Transaction manager submodule, i.e. transaction manager TM: used to define the scope of the global transaction, start the global transaction, commit or rollback the global transaction.
The resource manager submodule, i.e. the resource coordinator RM: resources for managing branch transactions being processed, dialogues with the transaction coordinator sub-module to register and report the status of branch transactions, and drive commit or rollback of branch transactions.
Specifically, referring to fig. 6, step S300 includes:
step S310: and starting preprocessing to generate a calling instruction according to the service requirement instruction of the front-end module.
Specifically, according to the service requirement instruction of the front-end module, the transaction manager submodule requests the transaction coordinator submodule to start a new global transaction. The transaction coordinator sub-module generates a call instruction, an XID instruction, that represents a global transaction.
Step S320: and requesting a response to the corresponding node element of the first interface according to the calling instruction, and executing a corresponding business process.
The XID instruction propagates through the call chain of the first interface. The resource manager submodule registers the local transaction as a branch of the corresponding global transaction of the XID instruction to the transaction coordinator submodule.
Step S330: and requesting a response to the corresponding node element of the first interface according to the calling instruction, and executing a corresponding business process.
The sub-module of the transaction coordinator requests transaction pre-submission confirmation from each node interface, and each node interface responds to the request, such as timeout unconfirmed, global rollback and call failure. If all are confirmed, the next phase of commit is continued.
Step S340: and when all the node elements are monitored to finish the service flow, the calling of the back-end module is finished.
And after all the nodes finish the service logic, sending a commit operation to the transaction coordinator sub-module. And according to the completion condition of submission, the transaction manager submodule requires the transaction coordinator submodule to submit or rollback the corresponding XID global transaction, and finally the transaction coordinator submodule informs the transaction manager submodule and the resource manager submodule of finishing the whole transaction.
Referring to fig. 7, in the embodiment, which includes 2 node elements, i.e. participant 1 and participant 2, when a business starts, the transaction manager TM requests the transaction coordinator TC to start a new global transaction. Transaction coordinator TC generates an XID instruction representing a global transaction, which is propagated through the call chain of the first interface. The resource coordinator RM registers the local transaction as a branch of the XID to the corresponding global transaction of transaction coordinator TC.
The transaction coordinator TC requests transaction pre-commit confirmation from the participants 1 and 2, and each node interface responds to the request, such as timeout unconfirmed, global rollback, and call failure. If all are confirmed, the next phase of commit is continued.
After completing the business logic, participant 1 and participant 2 send a commit operation to transaction coordinator TC. Depending on the completion of the commit, transaction manager TM asks transaction coordinator TC to commit or rollback the corresponding XID global transaction, and finally transaction coordinator TC informs transaction manager TM and resource coordinator RM to end the entire transaction.
In this embodiment, please refer to fig. 8, which further includes:
step S400: and generating random test data according to the return information of the first interface, or acquiring field data from a database through a network to generate the test data.
Step S500: and the front-end module completes the simulation call of the rear-end module according to the first interface through the test data.
The method comprises the steps of generating random test data on line according to information returned by a first interface, automatically acquiring data in a certain table through database connection, configuring a mapping relation between returned fields and fields of the data table, simulating data residing in a database, and simulating the condition of data with different orders of magnitude.
In other embodiments, the method further includes that the code automatically generates an interface list, and when a developer writes the code, the developer needs to configure corresponding annotations in the interface method, where the annotations include descriptions of the method, descriptions, types, limitations, and return types of each parameter.
The method of the embodiment realizes the separation of the front end module and the rear end module, and reduces the operation and management difficulty when the front end module and the rear end module are called through the interface. Specifically, in the actual development process, a development computer running program or a set of latest codes in a test environment of a back-end developer is not needed. The front end does not need to frequently require the back end personnel to modify the interface, the back end personnel also does not need to worry about influencing other interfaces for modifying one interface, and the code reusability and maintainability are also greatly improved. The updating of the interface is practical and convenient. And a special person is not required to manually maintain, and a developer changes codes and automatically synchronizes the codes to a database of the API platform during compiling.
Example two
Continuing to refer to FIG. 9, a program module diagram of the device for calling the front-back interface of the program according to the present invention is shown. In this embodiment, the program front-back interface calling device 20 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the method for generating an enterprise asset data representation. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the program front-back interface calling device 20 in the storage medium than the program itself. The following description will specifically describe the functions of the program modules of the present embodiment:
a configuration module 202, configured to configure an initialization interface of the back-end module;
the interface generation module 204 is configured to generate a first interface according to an input instruction of a user, where the first interface has a call association with an initialization interface of the backend module;
the calling module 206 is configured to call the back-end module through the first interface according to a service requirement instruction of the front-end module.
EXAMPLE III
Fig. 10 is a schematic diagram of a hardware architecture of a computer device according to a third embodiment of the present invention. In the present embodiment, the computer device 2 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a preset or stored instruction. The computer device 2 may be a rack server, a blade server, a tower server or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in fig. 10, the computer device 2 includes, but is not limited to, at least a memory 21, a processor 22, a network interface 23, and a program front-back interface calling device 20, which are communicatively connected to each other through a system bus. Wherein:
in this embodiment, the memory 21 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 21 may be an internal storage unit of the computer device 2, such as a hard disk or a memory of the computer device 2. In other embodiments, the memory 21 may also be an external storage device of the computer device 2, 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 provided on the computer device 2. Of course, the memory 21 may also comprise both internal and external memory units of the computer device 2. In this embodiment, the memory 21 is generally used for storing an operating system installed in the computer device 2 and various application software, such as the program code of the program front-back interface calling device 20 described in the above embodiment. Further, the memory 21 may also be used to temporarily store various types of data that have been output or are to be output.
The network interface 23 may comprise a wireless network interface or a wired network interface, and the network interface 23 is generally used for establishing communication connection between the computer device 2 and other electronic apparatuses. For example, the network interface 23 is used to connect the computer device 2 to an external terminal through a network, establish a data transmission channel and a communication connection between the computer device 2 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), Wi-Fi, and the like.
It is noted that fig. 10 only shows the computer device 2 with components 20-23, but it is to be understood that not all of the shown components are required to be implemented, and that more or less components may be implemented instead.
In this embodiment, the program front-back interface calling device 20 stored in the memory 21 may be further divided into one or more program modules, and the one or more program modules are stored in the memory 21 and executed by one or more processors (in this embodiment, the processor 22) to complete the present invention.
Example four
The present embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor implements corresponding functions. The computer readable storage medium of this embodiment is used for storing a program front-back interface calling device 20, and when being executed by a processor, the computer readable storage medium implements the method for generating an enterprise asset data representation according to the above embodiment.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (10)
1. A program front-back end interface calling method is characterized by comprising the following steps:
configuring an initialization interface of a back-end module;
generating a first interface according to an input instruction of a user, wherein the first interface has a calling association with an initialization interface of the back-end module, and the first interface comprises a calling chain relation graph generated by connecting node elements through connecting elements of a front-end component;
calling the back-end module through the first interface according to a service demand instruction of a front-end module, wherein a calling instruction is generated by starting preprocessing according to the service demand instruction, the calling instruction is transmitted according to the calling chain relation diagram of the first interface, a response is requested to a corresponding node element of the first interface according to the calling instruction, and a corresponding service flow is executed to call the back-end module;
wherein the front-end component includes a plurality of node elements and connection elements, and the first interface including a call chain relationship graph generated by connecting the node elements by the connection elements of the front-end component includes:
setting a correlation call link relation for node elements, connecting different node elements together through an arrow, wherein the arrow direction represents a method of a next node to be called, and connecting the node elements through the connection elements to generate the call chain relation graph;
the generating a call instruction by starting preprocessing according to the service requirement instruction, transmitting the call instruction according to the call chain relation diagram of the first interface, requesting a response to a corresponding node element of the first interface according to the call instruction, and executing a corresponding service flow to call the back-end module includes:
according to the business requirement instruction of the front-end module, the transaction manager submodule requests the transaction coordinator submodule to start a new global transaction, the transaction coordinator submodule generates a call instruction representing the global transaction, the call instruction is spread through a call chain of a first interface, the resource manager submodule registers the local transaction as a branch of the call instruction to the corresponding global transaction of the transaction coordinator submodule, the transaction coordinator submodule requests transaction pre-submission confirmation to each node interface, and each node interface responds to the request.
2. The method for invoking a program front-back interface according to claim 1, wherein the generating a first interface according to the input instruction of the user comprises:
generating a visual design page of a front-end module;
configuring a plurality of front-end components in the visualization design page;
and moving the front-end component to a preset position according to the dragging operation of the user to generate the first interface.
3. The method for invoking a program front-end interface according to claim 2, wherein the moving the front-end component to a preset position according to a drag operation by a user to generate the first interface comprises:
connecting the node elements through the connecting elements to generate a call chain relation graph;
acquiring interface list information of a back-end module, wherein the interface list information is used for calling an initialization interface of the back-end module;
configuring the interface list information for the node element to generate the first interface;
and saving the first interface to the back-end module.
4. The method for calling the front-end and back-end interfaces of the program according to claim 1 or 3, wherein the calling the back-end module through the first interface according to the service requirement instruction of the front-end module comprises:
and when all the node elements are monitored to finish the service flow, the calling of the back-end module is finished.
5. The program front-back interface calling method of claim 4, wherein said method further comprises:
and the front-end module completes the simulation call of the rear-end module according to the first interface through the test data.
6. The method for invoking program front-end interface according to claim 5, wherein before the completion of the simulated invocation of the back-end module by the front-end module according to the first interface by the test data further comprises:
and generating random test data according to the return information of the first interface, or acquiring field data from a database through a network to generate the test data.
7. The program front-end and back-end interface calling method according to claim 3, wherein the obtaining interface list information of the back-end module comprises:
and acquiring code annotation to automatically generate the interface list information by scanning the code file.
8. A program front-back end interface calling apparatus, comprising:
the configuration module is used for configuring an initialization interface of the back-end module;
the interface generation module is used for generating a first interface according to an input instruction of a user, wherein the first interface has a calling association with an initialization interface of the back-end module, and the first interface comprises a calling chain relation graph generated by connecting node elements through connecting elements of a front-end component;
the calling module is used for calling the back-end module through the first interface according to a service demand instruction of the front-end module, wherein the calling instruction is generated by starting preprocessing according to the service demand instruction, is transmitted according to the calling chain relation diagram of the first interface, requests a response to a corresponding node element of the first interface according to the calling instruction, and executes a corresponding service flow to call the back-end module;
wherein the front-end component includes a plurality of node elements and connection elements, and the first interface including a call chain relationship graph generated by connecting the node elements by the connection elements of the front-end component includes:
setting a correlation call link relation for node elements, connecting different node elements together through an arrow, wherein the arrow direction represents a method of a next node to be called, and connecting the node elements through the connection elements to generate the call chain relation graph;
the generating a call instruction by starting preprocessing according to the service requirement instruction, transmitting the call instruction according to the call chain relation diagram of the first interface, requesting a response to a corresponding node element of the first interface according to the call instruction, and executing a corresponding service flow to call the back-end module includes:
according to the business requirement instruction of the front-end module, the transaction manager submodule requests the transaction coordinator submodule to start a new global transaction, the transaction coordinator submodule generates a call instruction representing the global transaction, the call instruction is spread through a call chain of a first interface, the resource manager submodule registers the local transaction as a branch of the call instruction to the corresponding global transaction of the transaction coordinator submodule, the transaction coordinator submodule requests transaction pre-submission confirmation to each node interface, and each node interface responds to the request.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method for invoking a program front-end interface as claimed in any one of claims 1 to 7 are implemented by the processor when executing the computer program.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implementing the steps of a program front-back interface call method as claimed in any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010701163.8A CN111736930B (en) | 2020-07-21 | 2020-07-21 | Program front-back end interface calling method and device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010701163.8A CN111736930B (en) | 2020-07-21 | 2020-07-21 | Program front-back end interface calling method and device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111736930A CN111736930A (en) | 2020-10-02 |
CN111736930B true CN111736930B (en) | 2020-12-29 |
Family
ID=72655120
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010701163.8A Active CN111736930B (en) | 2020-07-21 | 2020-07-21 | Program front-back end interface calling method and device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111736930B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112671574B (en) * | 2020-12-18 | 2024-04-16 | 深圳赛安特技术服务有限公司 | Front-end and back-end joint debugging method and device, proxy equipment and storage medium |
CN113722119A (en) * | 2021-07-29 | 2021-11-30 | 沐坤科技有限公司 | Novel system for calling windows function at front end |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
IL127293A0 (en) * | 1998-11-26 | 1999-09-22 | Creator Ltd | Script development systems and methods useful therefor |
CN103793240B (en) * | 2012-11-02 | 2017-08-18 | 腾讯科技(深圳)有限公司 | Interface scans method, interface scans device and corresponding update of plug-in method |
CN108491205B (en) * | 2018-03-22 | 2021-02-09 | 北京焦点新干线信息技术有限公司 | Front-end webpage development method and system based on component tree |
CN108845798A (en) * | 2018-05-30 | 2018-11-20 | 安徽四创电子股份有限公司 | A kind of visualization big data task cradle and processing method |
CN109240688A (en) * | 2018-08-13 | 2019-01-18 | 重庆金融资产交易所有限责任公司 | Interface development method, electronic device and readable storage medium storing program for executing |
CN109634596B (en) * | 2018-12-11 | 2021-10-22 | 清华大学 | Flow chart based visual programming tool |
CN111338614A (en) * | 2020-03-12 | 2020-06-26 | 苏州浪潮智能科技有限公司 | Application program interface development method, device, equipment and storage medium |
-
2020
- 2020-07-21 CN CN202010701163.8A patent/CN111736930B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111736930A (en) | 2020-10-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109840429B (en) | Intelligent contract deployment and calling method and device | |
CN108388622B (en) | API interface dynamic generation method and device, computer equipment and storage medium | |
US11797273B2 (en) | System and method for enhancing component based development models with auto-wiring | |
CN108287708B (en) | Data processing method and device, server and computer readable storage medium | |
US9697042B2 (en) | Extensibility of business process and application logic | |
CN113110963A (en) | Service processing method, service processing device, electronic equipment and readable storage medium | |
CN111736930B (en) | Program front-back end interface calling method and device, computer equipment and storage medium | |
CN111208992A (en) | System scheduling workflow generation method and system | |
CN106873970A (en) | The installation method and device of a kind of operating system | |
CN113094125B (en) | Business process processing method, device, server and storage medium | |
CN113138776A (en) | Template-based cluster automatic deployment method, device, equipment and medium | |
CN112579569A (en) | Data migration method and device | |
CN116360918A (en) | Modeling data processing method, modeling data processing device, computer equipment and storage medium | |
CN116257438A (en) | Updating method of interface test case and related equipment | |
CN109857579B (en) | Data processing method and related device | |
US11023361B1 (en) | Intelligent automated way of baselining integration content using messages from historical tests to be used for regression testing | |
CN113885886A (en) | Method, device, system and storage medium for processing activity service | |
CN116737662A (en) | Method, device, electronic equipment and storage medium for processing business data | |
CN112416384A (en) | Software upgrading method and device and computer equipment | |
CN110580624B (en) | Chain code upgrading method and device | |
CN113626007B (en) | Application method and device of connector model and server | |
CN112418796B (en) | Sub-process task node activation method and device, electronic equipment and storage medium | |
CN110874713A (en) | Service state management method and device | |
CN114677114A (en) | Approval process generation method and device based on graph dragging | |
CN114936152A (en) | Application testing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |