Micro-application development method, device, equipment, storage medium and program product

Combining logic and service elements through the micro-application editing interface generates business logic structures, which solves the problems of high threshold and low efficiency of existing application development, realizes micro-application development without programming, and improves development efficiency.

CN114064024BActive Publication Date: 2024-09-27GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111432111.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2024-09-27
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

Existing application development requires professional programming tools and languages, resulting in high development barriers and low efficiency.

Method used

Provides a micro-application development method that displays the micro-application editing interface, receives editing operations of editable elements, combines logical elements and service elements, and generates business logic structures corresponding to triggers, thereby generating micro-applications based on triggers without programming. Visual development.

Benefits of technology

It lowers the threshold for micro-application development, improves development efficiency, and enables users to complete micro-application development through simple editing operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114064024B
    Figure CN114064024B
Patent Text Reader

Abstract

The embodiment of the present application discloses a method, device, equipment, storage medium and program product for developing a micro-application, which belongs to the field of application technology. The method includes: displaying a micro-application editing interface; receiving an editing operation on an editable element in the micro-application editing interface, the editable element includes a logic element and a service element, the logic element is used to implement logic control, and the service element is used to implement a service call; displaying a business logic structure corresponding to a trigger in the micro-application editing interface, the business logic structure is obtained by combining editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on the trigger event; generating a micro-application based on the business logic structure corresponding to at least one trigger. In the embodiment of the present application, the user can complete the development of a micro-application through a simple drag operation, without the need to write code in a professional programming language, which helps to lower the development threshold of micro-applications and improve the development efficiency of micro-applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of application technology, and in particular to a method, device, equipment, storage medium and program product for developing a micro-application. Background Art

[0002] With the continuous development of application technology, more and more feature-rich applications have emerged, bringing convenience to people's daily lives.

[0003] Typically, applications require developers to use professional programming tools and corresponding programming languages ​​to write and debug code, resulting in a high threshold for application development and low development efficiency. Summary of the invention

[0004] The embodiments of the present application provide a method, device, equipment, storage medium and program product for developing a micro-application. The technical solution is as follows:

[0005] On the one hand, an embodiment of the present application provides a method for developing a micro-application, the method comprising:

[0006] Display the micro-application editing interface;

[0007] Receive an editing operation on an editable element in the micro-application editing interface, wherein the editable element includes a logic element and a service element, wherein the logic element is used to implement logic control, and the service element is used to implement service call, and the editing operation refers to an operation of combining the editable elements;

[0008] Displaying a business logic structure corresponding to a trigger in the micro-application editing interface, the business logic structure is obtained by combining the editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on a triggering event;

[0009] A micro-application is generated based on the business logic structure corresponding to at least one of the triggers.

[0010] On the other hand, an embodiment of the present application provides a micro-application development device, the device comprising:

[0011] An interface display module, used to display the micro-application editing interface;

[0012] A receiving module, used to receive an editing operation on an editable element in the micro-application editing interface, wherein the editable element includes a logic element and a service element, wherein the logic element is used to implement logic control, and the service element is used to implement service call, and the editing operation refers to an operation of combining the editable elements;

[0013] A structure display module, used to display the business logic structure corresponding to the trigger in the micro-application editing interface, the business logic structure is obtained by combining the editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on the trigger event;

[0014] A generation module is used to generate a micro application based on the business logic structure corresponding to at least one of the triggers.

[0015] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the micro-application development method as described in the above aspects.

[0016] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the micro-application development method as described in the above aspects.

[0017] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the micro-application development method provided in various optional implementations of the above aspects.

[0018] In the embodiment of the present application, by editing the editable elements in the micro-application editing interface, the editable elements are used to form the business logic structure corresponding to the trigger in the micro-application, and then the micro-application is generated based on the business logic structure corresponding to each trigger to realize the development of the micro-application. Using the solution provided by the embodiment of the present application, the user can complete the development of the micro-application through simple editing operations, without the need to write code in a professional programming language, and realize the development of micro-applications based on visual components, which helps to lower the development threshold of micro-applications and improve the development efficiency of micro-applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 is a schematic diagram of a micro-application script shown in an exemplary embodiment of the present application;

[0021] Figure 2 A system architecture diagram of a micro-application system provided by an exemplary embodiment of the present application is shown;

[0022] Figure 3 A flowchart of a method for developing a micro-application provided by an exemplary embodiment of the present application is shown;

[0023] Figure 4 is a schematic diagram of the structure of a micro-application editor shown in an exemplary embodiment of the present application;

[0024] Figure 5 is a flow chart of a logic element adding process shown in an exemplary embodiment of the present application;

[0025] Figure 6 is an interface schematic diagram of a logic element adding process shown in an exemplary embodiment of the present application;

[0026] Figure 7 is a flow chart of a service element adding process shown in an exemplary embodiment of the present application;

[0027] Figure 8 is an interface schematic diagram of a service element adding process shown in an exemplary embodiment of the present application;

[0028] Fig. 9 is a flow chart of a drag legality detection process shown in an exemplary embodiment of the present application;

[0029] Fig.10 It is a schematic diagram of an implementation of a business logic structure update process shown in an exemplary embodiment of the present application;

[0030] Fig.11 is an interface schematic diagram of a trigger creation process shown in an exemplary embodiment of the present application;

[0031] Fig.12 is an interface schematic diagram of a trigger switching process shown in an exemplary embodiment of the present application;

[0032] Fig.13 is a flowchart of a micro-application script generation process shown in an exemplary embodiment of the present application;

[0033] Fig.14 It is a schematic diagram of an implementation of a micro-application script generation process shown in an exemplary embodiment of the present application;

[0034] Fig.15 is an interface diagram of a micro-application submission setting interface shown in an exemplary embodiment of the present application;

[0035] Fig.16A structural block diagram of a micro-application development device provided by an embodiment of the present application is shown;

[0036] Fig.17 A structural block diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0038] For ease of understanding, the nouns involved in the embodiments of the present application are explained below.

[0039] Micro-applications: Micro-applications can be seen as a collection of services, which are used to implement specific business logic through calls between services, that is, the application functions of micro-applications. Unlike traditional applications that can only run on specific operating systems, the services of micro-applications can be services on different operating systems, that is, micro-applications support heterogeneous operating systems and can run across platforms.

[0040] Unlike traditional applications that need to be downloaded and bound to a device before use, micro-applications use a subscription mechanism and are bound to users. That is, after subscribing to a micro-application through a device under a user account, all devices under the user account can use the micro-application.

[0041] Micro-application script: also known as micro-application definition, used to control the calling relationship between services in a micro-application, and uses a scripting language to describe a common business logic. The scripting language can be XML, JavaScript, etc.

