A method, apparatus, device and medium for generating an app
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
- Filing Date
- 2021-06-11
- Publication Date
- 2026-07-03
Smart Images

Figure CN113485699B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of mobile internet, and in particular to a method, apparatus, device, and medium for generating an APP. Background Technology
[0002] An application (APP) refers to a third-party application used on a smartphone. With the widespread use of smartphones and mobile devices such as iPads, people have gradually become accustomed to using APP clients to access the internet. Currently, major e-commerce platforms in China all have their own APP clients, which signifies that the commercial use of APP clients is beginning to show its potential.
[0003] In app development, speed is crucial. Currently, even for the same enterprise-level application targeting different companies, where only some functional files differ, developers still need to start from scratch. This repetitive development consumes a significant amount of developers' time on repetitive tasks, leading to low development efficiency and lengthy development cycles. Furthermore, this large amount of repetitive work also limits developers' career growth opportunities. Summary of the Invention
[0004] This specification provides one or more embodiments of a method for generating an APP, which addresses the following technical problem: how to improve the development efficiency of an APP and reduce repetitive development work for developers.
[0005] One or more embodiments of this specification employ the following technical solutions:
[0006] This specification provides one or more embodiments of a method for generating an APP, the method including:
[0007] Copy the required base code from a pre-deployed code repository;
[0008] Based on the base code, the APP project with the preset identifier is determined;
[0009] Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information;
[0010] Replace the original configuration file in the APP project with the configuration file from the code repository;
[0011] The APP project is packaged to generate the corresponding APP.
[0012] Optionally, in one or more embodiments of this specification, before copying the required base code from a pre-deployed code repository, the method further includes:
[0013] Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms;
[0014] Select the corresponding code repository according to the type of the APP project, determine the search term rules of the management platform, and filter the summarized descriptive terms of the APP project through the search term rules;
[0015] After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained;
[0016] Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree.
[0017] Optionally, in one or more embodiments of this specification, determining the prominent configuration file of the APP based on the configuration information specifically includes:
[0018] The configuration information of the APP project is categorized, and different types of configuration files are generated in the form of macros through a preset management platform.
[0019] Optionally, in one or more embodiments of this specification, after determining the configuration file of the APP project based on the configuration information, the method further includes:
[0020] If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module;
[0021] The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.
[0022] Optionally, in one or more embodiments of this specification, replacing the original configuration file in the APP project with the configuration file through the code repository specifically includes:
[0023] Obtain the filename and file path of the configuration file;
[0024] Perform a full-text search in the APP project of the code repository based on the file name of the configuration file;
[0025] If the original configuration file in the APP project has the same filename as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project.
[0026] Optionally, in one or more embodiments of this specification, after packaging the APP project, the method further includes:
[0027] The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted.
[0028] The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected;
[0029] The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP.
[0030] Optionally, in one or more embodiments of this specification, the configuration information includes at least one or more of the following: domain name, package name, version number, third-party key, number of tags, copyright information, and logo image.
[0031] This specification provides one or more embodiments of an apparatus for generating an app, the apparatus comprising:
[0032] A copy unit is used to copy the required base code from a pre-deployed code repository;
[0033] The determining unit is used to determine the APP project with a preset identifier based on the base code;
[0034] The configuration file unit is used to obtain the configuration information that the management platform has pre-configured for the APP project, so as to determine the configuration file of the APP project based on the configuration information;
[0035] The replacement unit is used to replace the original configuration file in the APP project with the configuration file through the code repository;
[0036] The packaging unit is used to package the APP project to generate the corresponding APP.
[0037] Optionally, in one or more embodiments of this specification, the apparatus further includes: a matching unit.
[0038] The extraction unit is used to obtain the requirements document of the APP project, extract the descriptive words of the APP project from the requirements document, and summarize the descriptive words;
[0039] The filtering unit is used to select the corresponding code repository according to the type of the APP project, determine the search term rules of the management platform, and filter the summarized descriptive terms of the APP project through the search term rules;
[0040] The matching unit is used to filter the descriptive terms according to the search term rules to obtain the keywords of the APP project; and to traverse the various base codes of the code repository according to the keywords to obtain the base code with the highest matching degree.
[0041] Optionally, the apparatus further includes: a generation unit;
[0042] The generation unit is used to classify the configuration information of the APP project and generate different types of configuration files in the form of macros through a preset management platform.
[0043] Optionally, the device further includes: a calling unit and a selection unit;
[0044] The calling unit is used to call the interface file related to the functional module in the management platform when it is determined from the requirements file of the APP project that the functional module in the configuration file needs to display a page; wherein, the interface file is used to determine the usage permissions and parameters of the interface target to be called by the functional module;
[0045] The selection unit is used to call the target interface through the interface file, so as to select the style and data information to be displayed by the functional module according to the usage permissions and parameters of the target interface.
[0046] Optionally, the replacement unit of the device specifically includes: a path acquisition unit, a retrieval unit, and a file replacement unit;
[0047] The path acquisition unit is used to acquire the file name and file path of the configuration file;
[0048] The retrieval unit is used to perform a full-text search in the APP project of the code repository based on the file name of the configuration file;
[0049] The file replacement unit is used to replace the original configuration file with the file path of the original configuration file when the original configuration file in the APP project has the same file name as the original configuration file, so as to obtain the replaced APP project.
[0050] Optionally, the device further includes: an encoding unit, a conversion unit, and a replacement protection unit;
[0051] The encoding unit is used to decompile the packaged APP to obtain an abstract syntax tree and extract the instruction code that needs to be protected from the packaged APP.
[0052] The conversion unit is used to process the content in the nodes of the abstract syntax tree according to the preset conversion rules to obtain the conversion code corresponding to the instruction code that needs to be protected;
[0053] The replacement protection unit is used to replace the instruction code that needs to be protected with coded data according to the conversion code, so as to strengthen the protection of the APP.
[0054] This specification provides one or more embodiments of a device for generating an app, the device comprising:
[0055] At least one processor; and,
[0056] A memory communicatively connected to the at least one processor; wherein,
[0057] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0058] Copy the required base code from a pre-deployed code repository;
[0059] Based on the base code, the APP project with the preset identifier is determined;
[0060] Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information;
[0061] Replace the original configuration file in the APP project with the configuration file from the code repository;
[0062] The APP project is packaged to generate the corresponding APP.
[0063] This specification provides one or more embodiments of a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0064] Copy the required base code from a pre-deployed code repository;
[0065] Based on the base code, the APP project with the preset identifier is determined;
[0066] Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information;
[0067] Replace the original configuration file in the APP project with the configuration file from the code repository;
[0068] The APP project is packaged to generate the corresponding APP.
[0069] The above-mentioned at least one technical solution adopted in the embodiments of this specification can achieve the following beneficial effects: the APP in this application can be configured by the user according to their needs, without being constrained by technical conditions, and the user does not need to be a professional R&D personnel to achieve the same APP function as the R&D personnel. Attached Figure Description
[0070] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:
[0071] Figure 1 This is a schematic flowchart of a method for generating an APP provided in an embodiment of this specification;
[0072] Figure 2 A schematic diagram of the internal structure of an apparatus for generating an APP provided in an embodiment of this specification;
[0073] Figure 3 This is a schematic diagram of the internal structure of a device for generating an APP, provided in an embodiment of this specification.
[0074] Figure 4 This is a schematic diagram of the internal structure of a non-volatile storage medium provided in the embodiments of this specification. Detailed Implementation
[0075] This specification provides a method, apparatus, device, and medium for generating an APP.
[0076] An application (APP) refers to a third-party application used on a smartphone. Currently, well-known app stores include Apple's App Store (iTunes Store), Google Play Store for Android, Nokia's Ovi Store, and BlackBerry App World for Blackberry users. Apple's iOS system uses IPA, PXL, and DEB formats for apps; Google's Android system uses APK format, and there's also GPK format from ThumbPlay, which combines data packages with games for installation; Nokia's S60 formats include SIS and SISX.
[0077] The rapid development of mobile internet technology has made mobile e-commerce a hot topic in recent years. Mobile devices, represented by Android, iOS, and Windows Phone, have transformed from traditional communication equipment into internet terminals. Their unique portability has allowed mobile internet to gradually penetrate deeper into people's lives. The development of mobile internet has brought new opportunities to companies that can quickly integrate into it, and apps have become a powerful tool for mobile internet marketing. Apps can enhance a company's image, increase customer engagement, and help it stand out from its competitors. Customized apps offer greater design freedom and are better tailored to the needs of most businesses.
[0078] To address the issues of repetitive app development and speed, existing technologies have proposed rapid app generation techniques. However, the native application platforms in these rapid generation technologies merely provide a pre-designed app template, offering only choices for name, icon, splash screen, and background. They don't give clients much autonomy in terms of functionality. Applicants are often forced to accept all the features of a chosen app type, unable to customize the configuration information to their own needs. This results in generic apps that fail to fully meet the client's project requirements.
[0079] Meanwhile, in the traditional APP development process, which relies on developers adding features to the APP based on customer needs, the creation of an APP requires a large number of developers, consuming their energy and time. Furthermore, the high development time cost often involves repetitive development work, leading to a cycle of redundant tasks and limiting the development growth potential of developers. Because this process is entirely dependent on developers, it increases costs for enterprises and slows down APP development.
[0080] Therefore, this application proposes a method for generating an app based on the technical characteristics of the platform architecture. After developers publicly disclose the name of the configuration file, the platform's functional configuration files enable greater flexibility. Non-developers can then manage and fill in the relevant configuration information, modifying the app domain name, third-party SDK keys, and image paths through the configuration files to create a completely new app. An automated packaging process automatically generates a download QR code for one-click installation. Based on the platform code, new apps can be developed without any intervention from developers, achieving the goal of saving labor costs in certain scenarios.
[0081] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0082] In one or more embodiments of this specification, the operation is performed by the server terminal that generates the APP or by each execution unit of the server terminal.
[0083] like Figure 1 As shown in the figure, one or more embodiments of this specification provide a flowchart of a method for generating an APP.
[0084] Figure 1 The process may include the following steps:
[0085] S101: Copy the required base code from a pre-deployed code repository.
[0086] In one or more embodiments of this specification, prior to copying the required base code from a pre-deployed code repository, the method further includes:
[0087] Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms;
[0088] Select the corresponding code repository according to the type of the APP project, determine the search term rules of the management platform, and filter the summarized descriptive terms of the APP project through the search term rules;
[0089] After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained;
[0090] Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree.
[0091] The code repository stores the base code of the original APP project. By copying the required base code from the code repository according to the needs, the subsequent APP can be generated while keeping the base architecture unchanged, so as to solve the changing needs of customers.
[0092] It's important to note that the code repository can be hosted on domestic or international third-party code hosting platforms according to its own needs. For example, GitHub and GitLab. GitHub is a hosting platform for open-source and private software projects. Because it only supports Git as the sole version control format, it is named GitHub. GitHub, an online code repository based on Git, is currently the world's largest code hosting platform, helping programmers communicate and learn from each other. GitLab is an open-source project for repository management systems. It uses Git as the code management tool and builds a web service on top of it. Users can also use GitLab to build their own repository similar to GitHub.
[0093] Before copying the base code, it is necessary to clarify the specific generation requirements of the APP in order to obtain base code that matches the APP. This ensures that the base code has a suitable architecture and matching functions for subsequent configuration, thereby saving unnecessary function replacement and modification steps during the configuration process and saving time spent on APP generation.
[0094] First, before developing the app, it's necessary to obtain the app project's requirements document. Based on this document, descriptive terms for the app project need to be extracted. These descriptive terms are Chinese words that summarize the app's functions. Since the requirements document contains many terms, some are simple programming terms and need to be excluded. The code repository's keyword rules are then used to filter the descriptive terms for the app project, extracting keywords that summarize the app project. For example, the requirements document might contain descriptive terms like: share, favorite, view, select type, click to buy, display details, price, and date; however, the code repository's keyword rules exclude price and date from search terms, thus filtering these terms.
[0095] It should be noted that the search term rules refer to the settings of search terms, which correspond to classification rules and word frequency, etc. Different search term rules have different filtering standards for descriptive words. Therefore, only by processing the descriptive words according to the search term rules can the keywords corresponding to the APP project be obtained.
[0096] After obtaining keywords that can summarize the APP project, the code repository is searched for various foundational codes based on these keywords to find the foundational code that best matches the current APP project. This reduces the amount of configuration information that needs to be replaced or modified, saving time and effort spent on feature configuration.
[0097] S102: Determine the APP item with the preset identifier based on the base code;
[0098] Based on the obtained base code, the configuration information and type of the original APP project can be obtained. Furthermore, the configuration file of the original APP, pre-configured by the developers within the base code, can be retrieved. Based on the original APP configuration file and the APP project's requirements file, APP projects with preset identifiers can be identified. These preset identifiers can distinguish between different APP projects, preventing confusion and unnecessary configuration errors.
[0099] S103: Obtain the configuration information of the APP project pre-configured by the preset management platform, so as to determine the configuration file of the APP project according to the configuration information.
[0100] In one or more embodiments of this specification, the configuration information determines the configuration file of the APP project, specifically including:
[0101] The configuration information of the APP project is categorized, and different types of configuration files are generated in the form of macros through a preset management platform.
[0102] In one or more embodiments of this specification, after determining the configuration file of the APP project based on the configuration information, the method further includes:
[0103] If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module;
[0104] The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.
[0105] In one or more embodiments of this specification, the configuration information includes at least one or more of the following: domain name, package name, version number, third-party key, number of tags, copyright information, and logo image.
[0106] After obtaining the required functions of the APP from the project's requirements document, the necessary functions are selected through a pre-defined management platform. Unnecessary functions can be left unselected, avoiding increased compilation time or impact on the installation package size due to redundant features. After selecting the functional modules, configuration information can be categorized and generated into different types of configuration files in macro form through the pre-configured management platform. These configuration files are globally configured in macro form; for example, the APP domain name is centrally managed through configuration files. Items involving the APP domain name in the project are assigned values as macros. This allows for local replacement of the APP domain name simply by modifying the configuration file, making the APP project modification process convenient and quick, saving developers' development time.
[0107] It should be noted that the management platform mentioned is a function configuration platform. It can be an operations management platform, an agile management platform, or any other app configuration platform that provides commonly used functional controls. Additionally, for example, the Jimu Mirror plugin for Android Studio / IDEA can integrate commonly used Android functional controls. Selecting the required functional modules through the management platform is simple and can be done by non-development personnel. By involving non-development personnel to replace developers in repetitive development work, it can free up development staff, increase their growth opportunities, and save on app development costs.
[0108] If the requirements document determines that the functional modules in the APP project configuration file need to display pages, then the usage permissions and parameters of the target interface to be called by the functional module can be determined by calling the corresponding interface file in the management platform.
[0109] When specific functional modules in the code repository need to be displayed, certain interfaces can be exposed to these applications to achieve the purpose of page display. To prevent application developers from abusing local resources, certain usage permissions and parameters are set for the target interfaces. After verification, the APP project can obtain the control styles and data of the required display functional modules through the interface information of the target interface. Therefore, when certain functions in an APP project need to be displayed, the corresponding target interface needs to be called through the interface file to obtain several display page styles and data information that can be used. It should be noted that the homepage code of the management platform has dozens of pre-built display modules that almost cover the styles of all APPs, so the display of functional modules can be flexibly configured based on the interface information of the target interface.
[0110] S104: Replace the original configuration file in the APP project with the configuration file through the code repository.
[0111] In one or more embodiments of this specification, replacing the original configuration file in the APP project with the configuration file through the code repository specifically includes:
[0112] Obtain the filename and file path of the configuration file;
[0113] Perform a full-text search in the APP project of the code repository based on the file name of the configuration file;
[0114] If the original configuration file in the APP project has the same filename as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project.
[0115] The configuration file uses relative paths. By obtaining the filename and relative path of the configuration file, a full-text search can be performed in the code repository, leveraging the macro-based nature of the configuration file. When a configuration file filename matching the one found in the copied base code is retrieved, the new configuration file replaces the original file path in the base code. After the replacement, the project now includes the custom functionality defined in the requirements file, enabling non-developers to create personalized apps and addressing diverse user needs. Furthermore, the full-text search and replacement method in the base code facilitates code migration and modification.
[0116] It's important to note that the configuration file path doesn't require special handling; as long as a relative path exists, the base code can be copied from the GitLab code repository to build the current app project. The base's flexible functionality allows users to choose features and styles without being limited by pre-generated app styles. They can generate completely different apps without releasing a new version or modifying the code, addressing diverse user needs.
[0117] S105: Package the APP project to generate the corresponding APP.
[0118] In one or more embodiments of this specification, after packaging the APP project, the method further includes:
[0119] The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted.
[0120] The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected;
[0121] The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP.
[0122] After replacing the APP project configuration file, the APP project now has the custom functions required by the user. The new APP installation package can be obtained directly by using the corresponding command-line code for iOS and Android. To ensure that the data information in the newly generated APP is not maliciously modified, clients often require the application installation package file to be hardened to guarantee application security.
[0123] First, the automatically generated app installation package can be decompiled to obtain the corresponding abstract syntax tree (AST). Then, the nodes on the AST are obtained, and their contents are processed according to preset transformation rules to obtain the transformed code corresponding to the app's instruction code that needs protection. It's important to note that the transformed code performs the same function as the required app instruction code within the app installation package, and decompiling the transformed code is more complex than decompiling the app's instruction code itself.
[0124] The process involves replacing the protected app's instruction code with the converted code to obtain the replaced encoded data. The converted code and the replaced app code are then repackaged to obtain the app's installation package file. By converting the app's instruction code into a decompiled code image, the difficulty and complexity of decompilation are increased, effectively protecting the app project and improving the security of the app installation package.
[0125] It should be noted that the above-mentioned abstract syntax tree is a tree-like representation of the abstract syntax structure of the source code. It is a register-based, typed three-address code with both statement and expression forms. Each node in the abstract syntax tree represents a structure in the source code. The abstract syntax tree of the installation package file can be obtained by decompiling the installation package file. This invention can use various forms of abstract syntax trees, such as Jimple, and no specific limitation is made here.
[0126] like Figure 2 As shown, one or more embodiments of this specification provide an apparatus for generating an APP.
[0127] Depend on Figure 2 It is known that the device includes:
[0128] A copy unit is used to copy the required base code from a pre-deployed code repository;
[0129] The determining unit is used to determine the APP project with a preset identifier based on the base code;
[0130] The configuration file unit is used to obtain the configuration information that the management platform has pre-configured for the APP project, so as to determine the configuration file of the APP project based on the configuration information;
[0131] The replacement unit is used to replace the original configuration file in the APP project with the configuration file through the code repository;
[0132] The packaging unit is used to package the APP project to generate the corresponding APP.
[0133] In one or more embodiments of this specification, the apparatus further includes: a matching unit.
[0134] The extraction unit is used to obtain the requirements document of the APP project, extract the descriptive words of the APP project from the requirements document, and summarize the descriptive words;
[0135] The filtering unit is used to select the corresponding code repository according to the type of the APP project, determine the search term rules of the management platform, and filter the summarized descriptive terms of the APP project through the search term rules;
[0136] The matching unit is used to filter the descriptive terms according to the search term rules to obtain the keywords of the APP project; and to traverse the various base codes of the code repository according to the keywords to obtain the base code with the highest matching degree.
[0137] In one or more embodiments of this specification, the apparatus further includes: a generation unit;
[0138] The generation unit is used to classify the configuration information of the APP project and generate different types of configuration files in the form of macros through a preset management platform.
[0139] Optionally, the device further includes: a calling unit and a selection unit;
[0140] The calling unit is used to call the interface file related to the functional module in the management platform when it is determined from the requirements file of the APP project that the functional module in the configuration file needs to display a page; wherein, the interface file is used to determine the usage permissions and parameters of the interface target to be called by the functional module;
[0141] The selection unit is used to call the target interface through the interface file, so as to select the style and data information to be displayed by the functional module according to the usage permissions and parameters of the target interface.
[0142] In one or more embodiments of this specification, the replacement unit of the device specifically includes: a path acquisition unit, a retrieval unit, and a file replacement unit;
[0143] The path acquisition unit is used to acquire the file name and file path of the configuration file;
[0144] The retrieval unit is used to perform a full-text search in the APP project of the code repository based on the file name of the configuration file;
[0145] The file replacement unit is used to replace the original configuration file with the file path of the original configuration file when the original configuration file in the APP project has the same file name as the original configuration file, so as to obtain the replaced APP project.
[0146] In one or more embodiments of this specification, the apparatus further includes: an encoding unit, a conversion unit, and a replacement protection unit;
[0147] The encoding unit is used to decompile the packaged APP to obtain an abstract syntax tree and extract the instruction code that needs to be protected from the packaged APP.
[0148] The conversion unit is used to process the content in the nodes of the abstract syntax tree according to the preset conversion rules to obtain the conversion code corresponding to the instruction code that needs to be protected;
[0149] The replacement protection unit is used to replace the instruction code that needs to be protected with coded data according to the conversion code, so as to strengthen the protection of the APP.
[0150] like Figure 3 As shown, a device for generating an APP is provided in one or more embodiments of this specification, the device comprising:
[0151] At least one processor 301; and,
[0152] The memory 302 is communicatively connected to the at least one processor 301; wherein,
[0153] The memory 302 stores instructions that can be executed by the at least one processor 301, the instructions being executed by the at least one processor 301 to enable the at least one processor 301 to:
[0154] Copy the required base code from a pre-deployed code repository;
[0155] Based on the base code, the APP project with the preset identifier is determined;
[0156] Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information;
[0157] Replace the original configuration file in the APP project with the configuration file from the code repository;
[0158] The APP project is packaged to generate the corresponding APP.
[0159] like Figure 4 As shown, one or more embodiments of this specification provide a non-volatile computer storage medium storing computer-executable instructions 401, wherein the computer-executable instructions 401 are configured as follows:
[0160] Copy the required base code from a pre-deployed code repository;
[0161] Based on the base code, the APP project with the preset identifier is determined;
[0162] Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information;
[0163] Replace the original configuration file in the APP project with the configuration file from the code repository;
[0164] The APP project is packaged to generate the corresponding APP.
[0165] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and non-volatile computer storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0166] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0167] The above description is merely one or more embodiments of this specification and is not intended to limit this specification. Various modifications and variations can be made to the one or more embodiments of this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of one or more embodiments of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for generating an App, the method comprising: Copy the required base code from a pre-deployed code repository; Based on the base code, the APP project with the preset identifier is determined; Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information; Replace the original configuration file in the APP project with the configuration file from the code repository; The APP project is packaged to generate the corresponding APP; Prior to copying the required base code from a pre-deployed code repository, the method further includes: Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms; Select the corresponding code repository according to the type of the APP project, determine the search term rules of the code repository, and filter the summarized descriptive terms of the APP project through the search term rules; After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained; Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree; The code repository replaces the original configuration file in the APP project with the configuration file, specifically including: Obtain the filename and file path of the configuration file; Perform a full-text search in the APP project of the code repository based on the file name of the configuration file; If the original configuration file in the APP project has the same file name as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project. After packaging the APP project, the method further includes: The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted. The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected; The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP; The step of determining the configuration file of the APP project based on the configuration information specifically includes: The configuration information of the APP project is classified, and different types of configuration files are generated in the form of macros through a preset management platform; After determining the configuration file of the APP project based on the configuration information, the method further includes: If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module; The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.
2. The method of generating APP according to claim 1, wherein, The configuration information includes at least one or more of the following: domain name, package name, version number, third-party key, number of tags, copyright information, and logo image.
3. An apparatus for generating an APP, characterized in that, The device includes: A copy unit is used to copy the required base code from a pre-deployed code repository; The determining unit is used to determine the APP project with a preset identifier based on the base code; The configuration file unit is used to obtain the configuration information that the management platform has pre-configured for the APP project, so as to determine the configuration file of the APP project based on the configuration information; The replacement unit is used to replace the original configuration file in the APP project with the configuration file through the code repository; The packaging unit, used to package the APP project to generate the corresponding APP, further includes the following before copying the required base code through a pre-deployed code repository: Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms; Select the corresponding code repository according to the type of the APP project, determine the search term rules of the code repository, and filter the summarized descriptive terms of the APP project through the search term rules; After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained; Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree; The code repository replaces the original configuration file in the APP project with the configuration file, specifically including: Obtain the filename and file path of the configuration file; Perform a full-text search in the APP project of the code repository based on the file name of the configuration file; If the original configuration file in the APP project has the same file name as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project. After packaging the APP project, it also includes: The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted. The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected; The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP; The step of determining the configuration file of the APP project based on the configuration information specifically includes: The configuration information of the APP project is classified, and different types of configuration files are generated in the form of macros through a preset management platform; After determining the configuration file of the APP project based on the configuration information, the following is also included: If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module; The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.
4. A device for generating an APP, characterized in that, The device includes: At least one processor, and The memory communicatively connected to the at least one processor, wherein, The memory stores executable instructions of the at least one processor, enabling the at least one processor to: Copy the required base code from a pre-deployed code repository; Based on the base code, the APP project with the preset identifier is determined; Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information; Replace the original configuration file in the APP project with the configuration file from the code repository; The APP project is packaged to generate the corresponding APP; Before copying the required base code from a pre-deployed code repository, the process also includes: Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms; Select the corresponding code repository according to the type of the APP project, determine the search term rules of the code repository, and filter the summarized descriptive terms of the APP project through the search term rules; After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained; Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree; The code repository replaces the original configuration file in the APP project with the configuration file, specifically including: Obtain the filename and file path of the configuration file; Perform a full-text search in the APP project of the code repository based on the file name of the configuration file; If the original configuration file in the APP project has the same file name as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project. After packaging the APP project, it also includes: The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted. The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected; The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP; The step of determining the configuration file of the APP project based on the configuration information specifically includes: The configuration information of the APP project is classified, and different types of configuration files are generated in the form of macros through a preset management platform; After determining the configuration file of the APP project based on the configuration information, the following is also included: If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module; The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.
5. A non-volatile storage medium storing computer-executable instructions, the executable instructions comprising: Copy the required base code from a pre-deployed code repository; Based on the base code, the APP project with the preset identifier is determined; Obtain the configuration information pre-configured for the APP project by the preset management platform, so as to determine the configuration file of the APP project based on the configuration information; Replace the original configuration file in the APP project with the configuration file from the code repository; The APP project is packaged to generate the corresponding APP; Before copying the required base code from a pre-deployed code repository, the process also includes: Obtain the requirements document for the APP project, extract the descriptive terms for the APP project from the requirements document, and summarize the descriptive terms; Select the corresponding code repository according to the type of the APP project, determine the search term rules of the code repository, and filter the summarized descriptive terms of the APP project through the search term rules; After filtering the descriptive terms according to the search term rules, the keywords of the APP project are obtained; Based on the keywords, iterate through all types of base code in the code repository and obtain the base code with the highest matching degree; The code repository replaces the original configuration file in the APP project with the configuration file, specifically including: Obtain the filename and file path of the configuration file; Perform a full-text search in the APP project of the code repository based on the file name of the configuration file; If the original configuration file in the APP project has the same file name as the configuration file, then the original configuration file is replaced by the file path of the configuration file to obtain the replaced APP project. After packaging the APP project, it also includes: The packaged APP is decompiled to obtain an abstract syntax tree, and the instruction code that needs to be protected in the packaged APP is extracted. The content in the nodes of the abstract syntax tree is processed according to the preset conversion rules to obtain the converted code corresponding to the instruction code that needs to be protected; The instruction code that needs protection is replaced with coded data according to the conversion code to strengthen the protection of the APP; The step of determining the configuration file of the APP project based on the configuration information specifically includes: The configuration information of the APP project is classified, and different types of configuration files are generated in the form of macros through a preset management platform; After determining the configuration file of the APP project based on the configuration information, the following is also included: If, based on the requirements document of the APP project, it is determined that a functional module in the configuration file needs to display a page, then the interface file related to the functional module in the management platform is called; wherein, the interface file is used to determine the usage permissions and parameters of the target interface to be called by the functional module; The target interface is called through the interface file to select the display page style and data information required by the functional module according to the usage permissions and parameters of the target interface.