An application building method and apparatus

By building and adding pure code to build modular logic code models in application scenarios on low-code development platforms, the problem that the platform is difficult to implement complex business logic is solved, and more efficient code model support and development convenience is achieved.

CN114741071BActive Publication Date: 2025-07-29DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210390571.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2025-07-29
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

Existing low-code development platforms are difficult to implement complex or special business logic code models, resulting in limited development flexibility and functionality.

Method used

Build a code model on the visual application development platform, use pure code to build modular logical code written in application scenarios, and support more business logic by querying the target code model and adding it to the application editing window and logic code.

Benefits of technology

It improves the code model support capabilities of the visual application development platform, enhances the convenience and flexibility of building code models, and can realize more complex business logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741071B_ABST
    Figure CN114741071B_ABST
Patent Text Reader

Abstract

The present disclosure provides an application construction method and apparatus. The method includes: in response to a code model addition instruction for a target application under current construction initiated on a visual application development platform, querying a target code model matching the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario; adding a model identifier corresponding to the target code model to a target position indicated by the code model addition instruction; the target position is in an application editing window on the visual application development platform that matches the target application; adding a code instruction for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to an application construction method and device. Background Art

[0002] A low-code development platform (visual application development platform) is a development platform that allows applications to be quickly generated with minimal or no coding. This visual approach to application development enables developers of varying experience levels to create web and mobile applications through a graphical user interface, using drag-and-drop components and model-driven logic.

[0003] In front-end development, a code model is a module that combines data and logic, independent of the user interface (UI). It is the logical component of the Model-View-ViewModel (MVVM) architecture. To implement the logic required for user interaction in an application, low-code scenarios typically involve code model implementations. These implementations often involve providing a UI on the development platform to create, edit, and generate one or more code models. The logic implemented by these code models is dependent on the implementation of the development platform, making it impossible or extremely difficult to implement certain specialized business logic. Summary of the Invention

[0004] The embodiments of the present disclosure at least provide an application construction method and device.

[0005] In a first aspect, an embodiment of the present disclosure provides an application construction method, including:

[0006] In response to a code model adding instruction initiated on the visual application development platform for a target application currently being built, querying a code model database for a target code model that matches the code model adding instruction; the target code model includes modular logic code written in a pure code construction application scenario;

[0007] Adding a model identifier corresponding to the target code model to a target location indicated by the code model adding instruction; the target location is located in an application editing window on the visual application development platform that matches the target application;

[0008] Adding code instructions for calling the target code model to the logic code of the target application that matches the target location, so that the target application can call the target code model.

[0009] In an optional implementation, the method further includes:

[0010] In response to an installation instruction for a target code model, obtain the target code model and generate an add button corresponding to the target code model; the add button is used to trigger a code model addition instruction for the target code model.

[0011] Obtain the model name and query label of the target code model.

[0012] Based on the model name and query label, store the target code model in the code model database; the model name and the query label are used to query the target code model from the code model database.

[0013] In an alternative implementation, adding the code instruction for invoking the target code model to the logic code of the target application that matches the target location, so that the target application can invoke the target code model, includes:

[0014] When the configuration parameters for the target code model are obtained, use the configuration parameters and the target code model to generate a target code model instance that matches the configuration parameters.

[0015] Add the code instruction for invoking the target code model instance to the logic code of the target application that matches the target location, so that the target application can invoke the target code model instance.

[0016] In an alternative implementation, after obtaining the target code model, the method further includes:

[0017] Obtain the variable description information corresponding to the target code model; the variable description information includes the type information and description information of each variable in the target code model.

[0018] Based on the type information and the description information, generate a variable description list for the target code model.

[0019] Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

[0020] In an alternative implementation, the storing the target code model in the code model database based on the model name and query label includes:

[0021] When multiple configuration parameters for the target code model are obtained, based on the multiple configuration parameters and the target code model, generate a target code model instance corresponding to each configuration parameter.

[0022] For each target code model instance, based on the model name, the query tag, and the configuration parameters corresponding to the target code model instance, store the target code model instance in the code model database; the model name, the query tag, and the configuration parameters are used to query the target code model instance from the code model database.

