Application program generation method and device, storage medium and electronic equipment
By displaying the application assembly interface and generating configuration files based on the components selected by the user, the server automatically determines the interface program and call relationship, solving the problem of inefficient generation of complex application programs in the prior art, and achieving efficient application generation.
Patent Information
- Application Number
- CN202411216683.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-30
AI Technical Summary
In the prior art, although configuration files are used, it is still difficult to improve generation efficiency when writing complex applications, and technicians need to be familiar with a large number of basic functional units and their combination principles, which increases development difficulty and cost.
By displaying the application assembly interface, the user selects components and determines their configuration files. The server generates the target application based on the configuration files, including determining the interface program and call relationship, and then generating the application.
Simplifies the application generation process, improves efficiency, and allows non-technical personnel to generate applications by selecting components, reducing development costs and complexity.
Smart Images

Figure CN119105746A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more particularly to an application generation method, device, storage medium, and electronic device. Background Art
[0002] With the continuous development of computer technology, users have higher and higher requirements for application interaction experience, and the resources required for technical personnel to develop applications that meet user needs are also gradually increasing.
[0003] In order to reduce the resources required for product development, a component-based development method has emerged. Technicians can pre-write configuration files corresponding to basic functional units, so that after determining the functions to be developed in the application, they can write programs based on the pre-generated configuration files, thereby reducing the time cost and computing resources required for technicians to develop applications.
[0004] However, the functions of current applications are often complex. Even if an application is developed through a configuration file, the technician needs to combine a large number of configuration files corresponding to the basic functional units to write a qualified target task program. In this process, the technician needs to be familiar with the composition of each configuration file and the principle of combining different configuration files. Based on this, even if the technician writes a program based on the configuration file, it cannot effectively improve the generation efficiency of the application.
[0005] Therefore, how to improve the efficiency of application generation is an urgent problem to be solved. Summary of the invention
[0006] This specification provides an application generation method, device, storage medium and electronic device to partially solve the above-mentioned problems existing in the prior art.
[0007] This manual adopts the following technical solutions:
[0008] This specification provides an application generation method, including:
[0009] In response to a user's program generation request, display an application assembly interface, wherein the application assembly interface includes options for several components;
[0010] In response to a selection operation performed by the user in the application assembly interface, determining components selected by the user in the application assembly interface as target components, and determining a configuration file corresponding to each target component;
[0011] According to the configuration file corresponding to each target component, determine the interface program corresponding to each target component;
[0012] According to the interface program corresponding to each target component, determine the calling relationship of each target component when executing the task;
[0013] A target application is generated according to the calling relationship and the configuration files corresponding to each target component.
[0014] Optionally, the function of the target component is provided by association of several subcomponents, and the configuration file contains association rules of the several subcomponents;
[0015] According to the interface program corresponding to each target component, determine the calling relationship of each target component when executing the task, including:
[0016] For each target component, determine the trigger logic between several subcomponents corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component;
[0017] According to the triggering logic between the several sub-components corresponding to each target component and the interface program corresponding to each target component, the calling relationship of each target component when executing the task is determined.
[0018] Optionally, for each target component, according to the association rules contained in the configuration file corresponding to the target component, the trigger logic between the subcomponents corresponding to the target component is determined, specifically including:
[0019] For each target component, determine the initial trigger logic between several subcomponents corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component;
[0020] In response to a trigger logic adjustment operation performed by a user, the initial trigger logic is adjusted according to the trigger logic adjustment operation, and the adjusted trigger logic is used as the trigger logic between several sub-components corresponding to the target component.
[0021] Optionally, for each target component, if the target component is a backend component, the configuration file corresponding to the target component also includes: a docking protocol between the target component and a plurality of frontend components;
[0022] Generate a target application according to the calling relationship and the configuration files corresponding to each target component, specifically including:
[0023] Establishing a link relationship between at least some of the target components and the plurality of front-end components according to a docking protocol included in a configuration file corresponding to at least some of the target components;
[0024] A target application is generated according to the link relationship, the call relationship and the configuration files corresponding to each target component.
[0025] Optionally, the method further comprises:
[0026] Exporting the target application in the form of a configuration file to obtain an application configuration file;
[0027] In response to the acquired deployment request, a target deployment device is determined, so as to deploy the target application on the target deployment device according to the application configuration file.
[0028] Optionally, generating a target application according to the calling relationship and a configuration file corresponding to each target component specifically includes:
[0029] Input the calling relationship and the configuration files corresponding to each target component into a preset construction model, so that the construction model generates and outputs program framework information corresponding to the target application according to the calling relationship and the configuration files corresponding to each target component;
[0030] According to the program framework information, a program framework is constructed, and according to the calling relationship and the configuration file corresponding to the target component, the target application is generated based on the program framework.
[0031] Optionally, the calling relationship and the configuration file corresponding to each target component are input into a preset construction model, so that the construction model generates and outputs program framework information corresponding to the target application according to the calling relationship and the configuration file corresponding to each target component, specifically including:
[0032] Acquire task requirement information corresponding to the task, where the task requirement information is used to represent performance indicators that need to be met when the task is executed by the generated target application;
[0033] The task requirement information, the calling relationship and the configuration file corresponding to each target component are input into a preset construction model, so that the construction model determines the candidate basic program units required for generating the corresponding program framework of the target application according to the calling relationship and the configuration file corresponding to each target component, and screens out the target basic program unit from the candidate basic program units according to the task requirement information, so as to generate and output the program framework information corresponding to the target application through the target basic program unit. For any candidate basic program unit, the candidate basic program unit includes: a function required for building a program or a class required for building a program.
[0034] This specification provides an application generation device, including:
[0035] Display module: used to respond to the user's program generation request and display the application assembly interface, wherein the application assembly interface includes options of several components;
[0036] A first determination module: configured to determine, in response to a selection operation performed by the user in the application assembly interface, components selected by the user in the application assembly interface as target components, and determine a configuration file corresponding to each target component;
[0037] The second determination module is used to determine the interface program corresponding to each target component according to the configuration file corresponding to each target component;
[0038] The third determination module is used to determine the calling relationship of each target component when executing the task according to the interface program corresponding to each target component;
[0039] Generation module: used to generate a target application according to the calling relationship and the configuration file corresponding to each target component.
[0040] Optionally, the function of the target component is provided by association of several subcomponents, and the configuration file contains association rules of the several subcomponents;
[0041] The third determination module is specifically used to determine, for each target component, the trigger logic between several sub-components corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component; and to determine the calling relationship between the target components when executing the task according to the trigger logic between several sub-components corresponding to each target component and the interface program corresponding to each target component.
[0042] Optionally, the third determination module is specifically used to determine, for each target component, an initial trigger logic between several sub-components corresponding to the target component according to association rules contained in a configuration file corresponding to the target component; in response to a trigger logic adjustment operation performed by a user, adjust the initial trigger logic according to the trigger logic adjustment operation, and use the adjusted trigger logic as the trigger logic between several sub-components corresponding to the target component.
[0043] Optionally, for each target component, if the target component is a backend component, the configuration file corresponding to the target component also includes: a docking protocol between the target component and a plurality of frontend components;
[0044] Optionally, the generation module is specifically used to establish a link relationship between at least some of the target components and a number of front-end components according to a docking protocol contained in a configuration file corresponding to at least some of the target components; and generate a target application according to the link relationship, the call relationship and the configuration file corresponding to each target component.
[0045] Optionally, the device further comprises:
[0046] The deployment module is used to export the target application in the form of a configuration file to obtain an application configuration file; in response to the obtained deployment request, determine the target deployment device to deploy the target application on the target deployment device according to the application configuration file.
[0047] Optionally, the generation module is specifically used to input the calling relationship and the configuration files corresponding to each target component into a preset construction model, so that the construction model generates and outputs the program framework information corresponding to the target application according to the calling relationship and the configuration files corresponding to each target component; constructs a program framework according to the program framework information, and generates the target application based on the program framework according to the calling relationship and the configuration files corresponding to the target component.
[0048] Optionally, the generation module is specifically used to obtain task requirement information corresponding to the task, the task requirement information is used to characterize the performance indicators that need to be met when the task is executed by the generated target application; the task requirement information, the calling relationship and the configuration file corresponding to each target component are input into a preset construction model, so that the construction model determines the candidate basic program units required to generate the program framework corresponding to the target application according to the calling relationship and the configuration file corresponding to each target component, and according to the task requirement information, the target basic program unit is screened out from the candidate basic program units, so as to generate and output the program framework information corresponding to the target application through the target basic program unit. For any candidate basic program unit, the candidate basic program unit includes: a function required to build a program or a class required to build a program.
[0049] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned application generation method is implemented.
[0050] This specification provides an electronic device, including a processor and a computer program stored in a memory and executable on the processor, wherein the processor implements the above-mentioned application generation method when executing the program.
[0051] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:
[0052] In the application generation method provided in the present specification, the server responds to the user's program generation request by displaying an application assembly interface containing several component options, and then responds to the user selecting a component in the interface, takes the components selected by the user as target components, and determines the configuration file corresponding to each target component, thereby determining the interface program corresponding to each target component based on the configuration file corresponding to each target component, and determining the calling relationship between each target component when executing a task based on the interface program corresponding to each target component, and then generating a target application based on the calling relationship and the configuration file corresponding to each target component.
[0053] It can be seen from the above method that by pre-setting the configuration files corresponding to each component, and setting the interface programs corresponding to each target component and the calling relationships between the target components in each configuration file, the server can generate the target application when the user only selects a few component options, thereby greatly improving the application generation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:
[0055] Figure 1 A flowchart of a method for generating an application provided in this specification;
[0056] Figure 2 A schematic diagram of the calling relationship between functions provided by two target components provided in this specification;
[0057] Figure 3 A schematic diagram of the structure of an application generating device provided in this specification;
[0058] Figure 4 A method provided in this specification corresponding to Figure 1 Schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0060] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0061] Figure 1 A flowchart of an application generation method provided in this specification includes:
[0062] S101: In response to a user's program generation request, an application assembly interface is displayed.
[0063] The execution subject of an application generation method provided in this specification can be a terminal device such as a laptop computer, a desktop computer, or a client installed in the terminal device, or a server. For the sake of ease of description, the following only takes the execution subject as an example to illustrate an application generation method provided in this specification.
[0064] As applications become more complex, the cost of writing applications becomes higher and higher, and the efficiency becomes lower and lower. In order to alleviate the problem of overly complex applications, technicians can pre-write configuration files corresponding to small functions, and then directly generate these small functions through the configuration files when they are needed, thereby improving the efficiency of writing applications.
[0065] However, since the configuration files written by technical personnel usually only involve small functions and the use of configuration files requires users to have strong configuration capabilities, the efficiency of generating applications is not significantly improved even if the applications are written using configuration files.
[0066] Based on this, this specification provides an application assembly platform that can be used even by non-technical personnel. In the application assembly interface of the application assembly platform, there are several component options, and users can understand the functions that can be realized by each component by browsing the application assembly interface. When a user browses the options of a component, the server can display information such as the function name, function category, applicable scenario, and function applicable device corresponding to the option of the component to the user. Of course, the platform user can be a developer, other technical personnel or non-technical personnel, and this specification does not make specific restrictions. For the convenience of explanation, the following will only use the user as the platform user to explain the application assembly method provided in this specification.
[0067] For each component option displayed in the application assembly interface, the option corresponds to a configuration file, and the server can generate a component based on the configuration file to provide the function that can be realized by the option. In addition, each configuration file pre-sets the calling relationship between the function corresponding to the configuration file and the function corresponding to other configuration files. This allows, after the user selects multiple components, the server can use the configuration files corresponding to each option selected by the user as the basis to generate an application consisting of multiple components, and this application can provide the function corresponding to each selected component.
[0068] It should be noted that this manual does not impose any specific restrictions on the way in which the options of each component in the application assembly interface are displayed. For example, a number of pages can be set, each page contains ten function identifiers, and after the user clicks on a function identifier, all function information of the function corresponding to the function identifier can be displayed.
[0069] S102: In response to a selection operation performed by the user in the application assembly interface, components selected by the user in the application assembly interface are determined as target components, and a configuration file corresponding to each target component is determined.
[0070] After the user browses the application assembly interface and determines the required functions according to his own needs, he can select several components in the application assembly interface according to the required functions. In response to the selection operation performed by the user in the application assembly interface, the server can determine the components selected by the user as target components and determine the configuration file corresponding to each target component. Among them, the user's selection operation can have many forms. For example, when the user performs a drag operation on a component displayed in the application assembly interface, the drag operation is the selection operation performed by the user; for another example, when the user performs a click operation on the component displayed in the application assembly interface, the click operation is the selection operation performed by the user. Other forms are not explained in detail here.
[0071] S103: Determine the interface program corresponding to each target component according to the configuration file corresponding to each target component.
[0072] S104: Determine the calling relationship of each target component when executing the task according to the interface program corresponding to each target component.
[0073] After determining the configuration files corresponding to each target component, the server can determine the interface program corresponding to each target component according to the configuration files. The interface program of the component can be regarded as a data transmission channel between different components. For example, there is a sign-in component that can provide users with a daily sign-in function and can record the number of consecutive sign-ins of the user. The interface program of the sign-in component can transmit the number of consecutive sign-ins recorded by the sign-in component to other components.
[0074] The calling relationship between different components when executing tasks is realized based on the data passed by the component interface program. For example, if there is a lottery component that provides a lottery function, and one of the triggering conditions of the lottery function is that the user's consecutive sign-in times reaches seven, then when the sign-in component's interface program passes the number of consecutive sign-ins of seven to the lottery component, the lottery function of the lottery component is executed once, realizing the calling relationship between the sign-in component and the lottery component when executing tasks.
[0075] It should be noted that the function that the target component can provide can also be a complex function composed of multiple basic functional units associated with each other. Each basic functional unit is provided by a subcomponent, and multiple subcomponents constitute a target component. For a target component, the configuration file corresponding to the target component also includes: the association rules between the subcomponents corresponding to the target component. The server can determine the trigger logic between the basic functional units provided by each subcomponent according to the association rules of each subcomponent contained in the configuration file corresponding to the target component. Among them, if the trigger condition of a basic functional unit is related to another basic functional unit, there is a trigger relationship between the two basic functional units, and the trigger relationship between the two basic functional units is used to represent the trigger logic between the two basic functional units. Specifically, the trigger condition of a basic functional unit can be: another basic functional unit triggers, another basic functional unit is continuously triggered for a preset number of times, or another basic functional unit is continuously running for a preset duration. In short, the trigger condition of the basic functional unit can be pre-set according to demand, and this specification does not limit it.
[0076] Still taking the sign-in component as an example, the sign-in function provided by the sign-in component corresponds to multiple basic functional units, including: daily sign-in function, daily sign-in reward collection function, continuous sign-in reward collection function, and Friday sign-in special reward collection function. The server can determine the trigger logic between the functions provided by each subcomponent of the sign-in component based on the configuration file corresponding to the sign-in component. For example, the server can determine that the trigger condition for the daily sign-in reward collection function is triggered by today's sign-in function, or the trigger condition for the continuous sign-in reward collection function is that today's sign-in function is triggered for seven consecutive days based on the configuration file.
[0077] Furthermore, after determining the interface program corresponding to each target component and the triggering logic between the basic functional units corresponding to the target component, the server can determine the calling relationship between the functions provided by each target component when executing the task, which will be explained in conjunction with the schematic diagram below.
[0078] Figure 2 A schematic diagram of the calling relationship between functions provided by two target components provided in this specification.
[0079] There is a lottery function provided by the lottery component and a daily sign-in function provided by the sign-in component, and the trigger mechanism of the lottery function is that the number of consecutive sign-ins recorded by the sign-in component is seven. The sign-in component corresponds to two subcomponents, which provide daily sign-in function and continuous sign-in reward collection function respectively.
[0080] The lottery function is triggered when the user uses the daily sign-in function provided by the daily sign-in subcomponent of the sign-in component. Then, the subcomponent that provides the continuous sign-in collection function records the number of consecutive sign-ins of the user, and the lottery component can obtain the number of consecutive sign-ins of the user according to the interface program of the sign-in component, and trigger the lottery function provided by the lottery component after the number of consecutive sign-ins of the user obtained is seven. After the lottery function is triggered, the reward distribution subcomponent of the lottery component records the type and number of prizes obtained by the user. Other components can obtain the type and number of prizes obtained by the user according to the interface program of the lottery component, and then adjust the user's backpack data based on the obtained data. It can be seen that the calling relationship of the functions provided by different target components is realized through the interface of each target component and the triggering logic between the functions provided by each subcomponent corresponding to each target component.
[0081] But sometimes, users may need to adjust the triggering conditions of a function. Taking the sign-in component as an example, users may need to modify the number of consecutive sign-ins required to trigger the continuous sign-in reward collection function, and change the original requirement for users to sign in continuously for seven days to three days.
[0082] In response to this demand, for a target component, after determining the trigger logic between the functions provided by several sub-components corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component, the server can use the trigger logic as the initial trigger logic and display it to the user in the form of text information for the user to modify. For example, the text is displayed to the user: "The trigger condition for the continuous check-in reward function is: the number of consecutive check-ins is seven times". The server can set the value of the number of consecutive check-ins in the displayed text as a modifiable item, and then the user can adjust the value of the number of consecutive check-ins in the text and adjust the required number of days to three. Thereafter, the server can respond to the trigger logic adjustment operation performed by the user, and change the mechanism of the initial trigger logic from checking in for seven consecutive days to receiving the reward to checking in for three consecutive days according to the modified value. The adjusted initial trigger logic can be used as the trigger logic between several sub-components corresponding to the target component when generating an application.
[0083] It should be noted that in addition to displaying the text trigger logic modification method to the user, for users with strong technical capabilities, the server can provide a method for modifying the trigger logic with variable parameters as the data to be adjusted. Specifically, for a target component, after the server determines the part of the code used to control the trigger logic in the association rules according to the association rules contained in the configuration file corresponding to the target component, this part of the code is displayed to the user in a highlighted and modifiable manner, and the user can directly adjust the variable parameters used to control the trigger logic in the code. The server can determine the adjusted trigger logic through the modified association rules, and use the adjusted trigger logic as the trigger logic between several sub-components corresponding to the target component when generating the application. Of course, this specification does not specifically limit the method for modifying the trigger logic. Whether it is to modify the association rules in the configuration file or to adjust the initial trigger logic generated by the server, it can be used as a method for adjusting the trigger logic.
[0084] S105: Generate a target application according to the calling relationship and the configuration files corresponding to each target component.
[0085] The server can generate the target application by determining the calling relationship between each target component when executing the task and the configuration file corresponding to each target component. Through S102 to S103, it has been clarified how the server establishes the calling relationship between each target component and the triggering logic between several subcomponents corresponding to each target component. Next, it will be explained how each target component interacts with the user.
[0086] Components can be divided into front-end components that display information to users and back-end components that implement data processing. For each target component, if the target component is a back-end component and the back-end component needs to be docked with the front-end component, the configuration file corresponding to the target component also includes: the identifier of each front-end component in the several front-end components corresponding to the target component and the docking agreement between the target component and the several front-end components. The server can retrieve the front-end components corresponding to the identifiers of each front-end component from the storage space storing the front-end components according to the identifiers of each front-end component recorded in the configuration file corresponding to the target component.
[0087] After retrieving the front-end components corresponding to the identifiers of each front-end component, the server can establish a link relationship between the back-end component and the front-end component according to the docking protocol contained in the configuration files of each target component, thereby generating a target application. Still taking the sign-in component as an example, the sign-in component needs to be linked to the front-end component that provides the sign-in interface. That is, there is a sign-in interface, in which a daily sign-in icon is provided. In response to the player clicking on this icon, the daily sign-in function provided by the daily sign-in subcomponent of the sign-in component is triggered, which is a response to the player's operation. In addition, after determining that the player's consecutive sign-ins are seven times according to the interface program of the sign-in component, the continuous sign-in reward collection icon in the sign-in interface can be highlighted to prompt the user to receive the reward. Through the link relationship between the front-end component and the back-end component, the interactive function between the game player and the game application is realized, and a runnable application is obtained. The application generated by the server is not limited to a Web browser-based application, but can also be a desktop application that needs to be installed on the user's computer to run, or a mobile application for mobile devices such as smart phones or tablets. In short, for this application, the application generated by the server is not limited to a single type of application.
[0088] It should be noted that, for an application, in addition to components that provide interactive functions, the application may also include front-end components that are only displayed to users, and back-end components that are not displayed to users through front-end components. For example, there is an animation effect of a login interface that is only for display. The front-end component corresponding to this animation effect does not interact with the user. For such front-end components, the server can indicate in the application assembly interface that such front-end components do not involve interaction with users. For back-end components that are not displayed to users through front-end components, the data processed by such back-end components is not displayed to ordinary application users, but the technicians who manage such back-end components can query the data through such back-end components. For example, if the company to which the game belongs needs to record the total amount of recharge of the players, a back-end component can be set to record the recharge records of all players, and a query interface can be set for the back-end component to allow the game administrator to query the total amount of recharge of the players.
[0089] In addition, for some more complex applications, such as large games, such applications often require a series of optimizations to improve application performance, and one of the optimization methods is program framework optimization, which provides target application performance through the simplest framework possible.
[0090] The present application also provides an optimization method, whereby the server can pre-train a construction model for generating a program framework. Specifically, the server needs to first determine a sample application, configuration files corresponding to several target components corresponding to the sample application, and performance indicators corresponding to the sample application, and obtain standard program framework information corresponding to the sample application that can meet the performance indicators. The performance indicators corresponding to the sample application are the task requirement information that the sample application needs to meet during the execution of the task, such as application response time, memory utilization, and throughput data.
[0091] Then, the server can determine the calling relationship between several target components corresponding to the sample application based on several configuration files corresponding to the sample application, and then input the determined calling relationship, the performance index corresponding to the sample application, and the configuration files corresponding to several target components corresponding to the sample application into the construction model to obtain the prediction framework information corresponding to the sample application. Then, the server can determine the loss value based on the prediction framework information corresponding to the sample application and the standard program framework information corresponding to the sample application that can meet the performance index, and train the construction model based on this loss value. Among them, the loss value is used to represent the deviation between the prediction framework information corresponding to the sample application and the standard program framework information corresponding to the sample application that can meet the performance index, and there is a positive correlation between the loss value and the deviation.
[0092] It should be noted that, taking a function or a class required for building a program as a basic program unit, in the process of determining the prediction framework information obtained by the construction model, the candidate basic program units required for generating the corresponding program framework of the application will be determined based on the input call relationship and the configuration file, and then the target basic program unit will be selected from the candidate basic program units on the condition that the performance of the generated application can meet the performance index, so as to generate and output the program framework information corresponding to the application through the target basic program unit. Then, the server generates the application according to the program framework information output by the construction model.
[0093] The server can input the calling relationship of each target component when executing the task, the configuration file corresponding to each target component, and the performance indicators corresponding to the target application into the trained construction model, and then generate the target application according to the program framework information output by the construction model.
[0094] After generating the target application, the server can export the target application in the form of a configuration file to obtain the application configuration file. The user can then send a deployment request based on the target deployment device. After receiving the deployment request, the server responds to the acquired deployment request and deploys the target application on the target deployment device based on the application configuration file to achieve a complete process from self-assembly to deployment.
[0095] It can be seen from the above method that through the above application generation method, the user only needs to select several target components, and the server can generate a target application that can meet the user's needs based on the several target components selected by the user, thereby improving the generation efficiency of the application.
[0096] Moreover, after inputting the task requirement information needed for the task into the construction model, the server generates a target application based on the obtained program framework information, so that the target application can achieve the performance indicators that need to be met when executing the task without much adjustment by technical personnel, thereby further improving the efficiency of application generation.
[0097] The above is one or more application generation methods of this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0098] Figure 3 A schematic diagram of the structure of an application generating device provided in an embodiment of this specification, the device comprising:
[0099] Display module 301: for displaying an application assembly interface in response to a user's program generation request, wherein the application assembly interface includes options of several components;
[0100] The first determination module 302 is used to determine, in response to a selection operation performed by the user in the application assembly interface, the components selected by the user in the application assembly interface as target components, and determine a configuration file corresponding to each target component;
[0101] The second determination module 303 is used to determine the interface program corresponding to each target component according to the configuration file corresponding to each target component;
[0102] The third determination module 304 is used to determine the calling relationship of each target component when executing the task according to the interface program corresponding to each target component;
[0103] The generating module 305 is used to generate a target application according to the calling relationship and the configuration files corresponding to each target component.
[0104] Optionally, the function of the target component is provided by association of several subcomponents, and the configuration file contains association rules of the several subcomponents;
[0105] The third determination module 304 is specifically used to determine, for each target component, the trigger logic between several sub-components corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component; and determine the calling relationship between the target components when executing the task according to the trigger logic between several sub-components corresponding to each target component and the interface program corresponding to each target component.
[0106] Optionally, the third determination module 304 is specifically used to determine, for each target component, an initial trigger logic between several sub-components corresponding to the target component according to association rules contained in a configuration file corresponding to the target component; in response to a trigger logic adjustment operation performed by a user, adjust the initial trigger logic according to the trigger logic adjustment operation, and use the adjusted trigger logic as the trigger logic between several sub-components corresponding to the target component.
[0107] Optionally, for each target component, if the target component is a backend component, the configuration file corresponding to the target component also includes: a docking protocol between the target component and a plurality of frontend components;
[0108] Optionally, the generation module 305 is specifically used to establish a link relationship between at least some of the target components and a number of front-end components according to a docking protocol contained in a configuration file corresponding to at least some of the target components; and generate a target application according to the link relationship, the call relationship and the configuration file corresponding to each target component.
[0109] Optionally, the device further comprises:
[0110] The deployment module 306 is used to export the target application in the form of a configuration file to obtain an application configuration file; in response to the obtained deployment request, determine a target deployment device to deploy the target application on the target deployment device according to the application configuration file.
[0111] Optionally, the generation module 305 is specifically used to input the calling relationship and the configuration file corresponding to each target component into a preset construction model, so that the construction model generates and outputs the program framework information corresponding to the target application according to the calling relationship and the configuration file corresponding to each target component; constructs a program framework according to the program framework information, and generates the target application based on the program framework according to the calling relationship and the configuration file corresponding to the target component.
[0112] Optionally, the generation module 305 is specifically used to obtain task requirement information corresponding to the task, and the task requirement information is used to characterize the performance indicators that need to be met when the task is executed by the generated target application; the task requirement information, the calling relationship, and the configuration file corresponding to each target component are input into a preset construction model, so that the construction model determines the candidate basic program units required to generate the program framework corresponding to the target application according to the calling relationship and the configuration file corresponding to each target component, and according to the task requirement information, the target basic program unit is screened out from the candidate basic program units, so as to generate and output the program framework information corresponding to the target application through the target basic program unit. For any candidate basic program unit, the candidate basic program unit includes: a function required to build a program or a class required to build a program.
[0113] This specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, it can be used to perform the above Figure 1 Provides a method for generating applications.
[0114] based on Figure 1 The application generation method shown in the present specification also provides Figure 4 The structural diagram of the electronic device shown in FIG. Figure 4 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 A method for generating an application.
[0115] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0116] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0117] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0118] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0119] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0120] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0121] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0122] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0124] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0125] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0126] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0127] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0128] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0130] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0131] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for generating an application, characterized in that: include: In response to a user's program generation request, display an application assembly interface, wherein the application assembly interface includes options for several components; In response to a selection operation performed by the user in the application assembly interface, determining components selected by the user in the application assembly interface as target components, and determining a configuration file corresponding to each target component; According to the configuration file corresponding to each target component, determine the interface program corresponding to each target component; According to the interface program corresponding to each target component, determine the calling relationship of each target component when executing the task; A target application is generated according to the calling relationship and the configuration files corresponding to each target component.
2. The method according to claim 1, characterized in that The function of the target component is provided by the association of several subcomponents, and the configuration file contains the association rules of the several subcomponents; According to the interface program corresponding to each target component, determine the calling relationship of each target component when executing the task, including: For each target component, determine the trigger logic between several subcomponents corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component; According to the triggering logic between the several sub-components corresponding to each target component and the interface program corresponding to each target component, the calling relationship of each target component when executing the task is determined.
3. The method according to claim 2, characterized in that For each target component, according to the association rules contained in the configuration file corresponding to the target component, the trigger logic between the subcomponents corresponding to the target component is determined, specifically including: For each target component, determine the initial trigger logic between several subcomponents corresponding to the target component according to the association rules contained in the configuration file corresponding to the target component; In response to a trigger logic adjustment operation performed by a user, the initial trigger logic is adjusted according to the trigger logic adjustment operation, and the adjusted trigger logic is used as the trigger logic between several sub-components corresponding to the target component.
4. The method according to claim 1, characterized in that For each target component, if the target component is a backend component, the configuration file corresponding to the target component also includes: a docking protocol between the target component and a plurality of frontend components; Generate a target application according to the calling relationship and the configuration files corresponding to each target component, specifically including: Establishing a link relationship between at least some of the target components and the plurality of front-end components according to a docking protocol included in a configuration file corresponding to at least some of the target components; A target application is generated according to the link relationship, the call relationship and the configuration files corresponding to each target component.
5. The method according to claim 1, characterized in that The method further comprises: Exporting the target application in the form of a configuration file to obtain an application configuration file; In response to the acquired deployment request, a target deployment device is determined, so as to deploy the target application on the target deployment device according to the application configuration file.
6. The method according to claim 1, characterized in that Generate a target application according to the calling relationship and the configuration files corresponding to each target component, specifically including: Input the calling relationship and the configuration files corresponding to each target component into a preset construction model, so that the construction model generates and outputs program framework information corresponding to the target application according to the calling relationship and the configuration files corresponding to each target component; According to the program framework information, a program framework is constructed, and according to the calling relationship and the configuration file corresponding to the target component, the target application is generated based on the program framework.
7. The method according to claim 6, characterized in that Inputting the calling relationship and the configuration files corresponding to each target component into a preset construction model, so that the construction model generates and outputs program framework information corresponding to the target application according to the calling relationship and the configuration files corresponding to each target component, specifically including: Acquire task requirement information corresponding to the task, where the task requirement information is used to represent performance indicators that need to be met when the task is executed by the generated target application; The task requirement information, the calling relationship and the configuration file corresponding to each target component are input into a preset construction model, so that the construction model determines the candidate basic program units required for generating the corresponding program framework of the target application according to the calling relationship and the configuration file corresponding to each target component, and screens out the target basic program unit from the candidate basic program units according to the task requirement information, so as to generate and output the program framework information corresponding to the target application through the target basic program unit. For any candidate basic program unit, the candidate basic program unit includes: a function required for building a program or a class required for building a program.
8. An application generation device, characterized in that: include: Display module: used to respond to the user's program generation request and display the application assembly interface, wherein the application assembly interface includes options of several components; A first determination module: configured to determine, in response to a selection operation performed by the user in the application assembly interface, components selected by the user in the application assembly interface as target components, and determine a configuration file corresponding to each target component; The second determination module is used to determine the interface program corresponding to each target component according to the configuration file corresponding to each target component; The third determination module is used to determine the calling relationship of each target component when executing the task according to the interface program corresponding to each target component; Generation module: used to generate a target application according to the calling relationship and the configuration file corresponding to each target component.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. An electronic device comprising a processor and a computer program stored in a memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Micro-service development method and device, storage medium and electronic equipment
CN112416318A
Construction method and device of application program template and storage medium
CN113590107A
Application program construction method, application page display method, device and equipment
CN114721643A
Atomic service orchestration method and device, equipment and storage medium
CN116755677A
Interface generation method and device, computer equipment and storage medium
CN117492728A
