A platform layer code generation method, device, electronic device and storage medium

By associating interface management with code generation tools to generate platform layer code, it solves the problem of developers duplicating work and improves development efficiency and tool interoperability.

CN112380281BActive Publication Date: 2024-10-18CHINA LIFE INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011192998.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-30
Publication Date
2024-10-18
Estimated Expiration
2040-10-30

AI Technical Summary

Technical Problem

In the existing technology, interface management and code generation tools are not connected to each other, causing developers to perform a lot of repetitive work during project development, which reduces work efficiency.

Method used

Enter the interface information of the platform layer through the preset interface management tool, save it in the database, read the information to be supplemented, connect the development tool to generate a new project, display the interface information and add input boxes, save the supplementary information to the corresponding database, and use the template engine Generate platform layer code to realize the association between interface management and code generation.

Benefits of technology

It reduces the repetitive work of project developers, improves work efficiency, reduces learning costs and development cycles, and realizes the interoperability of interface management and code generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112380281B_ABST
    Figure CN112380281B_ABST
Patent Text Reader

Abstract

One or more embodiments of this specification provide a platform layer code generation method, device, electronic device and storage medium; including: entering the interface information of the platform layer through a preset interface management tool, and saving the interface information into a first database; reading the interface information in the first database through the interface management tool to obtain the information to be supplemented; connecting the development tool with the interface management tool to obtain a link containing the information to be supplemented, and generating a new project based on the link; displaying the interface information through the new project, and adding an information input box in the new project to obtain supplementary information; according to the type of supplementary information, saving the supplementary information into the corresponding database to obtain complete data of the platform layer; based on the complete data, using a template engine to generate the platform layer code. The combination of interface management tools and program development tools reduces the repetitive work of program developers and improves work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of code generation technology, and in particular, to a platform layer code generation method, device, electronic device and storage medium. Background Art

[0002] At present, the fields of interface management and code generation are not connected to each other and can only be operated separately. In terms of interface management tools, the main focus is on interface document generation and mock dynamic generation of simulation data, mainly to improve collaboration efficiency. In terms of code generation, it is mainly based on the database table structure to generate the corresponding Java code, reduce duplication of work, and improve development efficiency. When developing a new project, for interface management, generally choose from the existing interface tools, choose a suitable interface management tool to manage the interface; and when generating code, choose from the current existing code generation technology; because interface management and code generation are not implemented by the same tool, there is little correlation; at the same time, there are many overlapping contents between interface management and code generation. When performing interface management and code generation, a lot of duplication of work will be generated, slowing down the work progress of developers.

[0003] Based on this, a code generation method is needed that can effectively reduce the repetitive work of project developers and help developers improve efficiency. Summary of the invention

[0004] In view of this, the purpose of one or more embodiments of this specification is to propose a platform layer code generation method, device, electronic device and storage medium to solve the problems of high repetitiveness and low efficiency of developers' work in the current code generation process.

[0005] Based on the above purpose, one or more embodiments of this specification provide a platform layer code generation method, including:

[0006] Entering the interface information of the platform layer through a preset interface management tool, and saving the interface information into a first database;

[0007] Reading the interface information in the first database through the interface management tool to obtain the information to be supplemented;

[0008] Connecting the development tool with the interface management tool to obtain a link containing the information to be supplemented, and generating a new project according to the link;

[0009] Displaying the interface information through the new project, and adding an information input box in the new project to obtain supplementary information;

[0010] According to the type of the supplementary information, the supplementary information is saved in a corresponding database to obtain complete data of the platform layer;

[0011] The platform layer code is generated using a template engine according to the complete data.

[0012] Based on the same inventive concept, one or more embodiments of this specification further provide a platform layer code generation device, including:

[0013] An interface entry module is configured to enter the interface information of the platform layer through a preset interface management tool and save the interface information into a first database;

[0014] An information prompt module is configured to read the interface information in the first database through the interface management tool to obtain information to be supplemented;

[0015] A first generating module is configured to connect the development tool with the interface management tool, obtain a link containing the information to be supplemented, and generate a new project according to the link;

