Structured template specification interface class demand analysis and automatic development system
Through structured templates to standardize interface requirements analysis and automatic development system, the complexity of multi-system platform interface requirements analysis and development testing is solved, efficient interface design and development is achieved, and development efficiency and quality are improved.
Patent Information
- Application Number
- CN202510140060.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the functional development and subsequent maintenance of the existing technology, the complexity of multi-system platform interface requirements analysis and development testing is not effectively solved, resulting in high communication costs, low development efficiency, and the inability to fully cover abnormal situations and complex business logic.
Provides a structured template specification interface requirements analysis and automatic development system, including requirements management units, interface design units, interface management units and document generation units, through which requirements analysis, interface design, history management and automated document generation are realized.
By automatically generating requirements analysis, interface specifications, demonstration messages and some general codes, the joint debugging problem is reduced, development efficiency is improved, and implementation cycles are shortened. The interface requirement analysis has problems such as inconsistent specifications and long development time for parameter verification.
Smart Images

Figure CN120066458A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of IT support, and particularly relates to a structured template specification interface class requirements analysis and automatic development system. Background Art
[0002] During the process of function development and subsequent maintenance, the implementation of some functions depends on the services provided by multiple system platforms. The requirements analysis and development testing of such requirements are different from conventional requirements. Moreover, due to the non-standardization of interface documents and the deviation in the understanding of the provided documents between the two parties in joint debugging, it often increases a lot of meaningless communication and test development costs. Although the existing technologies provide solutions such as standardized interface documents, automated tools, entity class automatic development methods, and requirements analysis methods, there are still problems such as being unable to generate requirements analysis documents and demonstration messages in advance, being unable to fully cover abnormal situations, only being able to optimize existing code, being unable to understand complex business logics, and lacking the generation of interface design documents. Summary of the Invention
[0003] The purpose of the present invention is to provide a structured template specification interface class requirements analysis and automatic development system to solve the problems existing in the above-mentioned prior art.
[0004] To achieve the above purpose, the present invention provides a structured template specification interface class requirements analysis and automatic development system, including:
[0005] A requirements management unit for creating, editing, querying, and version management of requirements;
[0006] An interface design unit for performing interface design, where the interface design includes message structure design, parameter information management, entity class code generation, verification code generation, message generation, and interface information saving;
[0007] An interface management unit for providing management and query functions for the interface design history;
[0008] A document generation unit for automatically generating interface class requirements analysis documents.
[0009] Optionally, the requirements management unit specifically includes:
[0010] A requirements creation module for inputting the requirement name and the corresponding usage scope;
[0011] A requirements editing module for modifying requirement information;
[0012] A requirements query module for locating historical design interfaces according to fuzzy search;
[0013] A version management module for automatically recording the change history of requirements. The change history of requirements includes version numbers, change contents, and change times.
[0014] Optionally, the requirement creation module is further configured to input the description and term definition corresponding to the requirement name.
[0015] Optionally, the interface design unit specifically includes:
[0016] A message structure module for defining the communication protocol, character encoding, request method, request parameters, and response parameters of the interface;
[0017] A parameter information module for designing the parameter name, parameter type, parameter length, Chinese parameter name, parameter description, whether it is required, and value range of business parameters:
[0018] An entity class generation module for automatically generating entity class codes according to parameter information;
[0019] A parameter verification module for generating verification codes according to whether the parameter is required and the value range;
[0020] A message generation module for generating a demonstration message that fully complies with the specification according to the parameter name, parameter type, whether it is required, and value range of the parameter; generating test messages that trigger each error code according to whether the parameter is required and the value range;
[0021] An interface information saving module for saving interface information and supporting the addition and modification of custom fields.
[0022] Optionally, the interface management unit specifically includes:
[0023] An interface list query module for constructing a requirement list to display interface names and service descriptions, and supporting fuzzy search to locate historical interface designs;
[0024] An interface change management module for recording the change history of the interface. The change history of the interface includes version numbers, change contents, and change times.
[0025] Optionally, the document generation unit specifically includes:
[0026] A cover generation module for generating a cover, which includes the requirement name and interface version number;
[0027] A requirement information filling module for filling in the usage scope, description, and term definition according to requirement information;
[0028] An interface description generation module for generating the document content of the request structure, request parameters, and response parameters according to the information of the message structure module;
[0029] A service specification generation module, which is used to fill in the service specification according to the interface information, and the service specification includes interface constraints and service descriptions;
[0030] An appendix and document output module, which is used to output appendix content and a requirements analysis interface document.
[0031] Optionally, the service specification generation module specifically includes:
[0032] An interface constraint sub-module, which is used to generate the type and meaning of field constraints according to a preset template;
[0033] An interface description sub-module, which is used to generate an interface description, and the interface description includes service description explanations, service attribute explanations, request parameter explanations, response parameter explanations, and interface sample explanations.
[0034] Optionally, the system further includes a log and change record unit, and the log and change record unit is used to record system usage logs and requirements and interface change records, and provide log query and change traceability functions.
[0035] The technical effects of the present invention are as follows:
[0036] The present invention automatically generates requirements analysis, interface specifications, demonstration messages, and some general-purpose codes according to the actual requirements of the interface, reduces the joint debugging problems caused by interface specifications, improves the development efficiency of developers, and shortens the implementation cycle. The present invention not only has an interface testing function, but also supplements various application environments according to the analysis document, and can generate analysis documents, classes, and verification codes according to the needs of users. Through the general process from structured design to automatic code generation, the problems of inconsistent specifications in interface class requirements analysis, long time-consuming development for interface class parameter verification, low development efficiency, and unclear response information are solved, making the interface design to development more standardized, formatted, and automated, and capable of improving quality and efficiency. Description of the Drawings
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0038] The drawings forming a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation of this application. In the drawings:
[0039] Figure 1 It is a schematic diagram of the system structure in the embodiment of the present invention. Detailed Implementation Modes
[0040] The various exemplary implementation modes of the present invention will now be described in detail. This detailed description should not be construed as a limitation on the present invention, but rather as a more detailed description of certain aspects, features, and implementation schemes of the present invention.
[0041] It should be understood that the terms described in the present invention are only for describing specific implementation modes and are not used to limit the present invention. Additionally, for the numerical ranges in the present invention, it should be understood that each intermediate value between the upper and lower limits of the range is also specifically disclosed. Each intermediate value within any stated value or stated range, as well as each smaller range between any other stated value or intermediate value within the stated range, is also included in the present invention. The upper and lower limits of these smaller ranges may be independently included or excluded from the range.
[0042] Without departing from the scope or spirit of the present invention, various improvements and changes can be made to the specific implementation modes of the description of the present invention, which are obvious to those skilled in the art. Other implementation modes obtained from the description of the present invention are obvious to those skilled in the art. The description and examples in this application are merely exemplary.
[0043] Regarding the terms "comprising", "including", "having", "containing", etc. used herein, they are all open-ended terms, meaning including but not limited to.
[0044] It should be noted that, without conflict, the embodiments and features in the embodiments of this application can be combined with each other. The following will detail this application with reference to the accompanying drawings and in combination with the embodiments.
[0045] Embodiment 1
[0046] As Figure 1 shown, in this embodiment, a structured template specification interface class requirement analysis and automatic development system is provided, including:
[0047] A requirement management unit for creating, editing, querying, and version managing requirements;
[0048] An interface design unit for performing interface design, where the interface design includes message structure design, parameter information management, entity class code generation, verification code generation, message generation, and interface information saving;
[0049] An interface management unit for providing management and query functions for the interface design history;
[0050] A document generation unit for automatically generating interface class requirement analysis documents.
[0051] This embodiment proposes a general process and application implementation system from structured design to automatic code generation. During the implementation process of the interfaces that need to be jointly debugged and tested with external systems, a general, simple, and easy-to-modify tool is provided based on a structured template. This tool automatically generates requirement analysis, interface specifications, demonstration messages, and some general code according to the actual requirements of the interfaces, reduces the joint debugging problems caused by interface specifications, improves the development efficiency of developers, and shortens the implementation cycle.
[0052] To facilitate the generation of requirement analysis documents and the categorization of interfaces, existing requirements need to be created or selected before using the system tool. Subsequent series of operations are based on the requirements. When creating requirements, the requirement name, usage scope, description, and term definition need to be input. Among them, the requirement name and usage scope are mandatory items, and the rest are non-mandatory. Multiple term definitions are allowed to be input, and the requirement information part supports modification. The requirement name cannot be repeated.
[0053] On this basis, the tool consists of the following three parts:
[0054] 1. Interface design part:
[0055] 1.1. Message structure module: Under the same requirement, the request structure should be unified, including: communication protocol, character encoding, request method, request parameters, response parameters, etc. Multiple parameters are supported to be set in the parameter part, and each line needs to include name, type, length, whether it is mandatory, and description. It should be noted that these parameters are only the common parameters for requests and responses. See the parameter information module for business parameters.
[0056] 1.2. Parameter information module: The requirement personnel design the parameter name, parameter type, parameter length, Chinese parameter name, parameter description, whether it is mandatory, and value range of business parameters:
[0057] 1.2.1. If the parameter type is a mandatory field, the tool will provide corresponding common enumeration values, such as String, Integer, Boolean, List, etc.;
[0058] 1.2.2. Whether it is mandatory is a mandatory field, and the enumeration values include: yes, no, associated parameter. When selecting the associated parameter, a dropdown of the filled parameters will be displayed, and at least one needs to be selected, indicating that when all the selected parameters are filled, the current parameter is mandatory, otherwise it is non-mandatory.
[0059] 1.2.3. The value range is a non-mandatory field, and the tool provides two input methods:
[0060] ① If the value range is not limited to numerical types or there are few enumeration values, separate the enumeration values with English commas;
[0061] ②It is only numerical or has a wide range, supporting the union of one or more intervals, such as (0,9] ∪ [100,200), [3000,3030] and other forms.
[0062] 1.2.4. The parameter name, Chinese parameter name, description and requirements are all required fields, which should be combined with the actual application scenario and be concise and unambiguous for easy understanding by readers.
[0063] 1.3. Entity class display module: According to the current provided specification requirements, this tool can generate entity class code that fully meets the current input parameter requirements and output files.
[0064] 1.4. Parameter verification module: This tool will generate required field and value range verification codes that meet the conditions according to whether the parameters entered by the requester are required and the value range, and output files. At the same time, it will generate response messages in the following examples based on a standardized template and list the error codes and error descriptions of the parameter verification module:
[0065] {"errCode":"00002","resultDesc":"Required field XX is empty","retCode":"01"}
[0066] {"errCode":"00003","resultDesc":"Field XX exceeds the value range","retCode":"01"}
[0067] Table 1 Encoding and corresponding descriptions
[0068]
[0069]
[0070] 1.5. Generated message module: This tool provides two ways to generate messages, namely generating a demonstration message and generating a test message. Clicking to generate a demonstration message will generate a request message that fully complies with the specification according to the parameter name, parameter type, whether it is required, and the value range; clicking to generate a test message will generate request messages that trigger each error code according to whether it is required and the value range and output them as files for self-test reference.
[0071] 1.6. Interface information module: It can be used to save interface-related information including interface name, service description, proposed interface address, request method, service user, provider, etc. Except for the interface name, service description, proposed interface address, and request method, the remaining fields support custom addition and modification, and can be viewed after clicking save.
[0072] 2. Interface List Query Section: This section records the saved historical interface designs. Only the interface name and service description are shown on the list page, and it supports quickly locating the historical design interfaces for browsing or modification operations through fuzzy search.
[0073] 3. Generating Interface Class Requirement Analysis Document Section:
[0074] This tool supports requirement personnel to check the saved interfaces. After clicking to generate the requirement analysis document, it reads the requirement information and generates and outputs the interface class requirement analysis document based on the structured template and interface-related data. The specific process is as follows:
[0075] Step 1: Fill in the overview part of the template with the basic requirement information, including:
[0076] ① Cover Page: XXX Business Interface Specification. Fill in the requirement name in this part; the version number is automatically updated according to the number of words in the generated interface specification in the record.
[0077] ② Historical Record: It includes serial number, change content, version number, and version date. The change content is initially defaulted to the first draft, and then it compares with the interfaces selected during the previous export. For example, 'Deleted interfaces: XX, XX, New interfaces: XXX'. For interfaces that exist in both versions, if the change time is between the two version dates, then 'Updated interface: XX' is added to the change content. In addition, check whether the requirement name and usage scope have been modified between the two version dates, and if so, display them in the historical record together; the version date is the time when the requirement interface document is generated each time.
[0078] Step 2: Fill in the usage scope, description, and term definitions according to the requirement information: These are the first three chapters. The description and term definitions can be empty. If the term definitions exist, they will be shown in tabular form.
[0079] Step 3: Complete the filling of the interface description through the information in the message structure module, specifically including: request structure, request parameters, and response parameters. The request structure part corresponds to the communication protocol, character encoding, and request method. The request parameters and response parameters will be shown in tabular form.
[0080] Step 4: Read the interface information in sequence to complete the filling of the service specification. The service specification consists of two parts:
[0081] ① Interface Constraints: This part generates the representation of field constraint types and meanings according to the template.
[0082] ② Interface Description: The section titles in the interface description are taken from the interface names in each interface information. For each interface specification, it is further divided into:
[0083] Service Description: Taken from the service description filled in the interface information;
[0084] Service attributes: Obtained from the proposed interface address, request method, service user, provider, and other interface-related information filled in the interface information. This part is presented in tabular form;
[0085] Request parameters: Read from the parameter information module and presented in tabular form. The table headers include parameter name, Chinese parameter name, parameter type, parameter length, and description. Among them, parameter description, whether it is required, and value range are all filled in the description;
[0086] Response parameters: Here, the general response message body structure and the error codes and error messages listed in the parameter verification module are presented.
[0087] Interface example: This part of the request message only shows the demonstration message that can pass the verification correctly, and the response message will show examples of passing and not passing respectively.
[0088] Step 5: Directly output the appendix content provided by the provided structured template, such as organization code, provincial company code, attachment type, etc.
[0089] Step 6: Output the interface document for requirements analysis.
[0090] Meanwhile, during the process of using this tool, the usage logs and change records of various types of information in the requirements will be detailed for reference.
[0091] This embodiment not only has the interface testing function, but also supplements various application environments according to the analysis document, and can generate analysis documents, classes, and verification codes according to the needs of users. Through the general process from structured design to automatic code generation, it solves the problems of inconsistent specifications in interface class requirements analysis, long time consumption, low development efficiency, and unclear response information in interface class parameter verification development, making the interface design to development more standardized, formatted, and automated, improving quality and efficiency.
[0092] Meanwhile, the tool interaction interface implemented based on this method is designed to be user-friendly, easy to understand and use, reducing the complexity of interface class requirement implementation and being easily understood and accepted.
[0093] Beneficial effects of this embodiment:
[0094] 1. Efficiency improvement and cost savings:
[0095] Automated requirements analysis and design. Through automated interface requirements analysis, the time for manual document writing is reduced, and the preparation efficiency before development is improved.
[0096] Rapid development and iteration: The templated and automated development methods significantly reduce development time, accelerate development efficiency, and shorten the function implementation cycle.
[0097] Reduce labor costs: Automated processes reduce the need for manual labor, especially in the requirements analysis and preliminary development stages, effectively controlling labor costs.
[0098] 2. Quality and consistency assurance:
[0099] Standardized development process: Ensure that all interfaces follow unified specifications, improving code quality and system stability.
[0100] Reduce errors and rework: The automated process reduces human errors and decreases the rework rate caused by misunderstandings in requirements.
[0101] 3. Enhance team collaboration and project management:
[0102] Clear documentation and communication: Automatically generated specification documents facilitate information sharing among team members, improving communication efficiency.
[0103] 4. Customer satisfaction and market competitiveness:
[0104] Able to quickly respond to market changes: A faster development cycle means being able to respond more promptly to market and customer needs, enhancing customer satisfaction and improving market competitiveness.
[0105] 5. Long-term maintenance and scalability: Easy to maintain and upgrade: Standardized code and interface designs make later maintenance and upgrade work easier; Flexible system expansion: Structured templates and interface designs provide a flexible foundation for future system expansion.
[0106] By implementing this structured template to standardize interface class requirements analysis and the automatic development method, enterprises can not only significantly improve internal operation efficiency but also enhance external market competitiveness, achieving sustainable business growth.
[0107] As described above, it is only the preferred specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by this application should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A structured template specification interface class requirements analysis and automatic development system, characterized in that: include: Requirements management unit, used to create, edit, query and version requirements; An interface design unit, used for performing interface design, wherein the interface design includes message structure design, parameter information management, entity class code generation, verification code generation, message generation and interface information storage; An interface management unit, used to provide management and query functions of interface design history; Document generation unit, used to automatically generate interface requirement analysis documents.
2. A structured template specification interface class requirement analysis and automatic development system according to claim 1, characterized in that: The demand management unit specifically includes: The requirement creation module is used to input the requirement name and the corresponding scope of use; Demand editing module, used to modify demand information; Demand query module, used to locate historical design interfaces based on fuzzy search; The version management module is used to automatically record the change history of requirements. The change history of requirements includes version number, change content and change time.
3. A structured template specification interface class requirement analysis and automatic development system according to claim 2, characterized in that: The requirement creation module is also used to input descriptions and term definitions corresponding to the requirement name.
4. A structured template specification interface class requirement analysis and automatic development system according to claim 1, characterized in that: The interface design unit specifically includes: The message structure module is used to define the communication protocol, character encoding, request method, request parameters and response parameters of the interface; The parameter information module is used to design the parameter name, parameter type, parameter length, parameter Chinese name, parameter description, whether it is required, and value range of business parameters: Entity class generation module, used to automatically generate entity class code based on parameter information; Parameter verification module, used to generate verification code according to whether the corresponding parameter is required and the value range; The message generation module is used to generate a sample message that fully complies with the specification according to the parameter name, parameter type, whether it is required and the value range of the parameter; and to generate a test message that triggers each error code according to whether the parameter is required and the value range; The interface information saving module is used to save interface information and supports the addition and modification of custom fields.
5. A structured template specification interface class requirement analysis and automatic development system according to claim 1, characterized in that: The interface management unit specifically includes: Interface list query module, used to build a requirement list to display interface names and service descriptions, and supports locating historical interface designs using fuzzy search; The interface change management module is used to record the interface change history, which includes the version number, change content and change time.
6. A structured template specification interface class requirement analysis and automatic development system according to claim 1, characterized in that: The document generation unit specifically includes: A cover generation module, used to generate a cover, wherein the cover includes a requirement name and an interface version number; The requirement information filling module is used to fill in the scope of use, instructions and term definitions according to the requirement information; The interface description generation module is used to generate the document content of the request structure, request parameters and response parameters according to the message structure module information; A service specification generation module, used to fill in the service specification according to the interface information, wherein the service specification includes interface constraints and service descriptions; Appendix and document output module, used to output appendix content and requirement analysis interface documents.
7. A structured template specification interface class requirement analysis and automatic development system according to claim 6, characterized in that: The service specification generation module specifically includes: The interface constraint submodule is used to generate the type and meaning of field constraints according to the preset template; The interface description submodule is used to generate an interface description, which includes a service description, a service attribute description, a request parameter description, a response parameter description and an interface sample description.
8. A structured template specification interface class requirement analysis and automatic development system according to claim 1, characterized in that: It also includes a log and change recording unit, which is used to record system usage logs and requirements, interface change records, and provide log query and change tracing functions.