CN116662875A - Interface mapping method and device - Google Patents

Interface mapping method and device Download PDF

Info

Publication number
CN116662875A
CN116662875A CN202310498795.2A CN202310498795A CN116662875A CN 116662875 A CN116662875 A CN 116662875A CN 202310498795 A CN202310498795 A CN 202310498795A CN 116662875 A CN116662875 A CN 116662875A
Authority
CN
China
Prior art keywords
interface
branch
interface message
service
message
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
CN202310498795.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.)
China Construction Bank Corp
CCB Finetech Co Ltd
Original Assignee
China Construction Bank Corp
CCB Finetech 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 China Construction Bank Corp, CCB Finetech Co Ltd filed Critical China Construction Bank Corp
Priority to CN202310498795.2A priority Critical patent/CN116662875A/en
Publication of CN116662875A publication Critical patent/CN116662875A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/606Protecting data by securing the transmission between two devices or processes
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The invention discloses an interface mapping method and device, which can be used in the technical fields of artificial intelligence and cloud computing, and the method comprises the following steps: receiving an interface message sent by an application server in a buried point mode; analyzing the interface message to obtain interface information; performing inverse structure analysis on the interface message to determine the data structure, field information and data type of the interface message; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm. According to the invention, the API interface is deconstructed from service data, and the service branch to which the API interface call belongs is analyzed, so that the API interface has service attribute, and the automatic classification is more efficient and accurate.

Description

