Interface document monitoring method and device based on code scanning and information comparison

Through the interface document monitoring method based on code scanning and information comparison, the stability problem of interface document management tools during automatic update is solved, the consistency of interface documents and code is ensured, and the authority and stability of the management platform are improved. It reduces communication and maintenance costs and realizes the timeliness and accuracy of interface information.

CN119127295APending Publication Date: 2024-12-13CITIC AIBANK CORPORATION LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411298216.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Existing interface document management tools are prone to undermining the authority and stability of registration information when automatically updated, especially when external systems depend on them, which affects the stability of the system and lacks effective change approval process and version management.

Method used

Using the interface document monitoring method based on code scanning and information comparison, through writing and approval process management interface documents, scanning the code base regularly with the interface management platform, triggering alarms when differences are found, and the approval process is started to ensure that the interface documents and code are Consistency and authority.

Benefits of technology

It improves the authority and stability of interface information management, reduces communication and maintenance costs, ensures the timeliness and accuracy of interface information, realizes the traceability of historical versions, and improves review efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119127295A_ABST
    Figure CN119127295A_ABST
Patent Text Reader

Abstract

The invention relates to an interface document monitoring method and device based on code scanning and information comparison. The method comprises the steps of compiling a first interface document, starting an interface creation approval process to determine an interface branch version, and updating an interface version of an interface management platform; updating the first interface document according to the updated interface version of the interface management platform to form a new version to be approved as a second interface document, and updating the interface version of the interface management platform; the method comprises the following steps: regularly scanning a code library, obtaining interface branch information, comparing the interface branch information obtained by scanning the interface code library with the registered interface branch information of an interface management platform, and if a difference exists in an information comparison result, triggering an interface inconsistency alarm, starting an interface updating approval process, and confirming an interface branch version. And updating the interface version of the interface management platform. The interface information is collected through automatic code scanning, and the review process is started, so that the authority and stability of the interface information registered by the interface management platform are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of code scanning and information comparison, and in particular to an interface document monitoring method and device based on code scanning and information comparison. Background Art

[0002] At present, with the rapid development of microservice architecture, the demand for service governance is becoming more and more urgent. It is urgent to formulate corresponding tools and processes to reasonably and effectively implement the standardization and full life cycle management of interfaces, and solve problems such as scattered and difficult to find interface documents, different formats, lack of version management, and lack of change notifications. At present, there are many interface management tools on the market, including Eolink, APIfix, Postcat, Yapi, etc. The technical solutions implemented by these tools include: automatic generation of interface documents; interface document version management; document information change notification; status code and error code maintenance; test case generation and management, etc.

[0003] The existing technical solution is to directly update the registration information with the scanned information after comparing the scanned information and the registered information and finding differences. Although this direct update solution facilitates the creation and update of interface documents, it is not conducive to the authoritative management of interface documents and the change approval process management, and it is easy to undermine the authority and stability of the registration information. In particular, when there is an external system that relies on the registration information, this automatic update will directly affect the stability of this reliance. Summary of the invention

[0004] In order to address the deficiencies of the prior art, the present invention provides a monitoring solution and tool for automatically monitoring interface documents and code implementation by combining code scanning technology and information comparison technology to target possible deviations, including inconsistent interface quantity, inconsistent interface definition, inconsistent interface status, etc., thereby ensuring the authority of the interface document, and the consistency and freedom from deviation between the interface code and the interface document.

[0005] To achieve the above objectives, the technical solutions adopted by the present invention include:

[0006] An interface document monitoring method based on code scanning and information comparison, characterized by comprising:

[0007] S1. Write the first interface document, start the interface creation approval process, after the interface creation approval process is passed, determine the interface branch version, detect the interface approval status, when the interface approval status is approved, update the interface management platform interface version;

[0008] S2. Update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, the interface update approval process after passing, confirm the interface branch version, detect the interface approval status, when the interface approval status is approved, update the interface management platform interface version;

