CN113553519A - Interface address display method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN113553519A
CN113553519A CN202110698901.2A CN202110698901A CN113553519A CN 113553519 A CN113553519 A CN 113553519A CN 202110698901 A CN202110698901 A CN 202110698901A CN 113553519 A CN113553519 A CN 113553519A
Authority
CN
China
Prior art keywords
interface
address
query
initial
public
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110698901.2A
Other languages
Chinese (zh)
Inventor
张文
杜仲鹏
裘金龙
张瑞
谢仕卿
黄凌云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Original Assignee
Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Pingan Zhihui Enterprise Information Management Co ltd filed Critical Shenzhen Pingan Zhihui Enterprise Information Management Co ltd
Priority to CN202110698901.2A priority Critical patent/CN113553519A/en
Publication of CN113553519A publication Critical patent/CN113553519A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application belongs to the technical field of computers, is applied to the field of intelligent communities, and relates to a method and a device for displaying an interface address, computer equipment and a storage medium, wherein when an interface address acquisition request is received, interface codes of all interfaces are acquired, and the interfaces are filtered based on the interface codes to obtain a query interface; respectively acquiring the parameter of each query interface, and respectively generating an initial address based on the parameter of each query interface; detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table; and replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain a target address list, and displaying the target address list in a front-end page. The target address list may be stored in a block chain, among other things. The address of the query interface can be displayed in the front page in a distinguishing mode.

Description

