Interface address display method, device, computer equipment and storage medium

The method and device enhance interface address display in X-paas architectures by generating target addresses from input parameters, allowing developers to quickly identify and troubleshoot specific interfaces.

CN113553519BActive Publication Date: 2024-12-10PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110698901.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2024-12-10
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

In X-paas architectures, the query interface addresses are unified, making it difficult for developers to distinguish and locate specific interfaces when errors occur, hindering efficient troubleshooting.

Method used

A method and device for displaying interface addresses that involve filtering interfaces based on codes, generating initial addresses from input parameters, and replacing interface public addresses with target addresses to create a distinct display on the front-end page, ensuring a one-to-one correspondence with query interfaces.

Benefits of technology

Enables developers to intuitively distinguish and quickly locate specific interfaces, improving development efficiency by accurately identifying problem interfaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113553519B_ABST
    Figure CN113553519B_ABST
Patent Text Reader

Abstract

The embodiment of the present application belongs to the field of computer technology, and is applied in the field of smart communities. It relates to a method, device, computer equipment and storage medium for displaying an interface address, including obtaining the interface codes of all interfaces when receiving an interface address acquisition request, filtering the interfaces based on the interface codes, and obtaining a query interface; obtaining the input parameters of each query interface respectively, and generating an initial address based on the input parameters respectively; detecting whether each initial address belongs to the query interface address, and when the initial address belongs to the query interface address, using the initial address as the target address, and obtaining a pre-generated interface address information table; replacing the interface public address of the corresponding query interface in the interface information address table based on the target address, obtaining a target address list, and displaying the target address list in the front-end page. Among them, the target address list can be stored in the blockchain. The present application can display the address of the query interface distinguishably in the front-end page.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for displaying an interface address. Background Art

[0002] At present, with the continuous innovation and discovery of computer technology, many different operating architectures have been developed for different platforms. With the application of different types of architectures such as X-paas, its problems have gradually emerged. Among them, the address (URL) of the query interface in some architectures (such as X-paas architecture) needs to use the same interface address, that is, the interface public address. Each project uses its own unified interface public address. Therefore, the query interface that developers see in the browser console is the same interface address, and developers cannot distinguish different interfaces. As a result, when encountering interface error problems, it is difficult to quickly locate which specific interface has a problem. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a method, apparatus, computer device and storage medium for displaying an interface address, so as to display the address of the query interface in a distinctive manner on a front-end page.

[0004] In order to solve the above technical problems, the embodiment of the present application provides a method for displaying an interface address, which adopts the following technical solution:

[0005] A method for displaying an interface address comprises the following steps:

[0006] When receiving an interface address acquisition request, obtaining interface codes of all interfaces, filtering interfaces based on the interface codes, and obtaining a query interface;

[0007] Obtain input parameters of each query interface respectively, and generate initial addresses based on the input parameters respectively, wherein the initial addresses and the query interfaces are in a one-to-one correspondence;

[0008] Detecting whether each of the initial addresses belongs to a query interface address, and when the initial address belongs to a query interface address, using the initial address as a target address, and obtaining a pre-generated interface address information table;

[0009] The interface public address of the corresponding query interface in the interface information address table is replaced based on the target address to obtain a target address list, and the target address list is displayed on the front-end page.

[0010] Furthermore, the steps of respectively obtaining input parameters of each query interface and generating initial addresses based on the input parameters respectively include:

[0011] Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface;

[0012] respectively hiding repeated paths in the public addresses of the interfaces to generate initial addresses;

[0013] Based on a preset order, the initial address, interface name and query name corresponding to each query interface are concatenated to obtain the target address.

[0014] Furthermore, the steps of respectively obtaining input parameters of each query interface and generating initial addresses based on the input parameters respectively include:

[0015] Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface;

[0016] Obtaining application contexts from the interface public addresses respectively;

[0017] The application context, interface name and query name corresponding to each query interface are concatenated based on a preset order to obtain the target address.

