Interface design method and device, equipment, storage medium and program product
By obtaining and generating interface timing and definition information, performing simulation use cases and call tests, the problem of poor uniformity of interface design tools is solved, and the interface development efficiency is improved and the convenience of collaborative design is achieved.
Patent Information
- Application Number
- CN202411373248.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-10
AI Technical Summary
In the enterprise interface design, the interface design tools of each system are difficult to unify and have poor coordination, which makes it difficult to adjust the data and processing logic conflicts, which reduces the efficiency of interface development.
By obtaining interface timing information, generating timing definition information and interface definition information of each preset interface, generating interface documents based on this information, and executing simulation use cases and calling test cases through interface code, identifying and adjusting errors in interface design, realizing online Collaborative design.
It improves the efficiency and overall maintenance capabilities of interface development, simplifies the collaborative design and debugging of multiple system interfaces, and reduces development risks.
Smart Images

Figure CN119292570A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of software development technology, and in particular, relates to an interface design method, device, equipment, storage medium and program product. Background Art
[0002] Interfaces are tools for communication and information exchange between systems. Systems provide services to the outside world through interfaces and obtain services and data by accessing the interfaces of other systems. With the development of Internet technology, traditional enterprises are gradually carrying out digital transformation. Interface design and development have become an important factor in meeting the requirements of enterprise business development and digital transformation capabilities.
[0003] The interface design and development of an enterprise usually involves multiple systems. At present, when conducting interface design, it usually requires the participation and collaboration of developers and designers of multiple systems. After repeated communication and confirmation, the developers and designers of each system will design the interface of their own system.
[0004] In the above interface design scheme, the interface design tools of each system are selected by each system, which makes it difficult to unify the interface design tools of each system and the coordination is poor. Once there is a conflict between data and processing logic in the interface design, it is difficult to adjust, resulting in low interface development efficiency. Summary of the invention
[0005] The embodiments of the present application provide an interface design method, apparatus, device and computer storage medium, which can improve the efficiency of interface development.
[0006] In a first aspect, an embodiment of the present application provides an interface design method, which is applied to an interface design tool. The interface design method includes:
[0007] Acquire interface timing information, where the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases;
[0008] Based on the interface timing information, generate timing definition information of each preset interface;
[0009] Obtaining interface definition information of each preset interface, the interface definition information including interface parameters and interface type of the preset interface;
[0010] Based on the timing definition information and interface definition information of each preset interface, an interface document of each preset interface is generated.
[0011] In a possible implementation, after generating interface codes of each preset interface based on the timing definition information and the interface definition information of each preset interface, the interface design method further includes executing the following steps for each preset interface of the plurality of preset interfaces:
[0012] Obtain an interface simulation use case, which is generated according to the interface definition information of a preset interface;
[0013] Generate interface code based on interface document;
[0014] Execute interface simulation use cases through interface code;
[0015] Get the first execution result of the interface simulation use case.
[0016] In a possible implementation, after obtaining the first execution result of the interface simulation use case, the interface design method further includes:
[0017] When the first execution result does not meet the preset conditions, first prompt information is generated, the first prompt information includes execution information, and the prompt information is used to prompt the target object to modify the interface definition information based on the execution information, and update the interface document according to the modified interface definition information.
[0018] In a possible implementation, after obtaining the first execution result of the interface simulation use case, the interface design method further includes:
[0019] When the first execution result meets the preset condition, an interface call test case is obtained, and the interface call test case is generated according to the timing definition information and the interface definition information;
[0020] Execute interface call test cases through interface codes of multiple preset interfaces;
[0021] Obtaining the calling time information of each preset interface and the second execution result of the interface calling test case;
[0022] The interface calling test result is generated according to the calling time information of each preset interface and the second execution result.
[0023] In a possible implementation, after generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method further includes:
[0024] If the interface call test result fails, a second prompt information is generated, which includes the execution information and call time information of each preset interface. The second prompt information is used to prompt the target object to modify the timing definition information and interface definition information of each preset interface based on the execution information and call time information of each preset interface, and to update the interface document of each preset interface according to the modified timing definition information and interface definition information.
[0025] In a possible implementation, after generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method further includes:
[0026] Get the request parameters sent by the front-end component;
[0027] When the request parameters meet the preset interface specifications, the request parameters are processed through the interface codes of multiple preset interfaces;
[0028] The business processing results are sent to the front-end component so that the front-end component can adjust the front-end design solution based on the business processing results.
[0029] In a second aspect, an embodiment of the present application provides an interface design device, which is applied to an interface design tool. The interface design device includes:
[0030] An acquisition module, used to acquire interface timing information, where the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases;
[0031] A generation module, used to generate timing definition information of each preset interface based on the interface timing information;
[0032] The acquisition module is further used to acquire interface definition information of each preset interface, where the interface definition information includes interface parameters and interface type of the preset interface;
[0033] The generation module is also used to generate interface documents of each preset interface based on the timing definition information and interface definition information of each preset interface.
[0034] In a third aspect, an embodiment of the present application provides an interface design device, the device comprising:
[0035] A processor and a memory storing computer program instructions; an interface design method for implementing any one of the above items when the processor executes the computer program instructions.
[0036] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, any one of the above-mentioned interface design methods is implemented.
[0037] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device can execute any one of the above-mentioned interface design methods.
[0038] The interface design method, device, equipment and computer storage medium of the embodiment of the present application are applied to the interface design tool. The embodiment of the present application can obtain interface timing information, and generate timing definition information of each preset interface based on the interface timing information. The interface timing information is used to characterize the call timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases. In this way, the call timing of each interface can be defined according to the interface timing information through a unified interface design tool. Then, the interface definition information of each preset interface can be obtained, and the interface definition information includes the interface parameters and interface type of the preset interface. In this way, the interface definition of each interface can be performed through a unified interface design tool. Then, the interface document of each preset interface can be generated based on the timing definition information and interface definition information of each preset interface. In this way, online collaborative design can be performed for multiple interfaces. If there are data and processing logic conflicts in the interface design, they can be directly coordinated and adjusted. In this way, it is not only conducive to the orderly development and overall maintenance of the interface, but also to the efficiency of interface development. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0040] Figure 1 It is a flowchart of an interface design method provided by an embodiment of the present application;
[0041] Figure 2 is a structural schematic diagram of an interface design device provided by another embodiment of the present application;
[0042] Figure 3 It is a structural diagram of an interface design device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0043] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0044] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0045] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0046] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0047] As described in the background technology, the interface design and development of an enterprise usually involves multiple systems. At present, when performing interface design, it is usually necessary for developers and designers of multiple systems to participate and collaborate together. After repeated communication and confirmation, the developers and designers of each system will design the interface of their own system.
[0048] In the above interface design scheme, the interface design tools of each system are selected by each system, which makes it difficult to unify the interface design tools of each system and has poor coordination. Once there are data and processing logic conflicts in the interface design, the developers and designers of each system need to communicate and confirm the problem again. The workload is large and cumbersome, making it difficult to adjust the interface design. This leads to low interface development efficiency. Not only that, in the above interface design scheme, the interfaces of each system are usually debugged by the system with the help of tools. With the increase in the degree of parallel development of the system, the calling logic relationship between the interfaces of each system is becoming more and more complicated. The existing debugging scheme cannot guarantee the correctness of the interface logic. If the interface call logic problem is found during the interface development stage, the interface needs to be redesigned, which further reduces the interface development efficiency.
[0049] In order to solve the problems of the prior art, the embodiments of the present application provide an interface design method, device, equipment and computer storage medium.
[0050] The following first introduces the interface design method provided in the embodiment of the present application in conjunction with the accompanying drawings. The interface design method provided in the embodiment of the present application, the device for executing the method may be an interface design device, or a partial module in the interface design device for executing the interface design method. In the embodiment of the present application, the interface design method provided in the embodiment of the present application is described in detail by taking the interface design device executing the interface design method as an example.
[0051] Figure 1 A flow chart of an interface design method provided by an embodiment of the present application is shown. The interface design method can be applied to an interface design tool. The interface design tool can be a tool developed based on a preset interface protocol for abstract system interface definition, design and joint debugging functions. The interface design tool can provide functions such as interface definition and simulation debugging. In an example, the preset interface protocol can be a Hypertext Transfer Protocol (HTTP).
[0052] like Figure 1 As shown, the interface design method may include the following steps S110 to S140.
[0053] S110, obtaining interface timing information, where the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases.
[0054] In step S110, the multiple preset interfaces may include interfaces of multiple systems, and specifically may represent interfaces used by multiple systems when executing preset use cases. The preset use case may be a use case designed according to the business interaction process between multiple systems, and the preset use case may be one or more, which is not limited here.
[0055] In one embodiment, the interface timing information may include interface timing information generated according to user input. Exemplarily, the interface timing information may include an interface timing diagram. In one example, the interface timing diagram may be drawn based on the HTTP protocol using the Unified Modeling Language (UML). Specifically, the user may drag and drop corresponding components in the UML to represent the interaction relationship between multiple preset interfaces as a two-dimensional diagram, in which the vertical dimension represents the time dimension, the time extends downward, and the messages sent and received by each preset interface are listed in sequence by time. The horizontal dimension represents the dimension of the preset interface, and the independent preset interfaces participating in the interaction are arranged. This two-dimensional diagram is the interface timing diagram.
[0056] S120, generating timing definition information of each preset interface based on the interface timing information.
[0057] In step S120, the timing definition information of each preset interface may be used to describe the dependency relationship and calling sequence between each preset interface and other preset interfaces.
[0058] S130, acquiring interface definition information of each preset interface, where the interface definition information includes interface parameters and interface type of the preset interface.
[0059] S140: Generate interface documents of each preset interface based on the timing definition information and interface definition information of each preset interface.
[0060] The interface design method of the embodiment of the present application is applied to the interface design tool, and can obtain interface timing information, and generate timing definition information of each preset interface based on the interface timing information. The interface timing information is used to characterize the call timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases. In this way, the call timing of each interface can be defined according to the interface timing information through a unified interface design tool. Then, the interface definition information of each preset interface can be obtained, and the interface definition information includes the interface parameters and interface type of the preset interface. In this way, the interface definition of each interface can be performed through a unified interface design tool. Then, the interface document of each preset interface can be generated based on the timing definition information and interface definition information of each preset interface. In this way, online collaborative design can be performed for multiple interfaces. If there are data and processing logic conflicts in the interface design, they can be directly coordinated and adjusted. In this way, it is not only conducive to the orderly development and overall maintenance of the interface, but also to the efficiency of interface development.
[0061] In one embodiment, after generating the interface code of each preset interface based on the timing definition information and the interface definition information of each preset interface, the interface design method may further include performing the following steps for each preset interface in the plurality of preset interfaces:
[0062] Get the interface simulation use case, which is generated according to the interface definition information of the preset interface.
[0063] Generate interface code based on interface documentation.
[0064] Execute interface simulation use cases through interface code.
[0065] Get the first execution result of the interface simulation use case.
[0066] In the above implementation, the interface simulation use case can be an interface simulation use case designed by the user, or it can be an interface simulation use case randomly generated according to the interface definition information of the preset interface. The interface simulation use case can simulate the interface behavior in various scenarios, including success, failure, exception, etc. Specifically, executing the interface simulation use case through the interface code can include data simulation of the interface input parameters and output parameters. After inputting the interface input parameters into the preset interface and obtaining the output parameters of the preset interface, the processing logic of the preset interface can be verified based on the output parameters of the preset interface, or the preset interface can be verified based on the expected output parameters of the interface simulation use case and the output parameters of the preset interface, and the above-mentioned first execution result is obtained according to the verification result.
[0067] According to the above implementation, each preset interface can be simulated and debugged respectively, so as to reduce the risk of errors in the design of a single interface, thereby improving the efficiency of interface development.
[0068] In one embodiment, after obtaining the first execution result of the interface simulation use case, the interface design method may further include:
[0069] When the first execution result does not meet the preset conditions, first prompt information is generated, the first prompt information includes execution information, and the prompt information is used to prompt the target object to modify the interface definition information based on the execution information, and update the interface document according to the modified interface definition information.
[0070] In the above implementation, the execution information may include relevant information of the preset interface executing the interface simulation use case process, and may also include analysis information obtained by error analysis of the first execution result. The target object may include an interface designer. The embodiment of the present application performs interface design through an interface design tool, and the above first prompt information can be displayed on the front-end interface of the interface design tool to prompt the target object.
[0071] According to the above implementation, when a single preset interface design error occurs, the first prompt information for prompting the interface designer can be generated, which is conducive to timely correction of the design of the single preset interface, thereby improving the efficiency of interface development.
[0072] In one embodiment, after obtaining the first execution result of the interface simulation use case, the interface design method may further include:
[0073] When the first execution result meets the preset condition, an interface call test case is obtained, and the interface call test case is generated according to the timing definition information and the interface definition information.
[0074] Execute interface call test cases through interface codes of multiple preset interfaces.
[0075] Obtain the calling time information of each preset interface and the second execution result of the interface calling test case.
[0076] The interface calling test result is generated according to the calling time information of each preset interface and the second execution result.
[0077] In the above implementation, the interface call use case can be an interface call use case designed by the user, or it can be an interface call use case randomly generated according to the timing definition information and interface definition information of the preset interface. In the process of simulating the interface call, the interface design tool can record the start time and end time of each preset interface call, which can be achieved by adding log records in the test script or using a timestamp function. Based on the recorded call time information, it is possible to analyze whether the call order and time consumption of multiple preset interfaces meet expectations. The second execution result has a similar meaning to the first execution result, the only difference being that, except for the input parameters of the first preset interface in the interface timing diagram, which are the input parameters contained in the interface call test case, the input parameters of the remaining preset interfaces can be determined based on the output parameters of the previous preset interface.
[0078] According to the above implementation, by performing interface call simulation tests on multiple interfaces, on the one hand, it is possible to verify whether the call timing of multiple preset interfaces is correct, and on the other hand, it is possible to verify whether there are data and processing logic conflicts in the interface design. In this way, it is possible to accurately identify whether there are errors in the call logic relationship between the interfaces of each system during the interface design stage, thereby reducing the risk of returning to redesign the interface during the interface development stage, thereby improving the efficiency of interface development.
[0079] In one embodiment, after generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method may further include:
[0080] If the interface call test result fails, a second prompt information is generated, which includes the execution information and call time information of each preset interface. The second prompt information is used to prompt the target object to modify the timing definition information and interface definition information of each preset interface based on the execution information and call time information of each preset interface, and to update the interface document of each preset interface according to the modified timing definition information and interface definition information.
[0081] In the embodiment of the present application, the interface design is performed through an interface design tool, and the second prompt information can be displayed on the front-end interface of the interface design tool to be used for prompting the target object.
[0082] According to the above implementation, when there is an error in the calling logic relationship between the interfaces of each system, a second prompt information can be generated to prompt the interface designer. The second prompt information includes the execution information and calling time information of each preset interface, which helps the interface designer to quickly locate the problem of interface design. In this way, it is conducive to timely correcting the calling logic relationship of multiple preset interfaces, thereby improving the efficiency of interface development.
[0083] In one embodiment, after generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method may further include:
[0084] Get the request parameters sent by the front-end component.
[0085] When the request parameters meet the preset interface specifications, the request parameters are processed through the interface codes of the multiple preset interfaces.
[0086] The business processing results are sent to the front-end component so that the front-end component can adjust the front-end design solution based on the business processing results.
[0087] According to the above implementation, the front end can be provided with a simulated access service of the interface, and the interface joint debugging can be performed to output the processing results of the interface in real time. The front end can verify whether the business processing results returned by the back end meet expectations, including response codes, response data, etc. In this way, the front end can be assisted in development and data display, and a data interface simulation environment can be provided for front-end developers, thereby realizing synchronous development and debugging of the front and back ends and improving the overall development efficiency of the system.
[0088] Based on the interface design method provided in the above embodiment, the present application also provides a specific implementation of an interface design device, which can be applied to an interface design tool. Please refer to the following embodiment.
[0089] See first Figure 2 The interface design device 200 provided in the embodiment of the present application includes a first acquisition module 201 and a first generation module 202.
[0090] The first acquisition module 201 is used to acquire interface timing information, where the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases.
[0091] The first generating module 202 is used to generate timing definition information of each preset interface based on the interface timing information.
[0092] The first acquisition module 201 is further used to acquire interface definition information of each preset interface, where the interface definition information includes interface parameters and interface type of the preset interface.
[0093] The first generating module 202 is further configured to generate an interface document of each preset interface based on the timing definition information and the interface definition information of each preset interface.
[0094] The interface design device of the embodiment of the present application is applied to the interface design tool, which can obtain the interface timing information, and generate the timing definition information of each preset interface based on the interface timing information. The interface timing information is used to characterize the call timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases. In this way, the call timing of each interface can be defined according to the interface timing information through a unified interface design tool. Then, the interface definition information of each preset interface can be obtained, and the interface definition information includes the interface parameters and interface type of the preset interface. In this way, the interface definition of each interface can be performed through a unified interface design tool. Then, the interface document of each preset interface can be generated based on the timing definition information and interface definition information of each preset interface. In this way, online collaborative design can be performed for multiple interfaces. If there are data and processing logic conflicts in the interface design, they can be directly coordinated and adjusted. In this way, it is not only conducive to the orderly development and overall maintenance of the interface, but also to the efficiency of interface development.
[0095] In one embodiment, the interface design device may further include a second acquisition module, a second generation module, and a first execution module, which are used to generate interface codes of each preset interface based on the timing definition information and interface definition information of each preset interface, and then implement the following functions for each preset interface in the plurality of preset interfaces:
[0096] The second acquisition module is used to acquire an interface simulation use case, where the interface simulation use case is generated according to interface definition information of a preset interface.
[0097] The second generation module is used to generate interface codes based on the interface document.
[0098] The first execution module is used to execute the interface simulation use case through the interface code.
[0099] The second acquisition module is also used to obtain the first execution result of the interface simulation use case.
[0100] In one embodiment, the interface design device may further include:
[0101] The third generation module is used to generate a first prompt information after obtaining the first execution result of the interface simulation use case, if the first execution result does not meet the preset conditions, the first prompt information includes execution information, and the prompt information is used to prompt the target object to modify the interface definition information based on the execution information, and update the interface document according to the modified interface definition information.
[0102] In one embodiment, the interface design device may further include:
[0103] The third acquisition module is used to obtain the interface call test case after obtaining the first execution result of the interface simulation case, if the first execution result meets the preset conditions, and the interface call test case is generated according to the timing definition information and the interface definition information.
[0104] The second execution module is used to execute interface call test cases through interface codes of multiple preset interfaces.
[0105] The third acquisition module is also used to obtain the calling time information of each preset interface and the second execution result of the interface calling test case.
[0106] The fourth generating module is used to generate an interface calling test result according to the calling time information of each preset interface and the second execution result.
[0107] In one embodiment, the interface design device may further include:
[0108] The fifth generation module is used to generate a second prompt information after generating an interface call test result based on the call time information of each preset interface and the second execution result. If the interface call test result fails, the second prompt information includes the execution information and call time information of each preset interface. The second prompt information is used to prompt the target object to modify the timing definition information and interface definition information of each preset interface based on the execution information and call time information of each preset interface, and to update the interface document of each preset interface according to the modified timing definition information and interface definition information.
[0109] In one embodiment, the interface design device may further include:
[0110] The fourth acquisition module is used to acquire the request parameters sent by the front-end component after generating the interface call test result according to the call time information of each preset interface and the second execution result.
[0111] The processing module is used to perform business processing on the request parameters through the interface codes of multiple preset interfaces when the request parameters meet the preset interface specifications.
[0112] The sending module is used to send the business processing results to the front-end component, so that the front-end component can adjust the front-end design plan based on the business processing results.
[0113] Each module of the interface design device provided in the embodiment of the present application can realize Figure 1 The functions of each step of the interface design method are provided, and the corresponding technical effects can be achieved. For the sake of concise description, they will not be repeated here.
[0114] Figure 3 A schematic diagram of the hardware structure of the interface design device provided in an embodiment of the present application is shown.
[0115] The interface design device may include a processor 301 and a memory 302 storing computer program instructions.
[0116] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0117] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0118] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0119] The processor 301 implements any one of the interface design methods in the above embodiments by reading and executing computer program instructions stored in the memory 302 .
[0120] In one example, the interface design device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0121] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0122] Bus 310 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0123] The interface design device can execute the interface design method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 2 The interface design method and device described. The interface design method in the above embodiment can be implemented by providing a computer storage medium in the embodiment of the present application. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the interface design methods in the above embodiment is implemented.
[0124] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements any one of the interface design methods in the above embodiments.
[0125] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0126] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0127] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0128] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0129] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An interface design method, characterized in that: Applied to an interface design tool, the interface design method comprises: Acquire interface timing information, where the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases; Based on the interface timing information, generating timing definition information of each preset interface; Acquire interface definition information of each preset interface, wherein the interface definition information includes interface parameters and interface type of the preset interface; Based on the timing definition information and the interface definition information of each preset interface, an interface document of each preset interface is generated.
2. The interface design method according to claim 1, characterized in that: After the interface code of each preset interface is generated based on the timing definition information and the interface definition information of each preset interface, the interface design method further comprises executing the following steps for each preset interface of the plurality of preset interfaces: Obtaining an interface simulation use case, where the interface simulation use case is generated according to interface definition information of a preset interface; Generate interface code based on the interface document; Execute the interface simulation use case through the interface code; Obtain a first execution result of the interface simulation use case.
3. The interface design method according to claim 2, characterized in that: After obtaining the first execution result of the interface simulation use case, the interface design method further includes: When the first execution result does not meet the preset conditions, a first prompt information is generated, wherein the first prompt information includes execution information, and the prompt information is used to prompt the target object to modify the interface definition information based on the execution information, and to update the interface document according to the modified interface definition information.
4. The interface design method according to claim 2, characterized in that: After obtaining the first execution result of the interface simulation use case, the interface design method further includes: When the first execution result meets the preset condition, obtaining an interface call test case, wherein the interface call test case is generated according to the timing definition information and the interface definition information; Execute the interface call test case through the interface codes of the multiple preset interfaces; Obtaining the calling time information of each preset interface and the second execution result of the interface calling test case; An interface calling test result is generated according to the calling time information of each preset interface and the second execution result.
5. The interface design method according to claim 4, characterized in that: After generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method further includes: If the interface call test result fails, a second prompt information is generated, the second prompt information includes the execution information and call time information of each preset interface, and the second prompt information is used to prompt the target object to modify the timing definition information and interface definition information of each preset interface based on the execution information and call time information of each preset interface, and to update the interface document of each preset interface according to the modified timing definition information and interface definition information.
6. The interface design method according to claim 4, characterized in that: After generating the interface call test result according to the call time information of each preset interface and the second execution result, the interface design method further includes: Get the request parameters sent by the front-end component; When the request parameters conform to the preset interface specifications, performing business processing on the request parameters through the interface codes of the multiple preset interfaces; The business processing result is sent to the front-end component, so that the front-end component adjusts the front-end design solution based on the business processing result.
7. An interface design device, characterized in that: Applied to an interface design tool, the interface design device comprises: An acquisition module, used to acquire interface timing information, wherein the interface timing information is used to characterize the calling timing of multiple preset interfaces, wherein the multiple preset interfaces include interfaces of multiple systems for executing preset use cases; A generating module, used for generating timing definition information of each preset interface based on the interface timing information; The acquisition module is further used to acquire interface definition information of each preset interface, wherein the interface definition information includes interface parameters and interface type of the preset interface; The generating module is further used to generate interface documents of each preset interface based on the timing definition information and interface definition information of each preset interface.
8. An interface design device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the interface design method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the interface design method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the interface design method as described in any one of claims 1 to 6.