Interface address display method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for displaying an interface address, a computer device, and a storage medium.
Background
Currently, with the continuous innovation and discovery of computer technology, many different operating architectures are developed for different platforms. With the application of different architectures such as X-paas, the problem is also gradually appearing, wherein the address (URL) of the query interface in some architectures (such as X-paas architecture) needs to use the same interface address, i.e. the interface public address, uniformly. Each item uses a respective unified interface public address. Therefore, the query interfaces seen by the developer in the console of the browser are all the same interface addresses, and the developer cannot distinguish different interfaces, so that when the problem of interface error reporting is encountered, the specific interface is difficult to be quickly located.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for displaying an interface address, a computer device, and a storage medium, where addresses of query interfaces are displayed differently in a front-end page.
In order to solve the foregoing technical problem, an embodiment of the present application provides a method for displaying an interface address, which adopts the following technical solutions:
a method for displaying an interface address comprises the following steps:
when an interface address acquisition request is received, acquiring interface codes of all interfaces, and filtering the interfaces based on the interface codes to acquire a query interface;
respectively obtaining the parameter of each query interface, and respectively generating an initial address based on the parameter, wherein the initial address and the query interface are in a one-to-one correspondence relationship;
detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table;
and replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain a target address list, and displaying the target address list in a front-end page.
Further, the step of respectively obtaining the parameter of each query interface and generating the initial address based on the parameter of each query interface includes:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively hiding repeated paths in the interface public addresses to generate initial addresses;
and splicing the initial address, the interface name and the query name corresponding to each query interface respectively based on a preset sequence to obtain the target address.
Further, the step of respectively obtaining the parameter of each query interface and generating the initial address based on the parameter of each query interface includes:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively acquiring application contexts from the interface public addresses;
and respectively splicing the application context, the interface name and the query name corresponding to each query interface based on a preset sequence to obtain the target address.
Further, the step of obtaining the application context from the interface public address comprises:
calling an application context keyword list, wherein the application context keyword list comprises application context keywords;
comparing each English word in the interface public address with all the keywords one by one, and determining whether the English word same as the keyword exists in the interface public address;
when the application context exists, taking English words in the interface public address, which are the same as the keywords, as the application context;
and when the English words do not exist, respectively calculating the similarity between each English word in the interface public address and each keyword, and taking the English word with the highest similarity value as the application context.
Further, the step of filtering the interface based on the interface code to obtain the query interface includes:
extracting an interface public address from the interface code;
inquiring the type of the interface public address in an interface mapping table;
and when the type of the interface public address is a query type, taking all interfaces corresponding to the interface public address as query interfaces.
Further, the step of detecting whether the initial address belongs to the query interface address includes:
respectively judging whether each initial address comprises an inquiry interface identifier or not through an Nginx layer;
and when the initial address has the query interface identifier, determining that the initial address belongs to the query interface address.
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:
determining a query interface associated with each interface public address in the interface information address table;
and respectively replacing the corresponding interface public address in the interface information address table with each target address according to the query interface to obtain the target address list.
In order to solve the above technical problem, an embodiment of the present application further provides a device for displaying an interface address, which adopts the following technical solutions:
an interface address presentation apparatus, comprising:
the acquisition module is used for acquiring interface codes of all interfaces when receiving an interface address acquisition request, and filtering the interfaces based on the interface codes to acquire query interfaces;
the generating module is used for respectively acquiring the parameter of each query interface and respectively generating an initial address based on the parameter of each query interface, wherein the initial address and the query interfaces are in one-to-one correspondence;
the detection module is used for detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table;
and the replacing module is used for 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 a front-end page.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
a computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor implements the steps of the interface address presentation method when executing the computer readable instructions.
In order to solve the above technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having computer readable instructions stored thereon, which when executed by a processor, implement the steps of the method for presenting an interface address as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
when an interface address acquisition request is received, a uniform interface public address of an inquiry interface is not displayed immediately, but a corresponding initial address is generated based on a parameter of the inquiry interface after the inquiry interface is determined according to an interface code, the initial address and the inquiry interface are in one-to-one correspondence, whether the generated initial address belongs to the inquiry interface address or not is determined through further determination of the initial address, and when the initial address belongs to the inquiry interface address, the initial address is determined to be generated correctly, and is not only the address of the inquiry interface, but also has one-to-one correspondence with the inquiry interface. And replacing the interface public address of the corresponding query interface in the interface information address table by the target address, wherein the target address is displayed instead of the interface public address when the address of the query interface is displayed in the front-end page. The generated target addresses replace the interface public addresses of the corresponding query interfaces in the interface information address table to generate a target address list and display the target address list in a front-end page.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for presenting interface addresses in accordance with the present application;
FIG. 3 is a schematic block diagram of one embodiment of a presentation device for interface addresses according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Reference numerals: 200. a computer device; 201. a memory; 202. a processor; 203. a network interface; 300. the interface address display device; 301. an acquisition module; 302. a generation module; 303. a detection module; 304. and replacing the module.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have various communication client applications installed thereon, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen 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, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture Experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the method for displaying the interface address provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the apparatus for displaying the interface address is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continuing reference to FIG. 2, a flow diagram of one embodiment of a method for presenting an interface address in accordance with the present application is shown. The interface address display method comprises the following steps:
s1: when an interface address acquisition request is received, the interface codes of all the interfaces are acquired, and the interfaces are filtered based on the interface codes to obtain a query interface.
In this embodiment, the interface code and the interface correspond to each other, the interface code includes an address of the interface, and the addresses of the interfaces in the interface code are different for different types of interfaces. For the addresses belonging to the query interface, the address in the interface code is the interface public address. The interfaces are filtered based on the interface codes, and the query interfaces can be quickly determined.
In this embodiment, the electronic device (for example, the server/terminal device shown in fig. 1) on which the interface address presentation method operates may receive the interface address acquisition request in a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
Specifically, the step of filtering the interface based on the interface code to obtain the query interface includes:
extracting an interface public address from the interface code;
inquiring the type of the interface public address in an interface mapping table;
and when the type of the interface public address is a query type, taking all interfaces corresponding to the interface public address as query interfaces.
In this embodiment, the interface mapping table stores interface public addresses and corresponding types, where the interface public addresses and the types are in a one-to-one association relationship. By judging whether the interface public address is a query type, if so, determining that the interface public address corresponds to a query interface (QO) so as to ensure 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 common address of the interface unified by the QO interface in a certain project is/common/query.
S2: the method comprises the steps of respectively obtaining the parameter of each inquiry interface, and respectively generating an initial address based on the parameter of each inquiry interface, wherein the initial address and the inquiry interfaces are in one-to-one correspondence.
In this embodiment, each interface has its own interface code, and when the computer background requests, the requests are all uniform interface addresses, but the access parameters of the requests are different, and the computer background matches the interface code of the interface according to the access parameters of the requests, so that which interface is called can be determined. However, all interfaces seen by the front-end personnel are the same interface address, and different interfaces cannot be distinguished. The interface code contains a uniform interface public address, different interface names and different query names for different query interfaces. The interface name and the query name are the parameters of the access parameter. And generating an initial address according to the parameter of the access parameter, wherein the initial address and the corresponding query interface are in one-to-one correspondence. When the initial address is displayed on the front-end page, the front-end personnel can conveniently view the address of the query interface.
Specifically, in step S2, that is, the step of respectively obtaining the parameter of each query interface and generating the initial address based on the parameter of each query interface includes:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively hiding repeated paths in the interface public addresses to generate initial addresses;
and splicing the initial address, the interface name and the query name corresponding to each query interface respectively based on a preset sequence to obtain the target address.
In this embodiment, the parameters of the reference: QOName and qeuryName are placed on the path of the URL while hiding the duplicate/common/query path. Wherein QONAMe is the interface name and qeuryName is the query name. For example, the query interface is:
property/common/queryQOName ═ PlanQO & queryName ═ PlanDetail. Wherein,/performance/common/query? For interface public addresses, PlanQO and PlanDetail belong to the parameters of the entry. The initial address (URL) generated is: Performance/PlanQO/PlanDetail. And sending the initial address to the nginx layer for subsequent operation.
In addition, in step S2, the step of respectively obtaining the parameter of entry for each query interface and generating the initial address based on the parameter of entry respectively includes:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively acquiring application contexts from the interface public addresses;
and respectively splicing the application context, the interface name and the query name corresponding to each query interface based on a preset sequence to obtain the target address.
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 acquired from the interface public address and used as the application context, and the application context, the interface name and the query name are spliced according to a preset sequence, that is, the target address is acquired. For example, in the interface public address/performance/common/query? In other words, the performance is the application context.
Further, the step of obtaining the application context from the interface public address comprises:
calling an application context keyword list, wherein the application context keyword list comprises application context keywords;
comparing each English word in the interface public address with all the keywords one by one, and determining whether the English word same as the keyword exists in the interface public address;
when the application context exists, taking English words in the interface public address, which are the same as the keywords, as the application context;
and when the English words do not exist, respectively calculating the similarity between each English word in the interface public address and each keyword, and taking the English word with the highest similarity value as the application context.
In the embodiment, the application context of the current environment does not need to be judged, and the application context can be directly obtained from the interface public address. The processing speed of the computer is improved. Wherein the similarity is calculated as: and respectively converting the English words and the keywords into a first vector and a second vector, and calculating the cosine similarity between the first vector and the second vector. Specifically, a cosine value between the first vector and the second vector is calculated as the cosine similarity, and the closer the cosine value is to 1, the closer the included angle is to 0 degree, and the more similar the two vectors are.
S3: and detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table.
In this embodiment, the generated initial address is sent to the Nginx layer, and whether the initial address belongs to the query interface address is detected by the Nginx layer, and when the initial address belongs to the query interface address, the initial address is determined to be the target address, and meanwhile, a pre-stored interface address information table is obtained for subsequently generating the target address list.
Specifically, in step S3, that is, the step of detecting whether the initial address belongs to the query interface address includes:
respectively judging whether each initial address comprises an inquiry interface identifier or not through an Nginx layer;
and when the initial address has the query interface identifier, determining that the initial address belongs to the query interface address.
In this embodiment, nginn is a high-performance HTTP and reverse proxy service, and nginn has the characteristics of high concurrent connection, fast response request processing, and high reliability. The Nginx layer judges the target addresses of all the generated interfaces, judges whether the target addresses are QO interfaces, and if the target addresses are QO interfaces, the target addresses are rewritten to the original QO public interface: performance/common/query, the parameter of. The query interface is identified as QO. The initial address includes query name, the specific value of the query name is PlanQO, for different query interfaces, the Plan changes with the different interfaces, but the QO does not change, that is, the QO is used as the query interface mark, when the initial address includes QO, the initial address is judged to belong to the query interface address.
S4: and replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain a target address list, and displaying the target address list in a front-end page.
In this embodiment, the client requests a target address containing a QOName and a qeuryName, and the interface actually requests a public interface address at the back end, and can still normally request data. And replacing the address in the interface address information table by the target address to obtain a target address list. And displaying the target address list to a front-end page so that a developer can directly see the specific name and meaning of each query interface.
Specifically, in step S4, that is, 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:
determining a query interface associated with each interface public address in the interface information address table;
and respectively replacing the corresponding interface public address in the interface information address table with each target address according to the query interface to obtain the target address list.
In this embodiment, the interface information address table has a plurality of interface public addresses, in the back end, each interface public address corresponds to a different query interface according to a difference of the incoming parameter, and the interface public addresses in the interface information address table are respectively associated with the query interfaces according to a difference of the query interfaces corresponding to each interface public address. The target address is only required to replace the corresponding interface public address in the interface information address table according to the query interface, and finally the target address list is obtained.
When an interface address acquisition request is received, a uniform interface public address of an inquiry interface is not displayed immediately, but a corresponding initial address is generated based on a parameter of the inquiry interface after the inquiry interface is determined according to an interface code, the initial address and the inquiry interface are in one-to-one correspondence, whether the generated initial address belongs to the inquiry interface address or not is determined through further determination of the initial address, and when the initial address belongs to the inquiry interface address, the initial address is determined to be generated correctly, and is not only the address of the inquiry interface, but also has one-to-one correspondence with the inquiry interface. And replacing the interface public address of the corresponding query interface in the interface information address table by the target address, wherein the target address is displayed instead of the interface public address when the address of the query interface is displayed in the front-end page. The generated target addresses replace the interface public addresses of the corresponding query interfaces in the interface information address table to generate a target address list and display the target address list in a front-end page.
It is emphasized that the target address list may also be stored in a node of a block chain in order to further ensure privacy and security of the target address list.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The method and the device can be applied to the field of smart communities, and therefore the construction of smart cities is promoted.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware associated with computer readable instructions, which can be stored in a computer readable storage medium, and when executed, can include processes of the embodiments of the methods described above. The storage medium may 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).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an interface address presentation apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the interface address display apparatus 300 according to the present embodiment includes: an acquisition module 301, a generation module 302, a detection module 303, and a replacement module 304. The acquiring module 301 is configured to acquire interface codes of all interfaces when receiving an interface address acquisition request, and filter the interfaces based on the interface codes to obtain query interfaces; a generating module 302, configured to obtain a parameter of each query interface, and generate an initial address based on the parameter, where the initial address and the query interface are in a one-to-one correspondence relationship; a detecting module 303, configured to detect whether each initial address belongs to a query interface address, and when the initial address belongs to the query interface address, use the initial address as a target address, and obtain a pre-generated interface address information table; a replacing module 304, configured to replace, based on the target address, an interface public address of a corresponding query interface in the interface information address table, obtain a target address list, and display the target address list in a front-end page.
In this embodiment, when an interface address acquisition request is received, a uniform interface public address of an inquiry interface is not immediately displayed, but a corresponding initial address is generated based on an entry parameter of the inquiry interface after the inquiry interface is determined according to an interface code, the initial address and the inquiry interface are in a one-to-one correspondence relationship, whether the generated initial address belongs to the inquiry interface address or not is determined by further determining the initial address, and when the initial address belongs to the inquiry interface address, the initial address is determined to be correctly generated, and is not only the address of the inquiry interface, but also has a one-to-one correspondence relationship with the inquiry interface. And replacing the interface public address of the corresponding query interface in the interface information address table by the target address, wherein the target address is displayed instead of the interface public address when the address of the query interface is displayed in the front-end page. The generated target addresses replace the interface public addresses of the corresponding query interfaces in the interface information address table to generate a target address list and display the target address list in a front-end page.
The obtaining module 301 includes an extracting sub-module, a querying sub-module, and a first determining sub-module. The extracting submodule is used for extracting an interface public address from the interface code; the query submodule is used for querying the type of the interface public address in an interface mapping table; and the determining submodule is used for taking all the interfaces corresponding to the interface public address as query interfaces when the type of the interface public address is a query type.
The generating module 302 includes a first obtaining sub-module, a hiding sub-module, and a first splicing sub-module. The first obtaining submodule is used for obtaining an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface; the hiding sub-module is used for hiding the repeated paths in the interface public address respectively to generate an initial address; and the first splicing submodule is used for splicing the initial address, the interface name and the query name corresponding to each query interface respectively based on a preset sequence to obtain the target address.
The generating module 302 further includes a second obtaining sub-module, a third obtaining sub-module, and a second splicing sub-module, where the second obtaining sub-module is configured to 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; the third obtaining submodule is used for obtaining the application context from the interface public address respectively; and the second splicing submodule is used for splicing the application context, the interface name and the query name corresponding to each query interface respectively based on a preset sequence to obtain the target address.
The third acquisition submodule comprises a calling unit, a comparison unit, a determination unit and a calculation unit. The system comprises a calling unit, a receiving unit and a sending unit, wherein the calling unit is used for calling an application context keyword list, and the application context keyword list comprises application context keywords; the comparison unit is used for comparing each English word in the interface public address with all the keywords one by one and determining whether the English word same as the keywords exists in the interface public address or not; the determining unit is used for taking English words in the interface public address, which are the same as the keywords, as the application context when the English words exist; and the calculating unit is used for respectively calculating the similarity between each English word in the interface public address and each keyword when the English word does not exist, and taking the English word with the highest similarity value as the application context.
The detection module 303 includes a judgment sub-module and a second determination sub-module, where the judgment sub-module is configured to respectively judge whether each of the initial addresses includes an inquiry interface identifier through an Nginx layer; and the second determining submodule is used for determining that the initial address belongs to the query interface address when the query interface identifier exists in the initial address.
The replacement module 304 comprises a third determination submodule and a replacement submodule, wherein the third determination submodule is used for determining a query interface associated with each interface public address in the interface information address table; and the replacing submodule is used for replacing the corresponding interface public address in the interface information address table with each target address according to the query interface to obtain the target address list.
When an interface address acquisition request is received, a uniform interface public address of an inquiry interface is not displayed immediately, but a corresponding initial address is generated based on a parameter of the inquiry interface after the inquiry interface is determined according to an interface code, the initial address and the inquiry interface are in one-to-one correspondence, whether the generated initial address belongs to the inquiry interface address or not is determined through further determination of the initial address, and when the initial address belongs to the inquiry interface address, the initial address is determined to be generated correctly, and is not only the address of the inquiry interface, but also has one-to-one correspondence with the inquiry interface. And replacing the interface public address of the corresponding query interface in the interface information address table by the target address, wherein the target address is displayed instead of the interface public address when the address of the query interface is displayed in the front-end page. The generated target addresses replace the interface public addresses of the corresponding query interfaces in the interface information address table to generate a target address list and display the target address list in a front-end page.
In order to solve the technical problem, an embodiment of the present application further provides a computer device. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 200 comprises a memory 201, a processor 202, a network interface 203 communicatively connected to each other via a system bus. It is noted that only computer device 200 having components 201 and 203 is shown, but it is understood that not all of the illustrated components are required and that more or fewer components may alternatively be implemented. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to a preset or stored instruction, and the hardware includes, but is not limited to, a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 201 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 201 may be an internal storage unit of the computer device 200, such as a hard disk or a memory of the computer device 200. In other embodiments, the memory 201 may also be an external storage device of the computer device 200, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 200. Of course, the memory 201 may also include both internal and external storage devices of the computer device 200. In this embodiment, the memory 201 is generally used for storing an operating system installed in the computer device 200 and various application software, such as computer readable instructions of a presentation method of an interface address. Further, the memory 201 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 202 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 202 is generally operative to control overall operation of the computer device 200. In this embodiment, the processor 202 is configured to execute computer readable instructions stored in the memory 201 or process data, for example, execute computer readable instructions of the interface address presentation method.
The network interface 203 may comprise a wireless network interface or a wired network interface, and the network interface 203 is generally used for establishing communication connection between the computer device 200 and other electronic devices.
In the embodiment, the interface can be more conveniently checked and debugged by developers, and different interfaces can be visually distinguished in a development environment and a test environment.
The present application further provides another embodiment, which is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, which can be executed by at least one processor, so as to cause the at least one processor to execute the steps of the method for presenting an interface address as described above.
In the embodiment, the interface can be more conveniently checked and debugged by developers, and different interfaces can be visually distinguished in a development environment and a test environment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may 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 instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It is to be understood that the above-described embodiments are merely illustrative of some, but not restrictive, of the broad invention, and that the appended drawings illustrate preferred embodiments of the invention and do not limit the scope of the invention. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for displaying an interface address is characterized by comprising the following steps:
when an interface address acquisition request is received, acquiring interface codes of all interfaces, and filtering the interfaces based on the interface codes to acquire a query interface;
respectively obtaining the parameter of each query interface, and respectively generating an initial address based on the parameter, wherein the initial address and the query interface are in a one-to-one correspondence relationship;
detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table;
and replacing the interface public address of the corresponding query interface in the interface information address table based on the target address to obtain a target address list, and displaying the target address list in a front-end page.
2. The method for displaying interface addresses according to claim 1, wherein the step of respectively obtaining the parameter of entry of each query interface and generating the initial address based on the parameter of entry respectively comprises:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively hiding repeated paths in the interface public addresses to generate initial addresses;
and splicing the initial address, the interface name and the query name corresponding to each query interface respectively based on a preset sequence to obtain the target address.
3. The method for displaying interface addresses according to claim 1, wherein the step of respectively obtaining the parameter of entry of each query interface and generating the initial address based on the parameter of entry respectively comprises:
respectively acquiring an interface name, a query name and an interface public address of a query interface from the interface code corresponding to each query interface;
respectively acquiring application contexts from the interface public addresses;
and respectively splicing the application context, the interface name and the query name corresponding to each query interface based on a preset sequence to obtain the target address.
4. The method for showing the interface address according to claim 3, wherein the step of obtaining the application context from the interface public address comprises:
calling an application context keyword list, wherein the application context keyword list comprises application context keywords;
comparing each English word in the interface public address with all the keywords one by one, and determining whether the English word same as the keyword exists in the interface public address;
when the application context exists, taking English words in the interface public address, which are the same as the keywords, as the application context;
and when the English words do not exist, respectively calculating the similarity between each English word in the interface public address and each keyword, and taking the English word with the highest similarity value as the application context.
5. The method for displaying the interface address according to claim 1, wherein the step of filtering the interface based on the interface code to obtain the query interface comprises:
extracting an interface public address from the interface code;
inquiring the type of the interface public address in an interface mapping table;
and when the type of the interface public address is a query type, taking all interfaces corresponding to the interface public address as query interfaces.
6. The method for showing interface addresses according to claim 1, wherein the step of detecting whether the initial address belongs to the query interface address comprises:
respectively judging whether each initial address comprises an inquiry interface identifier or not through an Nginx layer;
and when the initial address has the query interface identifier, determining that the initial address belongs to the query interface address.
7. The method for showing interface addresses according to claim 1, wherein 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 comprises:
determining a query interface associated with each interface public address in the interface information address table;
and respectively replacing the corresponding interface public address in the interface information address table with each target address according to the query interface to obtain the target address list.
8. An interface address presentation apparatus, comprising:
the acquisition module is used for acquiring interface codes of all interfaces when receiving an interface address acquisition request, and filtering the interfaces based on the interface codes to acquire query interfaces;
the generating module is used for respectively acquiring the parameter of each query interface and respectively generating an initial address based on the parameter of each query interface, wherein the initial address and the query interfaces are in one-to-one correspondence;
the detection module is used for detecting whether each initial address belongs to a query interface address, taking the initial address as a target address when the initial address belongs to the query interface address, and acquiring a pre-generated interface address information table;
and the replacing module is used for 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 a front-end page.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor that when executed implements the steps of the method of presenting an interface address of any one of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the presentation method of interface addresses according to any one of claims 1 to 7.
CN202110698901.2A 2021-06-23 2021-06-23 Interface address display method and device, computer equipment and storage medium Pending CN113553519A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110698901.2A CN113553519A (en) 2021-06-23 2021-06-23 Interface address display method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110698901.2A CN113553519A (en) 2021-06-23 2021-06-23 Interface address display method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113553519A true CN113553519A (en) 2021-10-26

