Small program item generation method and device, equipment, storage medium and program product

By providing a mini program project generation method, obtaining pre-configured initial templates and generating target templates through user interaction, the problems of low user interaction and poor flexibility in the existing technology are solved, and efficient and flexible mini program project generation is achieved.

CN119645387APending Publication Date: 2025-03-18INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411853833.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The user interaction of existing technology small and medium-sized program projects is low, and the project generation flexibility is poor, which cannot meet the personalized needs of users.

Method used

Provides a method for generating a mini program project. By responding to the mini program creation operation, launching the project creation command, obtaining the preconfigured project initial template, and obtaining the template modification instructions entered by the user through the template modification interface, modifying the preconfigured template to generate the project target template, and finally generating the mini program.

Benefits of technology

It improves user interactivity and flexibility in mini-program project generation, and can personalize templates according to user needs, shorten development cycles, improve development efficiency, and simplify project management and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119645387A_ABST
    Figure CN119645387A_ABST
Patent Text Reader

Abstract

The invention provides an applet project generation method and device, equipment, a storage medium and a program product, and relates to the field of financial science and technology. The method comprises the following steps: in response to an applet creation operation, starting a project creation command; obtaining a pre-configured project initial template according to the project creation command; displaying a template modification interface according to a pre-configured template configuration type; obtaining a template modification instruction input by a user through the template modification interface; according to the template modification instruction, modifying a pre-configured project initial template to obtain a project target template; and generating an applet according to the project target template. According to the method provided by the invention, the user interactivity of small program item generation is enhanced, and the flexibility of small program item generation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and in particular to a method, device, equipment, storage medium and program product for generating a mini-program project. Background Art

[0002] With the continuous development of Internet technology, more and more enterprises and individuals have begun to use mini-programs in various mobile phone software. With the widespread popularity of mini-programs, enterprises and individuals have more and more demands for mini-programs. Some small and medium-sized enterprises are unable to generate a set of corresponding mini-programs for these demands. Therefore, the mini-program project generation method has become a direction with application prospects.

[0003] In the prior art, the mini-program container technology has a built-in fixed project creation template, and the generation of the mini-program project mainly depends on the built-in project creation template of the mini-program container technology. The user directly initializes a mini-program project by selecting different templates.

[0004] However, the existing technical methods have limited corresponding project template types, and are unable to build corresponding projects based on user needs. There are technical problems such as low user interactivity and poor flexibility in mini-program project generation. Summary of the invention

[0005] The present application provides a method, device, equipment, storage medium and program product for generating a mini-program project, so as to solve the technical problems of low user interactivity and poor flexibility in generating mini-program projects.

[0006] In a first aspect, the present application provides a method for generating a mini-program project, comprising:

[0007] In response to the applet creation operation, starting a create project command;

[0008] According to the command of creating a project, obtain the pre-configured initial template of the project;

[0009] According to the pre-configured template configuration type, the template modification interface is displayed;

[0010] Obtain the template modification instruction input by the user through the template modification interface;

[0011] According to the template modification instruction, modify the pre-configured project initial template to obtain the project target template;

[0012] Generate a small program based on the project target template.

[0013] In a second aspect, the present application provides a device for generating a mini-program project, comprising:

[0014] A startup module, used for starting a command to create a project in response to a mini-program creation operation;

[0015] A first acquisition module is used to acquire a pre-configured project initial template according to a command to create a project;

[0016] A display module, used to display a template modification interface according to a preconfigured template configuration type;

[0017] The second acquisition module is used to acquire the template modification instruction input by the user through the template modification interface;

[0018] A modification module, used to modify the pre-configured project initial template according to the template modification instruction to obtain the project target template;

[0019] The generation module is used to generate small programs according to the project target template.

[0020] In a third aspect, an embodiment of the present application provides a device for generating a mini-program project, including: a memory, a processor;

[0021] Memory stores computer-executable instructions;

[0022] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method of the first aspect as described above.

[0023] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the first aspect as described above.