[0018] Furthermore, the step of obtaining the application context from the interface public address includes:

[0019] Retrieving an application context keyword list, wherein the application context keyword list includes application context keywords;

[0020] Compare each English word in the interface public address with all the keywords one by one to determine whether there is an English word identical to the keyword in the interface public address;

[0021] When it exists, the English word in the interface public address that is the same as the keyword is used as the application context;

[0022] When it does not exist, the similarity between each English word in the interface public address and each keyword is calculated respectively, and the English word with the highest similarity value is used as the application context.

[0023] Furthermore, the step of filtering the interface based on the interface code to obtain the query interface includes:

[0024] Extracting the interface public address from the interface code;

[0025] Query the type of the interface public address in the interface mapping table;

[0026] When the type of the interface public address is query type, all interfaces corresponding to the interface public address are used as query interfaces.

[0027] Further, the step of detecting whether the initial address belongs to the query interface address includes:

[0028] Determine through the Nginx layer whether each of the initial addresses includes a query interface identifier;

[0029] When the query interface identifier exists in the initial address, it is determined that the initial address belongs to the query interface address.

[0030] Further, the step of replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain the target address list includes:

[0031] Determine the query interface associated with each interface public address in the interface information address table;

[0032] Each of the target addresses is replaced with a corresponding interface public address in the interface information address table according to the query interface to obtain the target address list.

[0033] In order to solve the above technical problems, the embodiment of the present application further provides a device for displaying an interface address, which adopts the following technical solution:

[0034] A device for displaying an interface address, comprising:

[0035] An acquisition module, used for acquiring interface codes of all interfaces upon receiving an interface address acquisition request, filtering interfaces based on the interface codes, and acquiring a query interface;

[0036] A generation module, used to obtain input parameters of each query interface respectively, and generate initial addresses based on the input parameters respectively, wherein the initial addresses and the query interfaces are in a one-to-one correspondence;

[0037] a detection module, configured to detect whether each of the initial addresses belongs to a query interface address, and when the initial address belongs to a query interface address, use the initial address as a target address and obtain a pre-generated interface address information table;

[0038] The replacement module is used to replace the interface public address of the corresponding query interface in the interface information address table based on the target address, obtain the target address list, and display the target address list in the front-end page.

[0039] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0040] A computer device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the above-mentioned interface address display method when executing the computer-readable instructions.

[0041] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0042] A computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the above-mentioned method for displaying an interface address.

[0043] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0044] When receiving an interface address acquisition request, this application does not immediately display the unified interface public address of the query interface, but first determines the query interface based on the interface code, and then generates a corresponding initial address based on the input parameters of the query interface. At this time, the initial address and the query interface are in a one-to-one correspondence. By further determining the initial address, it is determined whether the generated initial address belongs to the query interface address. When the initial address belongs to the query interface address, it is determined that the initial address is generated correctly, and it is both the address of the query interface and has a one-to-one correspondence with the query interface. By replacing the interface public address of the corresponding query interface in the interface information address table with the target address, when the address of the query interface is displayed on the front-end page, the target address is displayed instead of the interface public address. By replacing the interface public address of the corresponding query interface in the interface information address table with the generated multiple target addresses, a target address list is generated and displayed on the front-end page. Since the target address is generated based on the input parameters, and the input parameters of each query interface are different, developers can intuitively distinguish different query interfaces based on the target address list. When encountering an interface error, they can quickly and accurately locate which interface has a problem, thereby quickly locating the specific interface position of the problem, which can significantly improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0046] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0047] Figure 2 is a flowchart of an embodiment of a method for displaying an interface address according to the present application;

[0048] Figure 3 is a structural schematic diagram of an embodiment of a display device for an interface address according to the present application;

[0049] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application.

[0050] Figure numerals: 200, computer device; 201, memory; 202, processor; 203, network interface; 300, interface address display device; 301, acquisition module; 302, generation module; 303, detection module; 304, replacement module. DETAILED DESCRIPTION

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0052] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0053] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0054] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0055] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0056] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0057] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0058] It should be noted that the interface address display method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the interface address display device is generally set in the server / terminal device.