Family

ID=78130844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110698901.2A Pending CN113553519A (en) 2021-06-23 2021-06-23 Interface address display method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113553519A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124705A (en) * 2019-12-04 2020-05-08 中盈优创资讯科技有限公司 Service request processing method and device
CN111310007A (en) * 2020-02-11 2020-06-19 北京达佳互联信息技术有限公司 Webpage interface query method and device, electronic equipment and storage medium
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment
CN111930618A (en) * 2020-07-31 2020-11-13 银盛支付服务股份有限公司 Interface-based testing method and system
CN112306881A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Simulation data generation method, device, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124705A (en) * 2019-12-04 2020-05-08 中盈优创资讯科技有限公司 Service request processing method and device
CN111310007A (en) * 2020-02-11 2020-06-19 北京达佳互联信息技术有限公司 Webpage interface query method and device, electronic equipment and storage medium
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment
CN111930618A (en) * 2020-07-31 2020-11-13 银盛支付服务股份有限公司 Interface-based testing method and system
CN112306881A (en) * 2020-11-02 2021-02-02 平安普惠企业管理有限公司 Simulation data generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN111414407A (en) Data query method and device of database, computer equipment and storage medium
WO2015081720A1 (en) Instant messaging (im) based information recommendation method, apparatus, and terminal
CN102664925B (en) A kind of method of displaying searching result and device
JP2017507376A (en) Method, apparatus and system for communicating and presenting merchandise information
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112181835A (en) Automatic testing method and device, computer equipment and storage medium
CN113242331A (en) Different types of address translation methods, different types of address translation devices, different types of computer equipment and different types of storage media
CN112328486A (en) Interface automation test method and device, computer equipment and storage medium
CN110677506A (en) Network access method, device, computer equipment and storage medium
WO2022126962A1 (en) Knowledge graph-based method for detecting guiding and abetting corpus and related device
CN111797297B (en) Page data processing method and device, computer equipment and storage medium
CN112860662A (en) Data blood relationship establishing method and device, computer equipment and storage medium
CN113282591A (en) Authority filtering method and device, computer equipment and storage medium
WO2019071907A1 (en) Method for identifying help information based on operation page, and application server
WO2023066258A1 (en) Data processing method and apparatus for private data, computer device and medium
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN114968822A (en) Interface testing method and device, computer equipment and storage medium
CN112948733B (en) Interface maintenance method, device, computing equipment and medium
CN112416875B (en) Log management method, device, computer equipment and storage medium
CN113553519A (en) Interface address display method and device, computer equipment and storage medium
CN114615325A (en) Message pushing method and device, computer equipment and storage medium
CN113283759A (en) Account risk portrait updating method, device, equipment and storage medium
CN113420037B (en) Asset data real-time changing method and device
JP2013196315A (en) Information processing apparatus and method

Legal Events

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