[0024] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method of the first aspect above when executed by a processor.

[0025] The present application provides a method, device, equipment, storage medium and program product for generating a mini-program project. When creating a mini-program, the initial template of the project is first obtained. Through the pre-configured initial template of the project, the creation of the mini-program project can be quickly started. In order to meet the needs of different types of mini-programs, a template modification interface for modifying the template is provided to the user. The user enters the template modification instruction through the template modification interface, and then obtains the user's actual needs based on the way of interacting with the user, and personalizes the pre-configured template according to the actual needs, thereby achieving the technical effect of enhancing user interactivity and improving the flexibility of mini-program project generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0027] Figure 1A schematic diagram of an application data processing system architecture provided in an embodiment of the present application;

[0028] Figure 2 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 1 ;

[0029] Figure 3 A schematic diagram of the structure of a mini-program template provided in an embodiment of the present application;

[0030] Figure 4 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 2 ;

[0031] Figure 5 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 3 ;

[0032] Figure 6 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 4 ;

[0033] Figure 7 A schematic diagram of the architecture of a browser plug-in provided in an embodiment of the present application;

[0034] Figure 8 A schematic diagram of the structure of a device for generating a small program project provided in an embodiment of the present application;

[0035] Fig. 9 A schematic diagram of the structure of a mini-program project generation device provided in an embodiment of the present application.

[0036] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0037] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0038] It should be noted that the mini-program project generation method, device, equipment, storage medium and product provided in this application can be used in the field of financial technology, and can also be used in any field other than financial technology. The application field of the mini-program project generation method, device, equipment, storage medium and product in this application is not limited.

[0039] Since the types of project templates corresponding to the existing technical methods are limited, it is impossible to build corresponding projects according to user needs, and there are technical problems such as low user interactivity and poor flexibility in generating mini-program projects.

[0040] In response to the above problems, the present application provides a mini-program project generation method, device, equipment, storage medium and product. When creating a mini-program, the initial project template is first obtained. In order to meet the needs of different types of mini-programs, a template modification interface is provided for users to modify the template. Users enter template modification instructions through the template modification interface to create different types of mini-programs, thereby meeting the user's flexibility requirements for creating mini-programs.

[0041] Furthermore, through the pre-configured project initial template, the mini program project can be quickly started without having to build the project structure and configuration environment from scratch, thereby greatly shortening the development cycle and improving development efficiency. In addition, the use of pre-configured templates can ensure that different projects have similar structures and configurations, which not only facilitates project management and maintenance, but the reuse of templates also reduces duplication of work and improves development quality and practicality. At the same time, the entire process, from starting the create project command to generating the mini program, is implemented in an automated manner, reducing the steps of manual configuration and modification and reducing the complexity of operations. In addition, users are allowed to enter template modification instructions through the template modification interface, and then obtain the user's actual needs based on the way of interacting with the user, and customize the pre-configured template according to the actual needs, thereby achieving the technical effect of enhancing user interactivity and improving the flexibility of mini program project generation.

[0042] Figure 1 The present invention provides an application data processing system architecture diagram, the application data processing system can be a computer device. Figure 1 As shown, the above architecture includes at least one of a data acquisition device 101 , a processing device 102 and a display device 103 .

[0043] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the application data processing system architecture. In other feasible implementations of the present application, the above architecture may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1The components shown may be implemented in hardware, software, or a combination of software and hardware.

[0044] In a specific implementation process, the data acquisition device 101 may include an input / output interface and may also include a communication interface. The data acquisition device 101 may be connected to the processing device via the input / output interface or the communication interface.

[0045] The processing device 102 can initiate a create project command in response to a mini-program creation operation; obtain a preconfigured project initial template according to the create project command; display a template modification interface according to the preconfigured template configuration type; obtain a template modification instruction input by the user through the template modification interface; modify the preconfigured project initial template according to the template modification instruction to obtain a project target template; and generate a mini-program according to the project target template.

[0046] The display device 103 may also be a touch display screen or a screen of a terminal device, which is used to receive user instructions while displaying the above content to achieve interaction with the user.