Interface mapping method and device
Technical Field
The invention relates to the technical field of artificial intelligence and cloud computing, in particular to an interface mapping method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
An API interface of an application system is used as a main form of a streaming scene such as personal information inquiry, use, sharing and the like, and is an important channel for transmitting data, but an API developer generally only pays attention to service logic of the API and does not pay attention to safety and management of the API, so that a large amount of sensitive data is directly exposed in an open network environment through the API, and serious data leakage is caused by improper management. Meanwhile, the existing scheme is that the API and the API flow data are carded through passive flow analysis, and only simple identification of an API interface can be realized.
Disclosure of Invention
The embodiment of the invention provides an interface mapping method, which is used for deconstructing an API interface from service data, and comprises the following steps:
receiving an interface message sent by an application server in a buried point mode; the interface message is sent by the application server before responding to an interface call request initiated by the client;
analyzing the interface message to obtain interface information;
performing inverse structure analysis on the interface message to determine the data structure, field information and data type of the interface message;
matching the field information with a preset identification rule, and classifying the field information in a grading manner;
and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
The embodiment of the invention also provides an interface mapping device for implementing deconstructing the API interface from the service data, which comprises:
the analysis module is used for receiving the interface message sent by the application server in a buried point mode; the interface message is sent by the application server before responding to an interface call request initiated by the client; analyzing the interface message to obtain interface information;
the service branch identification module is used for carrying out inverse structure analysis on the interface message and determining the data structure, field information and data type of the interface message; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the interface mapping method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the interface mapping method when being executed by a processor.
Embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the above-described interface mapping method.
In the embodiment of the invention, an interface message sent by an application server is received by adopting a buried point mode; analyzing the interface message to obtain interface information; performing inverse structure analysis on the interface message to determine the data structure, field information and data type of the interface message; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm. Compared with the prior art, the method and the device have the advantages that the API interface is deconstructed from service data, and service branches to which the API interface calls belong are analyzed, so that the API interface has service attributes, and the automatic classification is more efficient and accurate.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of an interface mapping method provided by the invention;
FIG. 2 is a flow chart of an interface mapping method according to the present invention;
FIG. 3 is a flow chart of an interface mapping method according to the present invention;
FIG. 4 is a flow chart of an interface mapping method according to the present invention;
fig. 5 is a schematic structural diagram of an interface mapping device provided by the invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
Fig. 1 is a flow chart corresponding to an interface mapping method according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
and step 101, receiving an interface message sent by the application server in a buried point mode.
It should be noted that, the interface message is sent by the application server before responding to the interface call request initiated by the client.
The interface message is generated by the application system when running, and can be identified only when calling occurs between the systems. The embodiment of the invention adopts a buried point mode to collect interface messages generated during the system operation.
When business transaction occurs, collecting interface message, detecting URL of interface call request, once new interface call occurs, capturing one by one, and mapping all API interfaces of application system automatically.
Step 102, analyzing the interface message to obtain interface information.
In one possible implementation manner, the interface information is obtained by analyzing URL information of the interface message or a preset interface code keyword.
And 103, carrying out inverse structure analysis on the interface message, and determining the data structure, the field information and the data type of the interface message.
In the embodiment of the invention, the reverse structure analysis is carried out on the data message, even if the data is complex as an object nested array or an array nested object, the data can be accurately deconstructed, and the original structure of the data is kept unchanged.
And 104, matching the field information with a preset identification rule, and classifying the field information in a grading manner.
The field information is compared with the recognition rules of data classification, the recognition rules of regular expressions, system services, dictionaries and the like can be adopted to recognize the data classification of the message, sensitive data in the field information is determined, and the sensitive data is classified in a grading manner.
And 105, determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
According to the scheme, the API interface is deconstructed from service data, and the service branch to which the API interface call belongs is analyzed, so that the API interface has service attributes, and the automatic classification is more efficient and accurate.
In step 105, a branch identification algorithm and a branch merging algorithm are adopted to determine a service branch to which a call interface corresponding to the interface message belongs and data of the service branch, and the step flow is shown in fig. 2, and specifically includes the following steps:
in step 201, when the branch identification algorithm is adopted to determine that the interface message contains a new feature field, the current mapping is classified as a new service branch.
Step 202, when the branch identification algorithm is adopted to determine that the interface message does not contain the new feature field, the branch merging algorithm is adopted to merge the current mapping into the existing service branch.
In the embodiment of the invention, aiming at the same transaction interface, the interface messages are quite different due to different factors of request parameters, current logged-in users, service processing logic and the like, the current branch is compared with the existing branch data structures by adopting a branch identification algorithm, if the current branch and the existing branch data fields have the increasing and decreasing functions, the current branch is identified as a new branch, a new branch is generated, and the data fields of the new branch are calculated and identified by a branch characteristic algorithm.
If the data field of the current branch and the data field of the existing branch are only newly added or only reduced or kept unchanged, the current branch is identified as matching with the existing branch, the newly added data of the current branch is supplemented to the matched branch through a branch merging algorithm, and the two branches are merged into one branch.
The embodiment of the invention can accurately calculate whether the current transaction belongs to the existing service branch or the new service branch through the algorithm, and finally map out all service branches of the transaction interface.
Before analyzing the interface message, the embodiment of the invention has the steps shown in fig. 3, and the steps are as follows:
step 301, converting the format of the interface message into attribute data.
Step 302, parsing the converted interface message.
In the embodiment of the invention, the message formats of different protocols are converted into the attribute data map, so that the problem of analyzing the messages of different protocols is solved.
In the embodiment of the invention, the application system can automatically survey and draw the API interface of the application system by integrating with the SDK of the software development kit of the API interface survey and drawing platform. Fig. 4 is a flow chart corresponding to an interface mapping method according to an embodiment of the present invention, as shown in fig. 4, where the method includes:
step 401, when the interface of the application system is accessed, the SDK automatically collects interface messages and uploads the interface messages to the policy service node.
Step 402, the policy service node parses the interface message to determine the data structure, field information and data type of the interface message.
In step 403, the policy service node determines sensitive data in the field information.
In the embodiment of the invention, sensitive data is classified in a grading manner, and data identification rules of modes such as regular expressions, system services, dictionaries and the like are adopted.
According to the embodiment of the invention, a set of data classification models comprising multiple recognition algorithms such as regular expressions, dictionaries and the like are established according to the service scene, so that automatic classification is more efficient and accurate.
The embodiment of the invention also provides an interface mapping device, as described in the following embodiment. The device is shown in fig. 5, and the device comprises:
the parsing module 501 is configured to receive an interface message sent by an application server in a buried point manner; the interface message is sent by the application server before responding to an interface call request initiated by the client; analyzing the interface message to obtain interface information;
the service branch identification module 502 is configured to perform inverse structure analysis on the interface packet, and determine a data structure, field information, and a data type of the interface packet; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
In the embodiment of the present invention, the parsing module 501 is further configured to:
and converting the format of the interface message into attribute data before analyzing the interface message.
In the embodiment of the present invention, the parsing module 501 is specifically configured to:
and obtaining interface information by analyzing URL information of the uniform resource positioning system of the interface message or a preset interface coding keyword.
In the embodiment of the present invention, the service branch identifying module 502 is specifically configured to:
when a branch identification algorithm is adopted to determine that the interface message contains a new characteristic field, classifying the current mapping into a new service branch;
and when the branch identification algorithm is adopted to determine that the interface message does not contain the new characteristic field, the current mapping is merged into the existing service branch by adopting the branch merging algorithm.
Because the principle of the device for solving the problems is similar to that of the interface mapping method, the implementation of the device can refer to the implementation of the interface mapping method, and the repetition is not repeated.
The embodiment of the invention also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the interface mapping method when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the interface mapping method when being executed by a processor.
Embodiments of the present invention also provide a computer program product comprising a computer program which, when executed by a processor, implements the above-described interface mapping method.
In the embodiment of the invention, an interface message sent by an application server is received by adopting a buried point mode; analyzing the interface message to obtain interface information; performing inverse structure analysis on the interface message to determine the data structure, field information and data type of the interface message; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm. Compared with the prior art, the method and the device have the advantages that the API interface is deconstructed from service data, and service branches to which the API interface calls belong are analyzed, so that the API interface has service attributes, and the automatic classification is more efficient and accurate.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (11)

