CN113835680B - Application program generation method and device, electronic equipment and computer storage medium - Google Patents
Application program generation method and device, electronic equipment and computer storage medium Download PDFInfo
- Publication number
- CN113835680B CN113835680B CN202010591263.XA CN202010591263A CN113835680B CN 113835680 B CN113835680 B CN 113835680B CN 202010591263 A CN202010591263 A CN 202010591263A CN 113835680 B CN113835680 B CN 113835680B
- Authority
- CN
- China
- Prior art keywords
- node
- application program
- module
- node module
- modules
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application provides a method and a device for generating an application program, electronic equipment and a computer readable storage medium, and relates to the field of information processing. The method comprises the following steps: when an acquisition instruction is received, acquiring at least two node modules required by the application program and a configuration file containing the connection relation between the node modules from a preset node module library; and when receiving the generation instruction, packaging based on each node module and the configuration file to obtain the installation file of the application program. The application avoids the problem that the planner needs to communicate with the developer, not only causes efficiency loss, but also has ambiguity in the communication process, and realizes that the planner can quickly verify the logic of the application program basically by himself and adjust the relevant parameters of the application program, thereby quickly iterating the product.
Description
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method and apparatus for generating an application program, an electronic device, and a computer readable storage medium.
Background
In the existing development process of an application program, a product designer usually designs and writes text description contents of functions of the application program, and then sends the text to a developer to write codes to realize the text description contents into the product of the application program, and a specific development flow is shown in fig. 1. But this approach has the following drawbacks:
1) The text description is often ambiguous, and because the design and implementation are not the same person, deviations from the designer's description and the developer's understanding may occur, and the developer may not be able to fully understand all design details at a time, resulting in a final effect that is not as expected;
2) When a new function is designed, a large number of repeated source codes are required to be written, and the efficiency is low; moreover, after each function modification, a developer needs to be informed of changing and compiling the source code, and the source code can be released after the compiling is completed and tested, so that the process is time-consuming, and information expression ambiguity can be caused in the communication and communication process, and the iteration efficiency of the product is affected.
Disclosure of Invention
The application provides a method and a device for generating an application program, electronic equipment and a computer readable storage medium, and solves the problems. The technical scheme is as follows:
In a first aspect, there is provided a method for generating an application program, the method comprising:
When an acquisition instruction is received, acquiring at least two node modules required by the application program and a configuration file containing the connection relation between the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
when a generating instruction is received, packaging is carried out based on each node module and the configuration file to obtain an installation file of the application program, so that the installation file is unpacked to obtain each node module and the configuration file, each node module is called based on the configuration file when the application program runs, and corresponding behavior actions are executed through each node module.
Preferably, the node module library is generated by:
Acquiring a source code corresponding to any node module;
Compiling the source code to generate any node module, and setting the resource data reading type corresponding to the any node module in response to a setting instruction;
and storing any node module into a preset node module library.
Preferably, the configuration file is generated by:
receiving an acquisition instruction of a node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
acquiring corresponding node modules from a node module library based on the identification information;
When a connection instruction aiming at any two node modules is received, establishing a connection relation of the any two node modules;
When receiving the output instruction, generating a configuration file, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
Preferably, the behavioral actions include at least one of conditional judgment, transient computing actions, and continuous computing actions; the resource data reading type comprises at least one of static configuration data, dynamic configuration data and state maintenance data; the condition judgment corresponds to the static configuration data, the instantaneous calculation behavior corresponds to the dynamic configuration data, and the continuous calculation behavior corresponds to the state maintenance data.
Preferably, the encapsulating based on each node module and the configuration file to obtain an installation file of the application program includes:
And packaging each node module, the configuration file and the resource data which each node module needs to read to obtain the installation file of the application program.
In a second aspect, there is provided an apparatus for generating an application program, the apparatus comprising:
The receiving module is used for receiving the acquisition instruction;
The first acquisition module is used for acquiring at least two node modules required by the application program from a preset node module library and a configuration file containing the connection relation between the node modules; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
The receiving module is also used for receiving the generation instruction;
And the encapsulation module is used for encapsulating the installation files of the application program based on the node modules and the configuration files so as to enable the installation files to be unpacked to obtain the node modules and the configuration files, calling the node modules based on the configuration files when the application program runs, and executing corresponding behavior actions through the node modules.
Preferably, the method further comprises:
The second acquisition module is used for acquiring the source code corresponding to any node module;
the first processing module is used for compiling the source code, generating any node module and setting the resource data reading type corresponding to any node module in response to a setting instruction;
And the storage module is used for storing any node module to a preset node module library.
Preferably, the method further comprises:
the second processing module is used for receiving the acquisition instruction of the node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
The third acquisition module is used for acquiring corresponding node modules from the node module library based on the identification information;
The building module is used for building the connection relation of any two node modules when receiving the connection instruction aiming at the any two node modules;
And the generating module is used for generating a configuration file when receiving the output instruction, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
Preferably, the behavioral actions include at least one of conditional judgment, transient computing actions, and continuous computing actions; the resource data reading type comprises at least one of static configuration data, dynamic configuration data and state maintenance data; the condition judgment corresponds to the static configuration data, the instantaneous calculation behavior corresponds to the dynamic configuration data, and the continuous calculation behavior corresponds to the state maintenance data.
Preferably, the packaging module is specifically configured to:
And packaging each node module, the configuration file and the resource data which each node module needs to read to obtain the installation file of the application program.
In a third aspect, an electronic device is provided, the electronic device comprising:
A processor, a memory, and a bus;
The bus is used for connecting the processor and the memory;
The memory is used for storing operation instructions;
The processor is configured to cause the processor to execute an operation corresponding to the method for generating an application program according to the first aspect of the present application by calling the operation instruction.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, implements the method for generating an application program according to the first aspect of the application.
The technical scheme provided by the application has the beneficial effects that:
When an acquisition instruction is received, acquiring at least two node modules required by the application program and a configuration file containing the connection relation between the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, packaging is carried out based on each node module and the configuration file to obtain an installation file of the application program, so that the installation file is unpacked to obtain each node module and the configuration file, each node module is called based on the configuration file when the application program runs, and corresponding behavior actions are executed through each node module. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic diagram of a development flow of a prior art application;
FIG. 2 is a flowchart illustrating a method for generating an application according to an embodiment of the present application;
FIG. 3 is a logic diagram of each node module corresponding to three behavior operations in the present application;
FIG. 4 is a schematic diagram of a connection relationship between node modules according to the present application;
fig. 5 is a schematic structural diagram of an apparatus for generating an application according to another embodiment of the present application;
Fig. 6 is a schematic structural diagram of an electronic device for generating an application according to another embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings.
The application provides a method and a device for generating an application program, electronic equipment and a computer readable storage medium, and aims to solve the technical problems in the prior art.
The following describes the technical scheme of the present application and how the technical scheme of the present application solves the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
In one embodiment, a method for generating an application program is provided, as shown in fig. 2, and the method includes:
Step S201, when an acquisition instruction is received, acquiring at least two node modules required by an application program and a configuration file containing connection relations among the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
The user may generate an installation file of the application program through a third party (such as a plug-in, an application program and the like) with an installation file generating function, and the third party may run in a terminal, perform data interaction with a preset node module library, and the terminal may have the following characteristics:
(1) In a hardware system, the device includes a central processing unit, a memory, an input unit, and an output unit, that is, the device is often a microcomputer device having a communication function. In addition, there may be various input modes such as a keyboard, a mouse, a touch panel, a microphone, a camera, and the like, and the input may be adjusted as necessary. Meanwhile, the equipment often has various output modes, such as a receiver, a display screen and the like, and can be adjusted according to the needs;
(2) On a software architecture, the device must be provided with an operating system, such as Windows Mobile, symbian, palm, android, iOS, etc. Meanwhile, the operating systems are more and more open, and personalized application programs developed based on the open operating system platforms are layered endlessly, such as an address book, a calendar, a notepad, a calculator, various games and the like, so that the demands of personalized users are met to a great extent;
(3) In terms of communication capability, the device has flexible access mode and high-bandwidth communication performance, and can automatically adjust the selected communication mode according to the selected service and the environment, thereby facilitating the use of users. The device can support GSM (Global System for Mobile Communication, global System for Mobile communications), WCDMA (Wideband Code Division Multiple Access ), CDMA2000 (Code Division Multiple Access, code Division multiple Access), TDSCDMA (Time Division-Synchronous Code Division Multiple Access, time Division synchronous code Division multiple Access), wi-Fi (Wireless Fidelity), wiMAX (Worldwide Interoperability for Microwave Access ) and the like, thereby adapting to various system networks, supporting not only voice services but also various Wireless data services;
(4) In terms of functional use, the device is more focused on humanization, individualization and multifunctionality. With the development of computer technology, the device enters a mode of 'centering on people' from a mode of 'centering on the device', and embedded computing, control technology, artificial intelligence technology, biological authentication technology and the like are integrated, so that the aim of people is fully embodied. Due to the development of software technology, the device can adjust the settings according to personal needs, and is more personalized. Meanwhile, the device integrates a plurality of software and hardware, and the functions are more and more powerful.
Specifically, when the user runs the third party in the terminal, at least two node modules required by the generated application program and a configuration file containing the connection relation between the node modules can be obtained from a node module library preset in the terminal through the third party. The third party is provided with a visual interface, an acquisition button and a generation button are arranged in the visual interface, after a user clicks the acquisition button, each node module in the node module library can be displayed in a preset display window, the user can select a needed node module from the node modules, and then a configuration file required by the user is acquired from a storage container of the terminal.
Further, the configuration file includes connection relationships between the node modules, for example, the configuration file a includes connection relationships between the node modules 1, 2, and 3, and the configuration file B includes connection relationships between the node modules 4 and 5.
It should be noted that, the configuration file may be stored in the node module library, may be stored separately from the node module library, or may be stored in a storage container of the terminal in other manners, and in practical application, may be set according to practical requirements, which is not limited in the embodiment of the present invention.
Step S202, when a generation instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules.
Specifically, in the visual interface of the third party, when the user clicks the generation button, the installation file of the application program can be obtained by packaging based on each node module and the configuration file. The obtained installation file can be stored in a server for any user to download. After any user downloads the installation file in the terminal, the application program can be installed by decapsulating the installation file, and simultaneously, each node module, the configuration file and the resource data required to be read by each node module are obtained. When an application is running, the running logic consisting of three behavior actions can be as shown in FIG. 3; in addition, aiming at the operation instruction of the user, each node module can be called based on the configuration file, and corresponding behavior actions are executed through each node module, so that the requirement of the user is met.
Wherein, the flow structure diagram shown in fig. 3 describes service logic of an embodiment of the present invention, including: the entry point is the State node pointed by the START flag, wherein the OnTick exit is executed once per frame of the program, when the program is executed to the OnTick interface, the execution of the content in the Condition node of the subsequent node connected with the program is started, the execution result of the Condition node is Flase or True, after the execution result is calculated, the corresponding connected exit is selected to continue to activate the next node on the connection to START execution, and the flow execution flow is similar.
Further, loop loops execute logic in which For Each points; executing Listener and Listener pointed by Next after the logic execution of state is completed, wherein the Listener and Listener pointed by Next are used for sensing the change of external data; the Selector selects logic to be executed according to the internal logic; duration is used to perform waiting for the timer to finish, such as waiting for the timer to finish 5 seconds; subflow when the logic (complete flow shown in fig. 3) execution for the current stream file is completed, jump to another stream file.
In the embodiment of the invention, when an acquisition instruction is received, at least two node modules required by an application program and a configuration file containing the connection relation between the node modules are acquired from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
In another embodiment, a detailed description of a method of generating an application program as shown in fig. 2 is continued.
Step S201, when an acquisition instruction is received, acquiring at least two node modules required by an application program and a configuration file containing connection relations among the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
The user can generate the installation file of the application program through a third party (such as a plug-in, an application program and the like) with the function of generating the installation file, and the third party can run in the terminal to interact data with a preset node module library.
Specifically, when the user runs the third party in the terminal, at least two node modules required by the generated application program and a configuration file containing the connection relation between the node modules can be obtained from a node module library preset in the terminal through the third party. The third party is provided with a visual interface, an acquisition button and a generation button are arranged in the visual interface, after a user clicks the acquisition button, each node module in the node module library can be displayed in a preset display window, the user can select a needed node module from the node modules, and then a configuration file required by the user is acquired from a storage container of the terminal.
Further, the configuration file includes connection relationships between the node modules, for example, the configuration file a includes connection relationships between the node modules 1, 2, and 3, and the configuration file B includes connection relationships between the node modules 4 and 5.
It should be noted that, the configuration file may be stored in the node module library, may be stored separately from the node module library, or may be stored in a storage container of the terminal in other manners, and in practical application, may be set according to practical requirements, which is not limited in the embodiment of the present invention.
In a preferred embodiment of the invention, the node module library is generated by:
Acquiring a source code corresponding to any node module;
compiling the source code to generate any node module, and setting the resource data reading type corresponding to any node module in response to the setting instruction;
And storing any node module into a preset node module library.
Specifically, the user may acquire a source code corresponding to any node module, define an executable behavior of the node module in the source code, compile the source code through an application program with a compiling function to generate a corresponding node module, and then may continuously initiate a setting instruction to set a resource data reading type corresponding to the generated node module, and store the set node module to a preset node module library.
Further, the behavior Action includes at least one of a Condition judgment (Condition), an instantaneous computing Action (Action), and a continuous computing Action (State); the resource data read type includes at least one of static configuration data (ConfigVar), dynamic configuration data (ConfigFunction), and state maintenance data (ConfigFactroy); the condition judgment corresponds to static configuration data, the instantaneous calculation behavior corresponds to dynamic configuration data, and the continuous calculation behavior corresponds to state maintenance data.
The static configuration data are some static configuration data which are required to be read by the application program when the application program is running, the dynamic configuration data are some dynamically acquired configuration data which are required to be read by the application program when the application program is running, and the state maintenance data are environment data which are dependent by the application program when the application program is running.
For the Condition type behavior action, the name is Condition judgment, one operation is executed when a certain Condition is met, another operation is executed when another Condition is met, and the identification is shown in the table 1:
TABLE 1
Condition |
False |
Ture |
For Action type behavior, namely an instantaneous computing behavior, for example, completing a certain operation at one time, the identification is shown in table 2:
TABLE 2
SetVar |
For Each |
Next |
For State type behavior actions, to characterize its continued execution, a timed tick socket may be designed on its node module to simulate the State of the continued processing, the identity of which is shown in table 3:
TABLE 3 Table 3
State |
OnTick |
Next |
In a preferred embodiment of the invention, the configuration file is generated by:
receiving an acquisition instruction of a node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
acquiring corresponding node modules from a node module library based on the identification information;
When a connection instruction aiming at any two node modules is received, establishing a connection relation of any two node modules;
when receiving the output instruction, generating a configuration file, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
In particular, a visual editor may be used to edit the connection relationships between the various modules. In practical application, the visual editor is provided with a visual interface, a user can initiate an acquisition instruction of a node module in the visual interface, the acquisition instruction comprises identification information of a plurality of node modules, the visual edit acquires the node modules corresponding to the identification information from a node module library and displays the node modules in the visual interface, when receiving a connection instruction initiated by the user and aiming at any two node modules, a connection relation of the two node modules is established, when receiving an output instruction initiated by the user, a blank configuration file is generated, the currently established connection relation and the identification information of each node module with the connection relation are recorded in the blank configuration file, a final configuration file is obtained, and the final configuration file is stored; the storage may be stored in the terminal or the server, and may be set according to actual requirements in practical applications, which is not limited in the embodiment of the present invention.
For example, a user sets that the node module 1 and the node module 2 have a connection relationship in the visual editor, the node module 2 and the node module 3 have a connection relationship, when the user initiates an output instruction, a blank configuration file is generated, then the two connection relationships and identification information of the node modules 1, 2 and 3 are recorded in the blank configuration file, a final configuration file is obtained, and the final configuration file is stored.
Further, the connection relationship between the node modules may be a UML (Unified Modeling Language ) structure, as shown in fig. 4. Moreover, different connection relations are adopted between the same node modules, and the functions to be realized are different, for example, the node module 1 is connected with the node module 2, the node module 2 is connected with the node module 3, the node modules 1,2 and 3 can realize the function A, the node module 1 is connected with the node module 3, the node module 3 is connected with the node module 2, the node modules 1,3 and 2 can realize the function B, and then the function A and the function B are different.
Wherein ScriptFlowInstance in the UML structure diagram is an example of a stream, m_ STATEINST is List is all nodes contained in the stream, and corresponding UML class structure is StateNode. StateNode provides a method as disclosed: onBegin, onFinish, onAbort, etc. The m_ FlowCfg field in ScriptFlowInstance is a pointer to the configuration of a flow, and all the same flow is configured in the same static configuration, so that the pointer is used to point to the same configuration, thereby saving memory. The StateConfgi field in StateNode contains a number of ConfigVar classes that can be extended by subclasses, e.g., STATICVAR is the static configuration of a node, i.e., the value read from the configuration. DYNAMICVAR is the value dynamically calculated by the function during operation as the current operating parameter. And FactroyVar is the parameter that is evaluated at node initialization.
Step S202, when a generation instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules.
Specifically, in the visual interface of the third party, when the user clicks the generation button, the installation file of the application program can be obtained by packaging based on each node module and the configuration file.
In a preferred embodiment of the present invention, the encapsulating based on each node module and the configuration file to obtain the installation file of the application program includes:
And packaging each node module, the configuration file and the resource data which each node module needs to read to obtain an installation file of the application program.
Because each node module needs to read the resource data, besides each node module and the configuration file, each node module needs to read the resource data, and therefore, when in encapsulation, each node module, the configuration file and the resource data which each node module needs to read are encapsulated to obtain the installation file of the application program.
The obtained installation file can be stored in a server for any user to download. After any user downloads the installation file in the terminal, the application program can be installed by decapsulating the installation file, and simultaneously, each node module, the configuration file and the resource data required to be read by each node module are obtained. When an application is running, the running logic consisting of three behavior actions can be as shown in FIG. 3; in addition, aiming at the operation instruction of the user, each node module can be called based on the configuration file, and corresponding behavior actions are executed through each node module, so that the requirement of the user is met.
In the embodiment of the invention, when an acquisition instruction is received, at least two node modules required by an application program and a configuration file containing the connection relation between the node modules are acquired from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
Furthermore, the planner can establish the logic relation among the node modules through the visual editor, the planner is not required to directly face the source code, the operation complexity of the planner is reduced, and the output of the visual editor is a text file, so that the visual editor is convenient to dynamically load on a server in real time and is convenient to manage.
Furthermore, as all functions of the application program are split into a plurality of node modules, the connection relation of each node module can be defined when the application program runs, and various functions which are already developed can be reused like building blocks, so that the scale of source codes is reduced.
Fig. 5 is a schematic structural diagram of an apparatus for generating an application according to another embodiment of the present application, as shown in fig. 5, the apparatus of this embodiment may include:
a receiving module 501, configured to receive an acquisition instruction;
The first obtaining module 502 is configured to obtain at least two node modules required by an application program from a preset node module library, and a configuration file including a connection relationship between each node module; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
the receiving module is also used for receiving the generation instruction;
The encapsulation module 503 is configured to encapsulate the installation file of the application program based on each node module and the configuration file, so that the installation file is decapsulated to obtain each node module and the configuration file, and call each node module based on the configuration file when the application program runs, and execute corresponding behavior actions through each node module.
In a preferred embodiment of the present invention, further comprising:
The second acquisition module is used for acquiring the source code corresponding to any node module;
The first processing module is used for compiling the source code, generating any node module and setting the resource data reading type corresponding to any node module in response to the setting instruction;
And the storage module is used for storing any node module to a preset node module library.
In a preferred embodiment of the present invention, further comprising:
The second processing module is used for receiving the acquisition instruction of the node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
The third acquisition module is used for acquiring corresponding node modules from the node module library based on the identification information;
The establishing module is used for establishing the connection relation of any two node modules when receiving the connection instruction aiming at any two node modules;
And the generating module is used for generating a configuration file when receiving the output instruction, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
In a preferred embodiment of the present invention, the behavioral actions include at least one of conditional judgment, transient computing actions, and persistent computing actions; the resource data reading type comprises at least one of static configuration data, dynamic configuration data and state maintenance data; the condition judgment corresponds to static configuration data, the instantaneous calculation behavior corresponds to dynamic configuration data, and the continuous calculation behavior corresponds to state maintenance data.
In a preferred embodiment of the invention, the packaging module is specifically configured to:
And packaging each node module, the configuration file and the resource data which each node module needs to read to obtain an installation file of the application program.
The application program generating device of the present embodiment may execute the application program generating methods shown in the first embodiment and the second embodiment of the present application, and the implementation principles are similar, and are not repeated here.
In the embodiment of the invention, when an acquisition instruction is received, at least two node modules required by an application program and a configuration file containing the connection relation between the node modules are acquired from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
Furthermore, the planner can establish the logic relation among the node modules through the visual editor, the planner is not required to directly face the source code, the operation complexity of the planner is reduced, and the output of the visual editor is a text file, so that the visual editor is convenient to dynamically load on a server in real time and is convenient to manage.
Furthermore, as all functions of the application program are split into a plurality of node modules, the connection relation of each node module can be defined when the application program runs, and various functions which are already developed can be reused like building blocks, so that the scale of source codes is reduced.
In still another embodiment of the present application, there is provided an electronic apparatus including: a memory and a processor; at least one program stored in the memory for execution by the processor, which, when executed by the processor, performs: when an acquisition instruction is received, acquiring at least two node modules required by an application program from a preset node module library and a configuration file containing connection relations among the node modules; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
In an alternative embodiment, an electronic device is provided, as shown in fig. 6, and an electronic device 6000 shown in fig. 6 includes: a processor 6001 and a memory 6003. In which a processor 6001 is coupled to a memory 6003, such as via a bus 6002. Optionally, the electronic device 6000 may also include a transceiver 6004. It should be noted that, in practical applications, the transceiver 6004 is not limited to one, and the structure of the electronic device 6000 is not limited to the embodiment of the present application.
The processor 6001 may be a CPU, general purpose processor, DSP, ASIC, FPGA or other programmable logic device, transistor logic device, hardware components, or any combination thereof. Which may implement or perform the various exemplary logic blocks, modules and circuits described in connection with this disclosure. The processor 6001 may also be a combination that performs computing functions, e.g., including one or more microprocessors, a combination of a DSP and a microprocessor, and the like.
Bus 6002 may include a path to transfer information between the aforementioned components. Bus 6002 may be a PCI bus or an EISA bus, among others. The bus 6002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
The memory 6003 may be, but is not limited to, ROM or other type of static storage device, RAM or other type of dynamic storage device, which can store static information and instructions, EEPROM, CD-ROM or other optical disk storage, optical disk storage (including compact disk, laser disk, optical disk, digital versatile disk, blu-ray disc, etc.), magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
The memory 6003 is used for storing application program codes for executing the scheme of the present application, and execution is controlled by the processor 6001. The processor 6001 is operative to execute application code stored in the memory 6003 to implement what is shown in any of the method embodiments described previously.
Among them, electronic devices include, but are not limited to: mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like.
Yet another embodiment of the present application provides a computer-readable storage medium having stored thereon a computer program which, when run on a computer, causes the computer to perform the corresponding ones of the foregoing method embodiments. Compared with the prior art, when an acquisition instruction is received, acquiring at least two node modules required by an application program and a configuration file containing the connection relation between the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; when a generating instruction is received, the installation files of the application program are obtained through encapsulation based on the node modules and the configuration files, so that the installation files are unpacked to obtain the node modules and the configuration files, the node modules are called based on the configuration files when the application program runs, and corresponding behavior actions are executed through the node modules. In this way, by splitting all functions of the application program into a plurality of node modules, a planner of the application program can directly design the service logic into enumeration configuration of a plurality of node modules without depending on source codes of the application program when designing the service logic of the application program, so that the planner is prevented from communicating with a developer, the efficiency is not only damaged, but also the ambiguity problem in the communication process is caused, the planner can be realized to verify the logic of the application program completely and quickly, and relevant parameters of the application program are adjusted, thereby quickly iterating products.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.
Claims (7)
1. A method for generating an application program, comprising:
When an acquisition instruction is received, acquiring at least two node modules required by the application program and a configuration file containing the connection relation between the node modules from a preset node module library; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action;
when a generating instruction is received, packaging based on each node module and the configuration file to obtain an installation file of the application program, so that the installation file is unpacked to obtain each node module and the configuration file, calling each node module based on the configuration file when the application program runs, and executing corresponding behavior actions through each node module;
The node module library is generated by the following steps:
Acquiring a source code corresponding to any node module;
Compiling the source code to generate any node module, and setting the resource data reading type corresponding to the any node module in response to a setting instruction;
Storing any node module to a preset node module library; the behavioral actions include at least one of conditional judgment, transient computing actions, and continuous computing actions; the resource data reading type comprises at least one of static configuration data, dynamic configuration data and state maintenance data; the condition judgment corresponds to the static configuration data, the instantaneous calculation behavior corresponds to the dynamic configuration data, and the continuous calculation behavior corresponds to the state maintenance data; and if the behavior corresponding to the node module is the continuous calculation behavior, the node module comprises a timing socket for simulating the state of continuous processing.
2. The method for generating an application program according to claim 1, wherein the configuration file is generated by:
receiving an acquisition instruction of a node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
acquiring corresponding node modules from a node module library based on the identification information;
When a connection instruction aiming at any two node modules is received, establishing a connection relation of the any two node modules;
When receiving the output instruction, generating a configuration file, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
3. The method for generating an application program according to claim 1 or 2, wherein the encapsulating based on each node module and the configuration file to obtain an installation file of the application program includes:
And packaging each node module, the configuration file and the resource data which each node module needs to read to obtain the installation file of the application program.
4. An application program generation apparatus, comprising:
The receiving module is used for receiving the acquisition instruction;
the first acquisition module is used for acquiring at least two node modules required by the application program from a preset node module library and a configuration file containing the connection relation between the node modules; the node module library comprises at least two generated node modules, and each node module is used for executing at least one behavior action; the receiving module is also used for receiving the generation instruction;
The packaging module is used for packaging the installation files of the application program based on the node modules and the configuration files so as to enable the installation files to be unpacked to obtain the node modules and the configuration files, calling the node modules based on the configuration files when the application program runs, and executing corresponding behavior actions through the node modules;
The second acquisition module is used for acquiring the source code corresponding to any node module;
the first processing module is used for compiling the source code, generating any node module and setting the resource data reading type corresponding to any node module in response to a setting instruction;
The storage module is used for storing any node module to a preset node module library; the behavioral actions include at least one of conditional judgment, transient computing actions, and continuous computing actions; the resource data reading type comprises at least one of static configuration data, dynamic configuration data and state maintenance data; the condition judgment corresponds to the static configuration data, the instantaneous calculation behavior corresponds to the dynamic configuration data, and the continuous calculation behavior corresponds to the state maintenance data; and if the behavior corresponding to the node module is the continuous calculation behavior, the node module comprises a timing socket for simulating the state of continuous processing.
5. The apparatus for generating an application program according to claim 4, further comprising:
the second processing module is used for receiving the acquisition instruction of the node module through a preset visual editor; the acquisition instruction comprises identification information of at least two node modules;
The third acquisition module is used for acquiring corresponding node modules from the node module library based on the identification information;
The building module is used for building the connection relation of any two node modules when receiving the connection instruction aiming at the any two node modules;
And the generating module is used for generating a configuration file when receiving the output instruction, and recording the established at least one connection relation and the identification information of each node module with the connection relation in the configuration file.
6. An electronic device, comprising:
A processor, a memory, and a bus;
The bus is used for connecting the processor and the memory;
The memory is used for storing operation instructions;
The processor is configured to execute the method for generating an application program according to any one of claims 1 to 3 by calling the operation instruction.
7. A computer readable storage medium for storing computer instructions which, when run on a computer, cause the computer to perform the method of generating an application program according to any of the preceding claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010591263.XA CN113835680B (en) | 2020-06-24 | 2020-06-24 | Application program generation method and device, electronic equipment and computer storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010591263.XA CN113835680B (en) | 2020-06-24 | 2020-06-24 | Application program generation method and device, electronic equipment and computer storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113835680A CN113835680A (en) | 2021-12-24 |
CN113835680B true CN113835680B (en) | 2024-10-08 |
Family
ID=78964891
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010591263.XA Active CN113835680B (en) | 2020-06-24 | 2020-06-24 | Application program generation method and device, electronic equipment and computer storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113835680B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114201149B (en) * | 2022-02-18 | 2022-05-31 | 北京阿丘科技有限公司 | Operation flow generation method, device and system and computer readable storage medium |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111124388A (en) * | 2019-11-28 | 2020-05-08 | 深圳市世宗自动化设备有限公司 | Method and system for editing automation program, computer device and storage medium thereof |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7836426B2 (en) * | 2004-05-06 | 2010-11-16 | National Instruments Corporation | Automatic generation of application domain specific graphical programs |
CN105204837B (en) * | 2014-06-27 | 2021-02-09 | 南京南瑞继保电气有限公司 | Method and device for realizing logic programming |
CN107577515A (en) * | 2017-10-10 | 2018-01-12 | 北京小度信息科技有限公司 | Extended method, device, electronic equipment and the storage medium of visualization component |
CN108021363B (en) * | 2017-12-06 | 2021-06-15 | 广州多益网络股份有限公司 | Visual game logic editing method and system |
CN108509193A (en) * | 2018-05-22 | 2018-09-07 | 苏州蜗牛数字科技股份有限公司 | A kind of system using visualization component encapsulation function |
US10606613B2 (en) * | 2018-05-31 | 2020-03-31 | Bank Of America Corporation | Integrated mainframe distributed orchestration tool |
CN109324793A (en) * | 2018-10-24 | 2019-02-12 | 北京奇虎科技有限公司 | Processing system and method supporting algorithm componentization |
CN109582310B (en) * | 2018-11-30 | 2022-11-25 | 北京微播视界科技有限公司 | Data processing method and device, electronic equipment and computer readable storage medium |
CN110096271A (en) * | 2019-05-08 | 2019-08-06 | 中汇信息技术(上海)有限公司 | Component visual method, page processing method and device based on component visual |
CN110704043B (en) * | 2019-09-11 | 2023-07-28 | 广州方硅信息技术有限公司 | Special effect implementation method and device, electronic equipment and storage medium |
-
2020
- 2020-06-24 CN CN202010591263.XA patent/CN113835680B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111124388A (en) * | 2019-11-28 | 2020-05-08 | 深圳市世宗自动化设备有限公司 | Method and system for editing automation program, computer device and storage medium thereof |
Also Published As
Publication number | Publication date |
---|---|
CN113835680A (en) | 2021-12-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101807897B1 (en) | Cross―platform application framework | |
US10210591B2 (en) | Optimizing compilation of shaders | |
CN105335132B (en) | Method, device and system for customizing application program function | |
CN107179903B (en) | System and method for developing mobile-based applications using model-driven development | |
CN112463634A (en) | Software testing method and device under micro-service architecture | |
KR20200013915A (en) | Method of operating platform supporting application development and server providing platform | |
CN110597564A (en) | Installation package construction and service component loading method, device and terminal equipment | |
CN111111201B (en) | Skill creation method, device, server and medium based on game | |
CN111338925A (en) | Small program testing method and device, system, electronic device and storage medium | |
CN103443763A (en) | ISA bridging including support for call to overidding virtual functions | |
CN111045675A (en) | Page generation method, device, equipment and storage medium based on Flutter | |
CN114996619A (en) | Page display method and device, computer equipment and storage medium | |
CN113342330A (en) | Front-end engineering generation method and device | |
CN109388435A (en) | Realize app while the repeatedly method and apparatus of opening operation | |
CN104050001A (en) | Resource processing method, device and equipment based on Android system | |
CN113835680B (en) | Application program generation method and device, electronic equipment and computer storage medium | |
CN107733866A (en) | RPC requests, RPC request processing methods, device and equipment | |
CN103853546A (en) | Feedback system and feedback method | |
CN113595665B (en) | Method and device for acquiring analog channel | |
CN104750553A (en) | Application operating method and device | |
CN111367561A (en) | Software program remote development method and device | |
CN107092472A (en) | A kind of dynamic publishing method and equipment | |
CN106775608A (en) | The implementation method and device of autonomous system process | |
CN111803939B (en) | Image rendering method and device and electronic equipment | |
CN115062400A (en) | A method and device for generating a topology map of an automotive open system architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |