Search

CN-121996521-A - Interface list generation method and system based on time sequence diagram combined with large model

CN121996521ACN 121996521 ACN121996521 ACN 121996521ACN-121996521-A

Abstract

The invention discloses a method and a system for generating an interface list based on a time sequence diagram and a large model, wherein the method comprises the steps of generating structured log information based on a target engineering file, wherein the log information is associated with interface information; filtering the log information, generating a time sequence diagram comprising interface interaction information according to the filtered log information, carrying out semantic analysis on the filtered log information based on a large language model to generate each interface function description, and generating an interface list according to the time sequence diagram and each interface function description. Based on the data processing flow, the invention automatically generates the interface function description and the time sequence diagram, reduces the manual intervention and the processing time and greatly improves the working efficiency.

Inventors

  • ZHU DUNYAO
  • LU KAIXUAN
  • LUO YUEJUN
  • ZHANG LONG

Assignees

  • 武汉光庭信息技术股份有限公司

Dates

Publication Date
20260508
Application Date
20260313

Claims (10)

  1. 1. An interface list generation method based on a time sequence diagram and a large model is characterized by comprising the following steps: generating structured log information based on the target engineering file, wherein the log information is associated with interface information; Filtering the log information; Generating a time sequence diagram comprising interface interaction information according to the filtered log information; semantic analysis is carried out on the filtered log information based on the large language model, and each interface function description is generated; and generating an interface list according to the time sequence diagram and the function description of each interface.
  2. 2. The method for generating an interface list based on a time chart combined with a large model according to claim 1, wherein the structured log information comprises a plurality of log records with consistent formats, and each log record comprises an interface call and return type, an interface name, a file name to which the interface belongs and a code line number to which the interface belongs.
  3. 3. The method for generating an interface list based on a timing diagram combined with a large model according to claim 2, wherein said filtering said log information comprises screening log records associated with a log generation flow from said log information; Presetting an exclusion condition, wherein the exclusion condition is target interface information to be excluded in log records; And filtering the log records according to the exclusion condition.
  4. 4. The method for generating an interface list based on a timing diagram combined with a large model according to claim 2, wherein the generating the timing diagram including the interface interaction information based on the filtered log information comprises: Extracting a file path of a file name of the interface in each log record, taking the nth grade of directory reciprocal in the file path as a component name and taking the file name of the interface as a unit name; generating an arrow representing the relation of each component in the time sequence diagram according to the interface calling and returning types; and generating a time sequence diagram conforming to PlantUML format according to the arrows of each interface, each unit name and each component relation.
  5. 5. The interface list generating method based on the timing diagram and the large model according to claim 4, wherein the generating the arrow representing the relation of each component in the timing diagram according to the interface call and the return type comprises: Defining two interfaces as a first interface and a second interface; When a component corresponding to the first interface calls the second interface corresponding to another component, the relation of the two components is marked by a calling arrow; when the components corresponding to the second interface finish operation and return an operation result to the components corresponding to the first interface, marking the two components by using a return arrow; and ensuring that the matching relation between the call and the returned arrow between the first interface and the second interface is correct based on a call stack.
  6. 6. The interface list generating method based on the timing diagram and the large model according to claim 2, wherein the generating each interface function description based on the semantic analysis of the filtered log information by the large language model comprises: For the code line number of the interface in each log record, intercepting the front m lines and the rear m lines of the code line number of the interface to obtain a target interface line number; and generating functional description of each interface by using a large language model according to the corresponding target interface line number of each log record and the analysis rule of each interface.
  7. 7. The interface list generating method based on the timing diagram and the large model according to claim 2, wherein the generating the interface list according to the timing diagram and the interface function descriptions comprises: And capturing the call return relation of each interface by traversing the time sequence diagram, and associatively matching the function description of each interface to generate an interface list corresponding to each interface and comprising an interface name, a component name, a call object, a return object, a function description and a code line number of the interface.
  8. 8. An interface schedule generation system based on a timing diagram in combination with a large model, comprising: the log generation module is used for generating structured log information based on the target engineering file, and the log information is associated with interface information; the filtering module is in communication connection with the log generating module and is used for filtering the log information; The time sequence diagram generating module is in communication connection with the filtering module and is used for generating a time sequence diagram comprising interface interaction information according to the filtered log information; the semantic analysis module is in communication connection with the filtering module and is used for carrying out semantic analysis on the filtered log information based on the large language model to generate functional description of each interface and And the interface table generating module is in communication connection with the timing diagram generating module and the semantic analysis module and is used for generating an interface list according to the timing diagram and each interface function description.
  9. 9. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the interface list generation method based on a timing diagram in combination with a large model as claimed in any one of claims 1 to 7.
  10. 10. An electronic device comprising a storage medium, a processor and a computer program stored in the storage medium and executable on the processor, characterized in that the processor implements the interface checklist generation method based on a timing diagram in combination with a large model according to any one of claims 1 to 7 when the computer program is executed by the processor.