[0016] an information input module, configured to display the interface information through the new project and add an information input box in the new project to obtain supplementary information;

[0017] An information saving module is configured to save the supplementary information into a corresponding database according to the type of the supplementary information, so as to obtain complete data of the platform layer;

[0018] The second generating module is configured to generate the platform layer code using a template engine according to the complete data.

[0019] Based on the same inventive concept, one or more embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the methods described above when executing the program.

[0020] Based on the same inventive concept, one or more embodiments of the present specification also provide a non-transitory computer-readable storage medium, characterized in that the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute any of the methods described above.

[0021] From the above, it can be seen that the platform layer code generation method, device, electronic device and storage medium provided in one or more embodiments of this specification, based on interface management tools and project development languages ​​combined with different types of databases, associate interface management and code generation, and automatically generate some related fixed process codes. Project developers only need to focus on their own business logic, thereby improving the work efficiency of project developers. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate one or more embodiments of the present specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0023] Figure 1 A schematic diagram of a flow chart of a platform layer code generation method in one or more embodiments of this specification;

[0024] Figure 2 A schematic diagram of a platform layer code generation device in one or more embodiments of this specification;

[0025] Figure 3 This is a schematic diagram of the structure of an electronic device in one or more embodiments of this specification. DETAILED DESCRIPTION

[0026] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0027] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in one or more embodiments of this specification should be understood by people with ordinary skills in the field to which this disclosure belongs. The words "first", "second" and similar words used in one or more embodiments of this specification do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprises" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects.

[0028] As described in the background technology section, the interface management tool mainly realizes the generation of interface documents and the dynamic generation of simulation data by mock, which can effectively improve the collaboration efficiency; code generation mainly generates corresponding Java code based on the data table structure to reduce duplication of work and improve development efficiency. By combining interface management and code generation, a complete project can be divided into a platform layer and a content layer. The business logic is placed in the content layer, and the platform layer is mainly responsible for fixed functions such as code table conversion, input parameter verification, and exception handling. The code of the fixed process is automatically generated, and the project developers only need to focus on the business logic; when the code is to be generated, it needs to be generated according to the interface information. At the same time, the interface management tool and the program development tool are not interoperable. The project developers need to copy and paste the required information multiple times, resulting in a lot of duplication of work and reducing the work efficiency of the project developers.

[0029] In the development of new projects, there are generally two solutions to achieve code generation: the first solution is to choose an existing interface management tool with good usability and expand it based on the interface management tool. The premise of expansion is to be familiar with the development language of the interface management tool. The learning cost of this solution is very high, and the expansion is also quite difficult, and it is easy to have bugs that are difficult to solve; the second solution is to develop a brand new code generation system. This solution is difficult to develop and has a long development cycle, resulting in serious waste of manpower, financial resources, and material costs. A method is needed that can manage interfaces and avoid duplication of work in code generation to improve the work efficiency of project developers.

[0030] In response to the problems existing in the above-mentioned technology and based on the findings of the aforementioned applicant, one or more embodiments in this specification provide a platform layer code generation method, which first enters the interface information of the platform layer through a preset interface management tool and saves the interface information in a first database; reads the interface information in the first database through the interface management tool, and obtains a prompt page containing information to be supplemented according to the fixed functions in the interface information; then connects the development tool to the interface management tool, obtains the information to be supplemented according to the prompt page, generates a new project according to the information to be supplemented, displays the interface information through the new project, adds an information input box to the new project, completes the addition of the information to be supplemented through the information input box, and obtains the supplementary information; finally, according to the type of supplementary information, saves the supplementary information into the corresponding MySQL database and MongoDB database, completes the data storage, and obtains the complete data of the platform layer; the freemarker template engine generates the platform layer code according to the complete data.

[0031] The technical solutions of one or more embodiments of this specification are further described in detail below through specific examples.

[0032] refer to Figure 1 One or more embodiments of this specification provide a platform layer code generation method, comprising the following steps:

[0033] Step S101: input the interface information of the platform layer through a preset interface management tool, and save the interface information into a first database.