[0059] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0060] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for displaying an interface address according to the present application. The method for displaying an interface address comprises the following steps:

[0061] S1: upon receiving an interface address acquisition request, acquiring interface codes of all interfaces, filtering interfaces based on the interface codes, and obtaining a query interface.

[0062] In this embodiment, the interface code corresponds to the interface, and the interface code includes the address of the interface. For different types of interfaces, the address of the interface in the interface code is different. For addresses belonging to the query interface, the address in the interface code is the public address of the interface. By filtering the interface based on the interface code, the query interface can be quickly determined.

[0063] In this embodiment, the interface address display method is executed on the electronic device (eg Figure 1 The server / terminal device shown in the figure can receive the interface address acquisition request through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0064] Specifically, the step of filtering the interface based on the interface code to obtain the query interface includes:

[0065] Extracting the interface public address from the interface code;

[0066] Query the type of the interface public address in the interface mapping table;

[0067] When the type of the interface public address is query type, all interfaces corresponding to the interface public address are used as query interfaces.

[0068] In this embodiment, the interface public address and the corresponding type are stored in the interface mapping table, wherein the interface public address and the type are in a one-to-one corresponding relationship. By judging whether the interface public address is a query type, if it is a query type, it is determined that the interface public address corresponds to a query interface (QO), the purpose of which is that only the QO interface needs to be further processed, wherein the interface public address and the query interface are in a one-to-many relationship. For example, the unified interface public address of the QO interface in a certain project is / common / query.

[0069] S2: respectively obtain input parameters of each query interface, and respectively generate initial addresses based on the input parameters, wherein the initial addresses and the query interfaces are in a one-to-one correspondence.

[0070] In the present embodiment, each interface has its own interface code. When the computer background requests, a unified interface address is requested, but the input parameters of the request are different. The computer background matches the interface code of the interface according to the input parameters of the request, and can determine which interface to call. However, all the interfaces seen by the front-end personnel have the same interface address, and different interfaces cannot be distinguished. The interface code contains a unified interface public address, different interface names, and different query names for different query interfaces. The interface name and query name are input parameters. The initial address is generated according to the input parameters, and the initial address is in a one-to-one correspondence with the corresponding query interface. When the initial address is displayed on the front-end page, it is convenient for the front-end personnel to view the address of the query interface.

[0071] Specifically, in step S2, the steps of respectively obtaining the input parameter of each query interface and respectively generating the initial address based on the input parameter include:

[0072] Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface;

[0073] respectively hiding repeated paths in the public addresses of the interfaces to generate initial addresses;

[0074] Based on a preset order, the initial address, interface name and query name corresponding to each query interface are concatenated to obtain the target address.

[0075] In this embodiment, the input parameters: QOName and qeuryName are placed on the URL path, and the repeated / common / query path is hidden. Among them, QOName is the interface name, and qeuryName is the query name. For example, the query interface is:

[0076] / performance / common / query? QOName = PlanQO & queryName = PlanDetail. / performance / common / query? is the public address of the interface, and PlanQO and PlanDetail are input parameters. The generated initial address (URL) is: / performance / PlanQO / PlanDetail. The initial address is sent to the nginx layer for subsequent operations.

[0077] In addition, in step S2, that is, the step of respectively obtaining the input parameter of each query interface and generating the initial address based on the input parameter respectively includes:

[0078] Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface;

[0079] Obtaining application contexts from the interface public addresses respectively;

[0080] The application context, interface name and query name corresponding to each query interface are concatenated based on a preset order to obtain the target address.

[0081] In this embodiment, the application context in the interface public address is an important and indispensable content of the interface. The application context can be obtained from the interface public address. As the application context, the application context, the interface name and the query name are concatenated in a preset order to obtain the target address. For example, in the interface public address / performance / common / query?, performance is the application context.

