Program creation method, device, electronic device and storage medium
By establishing a template library and a template search mechanism, the duplicate development problem of the same content in program development is solved, and the fast and efficient creation of programs is achieved, which is suitable for program development in multiple fields.
Patent Information
- Application Number
- CN202111020782.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-09-01
AI Technical Summary
In the prior art, there are a large number of repeated developments of the same content during the program development process, resulting in low work efficiency and high pressure on development testers.
By creating a template library, we store templates that can be configured with different needs, and find the corresponding templates in the template library according to the program identification, select the parameters to be configured, determine the parameter information, and finally create the corresponding program based on the parameter information and templates.
It realizes fast and efficient creation of programs, reduces the pressure of development and testing, and is suitable for program development work in multiple fields.
Smart Images

Figure CN113900639B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and particularly relates to a program creation method, apparatus, electronic device, and storage medium. Background Art
[0002] In current program development, there is a problem of repeated development of a large amount of identical content. Sometimes, for requirements such as only replacing some copywriting or parameters, professional development operations are required, followed by testing and release. This method greatly reduces work efficiency and causes pressure on developers and testers. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. For this purpose, the present invention proposes a program creation method, which realizes the purpose of quickly and efficiently constructing a program by selecting a program template and configuring parameters with different requirements on the basis of the template.
[0004] The present invention also proposes a program creation apparatus, an electronic device, and a storage medium.
[0005] According to the program creation method of the first aspect embodiment of the present invention, it includes:
[0006] Search for a template corresponding to the program identifier in the template library according to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to one or more platform language environments, and the compilation statement containing the parameters to be configured is included in the compilation file;
[0007] Select the target parameters from the parameters to be configured in the template, and determine the parameter information of the target parameters;
[0008] Create a corresponding program according to the parameter information and the template.
[0009] According to the program creation method of the embodiment of the present invention, by establishing a template library, storing templates that can configure different requirements in the template library, selecting a template according to requirements, and then creating a program according to the template, the purpose of different users quickly and efficiently constructing a program is realized.
[0010] According to an embodiment of the present invention, the target parameters include architecture parameters and requirement parameters. Correspondingly, the selection of the target parameters from the parameters to be configured in the template includes:
[0011] Determine the architecture type and requirement type of the program to be created, and determine the architecture parameters and requirement parameters from the parameters to be configured according to the architecture type and the requirement type; wherein, the parameters to be configured are composed of parameters corresponding to different architecture types and parameters corresponding to different requirement types.
[0012] According to an embodiment of the present invention, creating a corresponding program according to the parameter information and the template includes:
[0013] Selecting compilation statements of parameter information corresponding to architecture parameters and compilation statements of parameter information corresponding to requirement parameters from the template;
[0014] Creating a corresponding program according to the selected compilation statements.
[0015] According to an embodiment of the present invention, searching for a template corresponding to the program identifier in the template library includes:
[0016] Searching for a template label corresponding to the program identifier in the cache; wherein, a template list is stored in the cache, and the template list stores the corresponding relationship between each program identifier and each template label;
[0017] Searching for a template matching the template label in the template library according to the template label.
[0018] According to an embodiment of the present invention, the program identifier includes a content identifier and a platform identifier, and the method further includes:
[0019] If a template label that matches both the content identifier and the platform identifier is not found in the cache according to the content identifier and the platform identifier, determining a template label that can match any one of the content identifier and the platform identifier;
[0020] Selecting any one of the template labels obtained by matching, and searching for a template matching the template label in the template library according to the template label;
[0021] Adding compilation statements corresponding to the content identifier and the platform identifier to the matched template according to the content identifier and the platform identifier.
[0022] According to an embodiment of the present invention, the method further includes:
[0023] If a template label that matches any one of the content identifier and the platform identifier is not found in the cache according to the content identifier and the platform identifier, creating a new template according to the content identifier and the platform identifier.
[0024] A program creation device according to an embodiment of the second aspect of the present invention includes:
[0025] A search module, configured to search in a template library for a template corresponding to the program identifier of a program to be created; wherein, the template is a compilation file adaptable to one or more platform language environments, and the compilation statements of the parameters to be configured are included in the compilation file;
[0026] A configuration module, configured to select target parameters from the parameters to be configured in the template and determine the parameter information of the target parameters;
[0027] A creation module, configured to create a corresponding program according to the parameter information and the template.
[0028] An electronic device according to an embodiment of the third aspect of the present invention includes a processor and a memory storing a computer program, and when the processor executes the computer program, the steps of the above program creation method are implemented.
[0029] A non-transitory computer-readable storage medium according to an embodiment of the fourth aspect of the present invention stores a computer program thereon, and when the computer program is executed by a processor, the steps of the above program creation method are implemented.
[0030] One or more of the above technical solutions in the embodiments of the present invention have at least one of the following technical effects:
[0031] Further, by separately configuring the architecture parameters and the requirement parameters, the horizontal and vertical expansion of program creation is realized, which is applicable to the program development work in multiple fields.
[0032] Furthermore, since the template is configured with parameters to be configured for different requirements, the corresponding compilation statements can be quickly found during the parameter selection process, so that the compilation file on which the program is created can be quickly obtained, and the program can be created quickly.
[0033] Still further, through the query of the template list, the corresponding template can be quickly found based on the program identifier, the scheduling of the template is accelerated, and quick service is provided for the subsequent creation of the program.
[0034] Also further, by adding new compilation statements or compilation files to the templates in the template library, the templates can be effectively managed, the templates in the template library are made more abundant, and programs with different requirements can be created.
[0035] The additional aspects and advantages of the present invention will be partly given in the following description, partly will become obvious from the following description, or will be understood through the practice of the present invention. Description of the Drawings
[0036] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0037] Figure 1 is a schematic flowchart of a program creation method provided by an embodiment of the present invention;
[0038] Figure 2 is a schematic structural diagram of a program creation device provided by an embodiment of the present invention;
[0039] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Specific Embodiments
[0040] The following further describes the embodiments of the present invention in detail in conjunction with the drawings and embodiments. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.
[0041] Figure 1 Illustrates a schematic flowchart of the program creation method provided by the present invention. Refer to Figure 1 , the method includes:
[0042] 11. Search for a template corresponding to the program identifier in the template library according to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to one or more platform language environments, and the compilation statement containing the parameters to be configured is included in the compilation file;
[0043] 12. Select the target parameters from the parameters to be configured in the template, and determine the parameter information of the target parameters;
[0044] 13. Create a corresponding program according to the parameter information and the template.
[0045] In this regard, it should be noted that in the present invention, a template library is configured, and multiple templates are configured in the template library. The template is a compilation file based on which software products are built. Different software products are applicable to different platforms, and different platforms have their own configured language environments.
[0046] The templates in the template library provided by the present invention are compilation files that can be adapted to one or more platform language environments. Therefore, it enables non-software product developers to directly call the templates to build the software products they need and publish the software products to the required platforms.
[0047] In the present invention, each template has a compilation file that contains compilation statements for the parameters to be configured. On the compilation display platform, these compilation statements can display the parameter items to be configured corresponding to the compilation statements, and corresponding parameter information can be configured on these parameter items.
[0048] In the present invention, according to different requirements proposed by users, each requirement corresponds to a parameter to be configured. Therefore, it enables non-software product developers to select the parameter items to be configured corresponding to the required requirements and configure the corresponding parameter information after calling the template.
[0049] In the present invention, due to different requirements, there are different parameters to be configured. Therefore, after the user selects a requirement, it is necessary to determine the parameter to be configured corresponding to the selected requirement from a large number of parameters to be configured, regarded as the target parameter, and then configure the corresponding parameter information for the target parameter.
[0050] In the present invention, after the parameter information is configured, at this time, the template for creating the software product required by the non-software product developer is complete, and then the required software product is constructed based on the complete template.
[0051] The program creation method provided by the present invention achieves the purpose of enabling different users to quickly and efficiently construct programs by establishing a template library, storing templates capable of configuring different requirements in the template library, selecting templates according to requirements, and then creating programs according to the templates.
[0052] In a further method of the above invention, it mainly explains the processing process of the target parameter among the parameters to be configured in the selected template, as follows:
[0053] Determine the architecture type and requirement type of the program to be created, and determine the architecture parameters and requirement parameters from the parameters to be configured according to the architecture type and requirement type; among them, the parameters to be configured are composed of parameters corresponding to different architecture types and parameters corresponding to different requirement types.
[0054] In this regard, it should be noted that in the present invention, different software products have their own product architectures, and there are multiple product requirements under different product architectures. Therefore, during the parameter configuration process of the template, it is necessary to configure the architecture parameters and requirement parameters of the software product separately.
[0055] The product architecture is mainly distinguished by product functions, product organizational structures, and applicable platforms. Therefore, for different software products in the present invention, the compilation statements of the parameters to be configured of multiple different architecture types are configured in the template.
[0056] The product requirements are mainly differentiated in terms of the design color, design structure, design layout, etc. For this purpose, the template of the present invention should be configured with compilation statements of to-be-configured parameters with multiple different requirements for different software products.
[0057] In the present invention, the parameters of the architecture and requirements required by the user are selected from the to-be-configured parameters of multiple different architecture types and the to-be-configured parameters of multiple different requirements as the target parameters. First, the architecture type and requirement type of the program to be created need to be determined. In the present invention, each product architecture corresponds to a unique architecture type, and each product requirement corresponds to a unique requirement type.
[0058] For example, the product functions include a, b, and c, the product organizational structure includes d and e, and the platform includes f and g.
[0059] Product function a + product organizational structure d + platform f is used as product architecture 1, and the architecture type of this product architecture 1 is m1.
[0060] Product function a + product organizational structure e + platform g is used as product architecture 2, and the architecture type of this product architecture 2 is m2.
[0061] For example, the design colors include h, i, and j, the design structures include k and l, and the design layouts include o and p.
[0062] Design color h + design structure k + design layout o is used as product requirement 1, and the requirement type of this product requirement 1 is q1.
[0063] Design color h + design structure l + design layout p is used as product requirement 2, and the requirement type of this product requirement 2 is q2.
[0064] After determining the architecture type and requirement type of the program to be created, the corresponding architecture parameters can be determined from the to-be-configured parameters of multiple different architecture types, and the corresponding requirement parameters can be determined from the to-be-configured parameters of multiple different requirements according to the architecture type and requirement type.
[0065] The further method provided by the present invention realizes the horizontal and vertical expansion of program creation by separately configuring the architecture parameters and requirement parameters, and is applicable to program development work in multiple fields.
[0066] In the further method of the above invention, it mainly explains the processing process of creating the corresponding program according to the parameter information and the template, which is specifically as follows:
[0067] Select the compilation statements of the parameter information corresponding to the architecture parameters from the template, and select the compilation statements of the parameter information corresponding to the requirement parameters;
[0068] Create the corresponding program according to the selected compilation statements.
[0069] In this regard, it should be noted that in the present invention, architecture parameters and requirement parameters are determined from the parameters to be configured according to the architecture type and requirement type. After determining the parameter information of the architecture parameters and requirement parameters, it is equivalent to selecting the compilation statements corresponding to the parameter information of the architecture parameters from the template, and selecting the compilation statements corresponding to the parameter information of the requirement parameters.
[0070] In the present invention, when using the compilation file corresponding to the template to build a software product, not only the above-mentioned compilation statements corresponding to the parameter information of the architecture parameters and the compilation statements corresponding to the parameter information of the requirement parameters are required, but also some basic compilation statements. These basic compilation statements are the common compilation statements in the compilation file corresponding to the template when building a software product.
[0071] In the present invention, according to the selected compilation statements and combined with the common basic compilation statements, the required program, that is, the software product, can be created.
[0072] The further method provided by the present invention can obtain a more accurate compilation file corresponding to the user requirements from the overall template by selecting the compilation statements corresponding to the architecture and requirements. According to this compilation file, software products with different user requirements can be created, making the program creation more selective.
[0073] In the further method of the above invention, the processing process of searching for the template corresponding to the program identifier in the template library according to the program identifier is mainly explained as follows:
[0074] Search for the template label corresponding to the program identifier in the cache; wherein, a template list is stored in the cache, and the template list stores the corresponding relationship between each program identifier and each template label;
[0075] Search for the template matching the template label in the template library according to the template label.
[0076] In this regard, it should be noted that in the present invention, various templates are stored in the template library. For this reason, a cache needs to be configured for various templates in the template library. The cache stores a template list established based on the information of each template, and the template list stores the corresponding relationship between each program identifier and each template label.
[0077] In the present invention, a software product architecture is mainly distinguished from the product function, product organizational structure, and applicable platforms. For this reason, on the basis that the template is a compilation file suitable for one or more platform language environments, it is still necessary to determine which template a software product architecture is suitable for.
[0078] In the present invention, the program identifier includes a content identifier and a platform identifier. The content identifier is mainly reflected in the product functions and the product organizational structure, and the platform identifier is mainly reflected in the platforms applicable to the software product.
[0079] In the present invention, each template may have compilation files applicable to multiple software products. Therefore, in the corresponding relationship existing in the cache, there is a corresponding relationship between one template label and the program identifiers of multiple software products.
[0080] Therefore, after determining the program identifier of the program to be created, based on this corresponding relationship, the corresponding template label can be determined, and then based on the template label, a template that can match the template label can be found in the template library.
[0081] The further method provided by the present invention can quickly find the corresponding template based on the program identifier through the query of the template list, accelerate the scheduling of the template, and provide fast service for the creation of subsequent programs.
[0082] In the further method of the above invention, it mainly explains the management process of the templates in the template library, which is specifically as follows:
[0083] If no template label that matches both the content identifier and the platform identifier is found in the cache according to the content identifier and the platform identifier, then determine the template label that can match either the content identifier or the platform identifier;
[0084] Select any one of the template labels obtained by matching, and find the template that matches the template label in the template library according to the template label;
[0085] Add compilation statements corresponding to the content identifier and the platform identifier to the matched template according to the content identifier and the platform identifier.
[0086] In this regard, it should be noted that in the present invention, the content identifier and the platform identifier of the program to be created cannot be matched in each template in the template library. That is, no template label that matches both the content identifier and the platform identifier is found in the cache according to the content identifier and the platform identifier.
[0087] For example, the template library includes Template 1, Template 2, and Template 3.
[0088] The programs that Template 1 can create include: Content Identifier 1 + Platform Identifier 1, Content Identifier 2 + Platform Identifier 1, Content Identifier 1 + Platform Identifier 2, Content Identifier 2 + Platform Identifier 2.
[0089] The programs that Template 2 can create include: Content Identifier 3 + Platform Identifier 3, Content Identifier 3 + Platform Identifier 4.
[0090] The programs that template 3 can create include: content identifier 4 + platform identifier 5, content identifier 5 + platform identifier 5.
[0091] For example, if the content identifier 6 and platform identifier 5 of the program to be created are matched in the template list in the cache, it is bound to be unable to match.
[0092] At this time, it is necessary to determine whether any of the content identifier and platform identifier can be matched. If a match can be found, the corresponding template number can be determined.
[0093] For example, template 4 is also included in the template library.
[0094] The programs that template 4 can create include: content identifier 7 + platform identifier 5, content identifier 7 + platform identifier 6.
[0095] For example, when the content identifier 6 and platform identifier 5 of the program to be created are matched in the template list in the cache, at this time, only the platform identifier 5 can be matched, and the template numbers that can be determined at this time are template 3 and template 4.
[0096] In the present invention, since the content identifier 6 and platform identifier 5 of the program to be created cannot be completely matched, it means that none of the templates in the template library can create the program to be created.
[0097] Therefore, it is necessary to establish a compilation file corresponding to the program to be created in the template. At this time, select any template number from the matched template numbers, search for the template matching the template number in the template library according to the template number, and then, by the developer of the template, add compilation statements corresponding to the content identifier and platform identifier on the matched template.
[0098] In a further method, if no template number matching any of the content identifier and platform identifier is found in the cache according to the content identifier and platform identifier, a new template is established according to the content identifier and platform identifier.
[0099] In this regard, it should be noted that in the present invention, the above content can indicate that none of the templates in the template library has a compilation file capable of completing the creation of the program to be created. At this time, the developer needs to establish a new template according to the content identifier and platform identifier, and in this new template, compile a compilation file for the compilation statements corresponding to the content identifier and platform identifier.
[0100] Correspondingly, a template can also be randomly selected from the template library, and compilation statements corresponding to the content identifier and platform identifier are added to this template.
[0101] A further method provided by the present invention can effectively manage templates by adding new compilation statements or compilation files to the templates in the template library, making the templates in the template library more abundant and enabling the creation of programs with different requirements.
[0102] Figure 2 The structural schematic diagram of the program creation device provided by the present invention is exemplified. Refer to Figure 2 This device includes a search module 21, a configuration module 22, and a creation module 23, where:
[0103] The search module 21 is used to search for a template corresponding to the program identifier in the template library according to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to one or more platform language environments, and the compilation statement containing the parameters to be configured is included in the compilation file.
[0104] The configuration module 22 is used to select the target parameters from the parameters to be configured in the template and determine the parameter information of the target parameters.
[0105] The creation module 23 is used to create a corresponding program according to the parameter information and the template.
[0106] In the further device of the above invention, the target parameters include architecture parameters and requirement parameters. Correspondingly, the configuration module is specifically used for:
[0107] Determine the architecture type and requirement type of the program to be created, and determine the architecture parameters and requirement parameters from the parameters to be configured according to the architecture type and requirement type; wherein, the parameters to be configured are composed of parameters corresponding to different architecture types and parameters corresponding to different requirement types.
[0108] In the further device of the above invention, the creation module is specifically used for:
[0109] Select the compilation statements corresponding to the parameter information of the architecture parameters from the template, and select the compilation statements corresponding to the parameter information of the requirement parameters;
[0110] Create a corresponding program according to the selected compilation statements.
[0111] In the further device of the above invention, the search module is specifically used for:
[0112] Search for the template label corresponding to the program identifier in the cache according to the program identifier; wherein, a template list is stored in the cache, and the corresponding relationship between each program identifier and each template label is stored in the template list.
[0113] Search for the template matching the template label in the template library according to the template label.
[0114] In a further device of the above invention, the program identifier includes a content identifier and a platform identifier, and the device further includes an update module for:
[0115] If no template label that matches both the content identifier and the platform identifier is found in the cache according to the content identifier and the platform identifier, then determine a template label that can match either the content identifier or the platform identifier;
[0116] Select any one of the template labels obtained by matching, and search for a template that matches the template label in the template library according to the template label;
[0117] Add compilation statements corresponding to the content identifier and the platform identifier to the matched template according to the content identifier and the platform identifier.
[0118] If no template label that matches either the content identifier or the platform identifier is found in the cache according to the content identifier and the platform identifier, then create a new template according to the content identifier and the platform identifier.
[0119] Since the principle of the device of the present invention is the same as that of the method of the above invention, no more detailed explanation will be given here.
[0120] It should be noted that in the present invention, relevant functional modules can be implemented by a hardware processor.
[0121] The program creation device provided by the present invention creates a template library, stores templates that can configure different requirements in the template library, selects templates according to requirements, and then creates a program according to the templates, so as to achieve the purpose of different users quickly and efficiently constructing programs.
[0122] Figure 3 Illustrates a schematic physical structure diagram of an electronic device, as Figure 3 shown, the electronic device may include: a processor 31, a communication interface 32, a memory 33, and a communication bus 34. Among them, the processor 31, the communication interface 32, and the memory 33 complete communication with each other through the communication bus 34. The processor 31 can call logical instructions in the memory 33 to execute the following method: search for a template corresponding to the program identifier in the template library according to the program identifier of the program to be created; where the template is a compilation file that can be adapted to one or more platform language environments, and the compilation file contains compilation statements with parameters to be configured; select target parameters from the parameters to be configured in the template, and determine the parameter information of the target parameters; create a corresponding program according to the parameter information and the template.
[0123] When the logical instructions in the aforementioned memory 33 can be implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0124] Furthermore, an embodiment of the present invention discloses a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided in the above-mentioned method embodiments. For example, it includes: searching in a template library for a template corresponding to the program identifier according to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to one or more platform language environments, and the compilation file contains compilation statements with parameters to be configured; selecting target parameters from the parameters to be configured in the template, and determining the parameter information of the target parameters; creating a corresponding program according to the parameter information and the template.
[0125] On the other hand, an embodiment of the present invention also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is implemented to execute the methods provided in the above-mentioned embodiments. For example, it includes: searching in a template library for a template corresponding to the program identifier according to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to one or more platform language environments, and the compilation file contains compilation statements with parameters to be configured; selecting target parameters from the parameters to be configured in the template, and determining the parameter information of the target parameters; creating a corresponding program according to the parameter information and the template.
[0126] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, rather than to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0127] The above embodiments are only used to illustrate the present invention, rather than to limit the present invention. Although the present invention has been described in detail with reference to the embodiments, those of ordinary skill in the art should understand that various combinations, modifications or equivalent substitutions of the technical solutions of the present invention do not depart from the spirit and scope of the technical solutions of the present invention, and should all be covered within the scope of the claims of the present invention.
Claims
1. A program creation method, characterized in that, it includes: Searching for a template corresponding to the program identifier in a template library according to the program identifier of the program to be created; wherein, the template is a compilation file adaptable to one or more platform language environments, and the compilation statements with configuration parameters to be set are included in the compilation file; the template is a compilation file based on which a software product is constructed; different software products are applicable to different platforms, and different platforms have their own configured language environments; Selecting target parameters from the parameters to be configured in the template, and determining the parameter information of the target parameters; Creating a corresponding program according to the parameter information and the template; The target parameters include architecture parameters and requirement parameters. Correspondingly, the selecting target parameters from the parameters to be configured in the template includes: Determining the architecture type and requirement type of the program to be created, and determining architecture parameters and requirement parameters from the parameters to be configured according to the architecture type and the requirement type; wherein, the parameters to be configured are composed of parameters corresponding to different architecture types and parameters corresponding to different requirement types; The architecture type is distinguished from the product function, product organizational structure, and applicable platform; The requirement type is distinguished from the design color, design structure, and design layout of the product.
2. The program creation method according to claim 1, characterized in that, The creating a corresponding program according to the parameter information and the template includes: Selecting the compilation statements corresponding to the parameter information of the architecture parameters from the template, and selecting the compilation statements corresponding to the parameter information of the requirement parameters; Creating a corresponding program according to the selected compilation statements.
3. The program creation method according to claim 1 or 2, characterized in that, The searching for a template corresponding to the program identifier in the template library according to the program identifier includes: Searching for a template label corresponding to the program identifier in a cache; wherein, a template list is stored in the cache, and the corresponding relationship between each program identifier and each template label is stored in the template list; Searching for a template matching the template label in the template library according to the template label.
4. The program creation method according to claim 3, characterized in that, The program identifier includes a content identifier and a platform identifier, and the method further includes: If no template label matching both the content identifier and the platform identifier is found in the cache according to the content identifier and the platform identifier, then determining a template label that can match any one of the content identifier and the platform identifier; Selecting any one template label from the obtained matching template labels, and searching for a template matching the template label in the template library according to the template label; Adding compilation statements corresponding to the content identifier and the platform identifier to the matched template according to the content identifier and the platform identifier.
5. The program creation method according to claim 4, characterized in that, The method further includes: If no template label matching any of the content identifier and the platform identifier is found in the cache according to the content identifier and the platform identifier, a new template is established according to the content identifier and the platform identifier.
6. A program creation device characterized in that it includes: a search module, configured to search in a template library for a template corresponding to the program identifier of the program to be created; wherein, the template is a compilation file that can be adapted to the language environment of one or more platforms, and the compilation statements containing the parameters to be configured are included in the compilation file; the template is a compilation file based on which a software product is constructed; different software products are applicable to different platforms, and different platforms have their own configured language environments; a configuration module, configured to select target parameters from the parameters to be configured in the template and determine the parameter information of the target parameters; a creation module, configured to create a corresponding program according to the parameter information and the template; the target parameters include architecture parameters and requirement parameters. Correspondingly, the configuration module is specifically configured to: determine the architecture type and requirement type of the program to be created, and determine the architecture parameters and requirement parameters from the parameters to be configured according to the architecture type and the requirement type; wherein, the parameters to be configured are composed of parameters corresponding to different architecture types and parameters corresponding to different requirement types; The architecture type is distinguished from the product function, product organizational structure, and applicable platforms. The requirement type is distinguished from the design color, design structure, and design layout of the product.
7. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that when the processor executes the program, the steps of the program creation method according to any one of claims 1 to 5 are implemented.
8. A non-transitory computer-readable storage medium, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the steps of the program creation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Multi-chip compatible compiling method and device
CN111796831A