[0034] In this embodiment, when the development of a new project is completed, it is necessary to enter the interface information of the platform layer through the interface management tool, and the interface management tool is to select from the existing tools and select the interface tool that best suits the project. The first database is the MongoDB database; MongoDB is a database based on distributed file storage. Written in C++, the core of the MongoDB database is to provide a scalable, high-performance data storage solution for WEB applications. MongoDB is a product between relational databases and non-relational databases. It is the most feature-rich and relational database among non-relational databases. The data structure it supports is very loose, in a bson format similar to json, so it can store more complex data types. The biggest feature of Mongo is that the query language it supports is very powerful, and its syntax is somewhat similar to an object-oriented query language. It can almost achieve most of the functions of single-table queries similar to relational databases, and it also supports indexing of data.

[0035] As an embodiment, in terms of interface management tools, the main purpose is to realize interface document generation and mock dynamic generation of simulation data, mainly to improve collaboration efficiency. Commonly used interface management tools include Swagger, RAP, DOClever, etc.; Swagger is a RESTFUL interface document online automatic generation + functional testing software, which is a standardized and complete framework, standard, language-independent, used to generate, describe, call and visualize RESTful-style Web services; RAP comes from Alibaba, and is a visual interface management tool that analyzes the interface structure, uses mock to dynamically generate simulation data, verifies the correctness of the real interface, and improves our collaboration efficiency through a series of automated tools around the interface definition; DOClever is an open source and free visual interface management tool, a professional api interface management system, and a preferred interface management platform in the mobile era that integrates interface documents, interface automated testing, Mock data, team collaboration, and interface snapshots. This application uses the DOClever interface management tool to receive and enter interface information, where the interface information includes the interface name and interface document.

[0036] Step S102: Read the interface information in the first database through the interface management tool to obtain information to be supplemented.

[0037] In this embodiment, the interface management tool reads the data table in the first database to obtain the interface information of the platform layer; the interface management tool first detects the interface information to obtain the detection result, and the detection result includes the interface information missing from the project.

[0038] As an optional embodiment, a jump link is added to the interface management tool, and the jump link contains data related to the information to be supplemented and a sorting ID of the information to be supplemented.

[0039] Step S103: connect the development tool with the interface management tool to obtain a link containing the information to be supplemented, and generate a new project according to the link.

[0040] In this embodiment, the development tool Java is connected to the interface management tool DOClever. At the same time, the development tool Java is also connected to the information to be supplemented. At this time, a jump link is added to the interface management tool DOClever. The jump link contains the information to be supplemented and is connected to the development tool Java. Click the jump link, and the development tool generates a new project PDMT based on the information to be supplemented in the jump link as the primary key. The new project uses the MySQL database for data storage. The MySQL database is an open source relational database management system that uses the most commonly used database management language - structured query language for database management. It has attracted much attention due to its speed, reliability and adaptability, and is loved by program developers.

[0041] As an optional embodiment, the generation of the new project may also be implemented using development languages ​​such as C++ or C#.

[0042] Step S104: display the interface information through the new project, and add an information input box in the new project to obtain supplementary information.

[0043] In this embodiment, the primary key in the new project reads the interface information entered in the first database, and displays the interface information through the new project; according to the information to be supplemented, the information to be supplemented is input through the information input box to obtain the supplementary information. The implementation of the interface input function relies on the open source product DOClever. Since the front end of its interface management tool is implemented using VUE, if the code generation function is directly added on the original basis and expanded on the original project, the learning cost is relatively high. In this embodiment, the new project expansion is adopted outside the project to reduce the learning cost, but in order to ensure that the update operations between the two can be interoperable, the display of the new project relies on the original project database data, which solves the problem of non-intercommunication between the original interface management tool and the development tool, and realizes a solution for rapid expansion of open source products, shortening the development cycle.

[0044] Step S105: According to the type of the supplementary information, the supplementary information is saved in a corresponding database to obtain complete data of the platform layer.

