Uniform resource locator interface information collection method and device, equipment and medium
By obtaining and processing the storage path of the unified resource locator management class, and using annotation information filtering and sorting, the automatic collection of URL interface information is achieved, solving the problems of low efficiency and insufficient accuracy of information collection in the existing technology, and improving the The efficiency and accuracy of information collection.
Patent Information
- Application Number
- CN202410907102.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-01
AI Technical Summary
Existing technologies cannot effectively collect and obtain unified resource locator (URL) interface information in banking business systems, especially when the system is updated, which leads to inefficient information collection and accuracy problems.
By obtaining the storage path of the unified resource locator management class, using annotation information to traverse access and filter core information, normalize processing and sorting, and finally realize automatic extraction and collection of URL interface information, improving information collection efficiency.
It realizes the automatic collection of information about multiple unified resource locator interfaces, improves the efficiency of information collection, solves the problem of the inability to obtain and publish URL interface information in the existing technology, and ensures the accuracy and timeliness of information.
Smart Images

Figure CN118885679A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to a method, device, equipment and storage medium for collecting uniform resource locator interface information. Background Art
[0002] With the development of finance and computers in today's society, banks are involved in more and more financial-related businesses, and they need to develop corresponding business systems. As the business changes, the business system also changes accordingly. For example, the uniform resource locator (URL) interface included in the business system will be added, modified, and deleted. This requires the system's URL interface information to be regularly collected and published to inform upstream and downstream products for coordinated processing.
[0003] Currently, the Swagger plug-in can be used to view URL interface information, but it cannot be used to obtain URL interface information, and it cannot collect information about URL interface information. Summary of the invention
[0004] In view of this, the purpose of the present application is to provide a method, device, equipment and storage medium for collecting uniform resource locator interface information, which can automatically collect information of multiple uniform resource locator interface information and improve the efficiency of information collection.
[0005] The embodiment of the present application provides a method for collecting uniform resource locator interface information, the method comprising:
[0006] Acquire storage paths of a plurality of uniform resource locator management classes, wherein the uniform resource locator management class defines uniform resource locator interface information;
[0007] Traversing and accessing each of the Uniform Resource Locator Management Classes according to the storage path of each of the Uniform Resource Locator Management Classes, extracting a plurality of core information of the Uniform Resource Locator Management Classes according to annotation information, wherein the annotation information is used to filter the core information;
[0008] Normalizing the plurality of core information to obtain a plurality of target information that conforms to preset rules;
[0009] Sorting the plurality of target information in a predetermined order to obtain a sorting result;
[0010] The core information extracted from the plurality of uniform resource locator management classes is collected according to the sorting result to obtain collected information.
[0011] Optionally, traversing and accessing each of the Uniform Resource Locator Management Classes according to the storage path of each of the Uniform Resource Locator Management Classes, and extracting a plurality of core information of the Uniform Resource Locator Management Classes according to the annotation information includes:
[0012] Each of the Uniform Resource Locator Management Classes is accessed one by one according to the storage path of each of the Uniform Resource Locator Management Classes, and the Uniform Resource Locator Interface Information included in each of the Uniform Resource Locator Management Classes is filtered according to the annotation information to extract multiple core information of each of the Uniform Resource Locator Management Classes.
[0013] Optionally, filtering the uniform resource locator interface information included in each uniform resource locator management class according to the annotation information to extract multiple core information of each uniform resource locator management class includes:
[0014] The shell pipeline technology is combined with annotation information to filter the uniform resource locator interface information included in each uniform resource locator management class layer by layer, remove annotations and invalid information, and gradually extract multiple core information of each uniform resource locator management class.
[0015] Optionally, the normalizing the plurality of core information to obtain a plurality of target information that conforms to a preset rule comprises:
[0016] The formats of the plurality of core information are standardized according to preset rules, and a plurality of target information with corrected formats that conform to the preset rules are obtained respectively.
[0017] Optionally, the sorting of the plurality of target information in a predetermined order to obtain a sorting result includes:
[0018] The plurality of target information included in each uniform resource locator management class are sorted according to a predetermined order to obtain a sorting result of each uniform resource locator management class.
[0019] Optionally, the method further comprises:
[0020] The uniform resource locator interface information collected multiple times is compared and analyzed to obtain analysis results.
[0021] Optionally, the core information is the interface name defined for each uniform resource locator management class, the interface description defined for each uniform resource locator management class, the author of each uniform resource locator management class or the management class name of each uniform resource locator management class.
[0022] The embodiment of the present application provides a device for collecting uniform resource locator interface information, the device comprising:
[0023] An information aggregation module, used to obtain storage paths of multiple uniform resource locator management classes, wherein the uniform resource locator management class defines uniform resource locator interface information;
[0024] An information extraction module, used to traverse and access each of the Uniform Resource Locator Management Classes according to the storage path of each of the Uniform Resource Locator Management Classes, and extract multiple core information of the Uniform Resource Locator Management Classes according to annotation information, wherein the annotation information is used to filter the core information;
[0025] A content correction module, used for normalizing the plurality of core information to obtain a plurality of target information that conforms to preset rules;
[0026] An information sorting module, used to sort the plurality of target information in a predetermined order to obtain a sorting result;
[0027] The information collection module is used to collect the core information extracted from the plurality of uniform resource locator management classes according to the sorting result to obtain the collected information.
[0028] The embodiment of the present application provides a device for collecting uniform resource locator interface information, the device comprising: a processor and a memory;
[0029] The memory is used to store instructions;
[0030] The processor is used to execute the instructions in the memory and perform the method as described in any one of the above embodiments.
[0031] An embodiment of the present application provides a computer-readable storage medium, including instructions, which, when executed on a computer, enables the computer to execute the method described in any one of the above embodiments.
[0032] The embodiment of the present application provides a method for collecting uniform resource locator interface information, the method comprising: obtaining storage paths of multiple uniform resource locator management classes, the uniform resource locator management class defines uniform resource locator interface information, traversing and accessing each uniform resource locator management class according to the storage path of each uniform resource locator management class, extracting multiple core information of the uniform resource locator management class according to annotation information, the annotation information is used to filter the core information, normalizing the multiple core information, respectively obtaining multiple target information that conform to preset rules, sorting the multiple target information according to a predetermined order to obtain a sorting result, and collecting the core information extracted from the multiple uniform resource locator management classes according to the sorting result to obtain collected information. That is, by obtaining the storage path of the uniform resource locator management class that defines the uniform resource locator interface information, accessing one by one according to the storage path, the automatic extraction of the uniform resource locator interface information is realized. When extracting, the annotation information is used to automatically filter the content included in the uniform resource locator management class to smoothly extract multiple core information. After extracting multiple core information, normalization and sorting are performed to facilitate subsequent information collection, realize automatic processing and information collection of core information, and improve information collection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.
[0034] Figure 1 A schematic diagram showing a flow chart of a method for collecting uniform resource locator interface information provided by an embodiment of the present application;
[0035] Figure 2 A schematic diagram of the structure of a device for collecting uniform resource locator interface information provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] 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 drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0037] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0038] The method, device, equipment and storage medium for collecting uniform resource locator interface information provided by the present invention can be used in the financial field or other fields, for example, can be used in the application scenario of uniform resource locator interface information collection in the financial field. Other fields are any fields other than the financial field, for example, the computer field. The above is only an example and does not limit the application field of the method, device, equipment and storage medium for collecting uniform resource locator interface information provided by the present invention.
[0039] With the development of finance and computers in today's society, banks are involved in more and more financial-related businesses, and they need to develop corresponding business systems. As the business changes, the business system also changes accordingly. For example, the uniform resource locator (URL) interface included in the business system will be added, modified, and deleted. This requires the system's URL interface information to be regularly collected and published to inform upstream and downstream products for coordinated processing.
[0040] Currently, the Swagger plug-in can be used to view URL interface information, but it is not possible to obtain URL interface information, collect information about URL interface information, or compare the results of each information collection.
[0041] The URL interface information can also be collected manually, but the collection efficiency is low and there may be accuracy issues.
[0042] Based on this, the embodiment of the present application provides a method for collecting uniform resource locator interface information, the method comprising: obtaining storage paths of multiple uniform resource locator management classes, the uniform resource locator management class defines uniform resource locator interface information, traversing and accessing each uniform resource locator management class according to the storage path of each uniform resource locator management class, extracting multiple core information of the uniform resource locator management class according to annotation information, the annotation information is used to filter the core information, normalizing the multiple core information, respectively obtaining multiple target information that conform to preset rules, sorting the multiple target information according to a predetermined order, obtaining a sorting result, and collecting the core information extracted from the multiple uniform resource locator management classes according to the sorting result to obtain collected information. That is, by obtaining the storage path of the uniform resource locator management class that defines the uniform resource locator interface information, accessing one by one according to the storage path, the automatic extraction of the uniform resource locator interface information is realized. When extracting, the annotation information is used to automatically filter the content included in the uniform resource locator management class to smoothly extract multiple core information. After extracting multiple core information, normalization and sorting are performed to facilitate subsequent information collection, realize automatic processing and information collection of core information, and improve information collection efficiency.
[0043] In order to better understand the technical solution and technical effects of the present application, specific embodiments will be described in detail below with reference to the accompanying drawings.
[0044] See also Figure 1 , which is a flow chart of a method for collecting uniform resource locator interface information provided in an embodiment of the present application.
[0045] The method for collecting uniform resource locator interface information provided in this embodiment includes the following steps:
[0046] S101, obtaining storage paths of multiple uniform resource locator management classes.
[0047] In the embodiment of the present application, the uniform resource locator URL management class is a Java class file for defining URL interface information, so in order to collect URL interface information, the content included in the URL management class can be extracted. The storage path of each URL management class of multiple URL management classes can be obtained first.
[0048] After obtaining the storage path of each URL management class in the multiple URL management classes, the storage path may be recorded in the same configuration file, so that each URL can be accessed by subsequently obtaining the storage path of each URL management class according to the configuration file.
[0049] S102, traversing and accessing each uniform resource locator management class according to the storage path of each uniform resource locator management class, and extracting a plurality of core information of the uniform resource locator management class according to the annotation information.
[0050] In an embodiment of the present application, after obtaining the storage path of each URL management class, each URL management class in multiple URL management classes can be traversed and accessed according to the storage path of each URL management class, and multiple core information in the URL management class can be extracted according to the annotation information, and the core information is the information reflecting the URL interface.
[0051] The core information may be the interface name defined by each uniform resource locator management class, the interface description defined by each uniform resource locator management class, the author of each uniform resource locator management class, or the management class name of each uniform resource locator management class.
[0052] In an embodiment of the present application, the annotation information is information for filtering the content included in the URL management class. Annotations are introduced in JDK1.5 and later versions. Annotations can be used to create documents, track dependencies in the code, and perform basic compile-time checks. In other words, the annotation information can be used to filter the content of the URL management class to determine the core information. The content included in the URL management class is relatively complex, and there may be problems with different content formats caused by different developers, so it is extremely important to use annotation information to filter the core information.
[0053] As an example, the content of the URL management class includes @author:ABC, the annotation information can be @author, and the core information can be ABC. That is to say, the extracted core information is filtered and located using the annotation information, that is, the core information can be automatically extracted using the annotation information.
[0054] Specifically, the storage path of each uniform resource locator management class can be obtained according to the configuration file, and then each uniform resource locator management class can be accessed one by one according to the storage path of each uniform resource locator management class, and the uniform resource locator interface information included in each uniform resource locator management class can be filtered according to the annotation information to extract multiple core information of each uniform resource locator management class. In other words, the annotation information can indicate the core information of the URL management class, realize automatic content screening and filtering, and greatly improve the efficiency of information extraction.
[0055] As a possible implementation method, the shell pipeline technology can be combined with annotation information to filter the content of each uniform resource locator management class layer by layer, remove annotations and invalid information, and gradually extract multiple core information of each uniform resource locator management class. The use of shell pipeline technology for information extraction has the advantage of being able to adapt to multiple operating systems. When the operating system is Windows or Linux, the shell pipeline technology can realize the extraction of core information, and there will be no problem of different information extraction due to different operating systems, which can meet the needs of actual applications.
[0056] In practical applications, multiple core information extracted from each URL management class can be stored in a primary temporary file.
[0057] S103, normalizing the multiple core information to obtain multiple target information that conform to preset rules.
[0058] In the embodiment of the present application, after extracting multiple core information of each URL management class using shell pipeline technology, the multiple core information can be normalized to obtain multiple target information that conforms to preset rules. This is because the core information directly extracted from the URL management class may have an irregular format, so it can be normalized to facilitate subsequent information collection.
[0059] Specifically, multiple core information in each URL management class can be obtained from the primary temporary file, and the formats of the multiple core information can be standardized according to the preset rules to obtain multiple target information that conform to the preset rules and have been formatted. Since the core information is the interface name defined by each uniform resource locator management class, the interface description defined by each uniform resource locator management class, the author of each uniform resource locator management class, or the management class name of each uniform resource locator management class, the target information that has been formatted can also be the interface name defined by each uniform resource locator management class, the interface description defined by each uniform resource locator management class, the author of each uniform resource locator management class, or the management class name of each uniform resource locator management class.
[0060] As an example, the core information may be information with spaces, and the target information after format normalization processing does not have spaces.
[0061] In actual applications, multiple target information in each URL management class obtained after format normalization processing can be stored in a secondary temporary file.
[0062] S104, sorting the multiple target information according to a predetermined order to obtain a sorting result.
[0063] In an embodiment of the present application, after normalizing multiple core information, multiple target information with corrected formats are obtained. At this time, the order of the multiple target information may be chaotic. Therefore, the multiple target information can be sorted in a predetermined order to obtain a sorting result to facilitate subsequent information collection and display.
[0064] Specifically, multiple target information included in each uniform resource locator management class can be obtained from the primary temporary file, and the multiple target information included in each uniform resource locator management class can be sorted according to a predetermined order to obtain the sorting result of each uniform resource locator management class. That is to say, based on each URL management class, the multiple target information in each URL management class is sorted, which is equivalent to sorting and classifying the multiple target information in multiple URL management classes to form a two-dimensional matrix with the predetermined order as the horizontal axis and different URL management classes as the vertical axis. For example, the management class names in different URL management classes are taken as the same column, and the interface names in different URL management classes are also taken as the same column.
[0065] As an example, the predetermined order is the management class name of each Uniform Resource Locator management class, the interface name defined by each Uniform Resource Locator management class, the interface description defined by each Uniform Resource Locator management class to the author of each Uniform Resource Locator management class.
[0066] In actual applications, the sorting results of the multiple target information in each URL management class obtained after sorting can be stored in a final result file.
[0067] S105, collecting core information extracted from multiple uniform resource locator management classes according to the sorting result to obtain collected information.
[0068] In an embodiment of the present application, after obtaining the sorting results of multiple target information, the core information extracted from multiple uniform resource locator management classes can be collected according to the sorting results to obtain collected information, which reflects the URL interface information included in the multiple uniform resource locator management classes.
[0069] Specifically, the sorting result of the multiple target information included in each uniform resource locator management class can be obtained from the final result file, and the URL interface information of the multiple uniform resource locator management classes can be collected and displayed according to the sorting result.
[0070] As an example, the collected information may be presented in a table format.
[0071] In an embodiment of the present application, information collection can be performed on the URL management class at preset intervals to obtain URL interface information at preset intervals. After multiple information collections, the URL interface information obtained multiple times can be compared and analyzed to obtain analysis results, which can be displayed in a visual form.
[0072] In the embodiment of the present application, when collecting URL interface information, the number of URL interfaces can also be counted, specifically, the number of each category can be counted after the URL interfaces are classified. Multiple URL management classes can be classified according to the system corresponding to the URL interface, so that the number of URL interfaces under different systems can be counted in the subsequent classification based on the system. It can be seen that the method for collecting uniform resource locator interface information provided by the embodiment of the present application uses a concise shell pipeline technology to centrally collect and process URL interface information of different systems that may be developed by different technicians, extract URL interface information, and improve information collection efficiency.
[0073] The embodiment of the present application provides a method for collecting uniform resource locator interface information, the method comprising: obtaining storage paths of multiple uniform resource locator management classes, the uniform resource locator management class defines uniform resource locator interface information, traversing and accessing each uniform resource locator management class according to the storage path of each uniform resource locator management class, extracting multiple core information of the uniform resource locator management class according to annotation information, the annotation information is used to filter the core information, normalizing the multiple core information, respectively obtaining multiple target information that conform to preset rules, sorting the multiple target information according to a predetermined order to obtain a sorting result, and collecting the core information extracted from the multiple uniform resource locator management classes according to the sorting result to obtain collected information. That is, by obtaining the storage path of the uniform resource locator management class that defines the uniform resource locator interface information, accessing one by one according to the storage path, the automatic extraction of the uniform resource locator interface information is realized. When extracting, the annotation information is used to automatically filter the content included in the uniform resource locator management class to smoothly extract multiple core information. After extracting multiple core information, normalization and sorting are performed to facilitate subsequent information collection, realize automatic processing and information collection of core information, and improve information collection efficiency.
[0074] Based on the method for collecting uniform resource locator interface information provided in the above embodiment, the embodiment of the present application further provides a device for collecting uniform resource locator interface information, and its working principle is described in detail below in conjunction with the accompanying drawings.
[0075] See also Figure 2 , which is a structural diagram of a device for collecting uniform resource locator interface information provided in an embodiment of the present application.
[0076] The apparatus 200 for collecting uniform resource locator interface information provided in this embodiment includes:
[0077] The information aggregation module 210 is used to obtain storage paths of multiple uniform resource locator management classes, wherein the uniform resource locator management class defines uniform resource locator interface information;
[0078] The information extraction module 220 is used to traverse and access each of the uniform resource locator management classes according to the storage path of each uniform resource locator management class, and extract multiple core information of the uniform resource locator management class according to annotation information, wherein the annotation information is used to filter the core information;
[0079] The content correction module 230 is used to perform normalization processing on the plurality of core information to obtain a plurality of target information that conforms to preset rules;
[0080] An information sorting module 240 is used to sort the plurality of target information in a predetermined order to obtain a sorting result;
[0081] The information collection module 250 is used to collect the core information extracted from the plurality of uniform resource locator management classes according to the sorting result to obtain collected information.
[0082] Optionally, the information extraction module 220 is specifically used to:
[0083] Each of the Uniform Resource Locator Management Classes is accessed one by one according to the storage path of each of the Uniform Resource Locator Management Classes, and the Uniform Resource Locator Interface Information included in each of the Uniform Resource Locator Management Classes is filtered according to the annotation information to extract multiple core information of each of the Uniform Resource Locator Management Classes.
[0084] Optionally, the information extraction module 220 is specifically used to:
[0085] The shell pipeline technology is combined with annotation information to filter the uniform resource locator interface information included in each uniform resource locator management class layer by layer, remove annotations and invalid information, and gradually extract multiple core information of each uniform resource locator management class.
[0086] Optionally, the content correction module 230 is specifically configured to:
[0087] The formats of the plurality of core information are standardized according to preset rules, and a plurality of target information with corrected formats that conform to the preset rules are obtained respectively.
[0088] Optionally, the information sorting module 240 is specifically configured to:
[0089] The plurality of target information included in each uniform resource locator management class are sorted according to a predetermined order to obtain a sorting result of each uniform resource locator management class.
[0090] Optionally, the device further comprises a difference comparison module;
[0091] The difference comparison module is used to compare and analyze the uniform resource locator interface information collected multiple times to obtain the analysis result.
[0092] Optionally, the core information is the interface name defined for each uniform resource locator management class, the interface description defined for each uniform resource locator management class, the author of each uniform resource locator management class, or the management class name of each uniform resource locator management class.
[0093] Based on the method for collecting uniform resource locator interface information provided in the above embodiment, the embodiment of the present application further provides a device for collecting uniform resource locator interface information, and the device for collecting uniform resource locator interface information includes:
[0094] The processor and the memory may be one or more processors. In some embodiments of the present application, the processor and the memory may be connected via a bus or other means.
[0095] The memory may include a read-only memory and a random access memory, and provides instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
[0096] The processor controls the operation of the terminal device and may also be referred to as a CPU.
[0097] The method disclosed in the above embodiment of the present application can be applied to a processor or implemented by a processor. The processor can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor can be a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor can be combined to perform. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
[0098] The embodiment of the present application also provides a computer-readable storage medium for storing program code, where the program code is used to execute any one of the methods of the aforementioned embodiments.
[0099] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0100] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0101] When introducing elements of various embodiments of the present application, the articles "a," "an," "the," and "said" are intended to mean that there are one or more elements. The words "comprising," "including," and "having" are all inclusive and mean that there may be additional elements in addition to the listed elements.
[0102] It should be noted that a person skilled in the art can understand that all or part of the processes in the above method embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0103] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0104] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is merely schematic, and the units and modules described as separate components may or may not be physically separated. In addition, some or all of the units and modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without paying creative work.
[0105] The above is only a preferred implementation of the present application. Although the present application has been disclosed as a preferred embodiment, it is not intended to limit the present application. Any technician familiar with the art can use the above disclosed methods and technical contents to make many possible changes and modifications to the technical solution of the present application without departing from the scope of the technical solution of the present application, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still falls within the scope of protection of the technical solution of the present application.
Claims
1. A method for collecting uniform resource locator interface information, characterized in that: The method comprises: Acquire storage paths of a plurality of uniform resource locator management classes, wherein the uniform resource locator management class defines uniform resource locator interface information; Traversing and accessing each of the Uniform Resource Locator Management Classes according to the storage path of each of the Uniform Resource Locator Management Classes, extracting a plurality of core information of the Uniform Resource Locator Management Classes according to annotation information, wherein the annotation information is used to filter the core information; Normalizing the plurality of core information to obtain a plurality of target information that conforms to preset rules; Sorting the plurality of target information in a predetermined order to obtain a sorting result; The core information extracted from the plurality of uniform resource locator management classes is collected according to the sorting result to obtain collected information.
2. The method according to claim 1, characterized in that The step of traversing and accessing each uniform resource locator management class according to the storage path of each uniform resource locator management class and extracting multiple core information of the uniform resource locator management class according to the annotation information includes: Each of the Uniform Resource Locator Management Classes is accessed one by one according to the storage path of each of the Uniform Resource Locator Management Classes, and the Uniform Resource Locator Interface Information included in each of the Uniform Resource Locator Management Classes is filtered according to the annotation information to extract multiple core information of each of the Uniform Resource Locator Management Classes.
3. The method according to claim 2, characterized in that The filtering of the uniform resource locator interface information included in each uniform resource locator management class according to the annotation information to extract multiple core information of each uniform resource locator management class includes: The shell pipeline technology is combined with annotation information to filter the uniform resource locator interface information included in each uniform resource locator management class layer by layer, remove annotations and invalid information, and gradually extract multiple core information of each uniform resource locator management class.
4. The method according to claim 1, characterized in that: The step of normalizing the plurality of core information to obtain a plurality of target information that conforms to preset rules comprises: The formats of the plurality of core information are standardized according to preset rules, and a plurality of target information with corrected formats that conform to the preset rules are obtained respectively.
5. The method according to claim 1, characterized in that The step of sorting the plurality of target information in a predetermined order to obtain a sorting result includes: The plurality of target information included in each uniform resource locator management class are sorted according to a predetermined order to obtain a sorting result of each uniform resource locator management class.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: The uniform resource locator interface information collected multiple times is compared and analyzed to obtain an analysis result.
7. The method according to any one of claims 1 to 5, characterized in that: The core information is the interface name defined for each uniform resource locator management class, the interface description defined for each uniform resource locator management class, the author of each uniform resource locator management class or the management class name of each uniform resource locator management class.
8. A device for collecting uniform resource locator interface information, characterized in that: The device comprises: An information aggregation module, used to obtain storage paths of multiple uniform resource locator management classes, wherein the uniform resource locator management class defines uniform resource locator interface information; An information extraction module, used to traverse and access each of the Uniform Resource Locator Management Classes according to the storage path of each of the Uniform Resource Locator Management Classes, and extract multiple core information of the Uniform Resource Locator Management Classes according to annotation information, wherein the annotation information is used to filter the core information; A content correction module, used for normalizing the plurality of core information to obtain a plurality of target information that conforms to preset rules; An information sorting module, used to sort the plurality of target information in a predetermined order to obtain a sorting result; The information collection module is used to collect the core information extracted from the plurality of uniform resource locator management classes according to the sorting result to obtain collected information.
9. A device for collecting uniform resource locator interface information, characterized in that: The device comprises: a processor and a memory; The memory is used to store instructions; The processor is used to execute the instructions in the memory to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The method comprises instructions which, when executed on a computer, cause the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for interface document generation, computer device, and storage medium
CN108932122A
Interface information generation method and apparatus, computer device, and storage medium
CN109542412A
Interface document generation method and system, computing equipment and storage medium
CN114153495A
API (Application Program Interface) document management method and system, electronic equipment and medium
CN117539528A