[0023] In an alternative implementation, adding the code instruction for invoking the target code model to the logic code of the target application that matches the target location, so that the target application can invoke the target code model, includes:

[0024] When the configuration parameters for the target code model are obtained, add the code instruction for invoking the target code model instance that matches the configuration parameters to the logic code of the target application that matches the target location, so that the target application can invoke the target code model instance that matches the configuration parameters.

[0025] In a second aspect, an embodiment of the present disclosure further provides an application construction apparatus, including:

[0026] A query module, configured to, in response to a code model addition instruction for a currently constructed target application initiated on a visual application development platform, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario;

[0027] A first addition module, configured to add a model identifier corresponding to the target code model to a target location indicated by the code model addition instruction; the target location is in an application editing window that matches the target application on the visual application development platform;

[0028] A second addition module, configured to add a code instruction for invoking the target code model to the logic code of the target application that matches the target location, so that the target application can invoke the target code model.

[0029] In an alternative implementation, the apparatus further includes an installation module, configured to:

[0030] In response to an installation instruction for a target code model, obtain the target code model, and generate an addition button corresponding to the target code model; the addition button is used to trigger a code model addition instruction for the target code model;

[0031] Obtain the model name and query tag of the target code model;

[0032] Based on the model name and the query tag, store the target code model in the code model database; the model name and the query tag are used to query the target code model from the code model database.

[0033] In an alternative implementation, when the second addition module adds a code instruction for invoking the target code model to the logic code of the target application that matches the target location, so that the target application can invoke the target code model, it is used for:

[0034] In the case of obtaining configuration parameters for the target code model, use the configuration parameters and the target code model to generate a target code model instance that matches the configuration parameters;

[0035] Add a code instruction for invoking the target code model instance to the logic code of the target application that matches the target location, so that the target application can invoke the target code model instance.

[0036] In an alternative implementation, after obtaining the target code model, the installation module is further used for:

[0037] Obtain variable description information corresponding to the target code model; the variable description information includes type information and description information of each variable in the target code model;

[0038] Based on the type information and the description information, generate a variable description list of the target code model;

[0039] Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

[0040] In an alternative implementation, when the installation module stores the target code model in the code model database based on the model name and the query tag, it is used for:

[0041] In the case of obtaining multiple configuration parameters for the target code model, based on the multiple configuration parameters and the target code model, generate a target code model instance corresponding to each configuration parameter;

[0042] For each target code model instance, based on the model name, the query tag, and the configuration parameters corresponding to the target code model instance, store the target code model instance in the code model database; the model name, the query tag, and the configuration parameters are used to query the target code model instance from the code model database.

[0043] In an alternative embodiment, when adding a code instruction for invoking the target code model to the logic code of the target application that matches the target location so that the target application can invoke the target code model, the second adding module is configured to:

[0044] In the case of obtaining configuration parameters for the target code model, add a code instruction for invoking an instance of the target code model that matches the configuration parameters to the logic code of the target application that matches the target location, so that the target application can invoke the instance of the target code model that matches the configuration parameters.

[0045] In a third aspect, an embodiment of the present disclosure further provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps in the first aspect or any possible implementation manner in the first aspect are executed.

[0046] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is run by a processor, the steps in the first aspect or any possible implementation manner in the first aspect are executed.

[0047] The application construction method and device provided by the embodiments of the present disclosure respond to a code model addition instruction for a target application under construction initiated on a visual application development platform, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario; add a model identifier corresponding to the target code model to a target location indicated by the code model addition instruction; the target location is in an application editing window that matches the target application on the visual application development platform; add a code instruction for invoking the target code model to the logic code of the target application that matches the target location, so that the target application can invoke the target code model.

[0048] By using modular logic code written in a pure code construction application scenario, the embodiments of the present disclosure construct a code model on a visual application development platform, display the visual effect of adding the target code model in an application editing window, and add the code instruction of the target code model to the logic code of the target application. Since the target code model includes modular logic code written in a pure code construction application scenario, the code model of the visual application development platform can support more business logics, and the construction of the code model is more convenient.

[0049] To make the above objects, features, and advantages of the present disclosure more obvious and understandable, the following provides preferred embodiments in conjunction with the accompanying drawings and describes them in detail as follows. Description of the Drawings