[0042] like Figure 1 As shown, the micro-application script 11 is composed of a number of triggers 12, and each trigger 12 is composed of a triggering event 13, a control logic 14, and a number of services 15 controlled by the control logic 14. Among them, the service in the micro-application script is not the service itself, but the service identifier of the service.

[0043] Unlike traditional applications that require downloading and installing application installation packages before running, for example, before running Android applications, you need to download the apk package. Before running micro-applications, you only need to download the corresponding micro-application script. During the micro-application process, the micro-application script is executed by the micro-application engine to realize the application function. Compared with traditional applications, micro-application scripts have lower code volume, so they occupy less storage space and are conducive to dynamic deployment and updating.

[0044] Service: As the smallest unit in the running process of a micro-application, it is used to implement specific tasks. For example, the screenshot service is used to implement the device screenshot function, the screen projection service is used to implement the display screen projection between devices, and so on. In addition, the services called during the running of the micro-application can be services on the current device or services on other devices. For example, during the running of the micro-application, you can obtain device screenshots of other devices by calling the screenshot service on other devices, and display the device screenshots of other devices by calling the image display service.

[0045] Unlike the traditional application installation process, which requires all services used during operation to be pre-installed locally, since the business logic of the micro-application is dynamically assembled during operation, the services in the micro-application support dynamic deployment, that is, during operation, based on the business logic executed by the current device, the services corresponding to the business logic are dynamically deployed to the current device. Accordingly, when the application functions of the same micro-application are implemented through multiple devices, since the business logic of different devices may be different, the services deployed on different devices may also be different, that is, the services in the micro-application have the characteristics of differential deployment.

[0046] In an embodiment of the present application, the services that constitute a micro-application may include static services and dynamic services, wherein static services refer to services provided by a host application and need to be pre-installed in a device, while dynamic services refer to services that support dynamic deployment and can be dynamically deployed in a device during the operation of the micro-application.

[0047] Figure 2 The system architecture diagram of a micro-application system provided by an exemplary embodiment of the present application is shown. The system includes a user device 210, a server 220 and a developer device 230.

[0048] The user device 210 is an electronic device with a micro-application running function, and the electronic device may be a smart phone, a tablet computer, a personal computer, a car computer, etc., which is not limited in this embodiment. Figure 2 The user device 210 includes a smart phone, a tablet computer, and a car computer as an example for description, but this is not a limitation.

[0049] In a possible implementation, a micro-application engine 211 is provided in the user device 210. The micro-application engine 211 serves as the core for controlling the operation of the micro-application, and includes a script management module 2111, an event bus module 2112, an application scheduling module 2113, a runtime module 2114, and a service scheduling module 2115.

[0050] The script management module 2111 is used to manage the micro-application scripts of each micro-application stored in the user device 210, and is responsible for parsing the micro-application script to determine the trigger in the micro-application script and the service under the trigger. Optionally, the script management module 2111 is also used to download the corresponding micro-application script when receiving a subscription operation for the micro-application, and delete the micro-application script corresponding to the micro-application when receiving a subscription cancellation operation for the micro-application.

[0051] The event bus module 2112 is used to cooperate with the application scheduling module 2113 to implement micro-application scheduling based on the trigger event. In some embodiments, the event bus module 2112 is mounted with triggers corresponding to multiple micro-applications. Since the same trigger event may trigger multiple subscribed micro-applications, after the event bus module 2112 receives the trigger event, the application scheduling module 2113 determines the micro-application that needs to be run from a number of micro-applications. Among them, the application scheduling module 2113 can automatically determine the micro-application based on the scheduling strategy, or it can be handed over to the user to manually select the micro-application.

[0052] The runtime module 2114 is used to execute the control logic in the micro-application script, thereby interacting with the service scheduling module 2115 based on the control logic, and the service scheduling module 2115 makes service calls.

[0053] In addition to the micro-application engine 211 , the user device 210 is also provided with a service management module 212 , a data synchronization module 213 and a service gateway 214 .

[0054] Among them, the service governance module 212 is used to manage the static services pre-installed in the device; the data synchronization module 213 is used to synchronize the state to other computer devices when the state of the micro-application engine 211 changes (for example, an event generated by the service causes a state change), to ensure the state consistency of the micro-application engine 211 in different computer devices.

[0055] The service gateway 214 is used to make service calls based on the service call request of the service scheduling module 2115, and specifically includes an agent management module 2141 and a life cycle management module 2142. Different service agents are set in the agent management module 2141, and the service agent is used to convert the service call request in a unified format to obtain a request that meets the requirements of the real service format. The life cycle management module 2142 is used to manage the life cycle of the service, and can include a static service life cycle management module and a dynamic service life cycle management module.

[0056] During the operation of the micro-application, in addition to making service calls through its own service gateway 214, the user device 210 can also make service calls through the service gateway 214 of other devices (determined by the business logic of the micro-application), that is, cross-device service calls can be realized.

[0057] Services for different deployment methods, such as Figure 2 As shown, the user equipment 210 is further provided with a static service module 216 and a dynamic service module 215. The static service module 216 is used to manage pre-installed static services, and the dynamic service module 215 is used to manage dynamically deployed dynamic services.

[0058] In some embodiments, the services included in the dynamic service module 215 may correspond to different operating environments, different deployment forms, or different programming development languages. Figure 2 The example in which the dynamic service module 215 includes an Android dynamic service 2151, a Web dynamic service 2152, and a container dynamic service 2153 is used for schematic illustration, but this is not intended to be limiting.

[0059] The server 220 is a server or a service cluster or a cloud computing center composed of a plurality of servers. The server cluster is divided according to the functions implemented by each server, such as Figure 2 As shown, the server cluster includes a user resource management server 221 , a micro application store server 222 , a service market server 223 and a cloud service library 224 .

[0060] The user resource management server 221 includes a user management module 2211, an application management module 2212, a service management module 2213, a device management module 2214, and a security module 2215. The user management module 2211 is used to manage user accounts that use micro-applications; the application management module 2212 is used to manage micro-applications subscribed to different user accounts; the service management module 2213 is used to manage the called services; the device management module 2214 is used to manage the binding relationship between the user account and the device; and the security module 2215 is used to perform security verification during the interaction process.

[0061] The micro-application store server 222 is used to provide a micro-application subscription service. When a user needs to use a micro-application, he can search for the micro-application through the micro-application search engine 2221 provided by the micro-application store server 222, and then choose to subscribe to the micro-application from the search results.