[0047] It should be understood that the above-mentioned processing device can be implemented by a processor reading instructions in a memory and executing the instructions, or it can be implemented by a chip circuit.

[0048] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0049] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0050] Figure 2 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 1 ,like Figure 2 As shown, the mini-program project generation method provided in the embodiment of the present application includes:

[0051] S201, in response to the mini-program creation operation, start a project creation command;

[0052] After executing the application instruction to create the mini-program, in response to the operation of creating the mini-program, the system starts the command to create the project.

[0053] Specifically, after the user installs the software package management tool (nodejs), he can execute the management and distribution (Node Package Manager, npm) command in the mini-program developer tool and install the npm package globally. The configuration file (bin) of the executable command of the npm package configures the command name as "mpinit", and maps and executes its corresponding main file (index.js). In index.js, a "create" command is created through the command command of the npm package command line tool framework (commander). The user can click "npm create" in the terminal to start the project creation command. Among them, commander is an npm package used to build the command line interface of Node.js, and npm create is an npm command used to create a new project.

[0054] S202, according to the command to create a project, obtain a pre-configured initial template for the project;

[0055] Specifically, according to the project creation command, an initial fixed template is downloaded from the distributed version control system (git) library as the initial template of the project. This template includes the initial built-in directory structure division of the mini program project, application programming interface (API) simulation data, etc.

[0056] Figure 3 A schematic diagram of the structure of a small program template provided in an embodiment of the present application, such as Figure 3As shown, package.json refers to the project configuration file, .gitignore refers to the ignored file, .eslintrc.js refers to the code formatting management configuration file, fide.project.config,json refers to the mini program project configuration file, Pages refers to pages, Components refers to components, util,js refers to tool files, app.json refers to the mini program global configuration file, Vant refers to the Vant UI component library, moment refers to the formatting tool, three refers to the JavaScript 3D library based on WebGL, lodash refers to the JavaScript utility library, babel refers to the JavaScript compiler, md5 refers to the hash algorithm, days refers to the library or function related to date calculation, axios-miniprogram refers to the Axios mini program version, which is a Promise-based HTTP client, mock-related means simulation-related, which means using simulated data to replace real data during the development process, FinClipConf.js refers to the configuration file, appAPIMock.json refers to the application API simulation data, and serviceMock refers to the service simulation;

[0057] The mini program template is divided into three stages, namely the initialization stage, the development stage and the release stage. The initialization stage includes some engineering tools such as package.json for npm management, .eslintrc.js for code formatting management, .gitignore for git file ignore configuration, and fide.project.config.json for the mini program project configuration; there are also components Components of the official mini program examples, sample pages Pages and the tool function module util.js of the examples; third-party npm packages needed in the development stage, including the UI component Vant, the time formatting tool moment, and the configuration of mock backend API and mock native API; front-end monitoring in the release stage such as business tracking and error monitoring, performance monitoring, and information related to project updates such as update logs.

[0058] Understandably, Figure 3 It is only a schematic display effect diagram and does not affect the protection scope of the embodiments of the present application.

[0059] S203, displaying a template modification interface according to a preconfigured template configuration type;

[0060] According to the pre-configured target configuration type obtained above, the corresponding target modification interface is visually displayed.

[0061] S204, obtaining a template modification instruction input by a user through a template modification interface;

[0062] The target modification instruction input by the user is obtained in the target modification interface.

[0063] Specifically, in the template modification interface, the console will pop up the following command to interact with the user:

[0064] Question 1: Please enter the project name?

[0065] Question 2: Choose template "Taro Vue" or template "Taro React" or template "Webview"?

[0066] Question 3: Is it necessary to simulate the native API?

[0067] Question 4: Is it necessary to introduce a testing framework?

[0068] After the user enters the corresponding answers through the target modification interface according to his or her own needs, the system obtains the corresponding template modification instructions based on these answers.

[0069] S205, modifying the pre-configured project initial template according to the template modification instruction to obtain the project target template;