[0050] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. These drawings are incorporated into the specification and constitute a part of this specification. These drawings show embodiments that conform to the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other relevant drawings can also be obtained based on these drawings.

[0051] Figure 1 Shows a flowchart of an application construction method provided by an embodiment of the present disclosure;

[0052] Figure 2 Shows one of the schematic diagrams of the user interface of the visual application development platform provided by an embodiment of the present disclosure;

[0053] Figure 3 Shows another schematic diagram of the user interface of the visual application development platform provided by an embodiment of the present disclosure;

[0054] Figure 4 Shows yet another schematic diagram of the user interface of the visual application development platform provided by an embodiment of the present disclosure;

[0055] Figure 5 Shows a schematic diagram of an application construction device provided by an embodiment of the present disclosure;

[0056] Figure 6 Shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure. Detailed Embodiments

[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are only some of the embodiments of the present disclosure, rather than all of them. The components of the embodiments of the present disclosure described and illustrated herein generally may be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the claimed present disclosure, but merely represents selected embodiments of the present disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of the present disclosure without creative efforts shall fall within the scope of protection of the present disclosure.

[0058] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not require further definition and explanation in subsequent drawings.

[0059] As used herein, the term "and / or" merely describes an association relationship and indicates that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, or B exists alone. In addition, the term "at least one" as used herein means any one of a plurality or any combination of at least two of a plurality. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0060] To solve the problem in the prior art that it is difficult for a visualization application development platform to implement a code model with special logic, the present disclosure provides an application construction method and apparatus. By using modular logic code written in a pure code construction application scenario, a code model is constructed on the visualization application development platform, the visual effects added to the target code model are displayed in the application editing window, and the code instructions of the target code model are added to the logic code of the target application. Since the target code model includes modular logic code written in a pure code construction application scenario, the code model of the visualization application development platform can support more business logics, and it is more convenient to construct the code model.

[0061] To facilitate the understanding of this embodiment, first, a detailed introduction to an application construction method disclosed in the embodiments of the present disclosure will be given. The execution subject of the application construction method provided in the embodiments of the present disclosure is generally a computer device with certain computing capabilities. In some possible implementation manners, this application construction method may be implemented by a processor calling computer-readable instructions stored in a memory.

[0062] See Figure 1As shown in the figure, it is a flowchart of an application construction method provided by an embodiment of the present disclosure. The method includes steps S101 to S103, where:

[0063] S101. In response to a code model addition instruction initiated on a visual application development platform for a target application under current construction, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario.

[0064] Among them, the visual application development platform, that is, the low-code development platform, can realize visual application development, enabling developers to develop application programs without coding or with little coding. The target application can be the application program currently being constructed by the developer. The code model can be a module that combines data and logic independent of the user interface, which is the logical part of the model-view-view model architecture. The code model is the model in the model-view-view model architecture. Among them, the view can be the UI of the application program, and the view model can include interfaces and attributes corresponding to the UI, containing the business logic corresponding to the view, while the model is the data structure corresponding to the view model, containing background logic independent of the view. The view model can synchronize the data of the model to the view for display.

[0065] In the visual application development platform, users can complete the deployment of the UI by dragging and dropping controls corresponding to the view, clicking the add button, etc., and can also use methods such as adding view models and models corresponding to the view. When receiving a code model addition instruction initiated on the visual application development platform for a target application under current construction, a target code model that matches the code model addition instruction can be queried from the code model database.

[0066] Among them, the target code model can contain modular logic code for implementing the underlying logic of the corresponding view model. The modular logic code of the target code model is code written in a pure code construction application scenario. The modular logic code can be unrestricted by the regulations of the visual application development platform and can implement various functions. When writing the target code model, users can use the interfaces provided by the visual application development platform to edit a pre-configured model template. The template is pre-configured with a standard code format. Users only need to configure parameters and the required states and methods. The visual application development platform can implement the logic of calling the target code model. In this way, users can write any standard-compliant logic code in the code model, thus decoupling the code model from the visual application development platform and not requiring the visual application development platform itself to support these logics, enabling the code model to support more functions.