[0062] In some embodiments, after receiving the subscription operation for the micro-application, the micro-application store server 222 sends the user account and the application identifier of the subscribed micro-application to the user resource management server 221, and the application management module 2212 in the user resource management server 221 updates the subscription relationship between the user account and the micro-application. Further, the user management module 2211 and the device management module 2214 determine other devices under the user account and push subscription notifications to other devices so that other devices can download the micro-application script of the micro-application from the micro-application store server 222. Schematically, as shown in FIG. Figure 2 As shown, after user "Zhang San" subscribes to the micro-application through a smart phone, the car computer and tablet computer logged into the user account of "Zhang San" receive the subscription notification pushed by the user resource management server 221, and then download the micro-application script of the micro-application based on the application identifier in the notification.

[0063] The service market server 223 is a server for developers to provide service query services. The developer device 230 can search for services through the service search engine 2231 provided by the service market server 223, and apply the searched services (including dynamic services and static services) to the developed micro-applications, and then upload the developed micro-applications to the micro-application store server 222 for other users to download and use.

[0064] In addition, developers can also develop services and upload the developed services to the cloud service library 224. Subsequently, the user device 210 can download and deploy the service from the cloud service library 224.

[0065] The developer device 230 is an electronic device used by the developer. In one possible implementation, a micro-application editor (i.e., a client) is installed in the developer device 230, and the developer can develop micro-applications through the micro-application editor; in another possible implementation, the developer device 230 can access a web version of the micro-application editor, and thus develop micro-applications through the web version of the micro-application editor.

[0066] The micro-application editor provided in the embodiment of the present application has a service search function. With the help of the service search function, the developer device 230 can query the service that meets the needs from the service market server 223, so as to add the service to the developed micro-application.

[0067] In addition, the micro-application editor provided in the embodiment of the present application is a visual editor. Developers can implement business logic editing by dragging editable elements (logical elements or service elements) displayed in the interface, and then the micro-application editor generates the code of the micro-application based on the edited business logic.

[0068] Optionally, developers can develop micro-applications or services through developer device 230, wherein the developed micro-applications will be submitted to micro-application store server 2221 and will be available for download and use by user device 210 after passing review; the developed services will be submitted to cloud service library 224 and will be available for use by other developers after passing review.

[0069] It should be noted that the above embodiment is only schematically illustrated by taking the user device 210 and the developer device 230 as different devices. In actual applications, ordinary users can also use the user device 210 to develop micro-applications, and this embodiment does not limit this.

[0070] In addition, the above embodiment only describes the basic architecture of the micro-application system. The micro-application system may also include other computer devices or servers that implement other functions, and this embodiment does not limit this.

[0071] Please refer to Figure 3 , which shows a flowchart of a method for developing a micro-application provided by an exemplary embodiment of the present application. The present application embodiment uses this method to apply Figure 2 The computer device shown (which may be a user device or a developer device) is used as an example for explanation, and the method includes:

[0072] Step 301, display the micro-application editing interface.

[0073] In a possible implementation, when the computer device opens the micro-application editor, the micro-application editor displays the micro-application editing interface; or, when accessing the web version of the micro-application editor, the computer device displays the micro-application editing interface through a browser.

[0074] The micro-application editing interface in the embodiment of the present application is a visual editing interface, which contains editable elements. During the micro-application development process, the business logic can be edited by dragging the editable elements.

[0075] Step 302, receiving an editing operation on an editable element in the micro-application editing interface, where the editable element includes a logic element and a service element, where the logic element is used to implement logic control and the service element is used to implement service calls, and the editing operation refers to an operation on combining the editable elements.

[0076] In some embodiments, the editing operation may be a gesture operation, such as a click operation, a long press operation, a drag operation, a double-click operation, etc. on an editable element; it may be a voice control operation triggered by voice, such as combining specific editable elements through voice instructions (the name of the editable element is included in the voice); it may be a visual control operation triggered by the human eye, such as determining the selected editable element by tracking the eye movement trajectory, and moving the editable element for combination; it may even be a combination of at least two operation modes, such as a gesture operation combined with a voice operation to implement an editing operation on an editable element, which is not limited in the embodiments of the present application. In the following embodiments, the editing operation of an editable element is illustrated as a drag operation, but it does not constitute a limitation on this.

[0077] Since the business logic of a micro-application is composed of control logic and at least one service controlled by the control logic, in one possible implementation, the editable elements in the micro-application editing interface include logic elements for users to implement logic control and service elements for implementing service calls. During the micro-application development process, users can logically combine logic elements and service elements to implement business logic editing.

[0078] Compared with pure code development, micro-application development does not require developers to have a code programming foundation by editing the visually editable elements of the component form, and the development process is more visual, which lowers the threshold for micro-application development and helps improve the efficiency of micro-application development.

[0079] Optionally, the editable element is displayed in the micro-application editing interface in the form of a draggable control. For example, the draggable control may be a draggable button, and the element name of the editable element is displayed on the draggable button. The embodiments of the present application do not limit the specific form of expression of the editable element.

[0080] Step 303: Display the business logic structure corresponding to the trigger in the micro-application editing interface. The business logic structure is obtained by combining editable elements. The trigger is used to execute the business logic represented by the business logic structure based on the triggering event.

[0081] In one possible implementation, the micro-application is composed of multiple triggers. For each trigger in the micro-application, when the trigger is triggered by a corresponding trigger event, the micro-application engine executes the control logic under the trigger, thereby calling the service under the trigger to implement the business logic corresponding to the trigger.

[0082] The trigger event may be a time generated by user interaction, such as a voice trigger event, a shake event, a tap event, etc., or the trigger event may be a service output event after the service is called, which is not limited in this embodiment.

[0083] The development process of the micro-application is the development process of each trigger. In order to improve the visibility of the business logic corresponding to the trigger, the computer is provided to display the business logic corresponding to the current trigger in the form of a business logic structure. Among them, the business logic structure is a tree structure, a building block structure, etc., which is not limited in this embodiment.

[0084] The above steps 302 and 303 are the development process of a single trigger in a micro-application. When the micro-application is composed of multiple triggers, the computer device repeatedly executes the above steps 302 and 303 to complete the development of each trigger.

[0085] Step 304: Generate a micro-application based on the business logic structure corresponding to at least one trigger.

[0086] After completing the development of each trigger in the micro-application, the computer device generates the application code of the micro-application based on the business logic structure corresponding to each trigger. In one possible implementation, the computer device converts the business logic structure into a scripting language to obtain a micro-application script corresponding to the micro-application. Compared with traditional application installation packages, micro-application scripts are low-code script files that are conducive to dynamic deployment and dynamic updates.

[0087] Optionally, when a computer device develops a micro-application through a locally installed micro-application editor, the computer device generates application code through the micro-application editor; when a computer device develops a micro-application through a web version of the micro-application editor, the computer device generates application code through a server.

[0088] In one possible implementation, the developed micro-application will be uploaded to the micro-application store server, which will review the micro-application (which can be a manual review or a machine review), and after passing the review, the micro-application will be put on the micro-application store for other users to download and use.