[0070] In this embodiment, the template modification instructions include modification instructions for the project name, modification instructions for the template name, modification instructions for the mock native application programming interface and / or modification instructions for the test framework.

[0071] Specifically, according to the answer input by the user, the pre-configured target initial template is modified to generate a project target template that meets the user's needs.

[0072] S206. Generate a small program according to the project target template.

[0073] Based on the generated project target template, the corresponding mini-program is further generated.

[0074] The present embodiment provides a method for generating a small program project, which starts a project creation command in response to a small program creation operation; obtains a preconfigured project initial template according to the project creation command; displays a template modification interface according to the preconfigured template configuration type; obtains a template modification instruction input by a user through the template modification interface; modifies the preconfigured project initial template according to the template modification instruction to obtain a project target template; generates a small program according to the project target template, so that the small program project can be quickly started through the preconfigured project initial template without having to build a project structure and configuration environment from scratch, thereby greatly shortening the development cycle, improving development efficiency, and making Using preconfigured templates can ensure that different projects have similar structures and configurations, which not only facilitates project management and maintenance, but the reuse of templates also reduces duplication of work and improves development quality and practicality. At the same time, the entire process, from starting the project creation command to generating the mini-program, is implemented in an automated manner, reducing manual configuration and modification steps and reducing operational complexity. In addition, users are allowed to enter template modification instructions through the template modification interface, and then obtain users' actual needs based on the way of interacting with users, and personalize preconfigured templates based on actual needs, achieving the technical effect of enhancing user interactivity and improving the flexibility of mini-program project generation.

[0075] Optional, Figure 4 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 2 ,like Figure 4 As shown, this embodiment, based on the above embodiment, describes in detail the display process of the template modification interface, including:

[0076] S401, obtaining a configuration file for describing and managing a project in a preconfigured project initial template;

[0077] In this embodiment, the preconfigured template configuration type includes at least one of a project name, a template name, a template solution, a mock native application programming interface, and a test framework.

[0078] Search for and obtain configuration files for describing and managing projects based on preconfigured project starter templates.

[0079] S402, generating a template modification interface according to the multiple interactive questions;

[0080] Set multiple interaction questions in the configuration file, and automatically generate the corresponding target modification interface based on these interaction questions.

[0081] S403: Display the template modification interface.

[0082] After the target modification interface is constructed, the target modification interface is visualized.

[0083] A mini-program project generation method provided in this embodiment collects users' specific needs by asking questions, and can generate a personalized template modification interface that meets users' needs, making the project more in line with users' actual business scenarios, improving user participation and satisfaction. At the same time, based on multiple interactive questions, a template modification interface is automatically generated, reducing the workload of manual template modification and reducing the possibility of errors in the generation process, thereby achieving the technical effect of enhancing user interactivity and improving the flexibility of mini-program project generation.

[0084] Optional, Figure 5 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 3 ,like Figure 5 As shown, this embodiment, based on the above embodiment, describes in detail the process of obtaining the project target template, including:

[0085] S501, for the modification instruction of the project name, obtaining a configuration file for describing and managing the project in a pre-configured project initial template;

[0086] Specifically, after obtaining the project name input by the user, it is determined that the modification instruction is a modification instruction for the project name. Then, after the user enters the project name, the user input is obtained through the commander, and a configuration file named "require package.json" is obtained through Nodejs.

[0087] S502: according to the modification instruction for the project name, modify the attribute value corresponding to the project name in the configuration file used to describe and manage the project;

[0088] Specifically, according to the modification instruction for the project name, the name attribute value in the configuration file named "require package.json" is changed to the name entered by the user.

[0089] S503, obtaining all templates in the pre-configured project initial templates according to the modification instruction of the template name;

[0090] Specifically, after the template name input by the user is obtained, it is determined that the modification instruction is a modification instruction for the template name, and then all templates in the pre-configured project initial templates are obtained.