[0009] S3. Scan the code library regularly to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison results, the interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is checked. When the interface approval status is approved, the interface management platform interface version is updated.

[0010] Furthermore, the interface creation approval process includes: architecture review, security review, error code review and performance review.

[0011] Furthermore, after the step S1 of determining the interface branch version, the method further includes:

[0012] Carry out interface development work according to the first interface document, and carry out test case development and interface testing simultaneously.

[0013] Furthermore, the interface update approval process includes: dependency review, architecture review, security review, error code review and performance review.

[0014] Furthermore, after the step S2 of confirming the interface branch version, the method further includes:

[0015] Carry out interface development work according to the second interface document, and carry out test case development and interface testing simultaneously.

[0016] Furthermore, the step S3 further includes:

[0017] If there is no difference in the information comparison result, the interface version will not be updated;

[0018] The interface inconsistency includes: inconsistent interface quantity, inconsistent interface definition and inconsistent interface status.

[0019] The present invention also relates to an interface document monitoring device based on code scanning and information comparison, characterized in that it comprises:

[0020] The interface creation unit is used to write a first interface document, start an interface creation approval process, determine the interface branch version after the interface creation approval process is passed, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version;

[0021] An interface update unit is used to update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, and after the interface update approval process is passed, confirm the interface branch version, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version;

[0022] The interface comparison unit is used to periodically scan the code library to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison result, an interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is detected. When the interface approval status is approved, the interface management platform interface version is updated.

[0023] The present invention also relates to a computer-readable storage medium, characterized in that a computer program is stored on the storage medium, and the computer program implements the above method when executed by a processor.

[0024] The present invention also relates to an electronic device, characterized in that it comprises a processor and a memory;

[0025] The memory is used to store program instructions;

[0026] The processor is used to execute the above method by calling program instructions.

[0027] The present invention also relates to a computer program product, comprising a computer program and / or instructions, characterized in that the computer program and / or instructions implement the steps of the above method when executed by a processor.

[0028] The beneficial effects of the present invention are:

[0029] The interface document monitoring method and device based on code scanning and information comparison described in the present invention are adopted. A monitoring means for collecting interface information is used through automatic code scanning. When it is found that the scanned information and the registered information are inconsistent, an alarm message is generated, an interface information evaluation process is started, and a new version of the interface registration information is created based on the scanned information. The high communication cost and maintenance cost of interface information transmission, the inability to guarantee timeliness and accuracy, the inability to guarantee that the system relying on the interface can obtain service change information in time when the interface information is updated, the lack of standardized standards for document writing, the blind spots of security review such as sensitive fields and Internet attributes, the low audit efficiency due to the inconsistency between interface development and interface definition, etc. are solved. The authority and stability of interface information management are improved, the authority and stability of interface information registered on the interface management platform are effectively guaranteed, and the traceability of historical versions is realized. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 The present invention is a flowchart of an interface document monitoring method based on code scanning and information comparison.

[0031] Figure 2 The present invention is a schematic diagram of the structure of an interface document monitoring device based on code scanning and information comparison. DETAILED DESCRIPTION

[0032] In order to more clearly understand the content of the present invention, it will be described in detail with reference to the drawings and embodiments.

[0033] The first aspect of the present invention relates to a process of steps as follows Figure 1 The interface document monitoring method shown is based on code scanning and information comparison, comprising:

[0034] Step S1. Write the first interface document and start the interface creation approval process. After the interface creation approval process is passed, determine the interface branch version, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version.

[0035] In this embodiment, the business system technicians write the interface document according to the format template on the interface management platform and start the interface creation approval process. The interface creation approval process involves major review links such as architecture review, security review, error code review, and performance review.