[0082] Furthermore, the step of obtaining the application context from the interface public address includes:

[0083] Retrieving an application context keyword list, wherein the application context keyword list includes application context keywords;

[0084] Compare each English word in the interface public address with all the keywords one by one to determine whether there is an English word identical to the keyword in the interface public address;

[0085] When it exists, the English word in the interface public address that is the same as the keyword is used as the application context;

[0086] When it does not exist, the similarity between each English word in the interface public address and each keyword is calculated respectively, and the English word with the highest similarity value is used as the application context.

[0087] In this embodiment, the application does not need to judge the application context of the current environment, and can be obtained directly from the public address of the interface. Improve the processing speed of the computer. The similarity is calculated as follows: English words and keywords are converted into a first vector and a second vector respectively, and the cosine similarity between the first vector and the second vector is calculated. Specifically, the cosine value between the first vector and the second vector is calculated as the cosine similarity. The closer the cosine value is to 1, the closer the angle is to 0 degrees, and the more similar the two vectors are.

[0088] S3: Detect whether each of the initial addresses belongs to the query interface address. If the initial address belongs to the query interface address, use the initial address as the target address and obtain a pre-generated interface address information table.

[0089] In this embodiment, the above-generated initial address is sent to the Nginx layer, and the Nginx layer detects whether the initial address belongs to the query interface address. When the initial address belongs to the query interface address, the initial address is determined to be the target address, and the pre-stored interface address information table is obtained for subsequent generation of the target address list.

[0090] Specifically, in step S3, the step of detecting whether the initial address belongs to the query interface address includes:

[0091] Determine through the Nginx layer whether each of the initial addresses includes a query interface identifier;

[0092] When the query interface identifier exists in the initial address, it is determined that the initial address belongs to the query interface address.

[0093] In this embodiment, Nginx is a high-performance HTTP and reverse proxy service. Nginx has the characteristics of high concurrent connection, fast processing and response request, and high reliability. The Nginx layer judges the target address of all generated interfaces to determine whether it is a QO interface. If it is a QO, it is rewritten to the original QO public interface: / performance / common / query, and the input parameters still use the above input parameters. The query interface is identified as QO. The initial address includes the query name, and the specific value of the query name is PlanQO. For different query interfaces, "Plan" varies with the interface, but "QO" will not change, that is, QO is used as the query interface identifier. When QO is included in the initial address, it is judged that the initial address belongs to the query interface address.

[0094] S4: replacing the interface public address of the corresponding query interface in the interface information address table based on the target address, obtaining a target address list, and displaying the target address list on the front-end page.

[0095] In this embodiment, the client request displays the target address including QOName and qeuryName. The interface actually requests the public interface address to the backend, and data can still be requested normally. The target address list is obtained by replacing the address in the interface address information table with the target address. The target address list is displayed on the front-end page so that developers can clearly see the specific name and meaning of each query interface.

[0096] Specifically, in step S4, the step of replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain the target address list includes:

[0097] Determine the query interface associated with each interface public address in the interface information address table;

[0098] Each of the target addresses is replaced with a corresponding interface public address in the interface information address table according to the query interface to obtain the target address list.

[0099] In this embodiment, there are multiple interface public addresses in the interface information address table. In the backend, each interface public address corresponds to a different query interface according to the different input parameters passed in. According to the different query interfaces corresponding to each interface public address, the interface public addresses in the interface information address table are respectively associated with the query interfaces. Then, it is only necessary to replace the corresponding interface public address in the interface information address table with the target address according to the query interface, and finally obtain the target address list.