[0091] S504. According to the modification instruction for the template name, among all templates in the preconfigured initial templates of the project, the template corresponding to the modification instruction for the template name is retained, and other templates except the template corresponding to the modification instruction for the template name are deleted;

[0092] Specifically, if the template name input by the user is "Webview", then according to the entry modification instruction, all templates except the "Webview" template are deleted from all templates in the pre-configured project initial templates, and only the project template selected by the user is retained.

[0093] S505. Determine whether to delete the native mock native application programming interface files and / or the configuration and files of the test framework in the preconfigured project initial template according to the modification instructions for the mock native application programming interface and / or the modification instructions for the test framework.

[0094] Specifically, for the modification instructions of the mock native application programming interface, if the user selects the modification instructions that require the mock native application programming interface, all relevant files corresponding to the native application programming interface in the target project will be retained. If not needed, the synchronous directory deletion method (fs.rmdirSync) will be called to remove the relevant mock files and configurations;

[0095] Regarding the modification instructions for the test framework, if the user chooses to introduce the test framework, the relevant configuration corresponding to the mini-program test framework will be retained. If the user does not choose to introduce the test framework, the relevant configuration and files corresponding to the mini-program test framework will be removed.

[0096] The present embodiment provides a method for generating a mini-program project. By modifying the pre-configured initial target accordingly according to different types of template modification instructions, the method automatically generates a project target template that meets user needs and expectations, thereby improving the comprehensiveness and pertinence of project mini-program generation. At the same time, by deleting unnecessary templates and components, the redundancy and complexity of the project are reduced, maintenance costs are reduced, development efficiency is improved, and potential errors and vulnerabilities are reduced, thereby achieving the technical effect of enhancing user interactivity and improving the flexibility of mini-program project generation.

[0097] Optional, Figure 6 A schematic diagram of a method for generating a small program project provided in an embodiment of the present application Figure 4 ,like Figure 6 As shown, based on the above embodiment, this embodiment provides a supplementary description of the process of obtaining the pre-configured project initial template, including:

[0098] S601, obtaining pre-configured node package manager instructions;

[0099] In this embodiment, the node package refers to a management and distribution tool (Node Package Manager, NPM) package.

[0100] After the system starts, directly obtain the pre-configured node package manager instructions.

[0101] S602, installing the node package according to the pre-configured node package manager instructions;

[0102] Download the node package according to the instructions for getting a preconfigured node package manager.

[0103] S603, generate a command to create a project through the node package;

[0104] Specifically, generate the command to create a project through the node package.

[0105] S604, in response to the mini-program creation operation, start a project creation command;

[0106] Specifically, after executing the application instruction for creating the mini-program, in response to the mini-program creation operation, the system executes a project creation command named "mpinit create text-project".

[0107] S605. According to the command to create a project, a template download command is initiated to the remote template git repository;

[0108] Specifically, by executing the create project command, a template download command named "npm install -gmpinit" is sent to the remote template git repository.

[0109] S606: Receive a pre-configured project initial template sent by a remote template git repository.

[0110] After the remote template git repository receives the download command, the system receives the pre-configured project initial template sent by the remote template git repository.

[0111] A mini-program project generation method provided in this embodiment can automatically prepare the package management tool environment required for the project by obtaining pre-configured node package manager instructions, reducing the time and errors of manual configuration, installing the node package according to the pre-configured node package manager instructions, and using the installed node package to generate the project creation command, further simplifying the project creation process. At the same time, when the user initiates the mini-program creation operation, the project creation command is immediately started, which improves the immediacy and smoothness of the user experience. In addition, the git library is used to store project templates, which improves the scalability of the project, and by initiating a download command to the remote template git repository to obtain the pre-configured project initial template, the dependence on the built-in project creation template of the mini-program container technology is reduced, achieving the technical effect of enhancing user interactivity and improving the flexibility of mini-program project generation.

[0112] Figure 7 A schematic diagram of the architecture of the browser plug-in provided in the embodiment of the present application is shown in FIG. Figure 7 As shown, API refers to application programming interface, background.js refers to background script, content script refers to content script, and DOM refers to document object model.

