Interface management method, device, equipment and storage medium
Through interface management methods and devices, the use record array of interface configuration objects is summarized, which solves the problem of low efficiency of interface management in the front and back end separation and distribution, and realizes efficient interface management and transformation, especially in front-end development in the field of financial technology, which significantly improves management efficiency and scientificity.
Patent Information
- Application Number
- CN202211204588.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-09-29
AI Technical Summary
The existing method based on the front-end and back-end separation interface is prone to consume a lot of manpower and resources for the development of interfaces of a large number of functional pages of a large number of projects and needs to be transformed.
Through the interface management method, the interface configuration objects of all projects are summarized to form a usage record array, and the record array is queried and updated using keywords to quickly find and manage interface configuration objects, and dynamically adjust the interface handling schemes with different usage frequencies.
It improves the efficiency and scientificity of interface management, reduces the waste of human resources, improves the efficiency of query and transformation, and enhances the timeliness and scientificity of interface management devices.
Smart Images

Figure CN115495144B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an interface management method, device, equipment and storage medium. Background Art
[0002] Based on the separation of front-end and back-end development interfaces, the front-end development and back-end development of interface development are separated, so that the front-end development and back-end development do not hinder each other, which greatly improves the efficiency of interface development.
[0003] The existing method of developing interfaces based on the separation of front-end and back-end allows interface development to achieve joint development and debugging by simulating (mock) data based on the interface fields separated by the back-end when the back-end does not provide an interface. It can also design local rendering of the page to achieve on-demand loading, without the need to load all resources at the beginning, and the server does not need to parse the front-end page, which improves page interaction and user experience. Moreover, it can quickly locate and discover problems through mainstream front-end frameworks, and client problems no longer require back-end personnel to participate in debugging, thereby enhancing code refactoring and maintainability.
[0004] However, the existing method of developing interfaces based on the separation of front-end and back-end is prone to consuming a lot of manpower and resources to count the projects that need to be modified when developing interfaces for a large number of functional pages in a large number of projects. Summary of the Invention
[0005] The main technical problem to be solved by this application is that the existing method of developing interfaces based on separation of front-end and back-end is prone to consuming a lot of manpower and resources to count the projects that need to be modified when developing interfaces for a large number of functional pages in a large number of projects.
[0006] To solve the above technical problems, a technical solution adopted by this application is: an interface management method, comprising:
[0007] In response to the received call instruction of the interface configuration object, calling the usage record array of the interface configuration objects of all projects;
[0008] In response to a received query instruction for a keyword, querying whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array;
[0009] If the usage record of the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed;
[0010] If no usage record of the interface configuration object corresponding to the keyword is found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced.
[0011] Preferably, the interface configuration object includes the name of the interface, the corresponding link address and the name of the project to which it belongs; and the usage record array includes: usage records of multiple interface configuration objects of multiple projects.
[0012] Preferably, after displaying that the interface configuration object corresponding to the keyword has not been referenced, the method further includes the following steps:
[0013] The usage records of the interface configuration object that have not been referenced are added to the usage record array to form an updated usage record array.
[0014] Preferably, after calling the usage record array of the interface configuration object, the method further includes a step of updating the usage record array, including:
[0015] Traverse and call each interface configuration object of each project, and write each interface configuration object into the usage record array;
[0016] Traversing and determining whether each of the interface configuration objects is accurately written into the usage record array;
[0017] If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array;
[0018] If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
[0019] More preferably, the traversal calls each interface configuration object of each project and writes each interface configuration object into the usage record array, specifically:
[0020] The name of each interface that calls each project, the corresponding link address, and the name of the project to which it belongs;
[0021] The name of each interface, the corresponding link address and the name of the project to which it belongs are taken as an interface configuration object and written into the usage record array.
[0022] More preferably, the traversal to determine whether each of the interface configuration objects is accurately written into the usage record array specifically includes the following steps:
[0023] Traversing and determining whether the name in each of the interface configuration objects is written into the usage record of the corresponding link address;
[0024] If the name in each of the interface configuration objects is written into the usage record of the corresponding link address, it is determined that the interface configuration object is accurately written into the usage record array;
[0025] If the name in each of the interface configuration objects is not written into the usage record of the corresponding link address, it is determined that the interface configuration object is not accurately written into the usage record array.
[0026] More preferably, the interface management method:
[0027] In response to the received call instruction of the interface configuration object, call Gitlab's repository files to obtain the usage record array of the interface configuration objects of all projects;
[0028] In response to the received continue operation instruction, perform an interface query operation or a record update operation;
[0029] The interface query operation includes the following steps:
[0030] In response to the received keyword query instruction, call Gitlab's repository files to query the JSON format usage record of the interface configuration object;
[0031] Querying whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array;
[0032] If the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed;
[0033] If the interface configuration object corresponding to the keyword is not found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced;
[0034] The update record operation includes the following steps:
[0035] Call Gitlab's repository tree to obtain each interface configuration object of all projects;
[0036] Traverse and call each interface configuration object of each project, and write each interface configuration object into the usage record array;
[0037] Traversing and determining whether each of the interface configuration objects is accurately written into the usage record array;
[0038] If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array;
[0039] If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
[0040] To solve the above technical problems, another technical solution adopted by this application is: an interface management device, comprising:
[0041] The data acquisition module is used to obtain the usage record array of the interface configuration object according to the received calling instruction of the interface configuration object;
[0042] A data processing module is used to query whether the interface configuration object corresponding to the keyword exists in the usage record array according to the received keyword query instruction, and make corresponding processing instructions according to the query result;
[0043] The data display module is used to display the corresponding processing results according to the corresponding processing instructions.
[0044] To solve the above technical problems, another technical solution adopted in this application is: an interface management device, which includes: a memory, a processor, and an interface management program stored in the memory and runnable on the processor, and the interface management program is configured to implement the steps of the interface management method as described above.
[0045] In order to solve the above technical problems, another technical solution adopted in the present application is: a storage medium, on which an interface management program is stored, and when the interface management program is executed by a processor, the steps of the interface management method described above are implemented.
[0046] Beneficial effects: The specific embodiment of the present application provides an interface management method based on front-end and back-end separation, which aggregates the interface configuration objects of all interfaces of all functional pages of all projects to form a usage record array of the interface configuration objects. By pre-forming a mapping relationship between the interface configuration objects and the interface usage records, the terminal can quickly retrieve the corresponding interface configuration object according to the mapping relationship after receiving the operation instruction, thereby effectively improving the efficiency of interface management. The interface configuration object usage record array can be used to efficiently and quickly find the interface to be queried / modified, thereby improving the efficiency of query / modification; and the usage period and frequency of each interface in each functional page of each project can be analyzed and judged based on the usage of each interface in the usage record array of the interface configuration object. Therefore, the interface management device of the present application can dynamically adopt different disposal schemes for interfaces with different usage frequencies based on the latest usage of interfaces of all functional pages of all projects on the basis of improving the efficiency of interface management, thereby enhancing the scientific nature of the interface management device of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present application. Those skilled in the art can also derive other drawings based on these drawings without inventive work, among which:
[0048] Figure 1 This is a schematic diagram of the module structure of the interface management device provided by this application;
[0049] Figure 2 This is a flowchart of the interface management method provided by this application;
[0050] Figure 3 This is a flowchart of an update method using a record array in the interface management method provided by this application;
[0051] Figure 4 yes Figure 3 A schematic diagram of a specific flow chart of step S41 in the update method using a record array is provided;
[0052] Figure 5 yes Figure 3 A schematic diagram of a specific flow chart of step S42 in the update method using a record array is provided;
[0053] Figure 6 This is a first flow chart of a specific embodiment of the interface management method provided by this application;
[0054] Figure 7 This is a second flow chart of a specific embodiment of the interface management method provided by this application;
[0055] Figure 8 This is a schematic diagram of the structure of the interface management device provided by this application;
[0056] Figure 9 This is a schematic block diagram of the structure of the storage medium provided by this application. DETAILED DESCRIPTION
[0057] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0058] The terms "first," "second," and "third" in this application are used only for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of such features. In the description of this application, "multiple" means at least two, for example, two, three, etc., unless otherwise specifically defined. All directional indications in the embodiments of this application (such as up, down, left, right, front, back...) are only used to explain the relative positional relationship, movement, etc. between the components under a specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications also change accordingly. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products, or devices.
[0059] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0060] The inventors of this application have found in practice that since the separation of the front-end and back-end can flexibly and quickly apply the interface to different pages and projects, in the process of interface transformation, a large amount of manpower / resources are required to search / count multiple interfaces and the projects and functions corresponding to multiple interfaces. Therefore, it is necessary to effectively manage multiple interfaces of multiple functional pages of multiple projects to reduce the workload of front-end developers and improve the efficiency of interface management / transformation.
[0061] The present application is described in detail below with reference to the accompanying drawings and embodiments.
[0062] See also Figure 1 , Figure 1 It is a schematic diagram of the module structure of the interface management device provided in this application.
[0063] See also Figure 1 , the present application provides an interface management device, comprising:
[0064] The data acquisition module 210 is used to acquire the usage record array of the interface configuration object according to the received calling instruction of the interface configuration object;
[0065] The data processing module 220 is used to query whether there is an interface configuration object corresponding to the keyword in the usage record array according to the received keyword query instruction, and make corresponding processing instructions according to the query result;
[0066] The data display module 230 is used to display the corresponding processing results according to the corresponding processing instructions.
[0067] See also Figure 2 , Figure 2 This is a flowchart of the interface management method provided by this application.
[0068] See also Figure 2 The interface management method provided in this application includes the following steps:
[0069] S10: In response to the received calling instruction of the interface configuration object, calling the usage record arrays of the interface configuration objects of all projects.
[0070] The execution subject of the method of the embodiment of the present application can be a computer device or terminal (hereinafter referred to as the terminal) with network communication, data processing and program execution functions, for example, a mainframe computer or a small / mobile computer. The method of the embodiment of the present application can be issued to the execution subject by a person who has management / modification / development authority over the interface management device, or can be triggered by a timed task set by a person who has management / modification / development authority over the interface management device to issue relevant instructions to the execution subject.
[0071] The interface in this embodiment is an API (Application Programming Interface), which is a set of predefined functions that allows applications and developers to access a set of routines based on certain software or hardware without requiring access to the source code. Specifically, the interface configuration object in this embodiment includes the name of the interface, the corresponding link address, and the name of the project to which it belongs.
[0072] The specific embodiment of the present application aggregates the interface configuration objects of all interfaces of all function pages of all projects ("all" in this application refers to the sum of the projects / function pages / interfaces currently supervised by a specific company / unit) to form an array of usage records of the interface configuration objects. By pre-forming a mapping relationship between the interface configuration objects and the interface usage records, the terminal can quickly retrieve the corresponding interface configuration object according to the mapping relationship after receiving the operation instruction, thereby effectively improving the efficiency of interface management. It can be understood that for financial technology fields such as payment and clearing, financing, wealth management, retail banking, insurance, and transaction settlement based on a series of technological innovations such as big data, cloud computing, artificial intelligence, and blockchain, the development / iteration cycle of the project is very fast. For the interface management of the project function page, there is a lot of management pressure. The unit has high requirements for the timeliness of the interface management of each function page of the current project. Therefore, it is necessary to effectively manage multiple interfaces of multiple function pages of multiple projects to reduce the workload of front-end developers and improve the efficiency of interface management / transformation.
[0073] The present application can efficiently and quickly search for interfaces to be queried / modified through the usage record array of the interface configuration object, thereby improving the efficiency of the query / modification; it can also analyze and determine the usage period and frequency of each interface on each functional page of each project based on the usage of each interface in the usage record array of the interface configuration object, so that the interface management device of the present application can dynamically adopt different disposal plans for interfaces with different usage frequencies based on the latest usage of interfaces on all functional pages of all projects on the basis of improving the efficiency of interface management, thereby enhancing the scientific nature of the interface management device of the present application in front-end development, especially in the front-end development in the field of financial technology.
[0074] Furthermore, in some specific embodiments, the interface management device of the embodiment of the present application relies on Gitlab (warehouse management tool), and the interface configuration object is saved in Gitlab's repository files in JSON format, so that the interface management method of the present application relies on Gitlab to uniformly manage all interfaces of all functional pages of all projects, and can dynamically control the delivery projects and functional pages of each interface according to actual needs, which can greatly improve the query and aggregation time, and the display is clearer, which is of great help in saving manpower and testing regression testing of related functions.
[0075] S20: In response to the received keyword query instruction, query whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array. The embodiment of the present application uses keyword retrieval to quickly query the interface configuration object corresponding to the keyword in the usage record array. The method is simple and fast, and is conducive to effectively extracting required information from a large amount of data information.
[0076] One of the query results of S20: the usage record of the interface configuration object corresponding to the keyword is found, and S31 is triggered to be executed by this query result.
[0077] The second query result of S20: the usage record of the interface configuration object corresponding to the keyword is found, and S32 is triggered by this query result.
[0078] S31: If the usage record of the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed.
[0079] Specifically, since the same keyword can correspond to usage records of different interface configuration objects in different projects, after querying by keyword, all projects and functions of the interface configuration objects corresponding to the keyword will be summarized and listed on the interface management platform.
[0080] S32: If no usage record of the interface configuration object corresponding to the keyword is found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced.
[0081] Specifically, if no usage records are found for the interface configuration object corresponding to the keyword, it means that the interface is not referenced in any function page of any current project and the usage rate of the interface is extremely low. In this case, you can set up a relevant program to issue a command to delete or update the interface configuration object on the terminal, or you can manually delete or update the interface configuration object.
[0082] Among them, deleting interface configuration objects with no usage records can reduce the redundant information of the usage record array, increase the attention of frequently used interfaces based on the usage of each interface of all projects, and maintain these used interfaces, which is conducive to maintaining the timeliness of the interface management device.
[0083] It is understood that there should be a certain time criterion for deleting interface configuration objects with no usage records. For example, if there are no related usage records for an interface configuration object for two weeks or longer, it is determined that the interface usage rate is extremely low and needs to be deleted.
[0084] It can be understood that, if a certain time dimension is not exceeded or there is a need for a certain interface configuration object to exist, the interface configuration object with no usage record can be updated, that is, the interface configuration object is given one or several usage records and written into the usage record array, so that the interface configuration object remains in the interface management device.
[0085] Specifically, after the interface configuration object corresponding to the display keyword has not been referenced, the following steps may be further included:
[0086] S321: Add usage records of interface configuration objects that have not been referenced to the usage record array to form an updated usage record array.
[0087] See also Figure 3-Figure 5 , Figure 3 This is a flowchart of the update method using the record array in the interface management method provided by this application. Figure 4 yes Figure 3 The specific flow chart of step S41 in the update method using the record array is provided. Figure 5 yes Figure 3 A schematic diagram of a specific flow chart of step S42 in the update method using a record array is provided.
[0088] See also Figure 3 , the specific embodiment of the present application further includes a step of updating the usage record array after calling the usage record array of the interface configuration object, specifically including the following steps:
[0089] S41: traverse and call each interface configuration object of each project, and write each interface configuration object into a usage record array.
[0090] See also Figure 4 In some specific embodiments, this step specifically includes the following steps:
[0091] S411: Call the name of each interface of each project, the corresponding link address (url) and the name of the project to which it belongs.
[0092] S412: The name of each interface, the corresponding link address, and the name of the project to which it belongs are taken as an interface configuration object and written into the usage record array.
[0093] Specifically, the method for calling the interface configuration object in the specific embodiment of the present application can use the Get method to call Gitlab's repository tree to obtain the data information of all function pages of all projects, and then call each repository file of the repository tree to obtain the interface configuration objects of all function pages of each project, and then write all the obtained interface configuration objects into the usage record array. Specifically, the interface configuration object in the embodiment of the present application is saved on Gitlab in JSON format. The specific embodiment of the present application realizes the preliminary update of the usage record array through this step.
[0094] S42: Traverse and determine whether each interface configuration object is accurately written into the usage record array.
[0095] See also Figure 5In some specific embodiments, this step specifically includes the following steps:
[0096] S421: traverse and determine whether the name in each interface configuration object is written into the usage record of the corresponding link address.
[0097] S422: If the name in each interface configuration object is written into the usage record of the corresponding link address, it is determined that the interface configuration object is accurately written into the usage record array.
[0098] S423: If the name in each interface configuration object is not written into the usage record of the corresponding link address, it is determined that the interface configuration object is not accurately written into the usage record array.
[0099] One of the judgment results of S42 is: the current interface configuration object is accurately written into the usage record array, and S43 is triggered to be executed by this judgment result.
[0100] The second judgment result of S42: the current interface configuration object is not accurately written into the usage record array, and S44 is triggered to be executed by this judgment result.
[0101] S43: If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array.
[0102] S44: If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
[0103] Specifically, this step determines whether each interface configuration object is accurately written into the usage record array by traversing, thereby ensuring the accuracy of the usage record array.
[0104] In some specific embodiments, the process of updating the usage record array in the embodiments of the present application can be updated by the same or different interface managers at different time dimensions, so that the data of the usage record array changes in line with the usage of each interface of the project. It can also be updated simultaneously by multiple interface managers at the same time dimension to improve the update efficiency of the usage record array. Further, in some specific embodiments, the update of the usage record array of the present application is carried out in the form of online update. It can be understood that the interface manager of the specific embodiment of the present application is a person with viewing / operation authority. In some specific embodiments, the interface management device of the present application is provided with an authority verification interface. When the terminal receives the correct authority verification, it displays the operation page of the interface management device. When the terminal receives the incorrect authority verification, it displays the page of the wrong login and notifies the relevant personnel by email.
[0105] See also Figure 6-Figure 7 , Figure 6 This is a first flow chart of a specific embodiment of the interface management method provided by this application. Figure 7 This is a second flow chart of a specific embodiment of the interface management method provided in this application.
[0106] See also Figure 6 , provides a specific embodiment of the interface management method of the present application to illustrate the interface management method of the present application. The execution subject of this embodiment is a computer device or terminal with network communication, data processing and program running functions.
[0107] S51: In response to the received calling instruction of the interface configuration object, call repositoryfiles of Gitlab to obtain the usage record array of the interface configuration objects of all projects.
[0108] S52: In response to the received continue operation instruction, perform interface query (S521) or update record (S522).
[0109] The interface query operation includes the following steps:
[0110] S61: In response to the received keyword query instruction, call the repository files of Gitlab to query the usage record of the interface configuration object in JSON format.
[0111] S62: Query the usage record array to see whether there is a usage record of the interface configuration object corresponding to the keyword.
[0112] Specifically, the terminal calls the repository files interface through the Get method, queries the Gitlab JSON format record file, obtains the interface usage record object, and queries whether the URL in the record object contains a record of the keyword through the input keyword.
[0113] One of the query results of S62: the interface configuration object corresponding to the keyword is found, and S63 is triggered by the query result.
[0114] The second query result of S62: no interface configuration object corresponding to the keyword is found, and S64 is triggered by this query result.
[0115] S63: If the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed.
[0116] S64: If the interface configuration object corresponding to the keyword is not found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced.
[0117] The update record operation includes the following steps:
[0118] S71: Call Gitlab's repository tree to obtain each interface configuration object of all projects.
[0119] Specifically, this step calls Gitlab's repository tree through the Get method to obtain the files in the project directory, that is, each interface configuration object of all projects.
[0120] S72: traverse and call each interface configuration object of each project, and write each interface configuration object into a usage record array.
[0121] Specifically, this step traverses and calls each interface configuration object of each project, calls Gitlab's repository files through the Get method, obtains each interface configuration object of each function page of each project, and puts the name of each interface, the name of the project to which it belongs, and the corresponding link address (url) as an object into the usage record array. When all interface configuration objects of all function pages of all projects are put into the usage record array, the traversal ends and a circular usage record array is formed.
[0122] S73: Traverse and determine whether each of the interface configuration objects is accurately written into the usage record array.
[0123] Specifically, this step uses the link address as the dimension to determine whether the interface name of the current object and the project name to which the interface belongs are written into the usage record of the corresponding link address, and traverses to determine whether each interface configuration object is accurately written into the circular usage record array.
[0124] One of the judgment results of S73: the current interface configuration object is accurately written into the usage record array, and S74 is triggered to be executed by this judgment result.
[0125] The second judgment result of S73: the current interface configuration object is not accurately written into the usage record array, and S75 is triggered to be executed by this judgment result.
[0126] S74: If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array.
[0127] S75: If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
[0128] S76: Call Gitlab's repository files through the put method, write the record array into Gitlab's JSON format record file, and complete the process of updating the record.
[0129] See also Figure 7 , provides a specific embodiment of the interface management method of the present application to illustrate the interface management method of the present application. The execution subject of this embodiment is the interface management personnel with modification / development authority.
[0130] For example, in the process of managing multiple interfaces of multiple function pages of a large number of projects supervised by the unit, interface manager A with development authority collects the interfaces of the function pages of all projects supervised by the unit onto the interface management device through the interface management device of the present application, and the interface configuration objects of the function pages of all projects are stored on the repository tree of Gitlab. Personnel B with query authority can enter the interface management device of the present application, query the interface configuration objects of the function pages of each project by project, or query the interface configuration objects of the function pages of all projects stored on the interface management device. Interface managers with modification authority can enter the interface management device of the present application, and update and maintain the interfaces of the function pages of each project supervised by the unit in the interface management device of the present application, thereby improving the maintenance quality and efficiency of interface management.
[0131] Specifically, the method for an interface management personnel with modification / development authority to use the interface management device of the present application may include the following steps:
[0132] S81, input the correct authority verification, enter the operation page of the interface management device, input the call instruction of the interface configuration object into the operation page, and obtain the usage record array of the interface configuration objects of all projects.
[0133] S82: Input a continue operation instruction to the operation page to perform an interface query operation (S821) or an update record operation (S822).
[0134] The interface query operation includes the following steps:
[0135] S91: In the API input box on the operation page, enter the keyword of the API interface to be queried, click the "Query API Usage Items" button to obtain the usage record of the interface configuration object.
[0136] S92: Query whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array.
[0137] One of the query results of S92: the interface configuration object corresponding to the keyword is found, and S93 is triggered by the query result.
[0138] The second query result of S92: If no interface configuration object corresponding to the keyword is found, S94 is triggered by this query result.
[0139] S93: If the interface configuration object corresponding to the keyword is found, the operation page summarizes and displays the project and function of the interface configuration object corresponding to the keyword.
[0140] S94: If the interface configuration object corresponding to the keyword is not found, the operation page displays that the interface configuration object corresponding to the keyword has not been referenced.
[0141] The update record operation includes the following steps:
[0142] S101: A pop-up window appears on the operation page to confirm whether to update the record. If so, go to S102. If not, close the pop-up window.
[0143] S102: Input the command to call the repository tree of Gitlab to obtain each interface configuration object of all projects.
[0144] S103: Input an instruction to loop through each interface configuration object of each project, and obtain a usage record array of each interface configuration object of all projects.
[0145] S104: Input a traversal instruction to determine whether each interface configuration object is accurately written into the usage record array.
[0146] One of the judgment results of S104 is: the current interface configuration object is accurately written into the usage record array, and S105 is triggered by this judgment result.
[0147] The second judgment result of S104: the current interface configuration object is not accurately written into the usage record array, and S106 is triggered by this judgment result.
[0148] S105: If the current interface configuration object is accurately written into the usage record array, a prompt "The project already exists in the interface usage record" will be displayed on the page.
[0149] S106: If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
[0150] S107: Writing the usage record array into a record file in the JSON format of Gitlab to complete the process of updating the record.
[0151] See also Figure 8 , Figure 8 This is a structural diagram of the interface management device provided by this application.
[0152] See also Figure 8 : The interface management device 300 may specifically include a processor 310 and a memory 320 and an interface management program stored in the memory 320 and executable on the processor 310. The interface management program is configured to implement the steps of the interface management method described above. The memory 320 is coupled to the processor 310.
[0153] The processor 310, which may also be referred to as a CPU (Central Processing Unit), is used to control the operation of the interface management device 300. The processor 310 may be an integrated circuit chip having signal processing capabilities, or may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, or any other conventional processor.
[0154] The memory 320 is used to store computer programs and can be RAM, ROM, or other types of storage devices. Specifically, the memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory is used to store at least one program code.
[0155] For a detailed description of the functions and execution processes of the various functional modules or components in the embodiment of the interface management device 300 of the present application, please refer to the description in the embodiment of the interface management method of the present application, which will not be repeated here.
[0156] See also Figure 9 , Figure 9 This is a schematic block diagram of the structure of the storage medium provided by this application.
[0157] See Figure 9The computer-readable storage medium 400 provided in this application stores an interface management program. When the interface management program is executed by the processor, the steps of the interface management method described above are implemented. The interface management program is implemented in the form of a software functional unit and sold or used as an independent product. Based on this understanding, the technical solution of this application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions / computer programs for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, as well as computer devices such as computers, mobile phones, laptops, tablet computers, cameras, etc. having the above storage media.
[0158] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0159] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0160] The above description is only an implementation method of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the description and drawings of this application, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An interface management method, characterized in that: include: In response to the received call instruction of the interface configuration object, call Gitlab's repository files to obtain the usage record array of the interface configuration objects of all projects; The interface configuration object includes the name of the interface, the corresponding link address and the name of the project to which it belongs; The usage record array includes: usage records of multiple interface configuration objects of multiple projects; In response to the received continue operation instruction, perform an interface query operation or a record update operation; The interface query operation includes the following steps: In response to the received keyword query instruction, call Gitlab's repository files to query the JSON format usage record of the interface configuration object; Querying whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array; If the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed; If the interface configuration object corresponding to the keyword is not found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced; The update record operation includes the following steps: Call Gitlab's repository tree to obtain each interface configuration object of all projects; Traverse and call each interface configuration object of each project, and write each interface configuration object into the usage record array; Traversing and determining whether each of the interface configuration objects is accurately written into the usage record array; If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array; If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
2. The interface management method according to claim 1, characterized in that: After the interface configuration object corresponding to the keyword is displayed and has not been referenced, the following steps are also included: The usage records of the interface configuration object that have not been referenced are added to the usage record array to form an updated usage record array.
3. The interface management method according to claim 1, characterized in that: After calling the usage record array of the interface configuration object, the method further includes the step of updating the usage record array, including: Traverse and call each interface configuration object of each project, and write each interface configuration object into the usage record array; Traversing and determining whether each of the interface configuration objects is accurately written into the usage record array; If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array; If the current interface configuration object is not accurately written into the usage record array, the current interface configuration object is written into the usage record array to form an updated usage record array.
4. The interface management method according to claim 3, characterized in that: The traversal calls each interface configuration object of each project and writes each interface configuration object into the usage record array, specifically: The name of each interface that calls each project, the corresponding link address, and the name of the project to which it belongs; The name of each interface, the corresponding link address and the name of the project to which it belongs are taken as an interface configuration object and written into the usage record array.
5. The interface management method according to claim 3, characterized in that: The traversal determines whether each of the interface configuration objects is accurately written into the usage record array, specifically comprising the following steps: Traversing and determining whether the name in each of the interface configuration objects is written into the usage record of the corresponding link address; If the name in each of the interface configuration objects is written into the usage record of the corresponding link address, it is determined that the interface configuration object is accurately written into the usage record array; If the name in each of the interface configuration objects is not written into the usage record of the corresponding link address, it is determined that the interface configuration object is not accurately written into the usage record array.
6. An interface management device, characterized in that: include: The data acquisition module is used to call Gitlab's repository files according to the call instructions of the received interface configuration object to obtain the usage record array of the interface configuration objects of all projects; The interface configuration object includes the name of the interface, the corresponding link address and the name of the project to which it belongs; The usage record array includes: usage records of multiple interface configuration objects of multiple projects; The data processing module is used to perform interface query operations or update record operations according to the received continue operation instructions; The interface query operation includes the following steps: In response to the received keyword query instruction, call Gitlab's repository files to query the JSON format usage record of the interface configuration object; Querying whether there is a usage record of the interface configuration object corresponding to the keyword in the usage record array; If the interface configuration object corresponding to the keyword is found, the project and function of the interface configuration object corresponding to the keyword are summarized and displayed; If the interface configuration object corresponding to the keyword is not found, it is displayed that the interface configuration object corresponding to the keyword has not been referenced; The update record operation includes the following steps: Call Gitlab's repository tree to obtain each interface configuration object of all projects; Traverse and call each interface configuration object of each project, and write each interface configuration object into the usage record array; Traversing and determining whether each of the interface configuration objects is accurately written into the usage record array; If the current interface configuration object is accurately written into the usage record array, it is displayed that the usage record of the interface configuration object has been recorded in the usage record array; If the current interface configuration object is not accurately written into the usage record array, then writing the current interface configuration object into the usage record array to form an updated usage record array; The data display module is used to display the corresponding processing results according to the corresponding processing instructions.
7. An interface management device, characterized in that: The device includes: a memory, a processor, and an interface management program stored in the memory and executable on the processor, wherein the interface management program is configured to implement the steps of the interface management method according to any one of claims 1 to 5.
8. A storage medium, characterized in that: The storage medium stores an interface management program, which implements the steps of the interface management method according to any one of claims 1 to 5 when executed by the processor.
Citation Information
Patent Citations
Interface simulation method and device, computer equipment and storage medium
CN110109656A
Method for carrying out interface visual configuration based on JSON object
CN111506298A