[0067] S102. Add the model identifier corresponding to the target code model to the target location indicated by the code model addition instruction; the target location is in the application editing window on the visual application development platform that matches the target application.

[0068] After the target code model is found, the model identifier corresponding to the target code model can be added to the target location indicated by the code model addition instruction. The target location can be a certain place in the application editing window. The model identifier is used to indicate that its corresponding target code model is added to the target application, which can enable users to intuitively feel the layout of the target application and improve the visualization degree during the application development process.

[0069] S103. Add the code instruction for calling the target code model to the logic code of the target application that matches the target location, so that the target application can call the target code model.

[0070] When adding the model identifier to the application editing window, the code instruction for calling the target code model can also be added to the logic code of the target application, and the added location matches the target location. Exemplarily, the code instruction for calling the target code model can be the code instruction corresponding to the target code model itself. In this case, the target code model itself can be directly called by other codes in the target application, or the target code model itself already includes codes related to the call; it can also include the code instruction corresponding to the target code model itself and the code instruction for calling the target code model itself.

[0071] Furthermore, if you want to use the target code model on the visual application development platform, you can first install the target code model on the visual application development platform. The steps for installing the target code model can include:

[0072] In response to the installation instruction for the target code model, obtain the target code model and generate an addition button corresponding to the target code model; the addition button is used to trigger the code model addition instruction for the target code model;

[0073] Obtain the model name and query label of the target code model;

[0074] Based on the model name and query label, store the target code model in the code model database; the model name and the query label are used to query the target code model from the code model database.

[0075] In this step, the user can install the target code model through the code model installation page. Figure 2As shown, it is one of the schematic diagrams of the user interface of the visualization application development platform provided by the embodiments of the present disclosure, showing the user interface of the installation page of the visualization application development platform. Users can select the code models pre-provided by the site or upload the installation package of the code model through custom installation. When installing, the model name and query tag (i.e., model key) can be configured. The visualization application development platform can store the target code model in the code model database and establish a query logic using the configured model name and query tag, so that the target code model can be queried from the code model database according to the model name and / or query tag.