1. An interface mapping method, comprising:
receiving an interface message sent by an application server in a buried point mode; the interface message is sent by the application server before responding to an interface call request initiated by the client;
analyzing the interface message to obtain interface information;
performing inverse structure analysis on the interface message to determine the data structure, field information and data type of the interface message;
matching the field information with a preset identification rule, and classifying the field information in a grading manner;
and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
2. The interface mapping method of claim 1, further comprising, prior to said parsing the interface message:
and converting the format of the interface message into attribute data.
3. The method of claim 1, wherein the parsing the interface message to obtain interface information comprises:
and obtaining interface information by analyzing URL information of the uniform resource positioning system of the interface message or a preset interface coding keyword.
4. The method for mapping an interface according to claim 1, wherein determining the service branch to which the calling interface corresponding to the interface packet belongs and the data of the service branch by using a branch identification algorithm and a branch merging algorithm comprises:
when a branch identification algorithm is adopted to determine that the interface message contains a new characteristic field, classifying the current mapping into a new service branch;
and when the branch identification algorithm is adopted to determine that the interface message does not contain the new characteristic field, the current mapping is merged into the existing service branch by adopting the branch merging algorithm.
5. An interface mapping apparatus, comprising:
the analysis module is used for receiving the interface message sent by the application server in a buried point mode; the interface message is sent by the application server before responding to an interface call request initiated by the client; analyzing the interface message to obtain interface information;
the service branch identification module is used for carrying out inverse structure analysis on the interface message and determining the data structure, field information and data type of the interface message; matching the field information with a preset identification rule, and classifying the field information in a grading manner; and determining a service branch and data of the service branch of the calling interface corresponding to the interface message by adopting a branch identification algorithm and a branch merging algorithm.
6. The interface mapping apparatus of claim 5, wherein the parsing module is further to:
and converting the format of the interface message into attribute data before analyzing the interface message.
7. The interface mapping apparatus of claim 5, wherein the parsing module is specifically configured to:
and obtaining interface information by analyzing URL information of the uniform resource positioning system of the interface message or a preset interface coding keyword.
8. The interface mapping apparatus of claim 5, wherein the service branch identification module is specifically configured to:
when a branch identification algorithm is adopted to determine that the interface message contains a new characteristic field, classifying the current mapping into a new service branch;
and when the branch identification algorithm is adopted to determine that the interface message does not contain the new characteristic field, the current mapping is merged into the existing service branch by adopting the branch merging algorithm.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 4 when executing the computer program.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
11. A computer program product, characterized in that it comprises a computer program which, when executed by a processor, implements the method of any of claims 1 to 4.
CN202310498795.2A 2023-05-05 2023-05-05 Interface mapping method and device Pending CN116662875A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310498795.2A CN116662875A (en) 2023-05-05 2023-05-05 Interface mapping method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310498795.2A CN116662875A (en) 2023-05-05 2023-05-05 Interface mapping method and device

Publications (1)

Publication Number Publication Date
CN116662875A true CN116662875A (en) 2023-08-29

Family

ID=87712716

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310498795.2A Pending CN116662875A (en) 2023-05-05 2023-05-05 Interface mapping method and device

Country Status (1)

Country Link
CN (1) CN116662875A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116975136A (en) * 2023-09-25 2023-10-31 北京众图识人科技有限公司 Processing method and device of application program interface, terminal equipment and storage medium
CN116974708A (en) * 2023-09-25 2023-10-31 北京众图识人科技有限公司 Service data processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116975136A (en) * 2023-09-25 2023-10-31 北京众图识人科技有限公司 Processing method and device of application program interface, terminal equipment and storage medium
CN116974708A (en) * 2023-09-25 2023-10-31 北京众图识人科技有限公司 Service data processing system

Similar Documents

Publication Publication Date Title
CN111695697B (en) Multiparty joint decision tree construction method, equipment and readable storage medium
CN109961204B (en) Service quality analysis method and system under micro-service architecture
CN116662875A (en) Interface mapping method and device
CN109308490B (en) Method and apparatus for generating information
CN110457175B (en) Service data processing method and device, electronic equipment and medium
US11188443B2 (en) Method, apparatus and system for processing log data
CN112527649A (en) Test case generation method and device
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN110941978A (en) Face clustering method and device for unidentified personnel and storage medium
CN111062431A (en) Image clustering method, image clustering device, electronic device, and storage medium
CN111104214B (en) Workflow application method and device
CN112783614A (en) Object processing method, device, equipment, storage medium and program product
CN113687958A (en) Data processing method, system, computer device and storage medium
CN111193631B (en) Information processing method, system, and computer-readable storage medium
CN111767161A (en) Remote calling depth recognition method and device, computer equipment and readable storage medium
CN111737371B (en) Data flow detection classification method and device capable of dynamically predicting
CN114691645A (en) Big data demand analysis method based on digital intelligence and server
CN113486749A (en) Image data collection method, device, electronic equipment and computer readable medium
CN113132383A (en) Network data acquisition method and system
WO2021051573A1 (en) Method for lip reading living body detection by using divided channel data collection, system and computer device
CN112364284B (en) Method and device for detecting abnormality based on context and related product
CN114860847B (en) Data link processing method, system and medium applied to big data platform
CN115361231B (en) Host abnormal flow detection method, system and equipment based on access baseline
CN111400594B (en) Information vector determining method, device, equipment and storage medium
CN112702368B (en) Service request processing method and device

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