Description

Interface list generation method and system based on time sequence diagram combined with large model Technical Field The invention relates to the technical field of software development operation and maintenance, in particular to a method and a system for generating an interface list based on a time sequence diagram and a large model. Background In modern software development and operation, interface checklists are important tools for analyzing system functions, understanding interactions between modules, and managing interface information. Conventional interface checklist generation methods typically rely on manually analyzing code logic, log files, or requirements documents, and therefore have the following problems: 1. the manual generation of the interface list requires the developer to understand the code logic and module interactions of the system in depth, and the process is cumbersome, time consuming and labor consuming, especially for complex systems, and requires significant time and labor costs to generate and maintain the interface list. 2. The method is easy to make mistakes, and due to the complexity of manual analysis, a developer may miss key interface information or generate errors when combing interface relations, so that the generated result is inaccurate, and further the subsequent development and maintenance work is affected. 3. The traditional method is difficult to quickly adapt to the update of the system or the change of the log format. When a system change occurs, the interface list needs to be regenerated or manually maintained, which clearly further increases maintenance costs. Disclosure of Invention The invention provides a method and a system for generating an interface list based on a time sequence diagram combined with a large model, which automatically generate interface function description and the time sequence diagram, reduce manual intervention and processing time and greatly improve working efficiency. In a first aspect, a method for generating an interface list based on a timing diagram combined with a large model is provided, including: generating structured log information based on the target engineering file, wherein the log information is associated with interface information; Filtering the log information; Generating a time sequence diagram comprising interface interaction information according to the filtered log information; semantic analysis is carried out on the filtered log information based on the large language model, and each interface function description is generated; and generating an interface list according to the time sequence diagram and the function description of each interface. In some embodiments, the structured log information includes a plurality of log records with consistent formats, and each log record includes an interface call and return type, an interface name, a file name to which the interface belongs, and a code line number to which the interface belongs. In some embodiments, the filtering the log information includes screening log records associated with a log generation process from the log information; Presetting an exclusion condition, wherein the exclusion condition is target interface information to be excluded in log records; And filtering the log records according to the exclusion condition. In some embodiments, the generating a timing diagram including interface interaction information according to the filtered log information includes: Extracting a file path of a file name of the interface in each log record, taking the nth grade of directory reciprocal in the file path as a component name and taking the file name of the interface as a unit name; generating an arrow representing the relation of each component in the time sequence diagram according to the interface calling and returning types; and generating a time sequence diagram conforming to PlantUML format according to the arrows of each interface, each unit name and each component relation. In some embodiments, the generating an arrow representing the relationship between the components in the timing diagram according to the interface call and return types includes: Defining two interfaces as a first interface and a second interface; When a component corresponding to the first interface calls the second interface corresponding to another component, the relation of the two components is marked by a calling arrow; when the components corresponding to the second interface finish operation and return an operation result to the components corresponding to the first interface, marking the two components by using a return arrow; and ensuring that the matching relation between the call and the returned arrow between the first interface and the second interface is correct based on a call stack. In some embodiments, the semantic parsing of the filtered log information based on the large language model generates each interface function description, including: For the code line nu