[0076] Meanwhile, users can also configure the configuration parameters of different instances of the target code model, such as the configuration parameters for adding an instance of the target code model (such as Figure 2 the add todu url configuration in Figure 2 and the configuration parameters for loading an instance of the target code model (such as

[0077] the get todu list url configuration in

[0077] ). For the configuration parameters of different instances, target code model instances corresponding to the configuration parameters can be generated and stored separately in the code model data, enabling users to directly add different instances of the target code model. Furthermore, in the case of directly adding a target code model, the configuration parameters input by the user can be obtained. If the configuration parameters for the target code model are obtained, the configuration parameters and the target code model can be used to generate a target code model instance that matches the configuration parameters, and then the code instruction for calling the target code model instance can be added to the logic code of the target application that matches the target location, so that the target application can call the target code model instance.

[0078] Furthermore, before generating a target code model instance that matches the configuration parameters, the target code model instance can be queried first. If a target code model instance that matches the configuration parameters is found, the code instruction for calling the target code model instance that matches the configuration parameters can be directly added to the logic code of the target application that matches the target location, without the need to generate a target code model instance again.

[0079] When installing the target code model, the visualization application development platform can also generate an add button corresponding to the target code model. The add button can be used to trigger a code model addition instruction for the target code model. The add button can be located in the add menu or directly displayed in the UI.

[0080] After obtaining the target code model, variable description information corresponding to the target code model can also be obtained. Among them, the variable description information includes the type information and description information of each variable in the corresponding target code model. Based on the obtained type information and description information, a variable description list of the target code model can be generated. Then, an instruction button corresponding to the variable description list can be generated. This instruction button can also be part of the UI of the visual application development platform. By operating this instruction button, a variable display instruction for displaying the variable description list can be triggered, so that the visual application development platform can display the variable description list in the user interface.

[0081] As Figure 3 shown, it is the second schematic diagram of the user interface of the visual application development platform provided by the embodiments of the present disclosure, showing the user interface of the visual application development platform during application development. Figure 3 An editable table and a formula editor are shown. The user can select the code to be added in the formula editor and insert it into the table. In the function list of the formula editor, a description identifier corresponding to the currently added target code model (TODOList business model 1) is shown. By selecting this description identifier, a variable description list of the target code model is shown. The variable description list indicates that the todolist variable is of string type (Str.), and the length variable is of numeric type (123). Figure 3 The attribute information of the table being edited can also be shown, such as the specific data in the table (table data), table size, status information. The editing options of the table can also be shown, such as switches for disabling, loading, table border, etc.

[0082] The visual application development platform can also display multiple target code model instances of the target code model, enabling the user to manage the target code model instances. As Figure 4 shown, it is the third schematic diagram of the user interface of the visual application development platform provided by the embodiments of the present disclosure, including a user interface for displaying multiple target code model instances of the target code model. Figure 3 Two target code model instances are shown, namely TODO List business model 1 and TODO List business model 1, and the model key, installation package name, version information, and data information of the variables in the code model are respectively shown.

[0083] The application construction method provided by an embodiment of the present disclosure first responds to a code model addition instruction for a target application under construction initiated on a visual application development platform, and queries a target code model matching the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario; then, adds a model identifier corresponding to the target code model to a target position indicated by the code model addition instruction; the target position is in an application editing window on the visual application development platform that matches the target application; finally, adds a code instruction for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model.

[0084] In an embodiment of the present disclosure, by using modular logic code written in a pure code construction application scenario, a code model is constructed on a visual application development platform, the visual effect of adding a target code model is displayed in an application editing window, and the code instruction of the target code model is added to the logic code of the target application. Since the target code model includes modular logic code written in a pure code construction application scenario, the code model of the visual application development platform can support more business logics, and constructing the code model is more convenient.

[0085] Those skilled in the art can understand that in the above method of the specific embodiment, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined according to its function and possible internal logic.

[0086] Based on the same inventive concept, an embodiment of the present disclosure also provides an application construction device corresponding to the application construction method. Since the principle of solving problems by the device in an embodiment of the present disclosure is similar to the above application construction method in an embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0087] Refer to Figure 5 As shown, it is a schematic diagram of an application construction device provided by an embodiment of the present disclosure. The device includes:

[0088] A query module 510, configured to respond to a code model addition instruction for a target application under construction initiated on a visual application development platform, and query a target code model matching the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario;

[0089] The first addition module 520 is configured to add the model identifier corresponding to the target code model to the target position indicated by the code model addition instruction; the target position is in the application editing window on the visual application development platform that matches the target application;

[0090] The second addition module 530 is configured to add a code instruction for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model.

[0091] In an optional implementation, the device further includes an installation module, configured to:

[0092] In response to an installation instruction for a target code model, obtain the target code model and generate an addition button corresponding to the target code model; the addition button is used to trigger a code model addition instruction for the target code model;

[0093] Obtain the model name and query label of the target code model;

[0094] Based on the model name and query label, store the target code model in the code model database; the model name and the query label are used to query the target code model from the code model database.

[0095] In an optional implementation, when the second addition module 530 adds a code instruction for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model, it is configured to:

[0096] When the configuration parameters for the target code model are obtained, use the configuration parameters and the target code model to generate a target code model instance that matches the configuration parameters;

[0097] Add a code instruction for calling the target code model instance to the logic code of the target application that matches the target position, so that the target application can call the target code model instance.

[0098] In an optional implementation, after obtaining the target code model, the installation module is further configured to:

[0099] Obtain the variable description information corresponding to the target code model; the variable description information includes the type information and description information of each variable in the target code model;

[0100] Based on the type information and the description information, generate a variable description list of the target code model;

[0101] Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

[0102] In an optional implementation manner, when storing the target code model in the code model database based on the model name and the query tag, the installation module is used for:

[0103] When obtaining a plurality of configuration parameters for the target code model, based on the plurality of configuration parameters and the target code model, generate a target code model instance corresponding to each configuration parameter;

[0104] For each target code model instance, based on the model name, the query tag, and the configuration parameters corresponding to the target code model instance, store the target code model instance in the code model database; the model name, the query tag, and the configuration parameters are used to query the target code model instance from the code model database.