[0045] In this embodiment, the supplementary information includes public information and field information; the public information is stored in a MySQL database connected to the new project and can be used in subsequent presentations, reducing the work of project developers; the field information is supplementary information for field data, including information on java types and constraint classes. This part of information is spliced ​​into the remark remarks of each attribute in the interface management tool by splicing the supplementary field information. The interface management tool is connected to the MongoDB database, so that the field information is stored in the MongoDB database, thereby realizing the update and intercommunication of the interface management tool and the development tool.

[0046] As an optional embodiment, the new project PDMT can not only supplement the information in the MongoDB database, but also query the interface information from the MongoDB database according to the storage ID and save the extended field information.

[0047] Step S106: Generate the platform layer code using a template engine according to the complete data.

[0048] In this embodiment, the template engine freemarker is used to read data from the first database and the second database respectively, and the data in the first database and the second database are integrated to obtain the complete data. The template engine freemarker is a Java class library that can be embedded in the components of the development product when used, and then is a general tool for generating output text based on the template and the data to be changed.

[0049] As an optional embodiment, the platform layer code generation method provided in one or more embodiments of the present specification uses a preset open source interface management tool DOClever to enter the interface information in the project, and saves the interface information in a MongoDB database, and reads the information in the interface information to obtain prompt information of the information to be supplemented; connects the development tool with the interface management tool to obtain a link containing the information to be supplemented, and uses the information to be supplemented in the link as the primary key to generate a new project; displays the interface information through the new project, and creates a new information input box in the new project, and the information input box is used to enter the supplementary information; wherein, the supplementary information is first classified, and the types of the classified supplementary information are stored in a MySQL database and a MongoDB database respectively, and the interface management tool, the development tool, the MySQL database and the MongoDB database are all interconnected, thereby realizing the combination of interface management and code generation, and the project developer can divide a complete project into a platform layer and a content layer, with the business logic placed in the content layer, and the platform layer is mainly responsible for fixed functions such as code table conversion, parameter input verification, and exception handling. After these fixed process codes are generated with one click, the developer only needs to focus on the business logic, thereby improving the work efficiency of the developer.

[0050] It should be noted that the method of one or more embodiments of this specification can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of one or more embodiments of this specification, and the multiple devices will interact with each other to complete the described method.

[0051] It should be noted that the above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0052] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, one or more embodiments of this specification also provide a platform layer code generation device.

[0053] refer to Figure 2 , the platform layer code generation device comprises:

[0054] The interface input module S201 is configured to input the interface information of the platform layer through a preset interface management tool and save the interface information into a first database;

[0055] The information prompt module S202 is configured to read the interface information in the first database through the interface management tool to obtain a prompt page of information to be supplemented;

[0056] The first generating module S203 is configured to connect the development tool with the interface management tool, obtain the information to be supplemented according to the prompt page, and generate a new project according to the information to be supplemented;

[0057] The information input module S204 is configured to display the interface information through the new project and add an information input box in the new project to obtain supplementary information;

[0058] The information saving module S205 is configured to save the supplementary information into a corresponding database according to the type of the supplementary information, so as to obtain the complete data of the platform layer;

[0059] The second generating module S206 is configured to generate the platform layer code using a template engine according to the complete data.

[0060] For the convenience of description, the above devices are described in terms of functions divided into various modules. Of course, when implementing one or more embodiments of this specification, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0061] The device of the above embodiment is used to implement the corresponding platform layer code generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0062] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, one or more embodiments of this specification also provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the platform layer code generation method described in any of the above embodiments is implemented.

[0063] Figure 3 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.

[0064] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0065] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0066] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.

[0067] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).

[0068] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0069] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0070] The electronic device of the above embodiment is used to implement the corresponding platform layer code generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0071] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, one or more embodiments of this specification also provide a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the platform layer code generation method described in any of the above embodiments.

[0072] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.

[0073] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the platform layer code generation method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0074] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. In line with the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present specification as described above, which are not provided in detail for the sake of simplicity.

[0075] In addition, to simplify the description and discussion, and in order not to obscure one or more embodiments of the present specification, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device may be shown in the form of a block diagram so as to avoid obscuring one or more embodiments of the present specification, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which one or more embodiments of the present specification will be implemented (i.e., these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that one or more embodiments of the present specification may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0076] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.