[0089] In an illustrative embodiment, Figure 4 As shown, the micro-application editor is composed of a UI module 41, a code generation module 42, an element generation module 43, a preview module 44, and a cloud service module 45. Among them, the UI module 41 is responsible for displaying each UI element in the micro-application editing interface, the code generation module 42 is responsible for coding the visualized business logic structure, the element generation module 43 is responsible for generating logic elements and service elements, the preview module 44 is responsible for implementing the execution effect preview of the local business logic during the development process, and the cloud service module 45 is responsible for interacting with the service market server 46 (for service search) and the micro-application store server 47 (for submitting micro-applications).

[0090] In summary, in the embodiment of the present application, by editing the editable elements in the micro-application editing interface, the editable elements are used to form the business logic structure corresponding to the trigger in the micro-application, and then the micro-application is generated based on the business logic structure corresponding to each trigger to realize micro-application development. Using the solution provided by the embodiment of the present application, the user can complete the development of the micro-application through simple editing operations, without the need to write code in a professional programming language, and realize the development of micro-applications based on visual components, which helps to lower the development threshold of micro-applications and improve the development efficiency of micro-applications.

[0091] In some embodiments, a logic selection area, a service selection area, and an editing area are provided in the micro-application editing interface, wherein the logic selection area displays candidate logic elements for developers to select and use, the service selection area displays candidate service elements for developers to select and use, and the editing area is used to display the edited business logic structure. Accordingly, the computer device receives a first drag operation on a logic element in the logic selection area, and receives a second drag operation on a service element in the service selection area.

[0092] In a possible implementation, Figure 5 As shown, adding a logic element in the business logic structure by dragging may include the following steps.

[0093] Step 501 , in response to a triggering operation on a target type selection control, displaying at least one candidate logic element belonging to a target type in a logic selection area, where the target type is a type of control logic corresponding to the target type selection control.

[0094] Since there are a large number of control logics that implement different logic functions, if all available logic elements are directly displayed in the logic selection area, the selection efficiency of the logic elements will be low. Therefore, in a possible implementation, the logic elements are pre-divided into multiple types, and the logic selection area displays type selection controls corresponding to different types of logic elements.

[0095] Regarding the classification method of logical elements, in one possible implementation, logical elements can be divided into general type, variable type, business type and mathematical operation type. Among them, general type logical elements are used to implement general control logic, such as conditional logic, loop logic, waiting logic, random logic, combinational logic, etc.; variable type logical elements are used to implement variable control (including variable definition, variable addition, deletion and modification, etc.), and the variables may include simple variables, list variables, Map variables, etc.; business type logical elements are used to implement business-related logic, such as device selection logic; mathematical operation type logical elements are used to implement basic mathematical operations with the help of mathematical functions, such as addition, subtraction, multiplication and division operation logic, trigonometric function operation logic, etc. It should be noted that the embodiment of the present application only uses the above-mentioned logical element classification method as an example for schematic illustration, but does not constitute a limitation to this.

[0096] When selecting a logical element to be added to the business logic, the user may first select a target type selection control from the logic selection area. Accordingly, when a trigger operation on the target type selection control is received, the computer device determines candidate logical elements belonging to the target type corresponding to the target type selection control, and displays the candidate logical elements in the logic selection area. Optionally, the candidate logical elements may be displayed in the logic selection area in the form of draggable components.

[0097] Indicatively, Figure 6 As shown, a logic selection area 62 is provided in the micro-application editing interface 61, and a plurality of type selection controls 621 are displayed in the logic selection area 62 (four type selection controls are used as an example for schematic illustration in the figure). When the user clicks the type selection control 621 of "general type", the logic selection area 62 displays a plurality of candidate logic elements 622 belonging to the "general type".

[0098] Step 502: receiving a first drag operation on a target logical element among candidate logical elements.

[0099] In a possible implementation, when a long press operation is received on a target logical element among candidate logical elements, and a drag operation is further received on the target logical element, and the dragging end point of the drag operation is located in the editing area, the computer device determines that the target logical element needs to be added to the business logic.

[0100] Indicatively, Figure 6 As shown, when waiting logic needs to be added to the business logic, the user can long press to select the candidate logic element 622 corresponding to the “waiting logic”, and drag the candidate logic element 622 to the editing area 63 .

[0101] Step 503: Display a logic setting interface corresponding to the target logic element, where the logic setting interface is used to set logic parameters of the target logic element.

[0102] Since corresponding parameters are required when executing the control logic corresponding to the logical element, in one possible implementation, when a drag operation on a target logical element is received, the computer device determines, based on the element definition corresponding to the target logical element, at least one logical parameter that needs to be set when adding the target logical element, and then displays a logical setting interface for setting the logical parameter.

[0103] Among them, the number and type of logical parameters required to be set for different logical elements are different. For example, for a conditional logical element, the logical parameters required to be set include at least one conditional parameter; for a waiting logical element, the logical parameters required to be set include the waiting time; for a random logical element, the logical parameters required to be set include a random range parameter, etc.; for a device selection logical element, the logical parameters required to be set include a device selection range, a device type or a device identifier, etc. The embodiments of the present application do not limit the specific types of logical parameters.

[0104] Indicatively, Figure 6 As shown, when the user drags the candidate logic element 622 to the editing area 63, the upper layer of the editing interface 61 displays a logic setting interface 64, which is used to set the waiting time.

[0105] Step 504: Acquire the set logic parameters through the logic setting interface.

[0106] Furthermore, the computer device obtains the logic parameters set in the logic setting interface, and adds the target logic element to the business logic structure.

[0107] Indicatively, Figure 6 As shown, after the user inputs the waiting time “500ms” in the logic setting interface 64 and clicks the confirmation control, the candidate logic element 622 is added to the business logic structure 631 in the editing area 63 .

[0108] In a possible implementation, Figure 7 As shown, adding a service element in the business logic structure by dragging may include the following steps.

[0109] Step 701: in response to a triggering operation on a service search control, at least one candidate service element is displayed in a service selection area, where the candidate service element is obtained by querying from a server based on a service search term.

[0110] Generally, the types of control logic in business logic are relatively limited, while the services controlled by the control logic are diverse. In order to improve the efficiency of developers in selecting required services from a large number of services, in a possible implementation, a service search control is provided in the service selection area, through which developers can enter service search terms, so that the service market server can search for matching services based on the service search terms. The candidate service elements searched by the service market server can be service elements corresponding to static services or service elements corresponding to dynamic services.

[0111] Optionally, the candidate service element may be a specific service implementation, or a service set consisting of several service implementations with the same functions. For example, when the service keyword is payment, the candidate service element may be a static service in instant messaging application A, or a service set consisting of a static payment service in instant messaging application A, a static payment service in payment application B, and a dynamic payment service.