[0100] When receiving an interface address acquisition request, this application does not immediately display the unified interface public address of the query interface, but first determines the query interface based on the interface code, and then generates a corresponding initial address based on the input parameters of the query interface. At this time, the initial address and the query interface are in a one-to-one correspondence. By further determining the initial address, it is determined whether the generated initial address belongs to the query interface address. When the initial address belongs to the query interface address, it is determined that the initial address is generated correctly, and it is both the address of the query interface and has a one-to-one correspondence with the query interface. By replacing the interface public address of the corresponding query interface in the interface information address table with the target address, when the address of the query interface is displayed on the front-end page, the target address is displayed instead of the interface public address. By replacing the interface public address of the corresponding query interface in the interface information address table with the generated multiple target addresses, a target address list is generated and displayed on the front-end page. Since the target address is generated based on the input parameters, and the input parameters of each query interface are different, developers can intuitively distinguish different query interfaces based on the target address list. When encountering an interface error, they can quickly and accurately locate which interface has a problem, thereby quickly locating the specific interface position of the problem, which can significantly improve development efficiency.

[0101] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned target address list, the above-mentioned target address list can also be stored in a node of a blockchain.

[0102] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0103] This application can be applied in the field of smart communities, thereby promoting the construction of smart cities.

[0104] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0105] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0106] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a device for displaying an interface address, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0107] like Figure 3 As shown, the interface address display device 300 described in this embodiment includes: an acquisition module 301, a generation module 302, a detection module 303 and a replacement module 304. Among them, the acquisition module 301 is used to obtain the interface codes of all interfaces when receiving an interface address acquisition request, filter the interfaces based on the interface codes, and obtain the query interface; the generation module 302 is used to obtain the input parameters of each query interface respectively, and generate the initial address based on the input parameters respectively, wherein the initial address and the query interface are in a one-to-one correspondence; the detection module 303 is used to detect whether each of the initial addresses belongs to the query interface address, and when the initial address belongs to the query interface address, the initial address is used as the target address, and a pre-generated interface address information table is obtained; the replacement module 304 is used to replace the interface public address of the corresponding query interface in the interface information address table based on the target address, obtain a target address list, and display the target address list in the front-end page.

[0108] In this embodiment, when receiving an interface address acquisition request, the application does not immediately display the unified interface public address of the query interface, but first determines the query interface according to the interface code, and then generates a corresponding initial address based on the input parameters of the query interface. At this time, the initial address and the query interface are in a one-to-one correspondence. By further determining the initial address, it is determined whether the generated initial address belongs to the query interface address. When the initial address belongs to the query interface address, it is determined that the initial address is generated correctly, which is both the address of the query interface and has a one-to-one correspondence with the query interface. By replacing the interface public address of the corresponding query interface in the interface information address table with the target address, when the address of the query interface is displayed in the front-end page, the target address is displayed instead of the interface public address. By replacing the interface public address of the corresponding query interface in the interface information address table with the generated multiple target addresses, a target address list is generated and displayed on the front-end page. Since the target address is generated based on the input parameters, and the input parameters of each query interface are different, developers can intuitively distinguish different query interfaces based on the target address list. When encountering an interface error, they can quickly and accurately locate which interface has a problem, thereby quickly locating the specific interface position of the problem, which can significantly improve development efficiency.

[0109] The acquisition module 301 includes an extraction submodule, a query submodule and a first determination submodule. The extraction submodule is used to extract the interface public address from the interface code; the query submodule is used to query the type of the interface public address in the interface mapping table; and the determination submodule is used to use all interfaces corresponding to the interface public address as query interfaces when the type of the interface public address is query type.

[0110] The generation module 302 includes a first acquisition submodule, a hiding submodule and a first splicing submodule. The first acquisition submodule is used to respectively acquire the interface name, the query name and the interface public address of the query interface from the interface code corresponding to each query interface; the hiding submodule is used to respectively hide the repeated paths in the interface public address to generate the initial address; the first splicing submodule is used to respectively splice the initial address, the interface name and the query name corresponding to each query interface based on a preset order to obtain the target address.

[0111] The generation module 302 also includes a second acquisition submodule, a third acquisition submodule and a second splicing submodule, wherein the second acquisition submodule is used to respectively obtain the interface name, query name and interface public address of the query interface from the interface code corresponding to each query interface; the third acquisition submodule is used to respectively obtain the application context from the interface public address; and the second splicing submodule is used to respectively splice the application context, interface name and query name corresponding to each of the query interfaces based on a preset order to obtain the target address.