[0077] One or more embodiments of this specification are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification should be included in the scope of protection of this disclosure.

Claims

1. A platform layer code generation method, characterized in that: include: Entering the interface information of the platform layer through a preset interface management tool, and saving the interface information into a first database; Reading the interface information in the first database through the interface management tool to obtain the information to be supplemented; The step of reading the interface information in the first database by the interface management tool to obtain the information to be supplemented specifically includes: the interface management tool reading the data table in the first database to obtain the interface information of the platform layer; the interface management tool detecting the interface information to obtain a detection result, and using the detection result to generate the information to be supplemented, wherein the detection result includes the interface information missing from the project; Connecting the development tool with the interface management tool, obtaining a link containing the information to be supplemented according to a prompt page, and generating a new project according to the link; The interface information is displayed through the new project, and an information input box is added in the new project to obtain supplementary information, wherein the supplementary information includes: public information and field information; According to the type of the supplementary information, the supplementary information is saved in a corresponding database to obtain complete data of the platform layer; Generate the platform layer code using a template engine according to the complete data; The interface management tool is DOClever; the interface information includes an interface name and an interface document; the first database is a MongoDB database; The step of connecting the development tool to the interface management tool, obtaining a link containing the information to be supplemented according to a prompt page, and generating a new project according to the link specifically includes: using the information to be supplemented as a primary key and generating the new project according to the primary key; wherein the development tool is Java; The method of displaying the interface information through the new project and adding an information input box in the new project to obtain supplementary information specifically includes: reading the interface information in the first database through the primary key and displaying the interface information through the new project; and inputting the information to be supplemented through the information input box according to the information to be supplemented to obtain the supplementary information.

2. The method according to claim 1, characterized in that: According to the type of the supplementary information, the supplementary information is saved in a corresponding database to obtain the complete data of the platform layer, specifically including: The public information is stored in a second database, and the field information is stored in the first database; wherein the second database is a MySQL database; The field information is spliced ​​into the remark remarks of the attributes of each interface in the interface management tool by splicing, and the supplementary information is stored in the first database.

3. The method according to claim 2, characterized in that Generating the platform layer code using a template engine according to the complete data specifically includes: The template engine obtains the complete data by reading data from the first database and the second database respectively and integrating the data in the first database and the second database; wherein the template engine is freemarker.

4. A platform layer code generation device, characterized in that: include: An interface entry module is configured to enter the interface information of the platform layer through a preset interface management tool and save the interface information into a first database; An information prompt module is configured to read the interface information in the first database through the interface management tool to obtain information to be supplemented; The information prompt module is further configured to read the data table in the first database as the interface management tool to obtain the interface information of the platform layer; The interface management tool detects the interface information to obtain a detection result, and uses the detection result to generate information to be supplemented, wherein the detection result includes the interface information missing from the project; A first generation module is configured to connect the development tool with the interface management tool, obtain a link containing the information to be supplemented according to the prompt page, and generate a new project according to the link; An information input module is configured to display the interface information through the new project and add an information input box in the new project to obtain supplementary information, wherein the supplementary information includes: public information and field information; An information saving module is configured to save the supplementary information into a corresponding database according to the type of the supplementary information, so as to obtain complete data of the platform layer; A second generating module is configured to generate the platform layer code using a template engine according to the complete data; The interface input module is further configured such that the interface management tool is DOClever; the interface information includes an interface name and an interface document; the first database is a MongoDB database; The first generating module is further configured to use the information to be supplemented as a primary key and generate the new project according to the primary key; wherein the development tool is Java; The information entry module is further configured to read the interface information in the first database using the primary key, and display the interface information through the new project; and input the information to be supplemented through the information input box according to the information to be supplemented to obtain the supplementary information.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 3 is implemented.

6. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause the computer to execute any one of claims 1 to 3.

Citation Information

Patent Citations

  • Interface code generation method and terminal device

    CN108268253A

  • Interface document generation method and device

    CN111258627A