[0113] against Figure 7 As shown in the browser plug-in architecture diagram, the embodiments of the present application provide a detailed description of the process of obtaining and distributing information on a single page involved in the above embodiments, including: after the user enters the browser page, the browser plug-in will drive the page to obtain an information list from the open API. If the information list exists, the information list is embedded in the current page in the form of an intrusive scrolling pop-up window; when the information scrolling ends, the browser plug-in obtains a new information list from the current page again. If the information list fails to be obtained, the pop-up window will not be displayed.

[0114] Understandably, Figure 7 It is only a schematic display effect diagram and does not affect the protection scope of the embodiments of the present application.

[0115] Figure 8 This is a schematic diagram of the structure of a small program project generation device provided in an embodiment of the present application. The device of this embodiment can be in the form of software and / or hardware. Figure 8 As shown, an embodiment of the present application provides a mini-program project generation device 800, the device comprising: a startup module 801, a first acquisition module 802, a display module 803, a second acquisition module 804, a modification module 805, and a generation module 806:

[0116] The starting module 801 is used to start a command to create a project in response to a mini-program creation operation;

[0117] The first acquisition module 802 is used to acquire a pre-configured project initial template according to a create project command;

[0118] Display module 803, used to display a template modification interface according to a preconfigured template configuration type;

[0119] The second acquisition module 804 is used to acquire the template modification instruction input by the user through the template modification interface;

[0120] The modification module 805 is used to modify the pre-configured project initial template according to the template modification instruction to obtain the project target template;

[0121] The generation module 806 is used to generate a small program according to the project target template.

[0122] In a possible implementation manner, the display module 803 is further used for:

[0123] Generate multiple interactive questions based on preconfigured template configuration types;

[0124] Generate a template modification interface based on multiple interactive questions;

[0125] The template modification interface is displayed.

[0126] In a possible implementation manner, the display module 803 is further used for:

[0127] The preconfigured template configuration type includes at least one of a project name, a template name, a template solution, a mock native application programming interface, and a test framework.

[0128] In a possible implementation manner, the second acquisition module 804 is further configured to:

[0129] The template modification instructions include modification instructions for the project name;

[0130] Accordingly, according to the template modification instruction, the preconfigured project initial template is modified to obtain the project target template, including:

[0131] Get the configuration files used to describe and manage projects in the pre-configured project initial template;

[0132] According to the modification instruction for the project name, change the property value corresponding to the project name in the configuration file used to describe and manage the project.

[0133] In a possible implementation manner, the second acquisition module 804 is further configured to:

[0134] The template modification instructions include modification instructions for the template name;

[0135] Accordingly, according to the template modification instruction, the preconfigured project initial template is modified to obtain the project target template, including:

[0136] Get all templates in the preconfigured project initial templates;

[0137] According to the modification instruction for the template name, among all templates in the preconfigured project initial templates, the template corresponding to the modification instruction for the template name is retained, and other templates except the template corresponding to the modification instruction for the template name are deleted.

[0138] In a possible implementation manner, the second acquisition module 804 is further configured to:

[0139] The template modification instructions include modification instructions for the mock native application programming interface and / or modification instructions for the test framework;

[0140] Accordingly, according to the template modification instruction, the preconfigured project initial template is modified to obtain the project target template, including:

[0141] According to the modification instructions for the mock native application programming interface and / or the modification instructions for the test framework, it is determined whether to delete the native mock native application programming interface files and / or the configuration and files of the test framework in the preconfigured project initial template.

[0142] In a possible implementation manner, the first acquisition module 802 is further configured to:

[0143] According to the command to create a project, initiate a template download command to the remote template git repository;

[0144] Receive pre-configured project initial templates sent by the remote template git repository.

[0145] In a possible implementation, the starting module 801 is further configured to:

[0146] Get pre-configured node package manager instructions;

[0147] Install the node package according to the pre-configured node package manager instructions;

[0148] Generate a command to create a project through the node package.