[0112] Optionally, the candidate service elements may be displayed in the service selection area in the form of draggable components.

[0113] In some embodiments, the service market server stores service definitions corresponding to various service elements, which include information such as service name and service description. The service market server can search the service definitions based on service search terms to determine candidate service elements that match the service search terms.

[0114] Indicative, Figure 8 As shown, a service selection area 65 is provided in the micro-application editing interface 61, and a service search control 651 is displayed in the service selection area 65. When the user enters the service keyword "A" in the service search control 651, the computer device performs a service query through the service market server and displays several candidate service elements 652 obtained by the query.

[0115] Step 702: receiving a second drag operation on a target service element among the candidate service elements.

[0116] In one possible implementation, when a long press operation is received on a target logic element in a candidate service element, and a drag operation is further received on the target service element, and the dragging end point of the drag operation is located in the editing area, the computer device determines that the target service element needs to be added to the business logic.

[0117] Indicatively, Figure 8 As shown, when it is necessary to add service A1 to the business logic, the user can long press to select the candidate service element 652 corresponding to “service A1”, and drag the candidate service element 652 to the editing area 63 .

[0118] Step 703: Display a service setting interface corresponding to the target service element, where the service setting interface is used to set service parameters of the target service element.

[0119] Since corresponding parameters are needed when executing the service corresponding to the service element, in one possible implementation, when a drag operation on a target service element is received, the computer device determines, based on the element definition corresponding to the target service element, at least one service parameter that needs to be set when adding the target service element, and then displays a service setting interface for setting the service parameter.

[0120] Among them, the number and type of service parameters required to be set for different service elements are different. For example, for the redirection service element, the service parameters required to be set include the source device, the destination parameter, and the media type parameter (including audio, video, and control); for the gesture recognition service, the service parameters required to be set include the gesture type, etc. The embodiments of this application do not limit the specific service parameters.

[0121] Optionally, the service parameters include service input parameters and service calling methods, and the service calling methods may include synchronous calling and asynchronous calling. For synchronous calling services, the output of the current service will be used as the input of subsequent services, and for asynchronous calling services, the service output event of the current service will be used as the triggering event of the trigger.

[0122] Indicatively, Figure 8 As shown, when the user drags the candidate service element 652 to the editing area 63, the upper layer of the editing interface 61 displays a service setting interface 66, which is used to set service input parameters and service calling methods.

[0123] Step 704: Obtain the set service parameters through the service setting interface.

[0124] Furthermore, the computer device obtains the service parameters set in the service setting interface, and adds the target service element to the business logic structure.

[0125] Indicatively, Figure 8 As shown, after the user completes the service parameter settings in the service setting interface 66 and clicks the confirmation control, the candidate service element 652 “Service A1” is added to the business logic structure 631 of the editing area 63 .

[0126] In order to improve development efficiency and enable users to view the execution effect of the edited business logic in real time during the development process, in a possible implementation, the micro-application editing interface also includes a preview area and a preview control. When a selection operation of a target element in the business logic structure is received, in response to a trigger operation on the preview control, the computer device generates a preview code corresponding to the target element, and displays the execution effect of the target element in the preview area by executing the preview code.

[0127] Optionally, the preview code is generated by a preview code generation module and executed by a preview code runtime module, which is used to convert the preview code into an animation for display. Figure 6 As shown, a preview area 69 is provided in the micro-application editing interface 61 . After the user selects an element (service element and / or logic element) in the editing area 63 and clicks the preview control, the execution animation of the selected element is displayed in the preview area 69 .

[0128] When users edit business logic, they need to ensure that the editable elements can be correctly combined to ensure the normal operation of the business logic. In one possible implementation, the micro-application editor provides a verification function, through which the micro-application editor can verify the legitimacy of the editing position of the editable elements to improve the legitimacy of the drag operation. Fig. 9 As shown, after receiving the editing operation on the editable element, the following steps may also be included.

[0129] Step 901: Determine the target element position of the editable element in the business logic structure based on the target editing position of the editable element.

[0130] Optionally, the target editing position refers to the dragging end position of the dragging operation on the editable element. In a possible implementation, the computer device determines the target element position of the editable element based on the relative position relationship between the target dragging position and existing elements in the business logic structure.

[0131] Optionally, the editable element is added to the business logic structure as a node, and the target element position is used to represent the parent-child node relationship between the editable element and the existing elements.

[0132] In one possible implementation, the computer device performs a validity check on the target element position based on the target element position and the element features of the editable element. If the target element position is legal (i.e., the editable element is legal when displayed at the target element position), step 902 is executed; if the target position is illegal, step 903 is executed.

[0133] Step 902: If the target element position is legal, insert the editable element into the target element position.

[0134] In a possible implementation manner, the service element and the logic element each include a corresponding node definition, and the node definition includes:

[0135] 1. Node key, name, and description, where key is a unique identifier, and name and description are used to indicate the meaning of the element;

[0136] 2. Attributes: For service elements, the attributes correspond to the service input parameters of the service and can be used to indicate the type of the attribute and the candidate values;

[0137] 3. Type, which is used to indicate the node type (i.e. element type) of the current node. The subsequent positions supported by the node are controlled based on the type.

[0138] 4. Child nodes and the child node types of each child node are used to indicate the node types supported by the subordinate child nodes when the current node is used as a parent node.

[0139] In an illustrative example, the node definition of a service element (camera service) is as follows:

[0140]

[0141] Optionally, when performing a validity check on the target element position, the computer device determines the subnode type of the subnode corresponding to the target element position, and detects whether the node type corresponding to the editable element matches the subnode type. If the two match, the target element position is determined to be legal; if the two do not match, the target element position is determined to be illegal. The subnode type of the subnode corresponding to the target element position is obtained from the node definition of the parent node corresponding to the target element position.

[0142] Further, when the target element position is legal, the computer device inserts the editable element into the target element position.

[0143] Indicatively, Fig.10 As shown, the computer device obtains the node definition of "Logic 3" based on the target element position of "Service 4". Since the subnode type of the subnode in the node definition includes "Service", and the node type corresponding to "Service 4" is "Service", the computer device determines that "Service 4" is legal at the target element position, and inserts "Service 4" into the target element position in the business logic structure.

[0144] Step 903: When the position of the target element is illegal, an invalid prompt is displayed, where the invalid prompt is used to indicate that the editing operation on the editable element is invalid.

[0145] Optionally, when the editing operation is a drag operation, when the target element position is illegal, the computer device will not insert the editable element into the target element position, and display an invalid prompt to inform the user that the current drag operation on the editable element is invalid. The invalid prompt may be in the form of text, pop-up window, animation, etc., which is not limited in this embodiment.

