An application generation method, apparatus, storage medium and electronic device
By displaying the application assembly interface and generating configuration files based on the components selected by the user, the problem of low application generation efficiency in the prior art is solved, and the ability to quickly generate complex applications is realized.
Patent Information
- Application Number
- CN202411216683.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The prior art is low in generation efficiency when developing complex applications, and technicians need to be familiar with the configuration files and combination principles of a large number of basic functional units.
By presenting the application assembly interface, users are allowed to select components and determine their corresponding configuration files, and the target application is generated based on these configuration files.
Improves application generation efficiency, allowing users to quickly generate applications that meet their needs without having to understand the composition and combination principles of each configuration file.
Smart Images

Figure CN119105746B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computers, and in particular 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 can meet user needs are also gradually increasing.
[0003] To reduce the resources required for product development, a component-based development approach has emerged. This allows engineers to pre-write configuration files corresponding to basic functional units. Once the application features to be developed are determined, they can then write the program based on the pre-generated configuration files, thus reducing the time and computing resources required to develop the application.
[0004] However, current applications often have complex functions. Even when developing applications using configuration files, engineers must combine numerous configuration files corresponding to basic functional units to create a suitable program for the target task. This process requires a thorough understanding of the composition of each configuration file and the principles of combining different configuration files. Consequently, even when engineers write programs based on configuration files, this does not significantly improve application development efficiency.
[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 manual provides a method for generating an application program, including:
[0009] In response to a user's program generation request, displaying an application assembly interface, wherein the application assembly interface includes options for a plurality of 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] Determine the interface program corresponding to each target component based on the configuration file 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 triggering 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 the target components when executing the task is determined.
[0018] Optionally, for each target component, the triggering logic between the subcomponents corresponding to the target component is determined according to the association rules contained in the configuration file corresponding to the target component, 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 the 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 further includes: a docking protocol between the target component and a plurality of frontend components;
[0022] Generate a target application based on the calling relationship and the configuration files corresponding to each target component, specifically including:
[0023] Establishing link relationships 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 file corresponding to each target component.
[0025] Optionally, the method further includes:
[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 includes:
[0029] 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;
[0030] A program framework is constructed according to the program framework information, and the target application is generated based on the program framework according to the calling relationship and the configuration file corresponding to the target component.
[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 generated target application program executes the task;
[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: functions required for building a program or classes required for building a program.
[0034] This specification provides an application generation device, including:
[0035] A display module is used to display an application assembly interface in response to a user's program generation request, wherein the application assembly interface includes options for several components;
[0036] A first determining 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 determining 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 triggering 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 triggering 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, the initial 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; in response to a trigger logic adjustment operation performed by the 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 further 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 part of the target components and several front-end components based on the docking protocol contained in the configuration file corresponding to at least part of the target components; and generate a target application based on 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 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 based on the calling relationship and the configuration file corresponding to each target component; constructs a program framework based on the program framework information, and generates the target application based on the program framework based on the calling relationship and the configuration file corresponding to the target component.
[0048] Optionally, the generation module 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 for generating 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 for building a program or a class required for building 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 this specification, the server responds to the user's program generation request and displays an application assembly interface containing several component options. Then, in response to the user selecting a component in the interface, the server uses the components selected by the user as target components and determines the configuration file corresponding to each target component. Based on the configuration file corresponding to each target component, the interface program corresponding to each target component is determined, and based on the interface program corresponding to each target component, the calling relationship between each target component when executing the task is determined, and then the target application is generated 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 exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:
[0055] Figure 1 A flowchart of a method for generating an application program provided in this manual;
[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 This specification provides a corresponding Figure 1 Schematic diagram of the structure of the electronic equipment. DETAILED DESCRIPTION
[0059] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts 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 with reference to 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, a client installed in a terminal device, or a server. For the sake of convenience 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 them increases and efficiency decreases. To alleviate this problem, engineers can pre-write configuration files for smaller functions and then directly generate them when needed, thereby improving application writing efficiency.
[0065] However, since the configuration files written by technical personnel often only involve small functions and the use of configuration files requires users to have strong configuration capabilities, even if applications are written using configuration files, the efficiency of generating applications is not significantly improved.
[0066] Based on this, this manual 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. 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 component option to the user. Of course, the platform user can be a developer, other technical personnel or non-technical personnel. This manual does not make specific restrictions. For the sake of convenience, the application assembly method provided in this manual will only be described with the user as the platform user.
[0067] Each component option displayed in the application assembly interface corresponds to a configuration file. The server can generate a component based on this configuration file to provide the functionality that can be achieved with this option. In addition, each configuration file pre-sets the calling relationship between the functions corresponding to this configuration file and the functions 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 a basis to generate an application composed of multiple components, and this application can provide the functions corresponding to each selected component.
[0068] It should be noted that this manual does not impose any specific restrictions on the display method of options for each component in the application assembly interface. For example, it is entirely possible to set a number of pages, each page containing ten function identifiers, and after the user clicks a function identifier, all functional 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, determining components selected by the user in the application assembly interface as target components, and determining a configuration file corresponding to each target component.
[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 take many forms. For example, when the user drags 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 clicks a 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 between the target components 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 then determine the corresponding interface program for each target component based on the configuration files. A component's interface program can be considered a data transmission channel between different components. For example, consider a check-in component that provides a daily check-in function for users and records their consecutive check-ins. The check-in component's interface program can then transmit this number of consecutive check-ins to other components.
[0074] The calling relationship between different components during task execution is based on the data passed by the component's interface program. For example, if there is a lottery component that provides a lottery function, and one of the triggering conditions for the lottery function is that the user has reached seven consecutive check-ins, when the check-in component's interface program passes the number of consecutive check-ins (7) to the lottery component, the lottery function of the lottery component will be executed once, thus establishing the calling relationship between the check-in component and the lottery component during task execution.
[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 sub-component, and multiple sub-components constitute a target component. For a target component, the configuration file corresponding to the target component also contains: the association rules between the sub-components corresponding to the target component. The server can determine the trigger logic between the basic functional units provided by each sub-component based on the association rules of each sub-component 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, then 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, the number of consecutive triggers of another basic functional unit reaches a preset value, or the continuous operation time of another basic functional unit reaches a preset time. In short, the trigger condition of the basic functional unit can be pre-set according to demand, and this specification does not impose any restrictions.
[0076] Taking the check-in component as an example, the check-in functionality provided by the check-in component corresponds to multiple basic functional units, including: daily check-in, daily check-in reward claiming, consecutive check-in reward claiming, and Friday check-in special reward claiming. Based on the configuration file corresponding to the check-in component, the server can determine the triggering logic between the functions provided by each subcomponent of the check-in component. For example, based on the configuration file, the server can determine that the trigger condition for the daily check-in reward claiming function is triggered by the current check-in function, or that the trigger condition for the consecutive check-in reward claiming function is triggered by the current check-in function for seven consecutive days.
[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 This is a schematic diagram of the calling relationship between the functions provided by two target components provided in this specification.
[0079] There is a lottery function provided by the lottery component and a daily check-in function provided by the check-in component. The lottery function is triggered by the check-in component recording seven consecutive check-ins. The check-in component has two subcomponents, one for daily check-in and the other for claiming consecutive check-in rewards.
[0080] The lottery function is triggered when the user uses the daily check-in function provided by the daily check-in subcomponent of the check-in component. Then, the subcomponent that provides the continuous check-in collection function records the user's continuous check-in times, and the lottery component can obtain the user's continuous check-in times according to the interface program of the check-in component, and trigger the lottery function provided by the lottery component after the obtained user's continuous check-in times reach 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] However, 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, changing the original requirement for users to sign in continuously for seven days to three days.
[0082] To meet this requirement, for a target component, after determining the trigger logic between the functions provided by several sub-components corresponding to the target component based on the association rules contained in the configuration file corresponding to the target component, the server can use this 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 "The trigger condition for the continuous check-in reward function is: the number of consecutive check-ins is seven times" is displayed to the user. 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 to 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 seven consecutive check-ins to receive the reward to three consecutive check-ins 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 the method of modifying the trigger logic by displaying text to the user, for users with strong technical capabilities, the server can provide a method of modifying the trigger logic with variable parameters as the data to be adjusted. Specifically, for a target component, the server determines the part of the code used to control the trigger logic in the association rules based on the association rules contained in the configuration file corresponding to the target component, and then displays this part of the code to the user in a highlighted and modifiable manner. 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 of 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 of adjusting the trigger logic.
[0084] S105: Generate a target application according to the calling relationship and the configuration file corresponding to each target component.
[0085] Once the server determines the calling relationships between target components during task execution and the corresponding configuration files for each target component, it can generate the target application. S102-S103 have already clarified how the server establishes the calling relationships between target components and the triggering logic between the subcomponents corresponding to each target component. Next, we will explain 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 connected to the front-end component, the configuration file corresponding to the target component also includes: the identifier of each front-end component among the several front-end components corresponding to the target component and the connection 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 based on 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 between the back-end component and the front-end component based on the docking protocol contained in the configuration files of each target component, thereby generating the target application. Taking the check-in component as an example, this check-in component needs to be linked to the front-end component that provides the check-in interface. Specifically, there is a check-in interface that provides a daily check-in icon. When a player clicks this icon, the daily check-in function provided by the daily check-in subcomponent of the check-in component is triggered, responding to the player's action. Furthermore, if the check-in component's interface program determines that the player has checked in seven times in a row, the continuous check-in reward claiming icon in the check-in interface can be highlighted to prompt the user to claim the reward. This link between the front-end and back-end components enables interaction between the game player and the game application, resulting in a runnable application. Server-generated applications are not limited to web browser-based applications; they can also be desktop applications that must be installed on the user's computer to run, or mobile applications for mobile devices such as smartphones or tablets. In short, for the purposes of this application, server-generated applications are not limited to a single type of application.
[0088] It's important to note that, in addition to components that provide interactive functionality, an application may also include front-end components that are displayed only to users, as well as back-end components that aren't displayed to users through the front-end components. For example, there might be an animation effect on a login screen that's only for display. The front-end component corresponding to this animation doesn't interact with the user. For such front-end components, the server can indicate in the application assembly interface that these front-end components don't interact with the user. Meanwhile, for back-end components that aren't displayed to users through the front-end components, the data processed by these components isn't displayed to ordinary application users, but technical personnel who manage these components can query the data through them. For example, if a game company needs to record the total amount of player top-ups, they can set up a back-end component to record all player top-up records and provide a query interface for game administrators to query the total amount of player top-ups.
[0089] In addition, for some more complex applications, such as large games, such applications often require a series of optimizations to improve application performance. One of the optimization methods is program framework optimization, which provides the target application performance through the simplest framework possible.
[0090] This application also provides an optimization method, where 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 the several target components corresponding to the sample application based on the several configuration files corresponding to the sample application, and then input the determined calling relationship, the performance indicators corresponding to the sample application, and the configuration files corresponding to the 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 indicators, and train the construction model based on this loss value. 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 indicators, and there is a positive correlation between the loss value and the deviation.
[0092] It should be noted that, taking a function or class used to build a program as a basic program unit, when building the model to determine the predicted framework information, the server first determines the candidate basic program units required to generate the corresponding program framework of the application based on the input call relationship and configuration file. Then, based on the condition that the performance of the generated application meets the performance indicators, the server selects the target basic program unit from the candidate basic program units. The target basic program unit is used to generate and output the corresponding program framework information of the application. The server then generates the application based on the program framework information output by the 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 based on 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 obtained 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 application generation efficiency.
[0096] Moreover, after inputting the task requirement information required 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 does not need to be adjusted much by technical personnel to achieve the performance indicators that need to be met when executing the task, thereby further improving the application generation efficiency.
[0097] The above is a method for generating one or more applications in this specification. Based on the same idea, this specification also provides corresponding devices, storage media and electronic devices.
[0098] Figure 3 This is a schematic diagram of the structure of an application generation 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 for several components;
[0100] A first determining module 302 is 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;
[0101] The second determining 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 determining 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] Generating module 305: for generating a target application according to the calling relationship and the configuration file 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 triggering 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 triggering 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, the initial 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; in response to a trigger logic adjustment operation performed by the 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 further 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 part of the target components and several front-end components based on the docking protocol contained in the configuration file corresponding to at least part of the target components; and generate a target application based on 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 configured to export the target application in the form of a configuration file to obtain an application configuration file; determine a target deployment device in response to the obtained deployment request, and 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 based on the calling relationship and the configuration file corresponding to each target component; constructs a program framework based on the program framework information, and generates the target application based on the program framework based on 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 for generating 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 for building a program or a class required for building a program.
[0113] This specification also provides a computer-readable storage medium, wherein the storage medium stores a computer program, which can be used to perform the above-mentioned Figure 1 Provides a method for generating applications.
[0114] based on Figure 1 The application generation method shown in the embodiment of this 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. Of course, it 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 execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0116] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, 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 will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0117] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. 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 will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement 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 having 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 smartphone, 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 devices are described as being divided into 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 combining software and hardware. Furthermore, 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 magnetic disk storage, CD-ROM, optical storage, etc.) containing 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 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 that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The 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 operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0124] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0125] 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. Memory is an example of a computer-readable medium.
[0126] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The 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 disc read-only memory (CD-ROM), digital versatile disc (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 transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0127] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0128] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, 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 magnetic 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, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like 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 communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0130] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
[0131] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.
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; 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 program framework corresponding to the target application according to the calling relationship and the configuration file corresponding to each target component, and selects 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, and 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; 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.
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. 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; A generation module: obtaining task requirement information corresponding to the task, wherein 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; inputting the task requirement information, the calling relationship, and the configuration file corresponding to each target component into a preset construction model, so that the construction model determines the candidate basic program units required for generating the program framework corresponding to 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, and 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; 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. 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 5 is implemented.
8. 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 5 is implemented.
Citation Information
Patent Citations
Atomic service orchestration method and device, equipment and storage medium
CN116755677A
Code generation method based on large language model, medium and equipment
CN118363580A