[0105] In an optional implementation manner, when the second addition module 530 adds a code instruction for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model, the second addition module 530 is used for:

[0106] When obtaining a configuration parameter for the target code model, add a code instruction for calling the target code model instance that matches the configuration parameter to the logic code of the target application that matches the target position, so that the target application can call the target code model instance that matches the configuration parameter.

[0107] The description of the processing flow of each module in the device and the interaction flow between the modules can refer to the relevant description in the above method embodiment, and will not be elaborated here.

[0108] Corresponding to Figure 1 the application construction method in, the embodiment of the present disclosure further provides an electronic device 600, as Figure 6 shown, which is a schematic structural diagram of the electronic device 600 provided by the embodiment of the present disclosure, and includes:

[0109] A processor 61, a memory 62, and a bus 63; the memory 62 is used to store execution instructions, including an internal memory 621 and an external memory 622; the internal memory 621 here is also called the main memory, which is used to temporarily store the operation data in the processor 61 and the data exchanged with the external memory 622 such as a hard disk. The processor 61 exchanges data with the external memory 622 through the internal memory 621. When the electronic device 600 runs, the processor 61 communicates with the memory 62 through the bus 63, so that the processor 61 executes the following instructions:

[0110] In response to a code model addition instruction initiated on a visualization application development platform for a target application under current construction, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario;

[0111] Add the model identifier corresponding to the target code model to the target position indicated by the code model addition instruction; the target position is in an application editing window on the visualization application development platform that matches the target application;

[0112] Add code instructions for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model.

[0113] In an optional implementation manner, among the instructions executed by the processor 61, there are also:

[0114] In response to an installation instruction for a target code model, obtain the target code model and generate an addition button corresponding to the target code model; the addition button is used to trigger a code model addition instruction for the target code model;

[0115] Obtain the model name and query label of the target code model;

[0116] Based on the model name and query label, store the target code model in the code model database; the model name and the query label are used to query the target code model from the code model database.

[0117] In an optional implementation manner, in the instructions executed by the processor 61, the step of adding code instructions for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model, includes:

[0118] In the case of obtaining the configuration parameters for the target code model, use the configuration parameters and the target code model to generate a target code model instance that matches the configuration parameters;

[0119] Add the code instruction for calling the target code model instance to the logical code of the target application that matches the target location, so that the target application can call the target code model instance.

[0120] In an optional implementation manner, among the instructions executed by the processor 61, after obtaining the target code model, it further includes:

[0121] Obtain the variable description information corresponding to the target code model; the variable description information includes the type information and description information of each variable in the target code model;

[0122] Generate a variable description list of the target code model based on the type information and the description information;

[0123] Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

[0124] In an optional implementation manner, among the instructions executed by the processor 61, the storing the target code model in the code model database based on the model name and the query tag includes:

[0125] In the case of obtaining multiple configuration parameters for the target code model, generate a target code model instance corresponding to each configuration parameter based on the multiple configuration parameters and the target code model;

[0126] For each target code model instance, store the target code model instance in the code model database based on the model name, the query tag, and the configuration parameter corresponding to the target code model instance; the model name, the query tag, and the configuration parameter are used to query the target code model instance from the code model database.

[0127] In an optional implementation manner, among the instructions executed by the processor 61, the adding the code instruction for calling the target code model to the logical code of the target application that matches the target location, so that the target application can call the target code model, includes:

[0128] In the case of obtaining the configuration parameters for the target code model, add the code instruction for invoking the target code model instance matching the configuration parameters to the logic code of the target application that matches the target location, so that the target application can invoke the target code model instance matching the configuration parameters.

[0129] An embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the application construction method described in the above method embodiment. Among them, the storage medium may be a volatile or non-volatile computer-readable storage medium.

[0130] An embodiment of the present disclosure further provides a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the application construction method described in the above method embodiment. For details, please refer to the above method embodiment and will not be elaborated here.

[0131] Among them, the above computer program product can be specifically implemented in the form of hardware, software, or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium. In another optional embodiment, the computer program product is specifically embodied as a software product, such as a Software Development Kit (SDK), etc.

[0132] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems and devices can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here. In the several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces. The indirect coupling or communication connection of the devices or units may be in an electrical, mechanical, or other form.