[0146] In this embodiment, the computer device performs a validity check on the editing operation based on the target element position and element definition indicated by the editing operation, so as to avoid business logic anomalies caused by improper editing position of the editable element, thereby affecting the normal operation of the micro-application, and helping to improve the accuracy of the business logic editing process.

[0147] When a micro application is composed of multiple triggers, during the micro application development process, the user needs to edit the trigger business logic corresponding to each trigger. In some embodiments, the micro application editing interface also includes a trigger area, which displays at least one created trigger, and the user can create a trigger, delete a trigger, and switch a trigger through the trigger area.

[0148] In a possible implementation, in response to a trigger creation operation in the trigger area, the computer device displays a trigger setting interface, which is used to set a trigger event of the trigger. After obtaining the set trigger event through the trigger setting interface, the computer device sets the corresponding trigger.

[0149] Among them, the trigger creation operation can be a click operation on the trigger creation control in the trigger area, or a click operation on a new trigger option in the menu option (such as called out by right-clicking the mouse in the trigger area), which is not limited in this embodiment.

[0150] Optionally, the trigger event may be pre-registered in the server, and the computer device may obtain the registered trigger event from the server and specify the trigger event for the created trigger.

[0151] In addition, when setting a trigger event, event parameters corresponding to the trigger event may also be set. For example, when the trigger event is a scene-aware event, the event parameters set for the scene-aware event may include location parameters (eg, home, office, etc.).

[0152] In addition to specifying the trigger event of the trigger from the registered trigger events, you can also add additional conditions as the trigger conditions of the trigger. For example, when the trigger event is a shake event, you can add an additional foreground application condition, that is, when the shake event is detected and the specified application is running in the foreground, the corresponding trigger is triggered.

[0153] Optionally, after completing the creation of the trigger, the computer device clears the editing area so that the user can edit the business logic of the newly added trigger in the editing area.

[0154] Indicatively, Fig.11 As shown, a trigger area 67 is provided in the micro-application editing interface 61, and the trigger area 67 includes a trigger identifier 671 of the created trigger and a trigger creation control 672. When the user clicks the trigger creation control 672, the computer device displays a trigger setting interface 68 so that the user can set a trigger event for the newly added trigger 3. After completing the trigger creation, the computer device clears the editing area 63 so that the user can edit the business logic of the trigger 3.

[0155] During the micro-application development process, the user may need to switch back and forth between multiple triggers. In one possible implementation, in response to a trigger switching operation in the trigger area, the computer device switches the business logic structure displayed in the micro-application editing interface.

[0156] Indicatively, Fig.12 As shown, the editing area 63 currently displays the business logic structure corresponding to trigger 1. When the user clicks trigger 2 in the trigger area 67, the editing area 63 switches to display the business logic structure corresponding to trigger 2.

[0157] Regarding the generation method of micro-applications, in a possible implementation, as Fig.13 As shown, the process may include the following steps:

[0158] Step 1301, traverse each trigger in the micro-application.

[0159] When the micro-application is composed of multiple triggers, the computer device traverses each trigger and performs the following steps 1302 to 1304 on each trigger.

[0160] Indicatively, Fig.14 As shown, for a micro-application named "test", the computer device traverses trigger 1 and trigger 2 in the micro-application.

[0161] Step 1302: for each trigger in the micro-application, traverse each node in the business logic structure corresponding to the trigger.

[0162] Furthermore, the computer device traverses each node (corresponding to the element) in the business logic structure corresponding to the trigger and determines the parent-child node relationship between the nodes. Fig.14As shown, for trigger 1, by traversing the first business logic structure 1401 corresponding to trigger 1, the computer device determines that service 1 and service 2 are both child nodes corresponding to logic 1, service 3 and logic 3 are both child nodes of logic 2, and service 4 and service 5 are both child nodes of logic 3. For trigger 2, by traversing the second business logic structure 1402 corresponding to trigger 2, the computer device determines that service 6 and service 7 are child nodes corresponding to logic 3.

[0163] Step 1303: Based on the mapping relationship between nodes and codes, obtain the node code corresponding to each node.

[0164] In a possible implementation, for different types of nodes, a mapping relationship between nodes and codes is predefined. When the business logic structure is converted into code form, the computer device maps the attributes of the node according to the mapping relationship to obtain the node code.

[0165] In some embodiments, when the code is in XML format, based on the mapping relationship, the node itself is mapped to a node in XML, and the attribute of the node is mapped to an attribute in XML.

[0166] Step 1304, generating a trigger code corresponding to the trigger based on the node code corresponding to each node.

[0167] Furthermore, the computer device nests the node codes based on the parent-child relationship between the nodes to obtain the trigger code corresponding to the current trigger, wherein the node code corresponding to the child node is nested in the node code corresponding to its parent node.

[0168] Indicative, such as Fig.14 As shown, since service 1 and service 2 are child nodes of logic 1, the codes mapped from service 1 and service 2 are nested in the codes mapped from logic 1; service 3 and service 4 are child nodes of logic 3, so the codes mapped from service 4 and service 5 are nested in the codes mapped from logic 3.

[0169] Step 1305, merge the trigger codes corresponding to the various triggers to obtain the micro-application script of the micro-application.

[0170] After obtaining the trigger codes corresponding to each trigger, the computer device further merges the trigger codes of each trigger to obtain the micro-application script of the micro-application. During the subsequent micro-application operation, the computer device parses the micro-application script through the micro-application engine.

[0171] Indicative, such as Fig.14As shown, the computer device merges the trigger codes of trigger 1 and trigger 2 to obtain a micro-application script 1403 in XML format.

[0172] In order to further simplify the development process of micro-applications and enable developers to pay more attention to the business logic itself, for the developed micro-applications, the micro-application editor supports automatically adding interactive functions to the micro-applications, and the interactive functions include at least one of sharing and sharing. In a possible implementation, in response to a trigger operation on a submit control in a micro-application editing interface, a computer device displays a submission setting interface, which is used to set the basic application information and interactive information of the micro-application. Among them, the basic application information may include an application name, an application icon, an application description, etc., and the interactive information is used to indicate the specific interaction mode of the micro-application.

[0173] In response to the interaction mode selection operation in the submission setting interface, the computer device determines the target interaction information of the micro-application. Optionally, the target interaction information includes at least one of the sharing mode and the sharing mode of the micro-application, and the sharing mode may include at least one of touch sharing (sharing), link sharing (sharing) or QR code sharing (sharing).

[0174] Indicatively, Fig.15 As shown, a sharing method selection control 1502 is provided in the submission setting interface 1501, and the user can set the sharing method of the micro-application before submitting the micro-application.

