A method and device for generating an application program
By developing fixed templates and components in the early stage, establishing a multi-end SDK library, and building a visual editor, the high threshold problem of APP development in the existing technology is solved, and fast and low-cost multi-end app generation is achieved.
Patent Information
- Application Number
- CN202010653297.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-08
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2040-07-08
AI Technical Summary
Existing mobile APP development frameworks such as React Native and Flutter require R&D personnel to have high R&D capabilities and large labor and time costs, and there are high technical barriers.
In the early stage, the R&D team developed fixed templates and template components for different operating systems, established a multi-terminal SDK library, and built a visual online editor, allowing users to independently configure template components and attributes, and assemble and package them in combination with the code in the SDK library to generate suitable for Apps for different operating systems.
It lowers the R&D threshold, improves R&D efficiency, simplifies operating procedures, reduces R&D costs, and is suitable for App generation of different operating systems.
Smart Images

Figure CN113760248B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for generating an application program. Background Art
[0002] With the rapid development of the Internet, mobile APPs have gradually become part of people's lives. Currently, the development of mobile APPs is based on local languages, such as OC (abbreviation of objective-c) and Swift for iOS, and Java and Kotlin for Android. Cross-platform development frameworks such as React Native and Flutter have also emerged.
[0003] However, the existing optimizations at the React Native, Flutter framework, and languages such as Swift and Kotlin all have technical barriers, which means that R&D personnel must have certain R&D capabilities, and the R&D team also needs to spend a lot of manpower and time costs in the R&D process. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and apparatus for generating an application program, which can at least solve the problem in the prior art that developing an APP requires the R&D capabilities of R&D personnel.
[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for generating an application is provided, comprising:
[0006] In response to a selection operation on a first template, determining a template component corresponding to the first template, and retrieving a code corresponding to each template component from a code library;
[0007] Converting the identifier, name and mapping object of the first template into data in a predetermined format; wherein the mapping object records the template information of the first template;
[0008] The predetermined format data and the code are packaged to obtain a code package corresponding to the first template and output the code package, so as to generate an application program through the code package.
[0009] Optionally, the determining the template components corresponding to the first template and retrieving the codes corresponding to the template components from the code library further includes: displaying the attribute information corresponding to the template components, generating a second template in response to a deletion operation on the template components and / or a modification operation on the attribute values in the attribute information, and adjusting the codes;
[0010] The converting the identifier, name and mapping object of the first template into data in a predetermined format includes: receiving input of the identifier and name of the second template, creating a mapping object, and converting the input identifier, name and created mapping object into data in a predetermined format;
[0011] The packaging of the predetermined format data and the code to obtain a code package corresponding to the first template and output it includes: packaging the predetermined format data and the adjusted code to obtain a code package corresponding to the second template and output it.
[0012] Optionally, the converting the identifier, name and mapping object of the first template into data in a predetermined format further includes:
[0013] In response to a click operation on the dependency relationship, according to the identifier, a template list associated with the first template is obtained and displayed, a selection operation on a third template in the template list is received, and the third template is used as a next template of the first template; and
[0014] Converting the identifier, name and mapping object of the third template into data in a predetermined format;
[0015] The packaging of the predetermined format data and the code to obtain a code package corresponding to the first template and output it includes: packaging the predetermined format data of the first template, the predetermined format data of the third template, the code corresponding to each template component in the first template, and the code corresponding to each template component in the third template, generating a code package and outputting it; wherein the predetermined format data of the first template includes the identifier of the third template.
[0016] Optionally, before determining the template component corresponding to the first template in response to the selection operation on the first template, the method further includes: extracting and displaying a template list corresponding to an operating system in response to the selection operation on the operating system; wherein the operating system is an Android system, an iOS system, or a third-party system;
[0017] The retrieving the code corresponding to each template component from the code library includes: retrieving the code corresponding to the operating system and each template component from the code library;
[0018] The packaging of the predetermined format data and the code includes: packaging the predetermined format data and the code based on a packaging method corresponding to the operating system.
[0019] To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a device for generating an application, comprising:
[0020] A selection module, configured to determine, in response to a selection operation on a first template, a template component corresponding to the first template, and retrieve a code corresponding to each template component from a code library;
[0021] A conversion module, used to convert the identifier, name and mapping object of the first template into data in a predetermined format; wherein the mapping object records the template information of the first template;
[0022] The packaging module is used to package the predetermined format data and the code, obtain a code package corresponding to the first template and output it, so as to generate an application through the code package.
[0023] Optionally, the selection module is further used to: display attribute information corresponding to the template component, generate a second template in response to a deletion operation on the template component and / or a change operation of an attribute value in the attribute information, and adjust the code;
[0024] The conversion module is used to: receive input of the identifier and name of the second template, create a mapping object, and convert the input identifier, name and created mapping object into data in a predetermined format;
[0025] The packaging module is used to: package the data in a predetermined format and the adjusted code to obtain a code package corresponding to the second template and output it.
[0026] Optionally, the conversion module is further used to:
[0027] In response to a click operation on the dependency relationship, according to the identifier, a template list associated with the first template is obtained and displayed, a selection operation on a third template in the template list is received, and the third template is used as a next template of the first template; and
[0028] Converting the identifier, name and mapping object of the third template into data in a predetermined format;
[0029] The packaging module is also used to: package the predetermined format data of the first template, the predetermined format data of the third template, the code corresponding to each template component in the first template, and the code corresponding to each template component in the third template, generate a code package and output it; wherein the predetermined format data of the first template includes the identifier of the third template.
[0030] Optionally, it further includes an extraction module, which is used to: in response to a selection operation on an operating system, extract and display a template list corresponding to the operating system; wherein the operating system is an Android system, an iOS system or a third-party system;
[0031] The selection module is used to: retrieve codes corresponding to the operating system and each template component from a code library;
[0032] The packaging module is used to package the predetermined format data and the code based on a packaging method corresponding to the operating system.
[0033] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device for generating an application is provided.
[0034] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned methods for generating an application.
[0035] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above methods for generating an application is implemented.
[0036] According to the solution provided by the present invention, one embodiment of the above invention has the following advantages or beneficial effects: the R&D team develops fixed templates and template components in the early stage to establish a multi-terminal SDK library. On this basis, a visual online editor is built for users to enable users to independently configure template components and change template properties, and assemble and package them in combination with the code configured in the SDK library to generate apps suitable for different operating systems.
[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0039] Figure 1 is a schematic diagram of the main flow of a method for generating an application according to an embodiment of the present invention;
[0040] Figure 2 It is a schematic diagram of generating code packages for multiple operating systems;
[0041] Figure 3 is a schematic diagram of an online editor interface of an embodiment of the present invention;
[0042] Figure 4 is a flowchart of an optional method for generating an application according to an embodiment of the present invention;
[0043] Figure 5 is a schematic diagram of main modules of a device for generating an application according to an embodiment of the present invention;
[0044] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0045] Figure 7 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0047] See also Figure 1 , which shows a main flow chart of a method for generating an application provided by an embodiment of the present invention, comprising the following steps:
[0048] S101: In response to a selection operation on a first template, determining a template component corresponding to the first template, and retrieving a code corresponding to each template component from a code library;
[0049] S102: Convert the identifier, name and mapping object of the first template into data in a predetermined format; wherein the mapping object records the template information of the first template;
[0050] S103: Packing the predetermined format data and the code to obtain a code package corresponding to the first template and outputting the code package to generate an application program through the code package.
[0051] In the above implementation, for step S101, the solution is to develop common templates and template components (i.e., UI fragment components) for different operating systems in advance through the R&D team in the early stage, and establish a multi-terminal SDK (Software Development Kit) library, see Figure 2 For example, page templates - Android system page template 1, iOS system page template 2, third-party system (such as Windows, phone) page template 3, after the user selects the Android system, page template 1 will be displayed.
[0052] This solution also builds an online editor, see Figure 3As shown, it includes a template online preview area, a UI fragment component selection area, and a template attribute editing area, which are used by the user to select a template (i.e., the first template), configure template components, and attribute information of template components. For example, after the user selects the template "text_info" in the template online preview area, the template preview is displayed in the middle of the interface, the template components required for the template "text_info" are displayed in the upper left corner, and the attribute information corresponding to the template components, including attribute names and attribute values, are displayed in the upper right corner.
[0053] The SDK library also stores the code of each template component in advance. If the template component and its attribute information are not changed, the code corresponding to the selected operating system and template component can be directly retrieved from the SDK library. However, if the template component and its attribute information are changed, its code needs to be adaptively adjusted. For details, please refer to the following Figure 4 Description shown.
[0054] For step S102, after the first template and template component are selected, json data in a fixed format is output: [{"id":"id","name":"name","event_next_id":"id","data":"{}"].
[0055] The meaning of each field is as follows:
[0056] id Template ID Name Template Name event_next_id The next template ID to switch to Data Template Required Data
[0057] If the user has only selected one template, event_next_id here is the default value, such as 0. However, if the user needs to select another template after configuring the current first template, for example, if the interface switching requires multiple templates, the user can click the dependency option. In response to the user's operation, the device determines a list of templates with an association / dependency relationship with the first template based on the identifier of the first template for the user to select. For example, the third template in the template list is selected as the next template of the first template, and the ID of the third template is used as the value of event_next_id.
[0058] It should be noted that some templates do not have a direct association relationship, such as template 4 corresponds to a shopping interface and template 5 corresponds to a pet raising interface, so the associated template list of template 4 does not include template 5.
[0059] Each template will parse the data content contained in data according to different businesses, which also requires that each template contains a data relationship mapping object T to record template information. Use the JSON parsing tools related to each platform to reflect the data to the mapping object T to complete the business logic. The pseudo code is as follows:
[0060] public T parseData(String data){
[0061] return jsonUtil.parse(data);
[0062] }
[0063] For step S103, after completing the above-mentioned json data format conversion and obtaining the code of the template component, the codes of the Android system and the iOS system are assembled and packaged through gradle and macro definition.
[0064] 1. The Android system sets the java and res resource directories in sourceSets through gradle:
[0065] sourceSets{
[0066] java.dirs=[Template1 / java,Template2 / java]
[0067] res.dirs=[Template1 / res,Template2 / res]
[0068] }
[0069] After assembling the code project, the project is built and output through the CI (Continuous Integration) platform and gradle script; among them, CI is an existing construction tool and no innovation has been made.
[0070] 2. The iOS system sets the source_file and resources resource directories by configuring podspec
[0071] se.run(){|root|
[0072] #Source code file
[0073] s.source_files="#{root} / Template1 / *.{h,m,mm,cpp,hpp}","#{root} / Template1 / ** / *.{h,m,mm,cpp,hpp}"
[0074] / / Resource settings
[0075] s.resources="#{root} / Template / Assets / *.*"
[0076] }
[0077] In addition, it should be noted that if the user selects multiple templates, the packaged data is the json format data of each template and the code of the template components. For example, the json data of the first template, the json data of the third template, the code of each template component in the first template, and the code of each template component in the third template.
[0078] The method provided in the above embodiment builds a platform for quickly generating apps for people with low R&D capabilities. The overall operation is simple and easy, and the templates for different operating systems are different, which greatly improves the R&D efficiency. While lowering the R&D threshold, it also reduces the team's R&D costs.
[0079] See also Figure 4 , shows a schematic flow chart of an optional method for generating an application according to an embodiment of the present invention, comprising the following steps:
[0080] S401: In response to a selection operation on a first template, determining a template component corresponding to the first template, and displaying attribute information corresponding to the template component;
[0081] S402: In response to a deletion operation on a template component and / or a modification operation on an attribute value in attribute information, a second template is generated, and codes corresponding to each template component retrieved from a code library are adjusted;
[0082] S403: receiving input of the identifier and name of the second template, creating a mapping object, and converting the input identifier, name and the created mapping object into data in a predetermined format;
[0083] S404: Packing the data in a predetermined format and the adjusted code to obtain a code package corresponding to the second template and outputting the code package to generate an application program through the code package.
[0084] In the above embodiment, for steps S401 and S402, see also Figure 3 As shown, the online editor includes a template online preview area, a UI fragment component selection area, and a template attribute editing area. After the user selects the template "text_info" in the template online preview area, the template component corresponding to the template "text_info" is displayed in the upper left corner of the interface, and the attribute information corresponding to the template component is displayed in the upper right corner, including the attribute name and attribute value.
[0085] The user can edit and configure the template components in the UI fragment component selection area. Since the first template has been determined, the editing and configuration of the template component can only be deleted, and the change of attribute information is only to change the attribute value. However, if a template component is deleted, the corresponding attribute information will also be adaptively deleted. In addition, the attribute values are all default values at the initial moment, and the user's changes to them usually cannot exceed a certain range.
[0086] After changing the template components and / or attribute information of the first template, its state may be different from the original first template. To distinguish it from the original first template, the changed first template is set as the second template. After generating the second template, due to the changes in template components and attribute information, the code needs to be adaptively adjusted. For example, if template component 1 in the original first template is deleted, there is no need to obtain the code of template component 1 later; if the attribute value of template component 2 is changed from "Null" to "3", the corresponding code also needs to be adaptively changed.
[0087] For steps S403 and S404, the subsequent JSON format data conversion and code packaging are performed based on the second template.
[0088] The identifier and name of the second template can be user-defined or generated based on the first template. For example, if the name of the first template is text_info, the name of the corresponding second template is text_info_1, and the identifier is the same. For the mapping object created by the second template, the mapping object of the first template can be copied and adaptively adjusted.
[0089] In the method provided in the above embodiment, for the selected template, the user can modify the template components and attribute information according to his / her own needs, so as to obtain a personalized template.
[0090] Here, we will use the splash screen interface and home page of the e-commerce platform as examples. First, the R&D team established two configurable templates for the Android system and iOS system respectively. Template 1 includes the splash screen interface base map, logo, copy information, splash screen interface stay time and attribute configuration after the splash screen ends. Template 2 includes the banner button icon and copy at the top of the homepage, as well as the corresponding click attributes, the bottom navigation button icon and copy, and the corresponding click attribute configuration. Generate a random template ID for Template 1 and Template 2 (which can also be customized by the user).
[0091] Build a visual online editor, in which users can select templates and configure them, such as the background image link, logo, copy text, splash screen stay time, and event configuration after the splash screen ends. After the user completes the operation, the template ID, name, mapping object, and next template ID are output in json format, and the code corresponding to the template component is retrieved from the SDK library.
[0092] The specific export format is (including partial information of Template 1 and Template 2, and Template 2 is the next template of Template 1):
[0093] [{"id":"1","name":"Splash","event_next_id":"2","data":"{\"duration\":\"1000\",\"background\":\"background.jpg\",\"logo\":\"logo.jpg\"}"},{"id":"2","name":"Index","event_next_id":"2","data":"{\"banner\":[{\"icon\":\"i con1.jpg\",\"desc\":\"E-commerce platform supermarket
[0094] \",\"event_next\":\"3\"},{\"icon\":\"icon2.jpg\",\"desc\":\"Digital Appliances
[0095] \",\"event_next\":\"4\"}],\"menu\":[{\"icon\":\"icon1.jpg\",\"desc\":\"E-commerce platform supermarket
[0096] \",\"event_next\":\"X\"},{\"icon\":\"icon2.jpg\",\"desc\":\"Digital Appliances\",\"event_next\":\"X\"}]}"}]
[0097] According to the above configuration information, codes corresponding to the template components of template 1 and the template components of template 2 are selected from the Android system and the iOS system respectively, combined, and then packaged and outputted using the packaging tools of each operating system.
[0098] In this solution, the R&D team develops fixed templates and template components in the early stage to establish a multi-terminal SDK library. On this basis, a visual online editor is built for users to configure template components and change template properties independently, and assemble and package them in combination with the code configured in the SDK library to generate apps suitable for different operating systems.
[0099] See also Figure 5 , which shows a schematic diagram of main modules of a device 500 for generating an application program provided by an embodiment of the present invention, including:
[0100] The selection module 501 is used to determine the template components corresponding to the first template in response to the selection operation on the first template, and retrieve the codes corresponding to each template component from the code library;
[0101] A conversion module 502, configured to convert the identifier, name and mapping object of the first template into data in a predetermined format; wherein the mapping object records the template information of the first template;
[0102] The packaging module 503 is used to package the predetermined format data and the code, obtain a code package corresponding to the first template and output it, so as to generate an application through the code package.
[0103] In the implementation device of the present invention, the selection module 501 is further used to: display the attribute information corresponding to the template component, generate a second template in response to a deletion operation on the template component and / or a change operation of the attribute value in the attribute information, and adjust the code;
[0104] The conversion module 502 is used to: receive input of the identifier and name of the second template, create a mapping object, and convert the input identifier, name and created mapping object into data in a predetermined format;
[0105] The packaging module 503 is used to package the data in a predetermined format and the adjusted code to obtain a code package corresponding to the second template and output it.
[0106] In the implementation device of the present invention, the conversion module 502 is also used for:
[0107] In response to a click operation on the dependency relationship, according to the identifier, a template list associated with the first template is obtained and displayed, a selection operation on a third template in the template list is received, and the third template is used as a next template of the first template; and
[0108] Converting the identifier, name and mapping object of the third template into data in a predetermined format;
[0109] The packaging module 503 is also used to: package the predetermined format data of the first template, the predetermined format data of the third template, the code corresponding to each template component in the first template, and the code corresponding to each template component in the third template, generate a code package and output it; wherein the predetermined format data of the first template includes the identifier of the third template.
[0110] The implementation device of the present invention further includes an extraction module 504 (not shown in the figure), which is used to: in response to a selection operation on an operating system, extract and display a template list corresponding to the operating system; wherein the operating system is an Android system, an iOS system or a third-party system;
[0111] The selection module 501 is used to: retrieve codes corresponding to the operating system and each template component from a code library;
[0112] The packaging module 503 is used to package the predetermined format data and the code based on a packaging method corresponding to the operating system.
[0113] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.
[0114] Figure 6 An exemplary system architecture 600 is shown in which embodiments of the present invention may be applied.
[0115] like Figure 6 As shown, the system architecture 600 may include terminal devices 601, 602, 603, a network 604 and a server 605 (just an example). The network 604 is used to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. The network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0116] The user can use the terminal devices 601, 602, 603 to interact with the server 605 through the network 604 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 601, 602, 603.
[0117] The terminal devices 601, 602, 603 may be various electronic devices having display screens and supporting web browsing, and the server 605 may be a server providing various services.
[0118] It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device is generally set in the server 605 .
[0119] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0120] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0121] like Figure 7As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0122] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0123] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0124] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0125] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0126] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a selection module, a conversion module, and a packaging module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the packaging module may also be described as a "packaging code package module".
[0127] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0128] In response to a selection operation on a first template, determining a template component corresponding to the first template, and retrieving a code corresponding to each template component from a code library;
[0129] Converting the identifier, name and mapping object of the first template into data in a predetermined format; wherein the mapping object records the template information of the first template;
[0130] The predetermined format data and the code are packaged to obtain a code package corresponding to the first template and output the code package, so as to generate an application program through the code package.
[0131] According to the technical solution of the embodiment of the present invention, the R&D team develops fixed templates and template components in the early stage to establish a multi-terminal SDK library. On this basis, a visual online editor is built for users to enable users to independently configure template components and change template properties, and assemble and package them in combination with the code configured in the SDK library to generate apps suitable for different operating systems.
[0132] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for generating an application, characterized in that: include: In response to a selection operation on a first template, determining a template component corresponding to the first template, and retrieving a code corresponding to each template component from a code library; Converting the identifier, name and mapping object of the first template into data in a predetermined format, comprising: in response to a click operation on the dependency relationship, obtaining and displaying a template list associated with the first template according to the identifier, receiving a selection operation on a third template in the template list, and using the third template as the next template of the first template; and converting the identifier, name and mapping object of the third template into data in a predetermined format; wherein the mapping object records template information of the first template; The predetermined format data and the code are packaged to obtain and output a code package corresponding to the first template, so as to generate an application through the code package, including: packaging the predetermined format data of the first template, the predetermined format data of the third template, the code corresponding to each template component in the first template, and the code corresponding to each template component in the third template, generating a code package and outputting it; wherein the predetermined format data of the first template includes an identifier of the third template.
2. The method according to claim 1, characterized in that The determining of the template components corresponding to the first template, retrieving the codes corresponding to the template components from the code library, further comprises: displaying the attribute information corresponding to the template components, generating a second template in response to a deletion operation on the template components and / or a modification operation on the attribute values in the attribute information, and adjusting the codes; The converting the identifier, name and mapping object of the first template into data in a predetermined format includes: receiving input of the identifier and name of the second template, creating a mapping object, and converting the input identifier, name and created mapping object into data in a predetermined format; The packaging of the predetermined format data and the code to obtain a code package corresponding to the first template and output it includes: packaging the predetermined format data and the adjusted code to obtain a code package corresponding to the second template and output it.
3. The method according to claim 1 or 2, characterized in that: Before determining the template component corresponding to the first template in response to the selection operation of the first template, the method further includes: in response to the selection operation of an operating system, extracting and displaying a template list corresponding to the operating system; wherein the operating system is an Android system, an iOS system, or a third-party system; The retrieving the code corresponding to each template component from the code library includes: retrieving the code corresponding to the operating system and each template component from the code library; The packaging of the predetermined format data and the code includes: packaging the predetermined format data and the code based on a packaging method corresponding to the operating system.
4. A device for generating an application, characterized in that: include: A selection module, configured to determine, in response to a selection operation on a first template, a template component corresponding to the first template, and retrieve a code corresponding to each template component from a code library; The conversion module is used to convert the identifier, name and mapping object of the first template into data in a predetermined format, and further includes: in response to a click operation on the dependency relationship, according to the identifier, obtaining and displaying a template list associated with the first template, receiving a selection operation on a third template in the template list, and using the third template as the next template of the first template; and converting the identifier, name and mapping object of the third template into data in a predetermined format; wherein the mapping object records the template information of the first template; A packaging module is used to package the predetermined format data and the code, obtain a code package corresponding to the first template and output it, so as to generate an application through the code package, including: packaging the predetermined format data of the first template, the predetermined format data of the third template, the code corresponding to each template component in the first template, and the code corresponding to each template component in the third template, generating a code package and outputting it; wherein the predetermined format data of the first template includes an identifier of the third template.
5. The device according to claim 4, characterized in that The selection module is further used to: display the attribute information corresponding to the template component, generate a second template in response to a deletion operation on the template component and / or a modification operation of the attribute value in the attribute information, and adjust the code; The conversion module is used to: receive input of the identifier and name of the second template, create a mapping object, and convert the input identifier, name and created mapping object into data in a predetermined format; The packaging module is used to: package the data in a predetermined format and the adjusted code to obtain a code package corresponding to the second template and output it.
6. The device according to claim 4 or 5, characterized in that It also includes an extraction module, which is used to: in response to a selection operation on an operating system, extract and display a template list corresponding to the operating system; wherein the operating system is an Android system, an iOS system or a third-party system; The selection module is used to: retrieve codes corresponding to the operating system and each template component from a code library; The packaging module is used to package the predetermined format data and the code based on a packaging method corresponding to the operating system.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Applet generation method and device
CN110727431A