[0112] The third acquisition submodule includes a calling unit, a comparison unit, a determination unit and a calculation unit. The calling unit is used to call the application context keyword list, wherein the application context keyword list includes application context keywords; the comparison unit is used to compare each English word in the interface public address with all the keywords one by one to determine whether there is an English word identical to the keyword in the interface public address; the determination unit is used to use the English word identical to the keyword in the interface public address as the application context if it exists; the calculation unit is used to calculate the similarity between each English word in the interface public address and each keyword if it does not exist, and use the English word with the highest similarity value as the application context.

[0113] The detection module 303 includes a judgment submodule and a second determination submodule, wherein the judgment submodule is used to determine whether each of the initial addresses includes a query interface identifier through the Nginx layer; the second determination submodule is used to determine that the initial address belongs to a query interface address when a query interface identifier exists in the initial address.

[0114] The replacement module 304 includes a third determination submodule and a replacement submodule, wherein the third determination submodule is used to determine the query interface associated with each interface public address in the interface information address table; the replacement submodule is used to replace each target address with the corresponding interface public address in the interface information address table according to the query interface to obtain the target address list.

[0115] When receiving an interface address acquisition request, this application does not immediately display the unified interface public address of the query interface, but first determines the query interface based on the interface code, and then generates a corresponding initial address based on the input parameters of the query interface. At this time, the initial address and the query interface are in a one-to-one correspondence. By further determining the initial address, it is determined whether the generated initial address belongs to the query interface address. When the initial address belongs to the query interface address, it is determined that the initial address is generated correctly, and it is both the address of the query interface and has a one-to-one correspondence with the query interface. By replacing the interface public address of the corresponding query interface in the interface information address table with the target address, when the address of the query interface is displayed on the front-end page, the target address is displayed instead of the interface public address. By replacing the interface public address of the corresponding query interface in the interface information address table with the generated multiple target addresses, a target address list is generated and displayed on the front-end page. Since the target address is generated based on the input parameters, and the input parameters of each query interface are different, developers can intuitively distinguish different query interfaces based on the target address list. When encountering an interface error, they can quickly and accurately locate which interface has a problem, thereby quickly locating the specific interface position of the problem, which can significantly improve development efficiency.

[0116] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0117] The computer device 200 includes a memory 201, a processor 202, and a network interface 203 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 200 having components 201-203, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0118] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0119] The memory 201 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 201 can be an internal storage unit of the computer device 200, such as a hard disk or memory of the computer device 200. In other embodiments, the memory 201 can also be an external storage device of the computer device 200, such as a plug-in hard disk equipped on the computer device 200, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 201 can also include both the internal storage unit of the computer device 200 and its external storage device. In this embodiment, the memory 201 is generally used to store the operating system and various application software installed on the computer device 200, such as computer-readable instructions of the interface address display method, etc. In addition, the memory 201 can also be used to temporarily store various data that have been output or will be output.

[0120] The processor 202 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 202 is generally used to control the overall operation of the computer device 200. In this embodiment, the processor 202 is used to run computer-readable instructions or process data stored in the memory 201, such as computer-readable instructions for running the interface address display method.

[0121] The network interface 203 may include a wireless network interface or a wired network interface. The network interface 203 is generally used to establish a communication connection between the computer device 200 and other electronic devices.

[0122] In this embodiment, it is more convenient for developers to view and debug interfaces, and different interfaces can be distinguished intuitively in both the development environment and the test environment.

[0123] The present application also provides another embodiment, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the interface address display method as described above.

[0124] In this embodiment, it is more convenient for developers to view and debug interfaces, and different interfaces can be distinguished intuitively in both the development environment and the test environment.