[0175] Further, the computer device packages the micro-application and the target interaction information and uploads them to the server. When other user devices subsequently download the micro-application from the micro-application store, in addition to downloading the micro-application script of the micro-application, the target interaction information will also be obtained. When using the micro-application, the micro-application manager (used to uniformly manage subscribed micro-applications) can share or share the micro-application with other devices or users based on the target interaction information, thereby realizing cross-device linkage with the help of the micro-application.

[0176] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0177] Please refer to Fig.16 , which shows a structural block diagram of a micro-application development device provided by an embodiment of the present application. The device may include:

[0178] The interface display module 1601 is used to display the micro-application editing interface;

[0179] A receiving module 1602 is used to receive an editing operation on an editable element in the micro-application editing interface, wherein the editable element includes a logic element and a service element, wherein the logic element is used to implement logic control, and the service element is used to implement service call, and the editing operation refers to an operation of combining the editable elements;

[0180] A structure display module 1603 is used to display the business logic structure corresponding to the trigger in the micro-application editing interface, where the business logic structure is obtained by combining the editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on the trigger event;

[0181] The generation module 1604 is used to generate a micro-application based on the business logic structure corresponding to at least one of the triggers.

[0182] Optionally, the micro-application editing interface includes a logic selection area, a service selection area, and an editing area;

[0183] The receiving module 1602 includes:

[0184] A first receiving unit, configured to receive a first drag operation on the logical element in the logical selection area, where the first drag operation refers to an operation of dragging the logical element from the logical selection area to an editing area;

[0185] A second receiving unit, configured to receive a second drag operation on the service element in the service selection area, wherein the second drag operation refers to an operation of dragging the service element from the service selection area to the editing area;

[0186] The structure display module 1603 is used to:

[0187] The business logic structure corresponding to the trigger is displayed in the editing area.

[0188] Optionally, the logic selection area includes at least one type selection control, and different type selection controls correspond to different types of control logic;

[0189] The first receiving unit is used for:

[0190] In response to a triggering operation on a target type selection control, displaying at least one candidate logic element belonging to a target type in the logic selection area, the target type being a type of control logic corresponding to the target type selection control;

[0191] A first drag operation on a target logical element among the candidate logical elements is received.

[0192] Optionally, the device further comprises:

[0193] A logic parameter setting module is used to display a logic setting interface corresponding to the target logic element, wherein the logic setting interface is used to set the logic parameters of the target logic element; and to obtain the set logic parameters through the logic setting interface.

[0194] Optionally, the service selection area includes a service search control;

[0195] The second receiving unit is used for:

[0196] In response to a triggering operation on the service search control, displaying at least one candidate service element in the service selection area, wherein the candidate service element is obtained by querying from a server based on a service search term;

[0197] A second drag operation on a target service element among the candidate service elements is received.

[0198] Optionally, the device further comprises:

[0199] A service parameter setting module, used to display a service setting interface corresponding to the target service element, wherein the service setting interface is used to set the service parameters of the target service element;

[0200] The service parameters set are obtained through the service setting interface.

[0201] Optionally, the device further comprises:

[0202] A position determination module, used to determine a target element position of the editable element in the business logic structure based on a target editing position of the editable element;

[0203] The inserting module is used to insert the editable element into the target element position if the target element position is legal.

[0204] Optionally, the insertion module includes:

[0205] A node type determination unit, used to determine the subnode type of the subnode corresponding to the target element position;

[0206] The inserting unit is used to determine that the target element position is legal and insert the editable element into the target element position when the node type corresponding to the editable element matches the child node type.

[0207] Optionally, the device further comprises:

[0208] The prompt module is used to display an invalid prompt when the position of the target element is illegal, and the invalid prompt is used to indicate that the editing operation on the editable element is invalid.

[0209] Optionally, the micro-application editing interface includes a trigger area, and the trigger area is used to display at least one created trigger;

[0210] The device also includes:

[0211] A trigger setting module is used to respond to a trigger creation operation in the trigger area, display a trigger setting interface, and the trigger setting interface is used to set the trigger event of the trigger; obtain the set trigger event through the trigger setting interface, and set the trigger.

[0212] Optionally, the device further comprises:

[0213] A switching module is used to switch the business logic structure displayed in the micro-application editing interface in response to a trigger switching operation in the trigger area.

[0214] Optionally, the generating module 1604 is used to:

[0215] Traversing each of the triggers in the micro-application;

[0216] For each of the triggers in the micro-application, traverse each node in the business logic structure corresponding to the trigger;

[0217] Based on the mapping relationship between nodes and codes, obtaining the node code corresponding to each of the nodes;

[0218] Generate a trigger code corresponding to the trigger based on the node code corresponding to each of the nodes;

[0219] The trigger codes corresponding to the respective triggers are merged to obtain a micro-application script of the micro-application.

[0220] Optionally, the micro-application editing interface includes a preview area and a preview control;

[0221] The device also includes:

[0222] The preview module is used to receive a selection operation on a target element in the business logic structure; generate a preview code corresponding to the target element in response to a trigger operation on the preview control; and display an execution effect of the target element in the preview area by executing the preview code.

[0223] Optionally, the device further comprises:

[0224] The submission module is used to display a submission setting interface in response to a trigger operation on a submission control in the micro-application editing interface; determine the target interaction information of the micro-application in response to an interaction mode selection operation in the submission setting interface; and package the micro-application and the target interaction information and upload them to a server.

[0225] In summary, in the embodiment of the present application, by editing the editable elements in the micro-application editing interface, the editable elements are used to form the business logic structure corresponding to the trigger in the micro-application, and then the micro-application is generated based on the business logic structure corresponding to each trigger to realize micro-application development. Using the solution provided by the embodiment of the present application, the user can complete the development of the micro-application through simple editing operations, without the need to write code in a professional programming language, and realize the development of micro-applications based on visual components, which helps to lower the development threshold of micro-applications and improve the development efficiency of micro-applications.

[0226] Please refer to Fig.17 , which shows a block diagram of a computer device provided by an exemplary embodiment of the present application. The computer device 1700 can be implemented as a developer device in the above-mentioned embodiments. The computer device 1700 may include one or more of the following components: a processor 1710 and a memory 1720.

[0227] The processor 1710 may include one or more processing cores. The processor 1710 uses various interfaces and lines to connect the various parts of the entire computer device 1700, and executes various functions and processes data of the computer device 1700 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1720, and calling data stored in the memory 1720. Optionally, the processor 1710 can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 1710 can integrate one or more combinations of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content that needs to be displayed on the touch display; the NPU is used to implement artificial intelligence (AI) functions; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor 1710, but may be implemented by a separate chip.

[0228] The memory 1720 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1720 includes a non-transitory computer-readable storage medium. The memory 1720 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.; the data storage area may store data (such as audio data, a phone book), etc., created according to the use of the computer device 1700.