[0036] Specifically, the architecture review is to review the overall architectural design of the interface, including system components, interaction methods between modules, data flow, etc., in order to ensure that the design of the interface can meet functional requirements and has good scalability, maintainability and reusability; the security review is to review the security measures of the interface, including verification of input parameters, protection of sensitive data, identity authentication and access control, etc., in order to ensure that the interface has defense capabilities against potential security threats and protect the system from attacks; the error code review is to ensure that the interface can return clear and accurate error code information when an error or abnormal situation occurs. The review will check the definition and specification of the error code, and ensure that the error code can help developers quickly locate and solve problems, and improve the maintainability and availability of the system; the performance review will stress test and perform performance analysis on the interface to determine its performance under high load conditions. The performance review can check indicators such as the interface's response time, throughput, and resource utilization to ensure that the system can meet performance requirements in actual use.

[0037] In this embodiment, the interface branch version is confirmed by the person in charge of the business system, the business system technicians carry out interface development work according to the interface document, and the testers carry out test case development and interface testing work according to the interface document at the same time. After the overall development and testing work is completed, the system online process will detect the interface approval status, and it can be put online only after approval, and the interface management platform interface version will be updated.

[0038] Step S2. Update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, and after the interface update approval process passes, confirm the interface branch version and check the interface approval status. When the interface approval status is approved, update the interface management platform interface version.

[0039] In this embodiment, the business system technicians update the interface document according to the format template on the interface management platform to form a new version to be approved. After the interface document is updated, the business system technicians start the interface update approval process. The interface update approval process involves major review links such as dependency review, architecture review, security review, error code review, and performance review.

[0040] Specifically, dependency review refers to the process of evaluating and testing the external systems, libraries, frameworks, etc. that an interface depends on when developing it. During the design and development process, the interface usually depends on other systems or components. These dependencies may have an impact on the stability, security, performance, etc. of the software or interface. The purpose of dependency review is to identify and evaluate the quality and reliability of the components that the interface depends on to ensure that the interface can run normally and achieve the expected results. Dependency review will consider issues such as system stability and version compatibility.

[0041] In this embodiment, after the interface update review process is passed, the person in charge of the business system confirms the interface branch version, the business system technicians perform interface development work according to the interface document, and the testers simultaneously perform test case development and interface testing work according to the interface document. After the overall development and testing work is completed, the system online process will detect the interface approval status, and it can only be launched online after approval, and the interface management platform interface version will be updated.

[0042] Step S3. Scan the code library regularly to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison result, the interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is checked. When the interface approval status is approved, the interface management platform interface version is updated.

[0043] In this embodiment, if there is no difference in the information comparison result, there is no need to update the interface. There is an information deviation between the interface branch information obtained by scanning the interface code library and the interface branch information registered on the interface management platform, including: inconsistent interface quantity, inconsistent interface definition and inconsistent interface status, etc. The approval process is triggered by the alarm mechanism. The interface manager creates a new version of the interface registration information based on the results of the evaluation process and the scanned information, and notifies each system that relies on the interface to evaluate the impact of the new version of the interface on their respective systems, as well as a work plan for adopting the new version of the interface.

[0044] Another aspect of the present invention also relates to an interface document monitoring device based on code scanning and information comparison, the structure of which is as follows: Figure 2 As shown, including:

[0045] The interface creation unit is used to write a first interface document, start an interface creation approval process, determine the interface branch version after the interface creation approval process is passed, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version;

[0046] An interface update unit is used to update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, and after the interface update approval process is passed, confirm the interface branch version, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version;

[0047] The interface comparison unit is used to periodically scan the code library to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison result, an interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is detected. When the interface approval status is approved, the interface management platform interface version is updated.

[0048] By using this system, the above-mentioned operation processing method can be executed and the corresponding technical effects can be achieved.

[0049] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all the steps in the method in the above embodiment, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, all the steps in the method in the above embodiment are implemented.