[0125] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0126] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for displaying an interface address, characterized in that: The steps include: When receiving an interface address acquisition request, obtaining interface codes of all interfaces, filtering interfaces based on the interface codes, and obtaining a query interface; Obtain input parameters of each query interface respectively, and generate initial addresses based on the input parameters respectively, wherein the initial addresses and the query interfaces are in a one-to-one correspondence; Detecting whether each of the initial addresses belongs to a query interface address, and when the initial address belongs to a query interface address, using the initial address as a target address, and obtaining a pre-generated interface address information table; Replace the interface public address of the corresponding query interface in the interface information address table based on the target address, obtain a target address list, and display the target address list on the front-end page; The step of detecting whether the initial address belongs to the query interface address comprises: Determine through the Nginx layer whether each of the initial addresses includes a query interface identifier; When the query interface identifier exists in the initial address, determining that the initial address belongs to the query interface address; The step of replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain the target address list includes: Determine the query interface associated with each interface public address in the interface information address table; Respectively replace the corresponding interface public address in the interface information address table with each of the target addresses according to the query interface to obtain the target address list; After the step of using the initial address as the target address, the method further includes: The target addresses of all generated interfaces are judged by the Nginx layer. If the interface is the query interface, the target address is rewritten to the public address of the interface, and the input parameter remains unchanged.

2. The method for displaying an interface address according to claim 1, characterized in that: The steps of respectively obtaining input parameters of each query interface and generating initial addresses based on the input parameters respectively include: Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface; respectively hiding repeated paths in the public addresses of the interfaces to generate initial addresses; Based on a preset order, the initial address, interface name and query name corresponding to each query interface are concatenated to obtain the target address.

3. The method for displaying an interface address according to claim 1, characterized in that: The steps of respectively obtaining input parameters of each query interface and generating initial addresses based on the input parameters respectively include: Respectively obtain an interface name, a query name, and an interface public address of the query interface from the interface code corresponding to each query interface; Obtaining application contexts from the interface public addresses respectively; The application context, interface name and query name corresponding to each query interface are concatenated based on a preset order to obtain the target address.

4. The method for displaying an interface address according to claim 3, characterized in that: The step of obtaining the application context from the interface public address comprises: Retrieving an application context keyword list, wherein the application context keyword list includes application context keywords; Compare each English word in the interface public address with all the keywords one by one to determine whether there is an English word identical to the keyword in the interface public address; When it exists, the English word in the interface public address that is the same as the keyword is used as the application context; When it does not exist, the similarity between each English word in the interface public address and each keyword is calculated respectively, and the English word with the highest similarity value is used as the application context.

5. The method for displaying an interface address according to claim 1, characterized in that: The step of filtering the interface based on the interface code to obtain the query interface comprises: Extracting the interface public address from the interface code; Query the type of the interface public address in the interface mapping table; When the type of the interface public address is query type, all interfaces corresponding to the interface public address are used as query interfaces.

6. A device for displaying an interface address, characterized in that: The interface address display device, when executed, implements the steps of the interface address display method according to any one of claims 1 to 5, including: An acquisition module, used for acquiring interface codes of all interfaces upon receiving an interface address acquisition request, filtering interfaces based on the interface codes, and acquiring a query interface; A generation module, used to obtain input parameters of each query interface respectively, and generate initial addresses based on the input parameters respectively, wherein the initial addresses and the query interfaces are in a one-to-one correspondence; a detection module, configured to detect whether each of the initial addresses belongs to a query interface address, and when the initial address belongs to a query interface address, use the initial address as a target address and obtain a pre-generated interface address information table; The replacement module is used to replace the interface public address of the corresponding query interface in the interface information address table based on the target address, obtain the target address list, and display the target address list in the front-end page.

7. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the method for displaying an interface address as claimed in any one of claims 1 to 5 when executing the computer-readable instructions.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the method for displaying an interface address according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Business request processing method and device

    CN111124705A

  • Web application-based page data acquisition method, device and equipment

    CN111782330A

  • Analog data generation method, device and equipment and storage medium

    CN112306881A