[0229] In addition, those skilled in the art can understand that the structure of the computer device 1700 shown in the above drawings does not constitute a limitation on the computer device, and the computer device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the computer device 1700 also includes a display screen, a camera assembly, a microphone, a speaker, a radio frequency circuit, an input unit, a sensor (such as an acceleration sensor, an angular velocity sensor, a light sensor, etc.), an audio circuit, a WiFi module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0230] An embodiment of the present application also provides a computer-readable storage medium, which stores at least one program code, and the program code is loaded and executed by a processor to implement the micro-application development method described in the above embodiments.

[0231] The embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the micro-application development method provided in various optional implementations of the above aspects.

[0232] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.

[0233] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for developing a micro-application, characterized in that: The method comprises: Display the micro-application editing interface; Receive an editing operation on an editable element in the micro-application editing interface, wherein the editable element includes a logic element and a service element, wherein the logic element is used to implement logic control, and the service element is used to implement service call, and the editing operation refers to an operation of combining the editable elements; Displaying a business logic structure corresponding to a trigger in the micro-application editing interface, the business logic structure is obtained by combining the editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on a triggering event; Traversing each of the triggers in the micro-application; For each of the triggers in the micro-application, traverse each node in the business logic structure corresponding to the trigger; Based on the mapping relationship between nodes and codes, obtaining the node code corresponding to each of the nodes; Generate a trigger code corresponding to the trigger based on the node code corresponding to each of the nodes; The trigger codes corresponding to the respective triggers are merged to obtain a micro-application script of the micro-application.

2. The method according to claim 1, characterized in that: The micro-application editing interface includes a logic selection area, a service selection area and an editing area; The receiving an editing operation on an editable element in the micro-application editing interface includes: receiving a first drag operation on the logical element in the logical selection area, wherein the first drag operation refers to an operation of dragging the logical element from the logical selection area to the editing area; receiving a second drag operation on the service element in the service selection area, where the second drag operation refers to an operation of dragging the service element from the service selection area to the editing area; The business logic structure corresponding to the trigger is displayed in the micro-application editing interface, including: The business logic structure corresponding to the trigger is displayed in the editing area.

3. The method according to claim 2, characterized in that The logic selection area includes at least one type selection control, and different type selection controls correspond to different types of control logic; The receiving a first drag operation on the logical element in the logical selection area includes: In response to a triggering operation on a target type selection control, displaying at least one candidate logic element belonging to a target type in the logic selection area, the target type being a type of control logic corresponding to the target type selection control; A first drag operation on a target logical element among the candidate logical elements is received.

4. The method according to claim 3, characterized in that After receiving the first drag operation on the target logical element among the candidate logical elements, the method further includes: Displaying a logic setting interface corresponding to the target logic element, wherein the logic setting interface is used to set logic parameters of the target logic element; The set logic parameters are obtained through the logic setting interface.

5. The method according to claim 2, characterized in that: The service selection area includes a service search control; The receiving a second drag operation on the service element in the service selection area includes: In response to a triggering operation on the service search control, displaying at least one candidate service element in the service selection area, wherein the candidate service element is obtained by querying from a server based on a service search term; A second drag operation on a target service element among the candidate service elements is received.

6. The method according to claim 5, characterized in that After receiving a second drag operation on a target service element among the candidate service elements, the method further includes: Displaying a service setting interface corresponding to the target service element, wherein the service setting interface is used to set service parameters of the target service element; The service parameters set are obtained through the service setting interface.

7. The method according to any one of claims 1 to 6, characterized in that: After receiving the editing operation on the editable element in the micro-application editing interface, the method further includes: Determining a target element position of the editable element in the business logic structure based on a target editing position of the editable element; If the target element position is legal, the editable element is inserted into the target element position.

8. The method according to claim 7, characterized in that The step of inserting the editable element into the target element position when the target element position is legal includes: Determine the subnode type of the subnode corresponding to the target element position; In the case where the node type corresponding to the editable element matches the child node type, it is determined that the target element position is legal, and the editable element is inserted into the target element position.

9. The method according to claim 7, characterized in that: After determining the target element position of the editable element in the business logic structure based on the target editing position of the editable element, the method further includes: In the case where the target element position is illegal, an invalid prompt is displayed, where the invalid prompt is used to indicate that the editing operation on the editable element is invalid.

10. The method according to any one of claims 1 to 6, characterized in that: The micro-application editing interface includes a trigger area, and the trigger area is used to display at least one created trigger; Before receiving a drag operation on an editable element in the micro-application editing interface, the method further includes: In response to a trigger creation operation in the trigger area, displaying a trigger setting interface, wherein the trigger setting interface is used to set a triggering event of the trigger; The trigger event is acquired through the trigger setting interface, and the trigger is set.

11. The method according to claim 10, characterized in that The method further comprises: In response to a trigger switching operation in the trigger area, the business logic structure displayed in the micro-application editing interface is switched.

12. The method according to any one of claims 1 to 6, characterized in that: The micro-application editing interface includes a preview area and a preview control; The method further comprises: Receiving a selection operation on a target element in the business logic structure; In response to a triggering operation on the preview control, generating a preview code corresponding to the target element; The execution effect of the target element is displayed in the preview area by executing the preview code.

13. The method according to any one of claims 1 to 6, characterized in that: After generating the micro-application based on the business logic structure corresponding to at least one of the triggers, the method further includes: In response to a triggering operation on a submit control in the micro-application editing interface, displaying a submit settings interface; In response to the interaction mode selection operation in the submission setting interface, determining target interaction information of the micro-application; The micro application and the target interaction information are packaged and uploaded to the server.

14. A micro-application development device, characterized in that: The device comprises: An interface display module, used to display the micro-application editing interface; A receiving module, used to receive an editing operation on an editable element in the micro-application editing interface, wherein the editable element includes a logic element and a service element, wherein the logic element is used to implement logic control, and the service element is used to implement service call, and the editing operation refers to an operation of combining the editable elements; A structure display module, used to display the business logic structure corresponding to the trigger in the micro-application editing interface, the business logic structure is obtained by combining the editable elements, and the trigger is used to execute the business logic represented by the business logic structure based on the trigger event; A generation module is used to traverse each of the triggers in the micro-application; for each of the triggers in the micro-application, traverse each node in the business logic structure corresponding to the trigger; based on the mapping relationship between the node and the code, obtain the node code corresponding to each of the nodes; based on the node code corresponding to each of the nodes, generate the trigger code corresponding to the trigger; merge the trigger codes corresponding to each of the triggers to obtain the micro-application script of the micro-application.

15. A computer device, characterized in that: The computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the micro-application development method as described in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the program code is loaded and executed by a processor to implement the micro-application development method as described in any one of claims 1 to 13.

17. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the micro-application development method as described in any one of claims 1 to 13.