[0133] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] In addition, in each of the embodiments of the present disclosure, each functional unit may be integrated into a processing unit, may exist physically separately for each unit, or two or more units may be integrated into one unit.

[0135] If the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present disclosure. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.

[0136] Finally, it should be noted that the above-described embodiments are only specific implementation manners of the present disclosure, used to illustrate the technical solutions of the present disclosure, rather than limiting them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed by the present disclosure can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be covered by the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A method for application construction, characterized in that, Including: In response to a code model addition instruction for a target application under construction initiated on a visual application development platform, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logic code written in a pure code construction application scenario; Add the model identifier corresponding to the target code model to the target position indicated by the code model addition instruction; The target position is in an application editing window on the visual application development platform that matches the target application; Add code instructions for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model; In response to an installation instruction for the target code model, obtain the target code model; Obtain variable description information corresponding to the target code model; The variable description information includes type information and description information of each variable in the target code model; Based on the type information and the description information, generate a variable description list for the target code model; Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

2. The method according to claim 1, characterized in that After obtaining the target code model, the method further includes: Generate an addition button corresponding to the target code model; the addition button is used to trigger a code model addition instruction for the target code model; Obtain the model name and query label of the target code model; Based on the model name and query label, store the target code model in the code model database; the model name and the query label are used to query the target code model from the code model database.

3. The method according to claim 1, wherein The step of adding code instructions for calling the target code model to the logic code of the target application that matches the target position, so that the target application can call the target code model, includes: When configuration parameters for the target code model are obtained, use the configuration parameters and the target code model to generate a target code model instance that matches the configuration parameters; Add code instructions for calling the target code model instance to the logic code of the target application that matches the target position, so that the target application can call the target code model instance.

4. The method according to claim 2, wherein The step of storing the target code model in the code model database based on the model name and query label includes: When multiple configuration parameters for the target code model are obtained, based on the multiple configuration parameters and the target code model, generate a target code model instance corresponding to each configuration parameter; For each target code model instance, store the target code model instance in the code model database based on the model name, the query tag, and the configuration parameters corresponding to the target code model instance; the model name, the query tag, and the configuration parameters are used to query the target code model instance from the code model database.

5. The method according to claim 4, wherein Adding the code instruction for calling the target code model to the logical code of the target application that matches the target location, so that the target application can call the target code model, includes: When the configuration parameters for the target code model are obtained, adding the code instruction for calling the target code model instance that matches the configuration parameters to the logical code of the target application that matches the target location, so that the target application can call the target code model instance that matches the configuration parameters.

6. An application building device, characterized in that, Includes: A query module, configured to, in response to a code model addition instruction for a currently being built target application initiated on a visual application development platform, query a target code model that matches the code model addition instruction from a code model database; the target code model includes modular logical code written in a pure code building application scenario; A first addition module, configured to add the model identifier corresponding to the target code model to the target location indicated by the code model addition instruction; The target location is in an application editing window that matches the target application on the visual application development platform; A second addition module, configured to add the code instruction for calling the target code model to the logical code of the target application that matches the target location, so that the target application can call the target code model; An installation module, configured to: In response to an installation instruction for the target code model, obtain the target code model; Obtain the variable description information corresponding to the target code model; The variable description information includes the type information and description information of each variable in the target code model; Based on the type information and the description information, generate a variable description list for the target code model; Generate an instruction button corresponding to the variable description list; the instruction button is used to trigger a variable display instruction for displaying the variable description list after being operated.

7. The device according to claim 6, characterized in that, The installation module is further configured to: Generate an addition button corresponding to the target code model; the addition button is used to trigger a code model addition instruction for the target code model; Obtain the model name and query tag of the target code model; Based on the model name and the query tag, store the target code model in the code model database; the model name and the query tag are used to query the target code model from the code model database.

8. An electronic device, characterized in that, Includes: A processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and when the machine-readable instructions are executed by the processor, the steps of the application construction method according to any one of claims 1 to 5 are executed.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, the steps of the application construction method according to any one of claims 1 to 5 are executed.

Citation Information

Patent Citations

  • Framework generation method and device, storage medium and electronic device

    CN114253547A