[0050] An embodiment of the present invention also provides an electronic device for executing the above method. As an implementation device of the method, the electronic device has at least a processor and a memory, and in particular, the memory stores data and related computer programs required for executing the method, such as program instructions, etc., and the processor calls the data and program in the memory to execute all steps of the implementation method and obtains the corresponding technical effect.

[0051] Preferably, the electronic device may include a bus architecture, the bus may include any number of interconnected buses and bridges, and the bus will include various circuits linked together by one or more processors and memories. The bus may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the receiver and transmitter. The receiver and transmitter may be the same component, i.e., a transceiver, providing a unit for communicating with various other systems over a transmission medium. The processor is responsible for managing the bus and general processing, while the memory may be used to store data used by the processor when performing operations.

[0052] In addition, the electronic device may further include components such as a communication module, an input unit, an audio processor, a display, and a power supply. The processor (or controller, operation control) used may include a microprocessor or other processor device and / or a logic device, which receives input and controls the operation of various components of the electronic device; the memory may be one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory, or other suitable devices, which may store the above-mentioned related data information, and may also store a program for executing related information, and the processor may execute the program stored in the memory to realize information storage or processing, etc.; the input unit is used to provide input to the processor, for example, it may be a key or a touch input device; the power supply is used to provide power to the electronic device; the display is used to display display objects such as images and text, for example, it may be an LCD display. The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal. Based on different communication technologies, multiple communication modules may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to a central processor, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.

[0053] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0054] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A system that specifies the functions of a box or multiple boxes.

[0055] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction system, which is implemented in the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0056] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps of the functions specified in a box or multiple boxes. Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the attached claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0057] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. An interface document monitoring method based on code scanning and information comparison, characterized in that: include: S1. Write the first interface document, start the interface creation approval process, after the interface creation approval process is passed, determine the interface branch version, detect the interface approval status, when the interface approval status is approved, update the interface management platform interface version; S2. Update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, the interface update approval process after passing, confirm the interface branch version, detect the interface approval status, when the interface approval status is approved, update the interface management platform interface version; S3. Scan the code library regularly to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison results, the interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is checked. When the interface approval status is approved, the interface management platform interface version is updated.

2. The method according to claim 1, characterized in that The interface creation approval process includes: architecture review, security review, error code review and performance review.

3. The method according to claim 1, characterized in that After the step S1 of determining the interface branch version, the method further includes: Carry out interface development work according to the first interface document, and carry out test case development and interface testing simultaneously.

4. The method according to claim 1, characterized in that The interface update approval process includes: dependency review, architecture review, security review, error code review and performance review.

5. The method according to claim 1, characterized in that After the step S2 of confirming the interface branch version, the method further includes: Carry out interface development work according to the second interface document, and carry out test case development and interface testing simultaneously.

6. The method according to claim 1, characterized in that The step S3 further comprises: If there is no difference in the information comparison result, the interface version will not be updated; The interface inconsistency includes: inconsistent interface quantity, inconsistent interface definition and inconsistent interface status.

7. An interface document monitoring device based on code scanning and information comparison, characterized in that: include: The interface creation unit is used to write a first interface document, start an interface creation approval process, determine the interface branch version after the interface creation approval process is passed, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version; An interface update unit is used to update the first interface document according to the updated interface management platform interface version, form a new version to be approved as the second interface document, start the interface update approval process, and after the interface update approval process is passed, confirm the interface branch version, detect the interface approval status, and when the interface approval status is approved, update the interface management platform interface version; The interface comparison unit is used to periodically scan the code library to obtain interface branch information, and compare the interface branch information obtained by scanning the interface code library with the interface branch information registered on the interface management platform. If there is a difference in the information comparison result, an interface inconsistency alarm is triggered, the interface update approval process is started, the interface branch version is confirmed, and the interface approval process status is detected. When the interface approval status is approved, the interface management platform interface version is updated.

8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store program instructions; The processor is configured to execute the method according to any one of claims 1 to 6 by calling program instructions.

10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.