[0149] This embodiment provides a mini-program project generation device that can execute the method provided by the above method embodiment. Its implementation principle and technical effects are similar, and this embodiment will not be repeated here.

[0150] Fig. 9 This is a schematic diagram of the structure of a small program project generation device provided by this application. Fig. 9 As shown, the electronic device 900 provided in this embodiment includes: at least one processor 901 and a memory 902. Optionally, the device 900 also includes a communication component 903. The processor 901, the memory 902 and the communication component 903 are connected via a bus.

[0151] In a specific implementation process, at least one processor 901 executes the computer execution instructions stored in the memory 902, so that at least one processor 901 executes the above method.

[0152] The specific implementation process of the processor 901 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0153] In the above embodiments, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor.

[0154] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage.

[0155] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.

[0156] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.

[0157] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.

[0158] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0159] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0160] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0161] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0163] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0164] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0165] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A method for generating a small program project, characterized in that: include: In response to the applet creation operation, starting a create project command; According to the project creation command, obtain a preconfigured project initial template; According to the pre-configured template configuration type, the template modification interface is displayed; Obtaining a template modification instruction input by a user through the template modification interface; According to the template modification instruction, modify the preconfigured project initial template to obtain a project target template; Generate a mini program according to the project target template.

2. The method according to claim 1, characterized in that The displaying of the template modification interface according to the preconfigured template configuration type includes: Generate multiple interactive questions based on preconfigured template configuration types; Generate a template modification interface according to the multiple interactive questions; The template modification interface is displayed.

3. The method according to claim 2, characterized in that The preconfigured template configuration type includes at least one of a project name, a template name, a template solution, a mock native application programming interface, and a test framework.

4. The method according to any one of claims 1 to 3, characterized in that: The template modification instruction includes a modification instruction for a project name; Accordingly, the step of modifying the preconfigured project initial template according to the template modification instruction to obtain a project target template includes: Obtain a configuration file for describing and managing a project in the preconfigured project initial template; According to the modification instruction for the project name, the attribute value corresponding to the project name in the configuration file for describing and managing the project is changed.

5. The method according to any one of claims 1 to 3, characterized in that: The template modification instruction includes a modification instruction for a template name; Accordingly, the step of modifying the preconfigured project initial template according to the template modification instruction to obtain a project target template includes: Obtain all templates in the preconfigured project initial templates; According to the modification instruction for the template name, among all templates in the preconfigured project initial template, the template corresponding to the modification instruction for the template name is retained, and other templates except the template corresponding to the modification instruction for the template name are deleted.

6. The method according to any one of claims 1 to 3, characterized in that: The template modification instructions include modification instructions for the mock native application programming interface and / or modification instructions for the test framework; Accordingly, the step of modifying the preconfigured project initial template according to the template modification instruction to obtain a project target template includes: According to the modification instructions for the mock native application programming interface and / or the modification instructions for the test framework, determine whether to delete the native mock native application programming interface files and / or the configuration and files of the test framework in the preconfigured project initial template.

7. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining a preconfigured project initial template according to the command for creating a project includes: According to the project creation command, a template download command is initiated to the remote template distributed version control system git repository; Receive the pre-configured project initial template sent by the remote template git repository.

8. The method according to any one of claims 1 to 3, characterized in that: Before initiating a command to create a project in response to the applet creation operation, the method further includes: Get pre-configured node package manager instructions for management and distribution tools; Install the node package according to the pre-configured node package manager instructions; Generate a command to create a project through the node package.

9. A device for generating a small program project, characterized in that: include: A startup module, used for starting a command to create a project in response to a mini-program creation operation; A first acquisition module, used to acquire a preconfigured project initial template according to the project creation command; A display module, used to display a template modification interface according to a preconfigured template configuration type; A second acquisition module is used to acquire the template modification instruction input by the user through the template modification interface; A modification module, used to modify the preconfigured project initial template according to the template modification instruction to obtain a project target template; A generation module is used to generate a small program according to the project target template.

10. A small program project generation device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.

12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.