Small program generation method and device, electronic equipment and storage medium
Automatically generate applets through low-code configuration, solving the problem of high cost of applet development and maintenance, and achieving the effect of reducing costs and improving efficiency.
Patent Information
- Application Number
- CN202411761366.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-03-28
AI Technical Summary
The development and maintenance cost of mini programs is high, which has become a pain point for individual users to use mini programs.
By generating the target component interface based on the target component list information, parsing the code of the target component interface, configuring the required data and binding it to the target component to automatically generate the applet.
It reduces the development and maintenance costs of mini programs, improves the efficiency of mini program generation, and reduces coding requirements.
Smart Images

Figure CN119718279A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a method, device, electronic device and storage medium for generating a small program. Background Art
[0002] Since mini programs are the most common and convenient system among existing promotional applications, they have received widespread attention since their release. More and more merchants are releasing mini programs on their respective platforms to facilitate users to quickly complete the purchase of corresponding products.
[0003] At present, the high cost of developing and maintaining mini programs has become a pain point for individual users. Therefore, a solution is urgently needed to reduce the cost of developing and maintaining mini programs. Summary of the invention
[0004] The embodiments of the present invention provide a method, device, electronic device and storage medium for generating a mini-program to solve the problem of high development and maintenance costs of mini-programs.
[0005] In a first aspect, a method for generating a mini-program is provided, comprising: Generate a target component interface based on the target component list information; Parsing the code of the target component interface to generate a parsed data component set corresponding to the target component interface; The parsed data set is configured with data required by the target component, and the configured data is bound to the target component to generate a target applet.
[0006] Optionally, generating a target component interface based on the target component list information includes: Based on the target component list information, multiple target components are selected from the programming platform; A target component interface is generated based on the multiple target components and the component layout information in the target component information.
[0007] Optionally, configuring the parsed data set with data required by the target component includes: According to the code of parsing the data set, obtaining the structure and properties of the target component; The parsed data set is configured with data required by the target component according to the structure and the property of the target component.
[0008] Optionally, the step of binding the configured data with the target component to generate a target applet includes: The data configured by the parsed data set is bound to the data source of the target component to generate a target applet.
[0009] Optionally, the target component interface is generated using a json data model.
[0010] Optionally, the generated target component interface includes interactive components of the target applet, wherein the interactive components are buttons, pictures and input boxes.
[0011] In a second aspect, a mini-program generation device is provided, comprising: An editing module, used to generate a target component interface based on the target component list information; A parsing module, used to parse the code of the target component interface and generate a parsed data component set corresponding to the target component interface; A generation module is used to configure the parsed data set with data required by the target component, and bind the configured data with the target component to generate a target applet.
[0012] Optionally, the editing module is further used to: Based on the target component list information, multiple target components are selected from the programming platform; A target component interface is generated based on the multiple target components and the component layout information in the target component information.
[0013] According to a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned applet generation method when executing the computer program.
[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned mini-program generation method are implemented.
[0015] The above-mentioned mini-program generation method, device, electronic device and storage medium generate a target component interface based on the target component list information; parse the code of the target component interface to generate a parsed data component set corresponding to the target component interface; configure the parsed data set with the data required by the target component, and bind the configured data to the target component to generate a target mini-program. This application uses low-code configuration to automatically generate mini-programs, which can greatly reduce the development and maintenance costs of mini-programs. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0017] Figure 1 is a schematic diagram of an application environment of a method for generating a small program in one embodiment of the present invention; Figure 2 is a flow chart of a method for generating a mini-program in one embodiment of the present invention; Figure 3 is an interactive flow chart of a method for generating a mini-program in one embodiment of the present invention; Figure 4 is an example diagram of a method for generating a mini-program in one embodiment of the present invention; Figure 5 is a schematic diagram of a small program generating device in one embodiment of the present invention; Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0019] The applet generation method provided in the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the applet generation method is applied in an applet generation system, and the applet generation system includes: Figure 1The client and server shown in the figure communicate with the server through the network to realize the generation of the target component interface based on the target component list information; parse the code of the target component interface to generate the parsed data component set corresponding to the target component interface; configure the data set required by the target component, and bind the configured data to the target component to generate the target applet. The application uses low-code configuration to automatically generate applet, which can greatly reduce the development and maintenance costs of applet. Among them, the client, also known as the user end, refers to the program corresponding to the server that provides local services to customers. The client can be installed on but not limited to various personal computers, laptops, smart phones, and tablets. The server can be implemented with an independent server or a server cluster consisting of multiple servers.
[0020] In one embodiment, if Figure 2 As shown, a method for generating a small program is provided, and the method is applied in Figure 1 The server in the example is used as an example to illustrate the process, including the following steps: S10: Generate a target component interface based on the target component list information.
[0021] Specifically, the target component list information described in this application uses a low-code platform, which means that users create applications through a graphical user interface and configuration rather than traditional handwritten code. The application reduces or simplifies coding requirements, allowing users to quickly build small programs.
[0022] Use the components provided in the low-code platform list to select the appropriate target component and generate a target component interface, wherein the target component interface can select the template generated by the low-code platform according to the user's needs, or create the components by yourself according to the user's needs to generate the target component interface, wherein the target component interface is generated using the json data model, and the generated target component interface includes the interactive components of the target applet, wherein the interactive components are components such as buttons, pictures, lists, selectors, carousels and input boxes, and the target component list information is used to provide basic components for the design of the target applet.
[0023] It should be noted that the target component interface generated in the present application can be saved as a target component interface template, and can be used directly the next time the user designs a mini-program without regenerating the target component interface. The templates generated in the target component interface template can be used repeatedly, which improves the efficiency of users in making mini-programs while saving users' production costs.
[0024] In this embodiment, all generated target components can realize their own specific functions. Each target component encapsulates source code for executing set functions. For example, the input component in the target component encapsulates source code for the search function, and the determination component in the target component encapsulates source code for saving user selections.
[0025] S20: Parse the code of the target component interface to generate a parsed data component set corresponding to the target component interface.
[0026] Specifically, in order to fill the generated target component page with corresponding data so that the target component can adapt to the target mini-program platform, it is necessary to parse the generated target component interface to obtain the entire code of the target component interface and generate a parsed data component set corresponding to the target component interface, wherein the target mini-program platform refers to an application that can provide a running environment for the target mini-program, for example: it can be an application suitable for a chat application class, or an application mini-program of a financial application class, and the specific application is not limited.
[0027] S30: configuring the parsed data set with data required by the target component, and binding the configured data with the target component to generate a target applet.
[0028] Specifically, the design of the target component page is carried out in terminal devices such as personal computers and laptops, and the data required by the user is filled into each target component accordingly. The data generated in the target component interface is not connected to the data of the target component. Therefore, it is necessary to connect the data source of the target component and the data of each target component filled by the user in order to generate a target applet that can be used in other mobile terminals, such as mobile phones, tablet computers or other laptops.
[0029] It should be noted that the parsed data set after parsing does not contain the data required by the user. Only the code of each component in the target component page needs to add the data required by the user before it can become the target mini program. Therefore, it is necessary to add corresponding data to each target component and bind the component with added data to the target component in order to generate a target mini program that can be used in any mobile terminal.
[0030] It should be noted that in this application, the data of one or more components can be simultaneously stored. According to different component structures and properties, after the required data is inserted into the component, a preview interface will be generated for the user to preview the complete form of the generated target applet. If the user is not satisfied with the target applet, he can make adjustments at any time until the user is satisfied and confirms the generation of the target applet.
[0031] In this embodiment, the mini-program generation method generates a target component interface through target component list information; parses the code of the target component interface to generate a parsed data component set corresponding to the target component interface; configures the parsed data set with the data required by the target component, and binds the configured data to the target component to generate a target mini-program. This application uses low-code configuration to automatically generate mini-programs, which can greatly reduce the development and maintenance costs of mini-programs.
[0032] In one embodiment, a method for generating a small program is provided. Figure 3 As shown, in step S10, a target component interface is generated based on the target component list information, which specifically includes the following steps: S11: Based on the target component list information, select multiple target components from the programming platform.
[0033] S12: Generate a target component interface based on the multiple target components and the component layout information in the target component information.
[0034] Specifically, different component identifiers are displayed in the page settings of the low-code platform, and the different component identifiers are used to implement different component functions. Users can select one or more components in the page of the low-code platform to implement the layout of different components, thereby generating a target component interface.
[0035] In this embodiment, a method for generating a small program is provided, by selecting multiple target components from a programming platform based on target component list information, and generating a target component interface based on the multiple target components and component layout information in the target component information. In this embodiment, the efficiency of generating a small program is improved by automatically configuring the components of the small program and generating the component interface of the small program.
[0036] In one embodiment, a method for generating a small program is provided. Figure 4 As shown, in step S30, the data required by the target component is configured for the parsed data set, which specifically includes the following steps: S31: According to the code of parsing the data set, the structure and properties of the target component are obtained.
[0037] S32: According to the structure and the properties of the target component, configure the parsed data set with the data required by the target component.
[0038] Specifically, different components in the present invention have different functions, and therefore, the structures and properties of different components are different. By parsing the code of the data set, parameter information such as the structure and properties of the target component is obtained, and the data required by the user is added to each component according to the structure and properties of different components. For example: the media component in the target component encapsulates the source code for inserting pictures or music functions. By parsing the media component code, the media data required by the user is inserted into the media component. The financial component in the target component encapsulates the source code for storing prices. By parsing the financial component code, the price set by the user is inserted into the financial component.
[0039] In this embodiment, a method for generating a mini-program is provided, by obtaining the structure and properties of the target component according to the code of the parsed data set, and configuring the parsed data set with the data required by the target component based on the structure and properties of the target component. In this embodiment, by configuring the parsed data set with the data required by the target component according to the structure and properties of the target component, the target component is filled with the data required by the user, so that the target mini-program component becomes a program that meets the user's needs.
[0040] In one embodiment, a method for generating a mini-program is provided. In step S30, the configured data is bound to the target component to generate a target mini-program, which specifically includes the following steps: S33: Binding the data configured by the parsed data set with the data source of the target component to generate a target applet.
[0041] Specifically, since the data configuration in the data set of the mini program in the present application is performed in the target mini program setting terminal, after the data configuration is completed, it is necessary to associate the data with the data source of the target component of the mini program so that the mini program can be used in any mobile terminal. Therefore, it is necessary to connect the data in the mini program and the data interface of the target component, wherein the connection is to connect each component and the data required by the user separately, so as to bind the data of the parsed data set configuration and the data source of the target component. In the process of configuring the data, it is necessary to adapt the user data and the data of the target component of the mini program.
[0042] Optionally, in this embodiment, the target component in the present application can also bind a corresponding interface to the target component according to the parsed component type, and configure corresponding data for the target component to realize component data dynamicization.
[0043] Optionally, in this embodiment, the data required by the user and the corresponding target components can be packaged according to the user's needs, and irrelevant components and functions can be automatically removed to minimize the size of the target applet and improve the user's experience of generating the target applet.
[0044] In this embodiment, a method for generating a mini-program is provided, by binding the data of the parsed data set configuration with the data source of the target component to generate a target mini-program. In this example, the target mini-program is set by binding the data required by the user of the terminal parsed data set configuration and the data source of the target component, and rendering the bound target mini-program to generate a target mini-program that can be used in any mobile terminal.
[0045] The above-mentioned mini-program generation method, device, electronic device and storage medium generate a target component interface based on the target component list information; parse the code of the target component interface to generate a parsed data component set corresponding to the target component interface; configure the parsed data set with the data required by the target component, and bind the configured data to the target component to generate a target mini-program. This application uses low-code configuration to automatically generate mini-programs, which can greatly reduce the development and maintenance costs of mini-programs.
[0046] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0047] In one embodiment, a mini-program generation device is provided, which corresponds one-to-one to the mini-program generation method in the above embodiment. Figure 5 As shown, the mini-program generation device includes: an editing module, a parsing module and a generating module. The detailed description of each functional module is as follows: An editing module, used to generate a target component interface based on the target component list information; Specifically, the target component list information described in this application uses a low-code platform, which means that users create applications through a graphical user interface and configuration rather than traditional handwritten code. The application reduces or simplifies coding requirements, allowing users to quickly build small programs.
[0048] Use the components provided in the low-code platform list to select the appropriate target component and generate the target component interface, wherein the target component interface can select the template generated by the low-code platform according to the needs of the user, or create the component by itself according to the needs of the user to generate the target component interface. The target component interface is generated using the json data model, and the generated target component interface includes the interactive components of the target applet, wherein the interactive components are components such as buttons, pictures, lists, selectors, carousels, and input boxes, and the target component list information is used to provide basic components for the design of the target applet.
[0049] In this embodiment, all generated target components can realize their own specific functions. Each target component encapsulates source code for executing set functions. For example, the input component in the target component encapsulates source code for the search function, and the determination component in the target component encapsulates source code for saving user selections.
[0050] A parsing module, used to parse the code of the target component interface and generate a parsed data component set corresponding to the target component interface; Specifically, in order to fill the generated target component page with corresponding data so that the target component can adapt to the target mini-program platform, it is necessary to parse the generated target component interface to obtain the entire code of the target component interface and generate a parsed data component set corresponding to the target component interface, wherein the target mini-program platform refers to an application that can provide a running environment for the target mini-program, for example: it can be an application suitable for a chat application class, or an application mini-program of a financial application class, and the specific application is not limited.
[0051] A generation module is used to configure the parsed data set with data required by the target component, and bind the configured data with the target component to generate a target applet.
[0052] Specifically, the design of the target component page is carried out in terminal devices such as personal computers and laptops, and the data required by the user is filled into each target component accordingly. The data generated in the target component interface is not connected to the data of the target component. Therefore, it is necessary to connect the data source of the target component and the data of each target component filled by the user in order to generate a target applet that can be used in other mobile terminals, such as mobile phones, tablet computers or other laptops.
[0053] It should be noted that the parsed data set after parsing does not contain the data required by the user. Only the code of each component in the target component page needs to add the data required by the user before it can become the target mini program. Therefore, it is necessary to add corresponding data to each target component and bind the component with added data to the target component in order to generate a target mini program that can be used in any mobile terminal.
[0054] It should be noted that in this application, the data of one or more components can be simultaneously stored. According to different component structures and properties, after the required data is inserted into the component, a preview interface will be generated for the user to preview the complete form of the generated target applet. If the user is not satisfied with the target applet, he can make adjustments at any time until the user is satisfied and confirms the generation of the target applet.
[0055] In this embodiment, the mini-program generation device generates a target component interface through the target component list information; parses the code of the target component interface to generate a parsed data component set corresponding to the target component interface; configures the parsed data set with the data required by the target component, and binds the configured data to the target component to generate a target mini-program. This application uses low-code configuration to automatically generate mini-programs, which can greatly reduce the development and maintenance costs of mini-programs.
[0056] Optionally, the editing module is further used to: Based on the target component list information, multiple target components are selected from the programming platform; A target component interface is generated based on the multiple target components and the component layout information in the target component information.
[0057] Specifically, different component identifiers are displayed in the page settings of the low-code platform, and the different component identifiers are used to implement different component functions. Users can select one or more components in the page of the low-code platform to implement the layout of different components, thereby generating a target component interface.
[0058] In this embodiment, a mini-program generation device is provided, which generates a target component interface based on the target component list information, by selecting multiple target components from a programming platform, and the target component layout information in the target component information. In this embodiment, the mini-program component interface is generated by automatically configuring the mini-program components, thereby improving the efficiency of mini-program generation.
[0059] For the specific definition of the applet generation device, please refer to the definition of the applet generation method above, which will not be repeated here. The various modules in the above-mentioned applet generation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, or can be stored in the memory of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0060] In one embodiment, an electronic device is provided. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The electronic device includes a processor, a memory, a network interface and a database connected by a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The electronic device generates a target component interface based on the target component list information; parses the code of the target component interface to generate a parsed data component set corresponding to the target component interface; configures the data set required by the target component, and binds the configured data to the target component to generate a target applet. The present application uses low-code configuration to automatically generate applet, which can greatly reduce the development and maintenance costs of applet. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating an applet is implemented.
[0061] In one embodiment, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: Generate a target component interface based on the target component list information; Parsing the code of the target component interface to generate a parsed data component set corresponding to the target component interface; The parsed data set is configured with data required by the target component, and the configured data is bound to the target component to generate a target applet.
[0062] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: Generate a target component interface based on the target component list information; Parsing the code of the target component interface to generate a parsed data component set corresponding to the target component interface; The parsed data set is configured with data required by the target component, and the configured data is bound to the target component to generate a target applet.
[0063] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0064] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0065] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for generating a small program, characterized in that: include: Generate a target component interface based on the target component list information; Parsing the code of the target component interface to generate a parsed data component set corresponding to the target component interface; The parsed data set is configured with data required by the target component, and the configured data is bound to the target component to generate a target applet.
2. The applet generation method according to claim 1, characterized in that: The generating of the target component interface based on the target component list information includes: Based on the target component list information, multiple target components are selected from the programming platform; A target component interface is generated based on the multiple target components and the component layout information in the target component information.
3. The applet generation method according to claim 1, characterized in that: The configuring the parsed data set with the data required by the target component includes: According to the code of parsing the data set, obtaining the structure and properties of the target component; The parsed data set is configured with data required by the target component according to the structure and the property of the target component.
4. The applet generation method according to claim 1, characterized in that: The step of binding the configured data with the target component to generate a target applet includes: The data configured by the parsed data set is bound to the data source of the target component to generate a target applet.
5. The applet generation method according to claim 1, characterized in that: The target component interface is generated using the json data model.
6. The applet generation method according to claim 1, characterized in that: The generated target component interface includes interactive components of the target applet, wherein the interactive components are buttons, pictures and input boxes.
7. A small program generation device, characterized in that: include: An editing module, used to generate a target component interface based on the target component list information; A parsing module, used to parse the code of the target component interface and generate a parsed data component set corresponding to the target component interface; A generation module is used to configure the parsed data set with data required by the target component, and bind the configured data with the target component to generate a target applet.
8. The applet generation device according to claim 7, characterized in that: The editing module is also used for: Based on the target component list information, multiple target components are selected from the programming platform; A target component interface is generated based on the multiple target components and the component layout information in the target component information.
9. 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 computer program, the steps of the applet generation method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the applet generation method as claimed in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Application program development method and device
CN110580147A
Sub-application generation method and device, computer equipment and storage medium
CN111522552A
Application program generation method and device
CN112799660A
Generation method and operation method of application program and corresponding device
CN116974620A