CN114064024A - Method, apparatus, device, storage medium, and program product for developing micro-application - Google Patents

Method, apparatus, device, storage medium, and program product for developing micro-application Download PDF

Info

Publication number
CN114064024A
CN114064024A CN202111432111.6A CN202111432111A CN114064024A CN 114064024 A CN114064024 A CN 114064024A CN 202111432111 A CN202111432111 A CN 202111432111A CN 114064024 A CN114064024 A CN 114064024A
Authority
CN
China
Prior art keywords
service
trigger
application
micro
logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111432111.6A
Other languages
Chinese (zh)
Inventor
杨俊拯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202111432111.6A priority Critical patent/CN114064024A/en
Publication of CN114064024A publication Critical patent/CN114064024A/en
Priority to PCT/CN2022/127027 priority patent/WO2023093414A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04842Selection of displayed objects or displayed text elements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop

Abstract

The embodiment of the application discloses a development method, a development device, equipment, a storage medium and a program product of micro application, and belongs to the technical field of application. The method comprises the following steps: displaying a micro application editing interface; receiving editing operation on editable elements in the micro application editing interface, wherein the editable elements comprise logic elements and service elements, the logic elements are used for realizing logic control, and the service elements are used for realizing service calling; displaying a business logic structure corresponding to a trigger in a micro application editing interface, wherein the business logic structure is obtained by combining editable elements, and the trigger is used for executing business logic represented by the business logic structure based on a trigger event; and generating the micro application based on the business logic structure corresponding to the at least one trigger. In the embodiment of the application, a user can complete the development of the micro application through simple dragging operation without writing codes by using a professional programming language, so that the development threshold of the micro application is favorably reduced, and the development efficiency of the micro application is improved.

Description

Method, apparatus, device, storage medium, and program product for developing micro-application
Technical Field
The embodiment of the application relates to the technical field of application, in particular to a development method, a development device, development equipment, a development storage medium and a development program product of micro application.
Background
With the continuous development of Application (Application) technology, more and more multifunctional and rich applications are brought to the end, and convenience is brought to the daily life of people.
Generally, an application needs to be written and debugged by a developer through a professional programming tool and using a corresponding programming language, so that the development threshold of the application is high, and the development efficiency is low.
Disclosure of Invention
The embodiment of the application provides a development method, a development device, development equipment, a development equipment and a development equipment of micro application. The technical scheme is as follows:
in one aspect, an embodiment of the present application provides a method for developing a micro application, where the method includes:
displaying a micro application editing interface;
receiving an editing operation on editable elements in the micro application editing interface, wherein the editable elements comprise logic elements and service elements, the logic elements are used for realizing logic control, the service elements are used for realizing service calling, 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, wherein the business logic structure is obtained by combining the editable elements, and the trigger is used for executing the business logic represented by the business logic structure based on a trigger event;
and generating a micro application based on the business logic structure corresponding to at least one trigger.
In another aspect, an embodiment of the present application provides an apparatus for developing a micro application, where the apparatus includes:
the interface display module is used for displaying a micro application editing interface;
the micro application editing interface comprises a receiving module and a processing module, wherein the receiving module is used for receiving editing operation on editable elements in the micro application editing interface, the editable elements comprise logic elements and service elements, the logic elements are used for realizing logic control, the service elements are used for realizing service calling, and the editing operation refers to the operation of combining the editable elements;
the structure display module is used for 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 for executing the business logic represented by the business logic structure based on a trigger event;
and the generating module is used for generating the micro application based on the business logic structure corresponding to at least one trigger.
In another aspect, an embodiment of the present application provides a computer device, which includes a processor and a memory; the memory stores at least one instruction for execution by the processor to implement a method of development of a micro-application as described in the above aspect.
In another aspect, 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 method for developing a micro application according to the above aspect.
In another aspect, embodiments of the present application provide a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the development method of the micro application provided in the various alternative implementations of the above aspects.
In the embodiment of the application, the editable elements in the micro-application editing interface are edited, so that the editable elements are utilized to form the business logic structures corresponding to the triggers in the micro-application, and the micro-application is generated based on the business logic structures corresponding to the triggers, so that the micro-application development is realized. By adopting the scheme provided by the embodiment of the application, a user can complete the development of the micro application through simple editing operation without compiling codes by using a professional programming language, so that the development of the micro application based on the visual component is realized, the development threshold of the micro application is favorably reduced, and the development efficiency of the micro application is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a micro application script shown in an exemplary embodiment of the present application;
FIG. 2 illustrates a system architecture diagram of a micro-application system provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of a method for developing a micro application provided by an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a micro application editor configuration, according to an illustrative embodiment of the present application;
FIG. 5 is a flow chart illustrating a logical element addition process in accordance with an exemplary embodiment of the present application;
FIG. 6 is an interface diagram illustrating a logical element addition process according to an exemplary embodiment of the present application;
FIG. 7 is a flow diagram illustrating a service element addition process in accordance with an illustrative embodiment of the present application;
FIG. 8 is an interface diagram illustrating a service element addition process according to an exemplary embodiment of the present application;
FIG. 9 is a flow diagram illustrating a drag legitimacy detection process in accordance with an exemplary embodiment of the present application;
FIG. 10 is a schematic diagram illustrating an implementation of a business logic structure update process according to an exemplary embodiment of the present application;
FIG. 11 is an interface diagram illustrating a trigger creation process according to an exemplary embodiment of the present application;
FIG. 12 is an interface diagram illustrating a trigger switch process according to an exemplary embodiment of the present application;
FIG. 13 is a flowchart of a micro application script generation process, shown in an exemplary embodiment of the present application;
FIG. 14 is a schematic diagram illustrating an implementation of a micro application script generation process in accordance with an illustrative embodiment of the present application;
FIG. 15 is an interface diagram illustrating a micro application submission settings interface in accordance with an illustrative embodiment of the present application;
fig. 16 is a block diagram illustrating a development apparatus for a micro application according to an embodiment of the present application;
fig. 17 is a block diagram illustrating a computer device according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
For convenience of understanding, terms referred to in the embodiments of the present application will be described below.
Micro application: a micro application can be seen as a collection of services for implementing a specific business logic, i.e. an application function of the micro application, by a call between the services. Unlike the traditional application which can only run on a specific operating system, the service of the micro application can be the service on different operating systems, namely the micro application supports heterogeneous operating systems, and cross-platform running can be realized.
Different from the traditional application which needs to be downloaded before being used and is bound with the device, the micro-application adopts a subscription mechanism and is bound with the user, namely, after the micro-application is subscribed by a certain device under the user account, each device under the user account can use the micro-application.
Micro application script: the method is also called micro application definition and is used for controlling the calling relation among services in the micro application, and a script language is adopted to describe a section of general business logic. Wherein, the script language can be xml, javascript, etc.
As shown in FIG. 1, the micro application script 11 is composed of several triggers 12, and each trigger 12 is composed of a trigger event 13, control logic 14, and several services 15 controlled by the control logic 14. The service in the micro application script is not the service itself, but the service identification of the service.
Different from the traditional application that the application installation package needs to be downloaded and installed before the operation, for example, before the android application is operated, the apk package needs to be downloaded, the micro application only needs to download the corresponding micro application script before the operation, and in the micro application process, the micro application script is executed through the micro application engine, so that the application function is realized. Compared with the traditional application, the code amount of the micro application script is lower, so that the occupied storage space is smaller, and the dynamic deployment and updating are facilitated.
Service: as the minimum unit in the running process of the micro-application, is used for realizing a specific task. For example, the screen capture service is used for realizing the screen capture function of the device, and the screen projection service is used for realizing the screen projection of the display picture between the devices. Moreover, the service called in the running process of the micro application can be a service on the current device or a service on other devices. For example, in the running process of the micro application, the device screenshots of other devices can be obtained by calling the screenshot service on other devices, and the device screenshots of other devices can be displayed by calling the picture display service.
Different from the traditional application installation process, all services used in the operation process need to be installed locally in advance, and the service logic of the micro application is dynamically assembled in the operation process, so that the service in the micro application supports dynamic deployment, namely the service corresponding to the service logic is dynamically deployed to the current equipment based on the service logic executed by the current equipment in the operation process. Accordingly, when the application function of the same micro application is implemented by a plurality of devices, since the business logic of different devices may be different, the services deployed at different devices may also have differences, that is, the services in the micro application have the characteristic of differential deployment.
In this embodiment of the present application, the services constituting the micro application may include a static service and a dynamic service, where the static service refers to a service provided by the host application and needs to be pre-installed in the device, and the dynamic service refers to a service supporting dynamic deployment and may be dynamically deployed in the device during the running process of the micro application.
Fig. 2 is a system architecture diagram of a micro application system provided in an exemplary embodiment of the present application. The system includes a user device 210, a server 220, and a developer device 230.
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 machine, or the like, which is not limited in this embodiment. In fig. 2, the user device 210 is illustrated as including a smart phone, a tablet computer, and a car machine, but the invention is not limited thereto.
In a possible embodiment, the user device 210 is provided with a micro application engine 211, and the micro application engine 211 is used as a core for controlling the running of the micro application and includes a script management module 2111, an event bus module 2112, an application scheduling module 2113, a running module 2114, and a service scheduling module 2115.
The script management module 2111 is configured to manage the micro application scripts of each micro application stored in the user equipment 210, and is responsible for parsing the micro application scripts to determine the triggers in the micro application scripts and services under the triggers. Optionally, the script management module 2111 is further configured to download a corresponding micro application script when receiving a subscription operation on the micro application, and delete the micro application script corresponding to the micro application when receiving a subscription cancellation operation on the micro application.
The event bus module 2112 is used for matching with the application scheduling module 2113 and realizing micro-application scheduling based on a trigger event. In some embodiments, the event bus module 2112 has a plurality of triggers corresponding to the micro applications, and since the same trigger event may trigger a plurality of subscribed micro applications, after receiving the trigger event, the event bus module 2112 delivers the trigger event to the application scheduling module 2113 to determine the micro application that needs to be run from the plurality of micro applications. The application scheduling module 2113 may automatically determine the micro-application based on the scheduling policy, or may manually select the micro-application by the user.
The runtime module 2114 is used to execute control logic in the micro application script, such that based on the control logic interacting with the service scheduler module 2115, a service call is made by the service scheduler module 2115.
Besides the micro application engine 211, the user device 210 is also provided with a service administration module 212, a data synchronization module 213 and a service gateway 214.
The service administration module 212 is configured to manage static services pre-installed in the device; the data synchronization module 213 is configured to synchronize states of the micro application engine 211 with other computer devices when the state of the micro application engine 211 changes (for example, a state change is caused by an event generated by a service), so as to ensure consistency of the states of the micro application engine 211 at different computer devices.
The service gateway 214 is configured to make a service call based on the service call request of the service scheduling module 2115, and specifically includes an agent management module 2141 and a lifecycle management module 2142. The agent management module 2141 is provided with different service agents, and the service agents are configured to convert the service invocation request in the unified format to obtain a request meeting the requirement of the real service format. The lifecycle management module 2142 is used to manage the lifecycle of the service, and may include a static service lifecycle management module and a dynamic service lifecycle management module.
In the running process of the micro application, the user equipment 210 may perform service invocation through the service gateway 214 of itself, and may also perform service invocation through the service gateways 214 of other devices (determined by the business logic of the micro application), so that the cross-device service invocation may be implemented.
For services with different deployments, as shown in fig. 2, a static service module 216 and a dynamic service module 215 are further disposed in the user equipment 210. The static services module 216 is used to manage pre-installed static services, and the dynamic services module 215 is used to manage dynamically deployed dynamic services.
In some embodiments, the services included in the dynamic services module 215 may correspond to different operating environments, different deployment modalities, or different programming development languages. In fig. 2, the example that the dynamic service module 215 includes the android dynamic service 2151, the Web dynamic service 2152, and the container dynamic service 2153 is illustrated schematically, but the invention is not limited thereto.
The server 220 is a server, a service cluster formed by a plurality of servers, or a cloud computing center. The functions implemented by the servers in the server cluster are divided, as shown in fig. 2, 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.
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 for managing user accounts using the micro applications; the application management module 2212 is used for managing micro applications subscribed under different user accounts; the service management module 2213 is used for managing the called service; the device management module 2214 is configured to manage a binding relationship between a user account and a device; the security module 2215 is used for security verification during the interaction.
The micro-application store server 222 is used to provide a micro-application subscription service. When a user needs to use a micro application, the user can perform a micro application search through the micro application search engine 2221 provided by the micro application store server 222, and then select a subscription micro application from the search result.
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 a subscription notification to the other devices, so that the other devices download the micro application script of the micro application from the micro application store server 222. Schematically, as shown in fig. 2, after a user "zhang san" subscribes a micro application through a smart phone, a car machine and a tablet computer logging in the user account "zhang san" receive a subscription notification pushed by the user resource management server 221, so as to download a micro application script of the micro application based on an application identifier in the notification.
The service market server 223 is a developer-oriented server for providing a service inquiry service. The developer device 230 may perform a service search through a service search engine 2231 provided by the service marketplace server 223, apply the searched service (including dynamic service and static service) to the developed micro application, and upload the developed micro application to the micro application store server 222 for downloading by other users.
In addition, the developer can also develop services and upload the developed services to the cloud service library 224. Subsequent user devices 210 may download and deploy the service from cloud services repository 224.
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 a developer can develop micro applications through the micro application editor; in another possible implementation, the developer device 230 may access a web version micro application editor for micro application development via the web version micro application editor.
The micro application editor provided in the embodiment of the present application has a service search function by which the developer device 230 can query a service satisfying a requirement from the service market server 223, thereby adding the service to the developed micro application.
In addition, the micro application editor provided in the embodiment of the application is used as a visual editor, a developer can drag editable elements (logic elements or service elements) displayed in an interface to realize business logic editing, and then the micro application editor generates micro application codes based on the edited business logic.
Optionally, the developer may perform micro application development or service development through the developer device 230, where the developed micro application is submitted to the micro application store server 2221 and downloaded to the user device 210 for use after passing the audit; the developed services are submitted to the cloud service library 224 and are used by other developers after passing the audit.
It should be noted that, in the above embodiment, only the user device 210 and the developer device 230 are taken as different devices for exemplary illustration, in practical applications, an ordinary user may also use the user device 210 to develop a micro application, and this embodiment is not limited to this.
In addition, the foregoing embodiment only illustrates the infrastructure of the micro application system, and the micro application system may further include other computer devices or servers that implement other functions.
Referring to fig. 3, a flowchart of a method for developing a micro application according to an exemplary embodiment of the present application is shown, where the method is described as being applied to a computer device (which may be a user device or a developer device) shown in fig. 2, and the method includes:
and step 301, displaying a micro application editing interface.
In one possible implementation, after the computer device starts the micro application editor, the micro application editor displays a micro application editing interface; alternatively, when the web page version micro application editor is accessed, the computer device displays the micro application editing interface through the browser.
The micro application editing interface in the embodiment of the application is a visual editing interface which comprises editable elements, and during the development process of the micro application, the editing of the business logic can be realized by dragging the editable elements.
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, the logic element is used to implement logic control, the service element is used to implement service invocation, and the editing operation refers to an operation of combining the editable elements.
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; voice control operations may be triggered by voice, such as combining specific editable elements (including names of editable elements in the voice) by voice instructions; the visual control operation triggered by human eyes can be performed, for example, the selected editable elements are determined by tracking the moving track of eyeballs, and the editable elements are moved to be combined; even the combination of at least two operation modes may be adopted, for example, the editing operation on the editable element is realized by combining a gesture operation and a voice operation, which is not limited in this application embodiment. In the following embodiments, an example in which an editing operation on an editable element is a drag operation will be described, but the present invention is not limited thereto.
Since the business logic of the micro-application is composed of the control logic and at least one service controlled by the control logic, in one possible embodiment, the editable elements in the editing interface of the micro-application comprise a logic element for realizing logic control by a user and a service element for realizing service call. In the development process of the micro application, a user can logically combine the logic elements and the service elements to realize business logic editing.
Compared with pure code development, by editing visual editable elements of the component situation, a developer does not need to have a code programming basis for micro application development, the visualization degree in the development process is higher, the micro application development threshold is reduced, and meanwhile, the development efficiency of micro application is improved.
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 an element name of the editable element is displayed on the draggable button, which does not limit the concrete representation form of the editable element in the embodiment of the application.
And 303, displaying a business logic structure corresponding to the trigger in the micro application editing interface, wherein the business logic structure is obtained by combining editable elements, and the trigger is used for executing the business logic represented by the business logic structure based on the trigger event.
In a possible implementation mode, the micro application is composed of a plurality of triggers, and 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, so as to call the service under the trigger and realize the business logic corresponding to the trigger.
The trigger event may be a time generated by user interaction, such as a voice trigger event, a shake event, a tap event, or the like, or the trigger event may also be a service output event after invoking a service, which is not limited in this embodiment.
The development process of the micro application is the development process of each trigger. In order to improve the visibility of the trigger corresponding to the business logic, the computer displays the business logic corresponding to the current trigger in the form of a business logic structure. The service logic structure is a tree structure, a building block structure, and the like, which is not limited in this embodiment.
The steps 302 and 303 are the development process of a single trigger in the micro application, and when the micro application is composed of a plurality of triggers, the computer device repeatedly executes the steps 302 and 303, thereby completing the development of each trigger.
And step 304, generating the micro application based on the business logic structure corresponding to the at least one trigger.
After the development of each trigger in the micro application is completed, 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, thereby obtaining a micro application script corresponding to the micro application. Compared with the traditional application installation package, the micro application script is used as a script file with low code quantity, and dynamic deployment and dynamic updating are facilitated.
Optionally, when the computer device performs the micro application development through the locally installed micro application editor, the computer device generates the application code through the micro application editor; when the computer equipment develops the micro application through the webpage version micro application editor, the computer equipment generates application codes through the server.
In one possible implementation, the developed micro application is uploaded to a micro application store server, the micro application store server performs an audit (which may be a manual audit or a machine audit) on the micro application, and after the audit is passed, the micro application is uploaded to a micro application store for downloading and use by other users.
In an exemplary embodiment, as shown in fig. 4, 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. 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 visual 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 execution effect preview of local business logic in the development process, and the cloud service module 45 is responsible for interacting with the service market server 46 (performing service search) and the micro application store server 47 (submitting micro applications).
To sum up, in the embodiment of the present application, by performing an editing operation on an editable element in the micro application editing interface, the editable element is used to form a business logic structure corresponding to a trigger in the micro application, and then the micro application is generated based on the business logic structure corresponding to each trigger, so as to implement micro application development. By adopting the scheme provided by the embodiment of the application, a user can complete the development of the micro application through simple editing operation without compiling codes by using a professional programming language, so that the development of the micro application based on the visual component is realized, the development threshold of the micro application is favorably reduced, and the development efficiency of the micro application is improved.
In some embodiments, a logic selection area, a service selection area and an editing area are arranged in the micro application editing interface, wherein the logic selection area displays candidate logic elements for a developer to select, the service selection area displays candidate service elements for the developer to select, and the editing area is used for displaying an edited business logic structure. Accordingly, the computer device receives a first drag operation on a logical element in the logical selection area and receives a second drag operation on a service element in the service selection area.
In one possible implementation, as shown in FIG. 5, adding a logical element in a business logic structure by a drag operation may include the following steps.
Step 501, in response to a trigger 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 a control logic corresponding to the target type selection control.
Since there are a large number of control logics for implementing different logic functions, if each available logic element is directly displayed in the logic selection area, the selection efficiency of the logic element will be low. In one possible embodiment, the logic elements are divided into multiple types in advance, and the logic selection area displays the type selection controls corresponding to the different types of logic elements.
Regarding the type division of the logical elements, in one possible implementation, the logical elements may be divided into general types, variable types, business types, and mathematical operation types. Wherein the logic elements of a common type are used to implement common control logic, such as conditional logic, round-robin logic, wait logic, random logic, combinational logic, and so forth; the logic elements of the variable type are used for realizing variable control (including variable definition, variable addition, deletion and modification and the like), and the variables can comprise simple variables, list variables, Map variables and the like; the logic elements of the service type are used to implement service-related logic, such as device selection logic; the logic elements of the mathematical operation type are used to implement basic mathematical operations by means of mathematical functions, such as addition, subtraction, multiplication, division, trigonometric function, etc. The embodiments of the present application are only schematically described by taking the above logical element classification as an example, but the present application is not limited to this configuration.
In selecting a logical element that needs to be added to the business logic, the user may first select a target type selection control from the logical selection area. Correspondingly, when the triggering operation of the target type selection control is received, the computer equipment determines the candidate logic elements belonging to the target type corresponding to the target type selection control, and displays the candidate logic elements in the logic selection area. Alternatively, the candidate logical elements may be displayed in the form of draggable components in the logical selection area.
Illustratively, as shown in fig. 6, a logical selection area 62 is provided in the micro application editing interface 61, and a plurality of type selection controls 621 (in the figure, 4 type selection controls are schematically illustrated as an example) are displayed in the logical selection area 62. When the user clicks on the type selection control 621 of "general type", the logical selection area 62 displays a number of candidate logical elements 622 belonging to "general type".
Step 502, a first drag operation on a target logical element of the candidate logical elements is received.
In one possible implementation, when a long-press operation on a target logical element in the candidate logical elements is received, and a drag operation on the target logical element is further received, and a drag endpoint 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.
Illustratively, as shown in fig. 6, when waiting logic needs to be added to the business logic, the user may long press and select the candidate logical element 622 corresponding to the "waiting logic" and drag the candidate logical element 622 to the editing area 63.
And 503, displaying a logic setting interface corresponding to the target logic element, wherein the logic setting interface is used for setting the logic parameter of the target logic element.
In a possible implementation, when receiving a drag operation on a target logic element, the computer device determines, based on an element definition corresponding to the target logic element, that at least one logic parameter needs to be set when the target logic element is added, and then displays a logic setting interface for setting the logic parameter.
Wherein, the number and types of logic parameters required to be set by different logic elements are different. For example, for the conditional logic element, the logic parameter to be set includes at least one conditional parameter; for the waiting logic element, the logic parameter required to be set comprises waiting duration; for random logic elements, the logic parameters required to be set include a random range parameter and the like; for the device selection logic element, the logic parameter required to be set includes a device selection range, a device type or a device identifier, and the like, and the specific type of the logic parameter is not limited in the embodiments of the present application.
Illustratively, as shown in fig. 6, when the user drags the candidate logical element 622 to the editing area 63, a logical setting interface 64 is displayed on the upper layer of the editing interface 61, and the logical setting interface 64 is used to set the waiting time period.
And step 504, acquiring the set logic parameters through the logic setting interface.
Further, the computer device obtains the logic parameters set in the logic setting interface, and adds the target logic element to the business logic structure.
Illustratively, as shown in fig. 6, after the user inputs a waiting time of "500 ms" in the logic setting interface 64 and clicks the determination control, the candidate logical element 622 is added to the business logic structure 631 of the editing area 63.
In one possible implementation, as shown in FIG. 7, adding a service element in a business logic structure by a drag operation may include the following steps.
Step 701, in response to a triggering operation on a service search control, displaying at least one candidate service element in a service selection area, wherein the candidate service element is obtained by querying from a server based on a service search word.
Generally, the types of control logic in the service logic are limited, and the services controlled by the control logic are various. In order to improve the efficiency of the developer in selecting the required service from the mass services, in one possible implementation mode, a service search control is arranged in the service selection area, and the developer can input a service search word through the service search control, so that the service market server searches the matched service based on the service search word. The candidate service elements searched by the service market server may be service elements corresponding to static services or service elements corresponding to dynamic services.
Optionally, the candidate service element may be a specific service implementation, or may be a service set formed by service implementations having several same functions. For example, when the service keyword is payment, the candidate service element may be a static service in the instant messaging application a, or may be a service set composed of the static payment service in the instant messaging application a, the static payment service in the payment application B, and a dynamic payment service.
Alternatively, the candidate service elements may be displayed in the service selection area in the form of a draggable component.
In some embodiments, the service market server stores a service definition corresponding to each service element, where the service definition includes information such as a service name and a service description, and the service market server may search the service definition based on the service search term to determine a candidate service element matching the service search term.
Schematically, as shown in fig. 8, 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 makes a service query through the service marketplace server and displays a number of candidate service elements 652 resulting from the query.
Step 702, a second drag operation on a target service element in the candidate service elements is received.
In one possible implementation, when a long press operation on a target logic element in the candidate service elements is received, and a dragging operation on the target service element is further received, and a dragging end point of the dragging operation is located in an editing area, the computer device determines that the target service element needs to be added to the business logic.
Illustratively, as shown in fig. 8, when a service a1 needs to be added in the service logic, the user may long press and select a candidate service element 652 corresponding to "service a 1" and drag the candidate service element 652 to the editing area 63.
And 703, displaying a service setting interface corresponding to the target service element, wherein the service setting interface is used for setting the service parameter of the target service element.
In a possible implementation manner, when a drag operation is received for a target service element, the computer device determines, based on an element definition corresponding to the target service element, that at least one service parameter needs to be set when the target service element is added, and then displays a service setting interface for setting the service parameter.
Wherein, the number and types of the service parameters required to be set by different service elements are different. For example, for the redirection service element, the service parameters to be set include source device, destination device parameters, and media type parameters (including audio, video, and control); for the gesture recognition service, the required setting service parameters include a gesture type and the like, and the embodiment of the application does not limit specific service parameters.
Optionally, the service parameters include service input parameters and a service invocation mode, and the service invocation mode may include a synchronous invocation and an asynchronous invocation, where for the synchronous invocation service, the output of the current service will be used as the input of the subsequent service, and for the asynchronous invocation service, the service output event of the current service will be used as the trigger event of the trigger.
Illustratively, as shown in fig. 8, when the user drags the candidate service element 652 to the editing area 63, a service setting interface 66 is displayed on the upper layer of the editing interface 61, and the service setting interface 66 is used for setting service input parameters and a service calling mode.
And step 704, acquiring the set service parameters through the service setting interface.
Further, the computer device obtains the service parameters set in the service setting interface and adds the target service element to the business logic structure.
Illustratively, as shown in fig. 8, after the user completes the service parameter setting on the service setting interface 66 and clicks the determination control, the candidate service element 652 "service a 1" is added to the business logic structure 631 of the editing area 63.
In order to improve the development efficiency and enable a user to view the execution effect of the edited business logic in real time in the development process, in a possible implementation manner, the micro application editing interface further includes a preview area and a preview control. When receiving a selection operation on a target element in the business logic structure, responding to a trigger operation on the preview control, generating a preview code corresponding to the target element by the computer equipment, and displaying an execution effect of the target element in a preview area by executing the preview code.
Optionally, the preview code is generated by the preview code generation module and executed by the preview code runtime module, and the preview code runtime module is configured to convert the preview code into an animation for displaying. Illustratively, as shown in fig. 6, a preview area 69 is provided in the micro application editing interface 61, and after a user selects an element (service element and/or logic element) in the editing area 63 and clicks a preview control, an execution animation of the selected element is displayed in the preview area 69.
When a user edits the service logic, it is necessary to ensure that editable elements can be correctly combined, so as to ensure that the service logic operates normally. In one possible embodiment, the micro application editor provides a verification function by which the micro application editor can verify the legitimacy of the editing position of the editable element, thereby improving the legitimacy of the dragging operation. As shown in fig. 9, after receiving an editing operation on an editable element, the following steps may be further included.
Step 901, determining the target element position of the editable element in the service logic structure based on the target editing position of the editable element.
Optionally, the target editing position refers to a drag end position of a drag operation performed on the editable element. In one possible implementation, the computer device determines a target element position of the editable element based on a relative positional relationship between the target drag position and existing elements in the business logic structure.
Optionally, the editable element is added to the service logic structure as a node, and the target element position is used to represent a parent-child node relationship between the editable element and the existing element.
In one possible embodiment, the computer device performs validity detection on the target element position based on the target element position and the element characteristics of the editable element, and performs step 902 if the target element position is valid (i.e., the editable element is valid when displayed at the target element position), and performs step 903 if the target element position is not valid.
And 902, inserting the editable element into the position of the target element under the condition that the position of the target element is legal.
In one possible implementation, the service element and the logic element each include a respective node definition, and the node definition includes:
1. a key, a name, and a description, wherein the key is a unique identifier, and the name and the description are used to indicate the meaning of the element;
2. an attribute, for a service element, the attribute corresponding to a service input parameter of the service, and being usable to indicate a type and a candidate value of the attribute;
3. a type indicating the node type (i.e., element type) of the current node, followed by controlling the location supported by the node based on the type;
4. the child nodes and the child node types of the child nodes are used for indicating the node types supported by the subordinate child nodes when the current node is used as a father node.
In one illustrative example, the nodes of the service element (camera service) are defined as follows:
Figure BDA0003380611790000091
optionally, when the target element position is subjected to validity detection, the computer device determines a child node type of a child node corresponding to the target element position, and detects whether a node type corresponding to the editable element is matched with the child node type. If the two are matched, determining that the position of the target element is legal; and if the two are not matched, determining that the position of the target element is illegal. The target element position is obtained from the node definition of the parent node corresponding to the target element position.
Further, the computer device inserts the editable element into the target element location when the target element location is legal.
Illustratively, as shown in fig. 10, the computer device obtains a node definition of "logic 3" based on the target element location of "service 4". Since the child node type of the child node 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.
And step 903, displaying an invalid prompt under the condition that the position of the target element is illegal, wherein the invalid prompt is used for indicating that the editing operation on the editable element is invalid.
Optionally, when the editing operation is a dragging operation, and when the target element position is illegal, the computer device may not insert the editable element into the target element position, and display an invalid prompt to notify the user that the current dragging 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.
In this embodiment, the computer device performs validity check on the editing operation based on the target element position and the element definition indicated by the editing operation, thereby avoiding that the normal operation of the micro application is affected due to abnormal business logic caused by improper editing position of the editable element, and contributing to improving the accuracy of the business logic editing process.
When the micro application is composed of a plurality of triggers, a user needs to edit the trigger service logic corresponding to each trigger in the micro application development process. In some embodiments, the micro application editing interface further comprises a trigger area, and the created at least one trigger is displayed in the trigger area, and a user can create a trigger, delete a trigger and switch a trigger through the trigger area.
In one possible implementation, in response to a trigger creation operation within the trigger area, the computer device displays a trigger setup interface for setting a trigger event of the trigger. And after the set trigger event is acquired through the trigger setting interface, the computer equipment sets a corresponding trigger.
The trigger creating operation may be a click operation on a trigger creating control in the trigger area, or a click operation on a newly added trigger option in a menu option (for example, by right-clicking a mouse to call out in the trigger area), which is not limited in this embodiment.
Alternatively, the trigger event may be registered in the server in advance, and the computer device may acquire the registered trigger event from the server and specify the trigger event for the created trigger.
In addition, when the trigger event is set, event parameters corresponding to the trigger event can be set. For example, when a context aware event of an event is triggered, the event parameters set for the context aware time may include location parameters (e.g., home, office, etc.).
In addition to specifying a trigger event of a trigger from registered trigger events, an additional condition may be added as a trigger condition of the trigger. For example, when the trigger event is a shake event, a foreground application condition may be additionally added, that is, when the shake event is detected and the specified application is run in the foreground, the corresponding trigger is triggered.
Optionally, after the trigger is created, the computer device clears the editing area, so that the user edits the service logic of the newly added trigger in the editing area.
Illustratively, as shown in fig. 11, a trigger area 67 is provided in the micro application editing interface 61, and the trigger area 67 includes a trigger identifier 671 of a created trigger and a trigger creation control 672. When the user clicks the trigger creation control 672, the computer device displays the trigger setting interface 68 so that the user can set a trigger event for the newly added trigger 3. After the trigger creation is completed, the computer device clears the edit area 63 for the user to edit the business logic of the trigger 3.
During the development of the micro application, a user may need to switch back and forth between multiple triggers, and in one possible implementation, the computer device switches the business logic structure shown in the micro application editing interface in response to a trigger switching operation in the trigger area.
Illustratively, as shown in fig. 12, the editing area 63 currently displays the business logic structure corresponding to the trigger 1, and when the user clicks the trigger 2 in the trigger area 67, the editing area 63 switches to display the business logic structure corresponding to the trigger 2.
Regarding the way the micro-application is generated, in one possible implementation, as shown in fig. 13, the process may include the following steps:
step 1301, traversing each trigger in the micro application.
When the micro-application is composed of multiple triggers, the computer device traverses each trigger and performs the following steps 1302 to 1304 for each trigger.
Illustratively, as shown in FIG. 14, for a micro-application with the application name "test," the computer device traverses flip-flop 1 and flip-flop 2 in the micro-application.
Step 1302, for each trigger in the micro application, traversing each node in the business logic structure corresponding to the trigger.
Further, the computer device corresponds to each node (corresponding to an element) in the business logic structure by traversing the trigger, and determines parent-child node relationships between the nodes. Illustratively, as shown in fig. 14, for trigger 1, by traversing a first service 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 corresponding to logic 2, and service 4 and service 5 are both child nodes corresponding to logic 3. For trigger 2, the computer device determines that service 6 and service 7 are children nodes corresponding to logic 3 by traversing the second business logic structure 1402 corresponding to trigger 2.
And step 1303, obtaining node codes corresponding to the nodes based on the mapping relationship between the nodes and the codes.
In a possible implementation manner, for different types of nodes, a mapping relationship between the nodes and the codes is predefined, and when the service logic structure is converted into a code form, the computer device maps the attributes of the nodes according to the mapping relationship to obtain the node codes.
In some embodiments, when the code is in xml format, based on the mapping relationship, the node itself is mapped as a node in xml, and the attribute of the node is mapped as attribute in xml.
In step 1304, trigger codes corresponding to triggers are generated based on the node codes corresponding to the nodes.
Further, 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. And node codes corresponding to the child nodes are nested in node codes corresponding to the parent nodes.
Illustratively, as shown in fig. 14, since service 1 and service 2 are child nodes of logic 1, the codes mapped by service 1 and service 2 are nested in the codes mapped by logic 1; service 3 and service 4 are child nodes of logic 3, so the code mapped by service 4 and service 5 is nested in the code mapped by logic 3.
And step 1305, combining trigger codes corresponding to the triggers to obtain the micro application script of the micro application.
After the trigger codes corresponding to the triggers are obtained, the computer equipment further combines the trigger codes of the triggers to obtain the micro application script of the micro application. In the subsequent micro application running process, the computer equipment analyzes the micro application script through the micro application engine.
Illustratively, as shown in fig. 14, the computer device combines the trigger codes of trigger 1 and trigger 2 to obtain micro application script 1403 in xml format.
In order to further simplify the development process of the micro application and enable a developer to pay more attention to the business logic, for the developed micro application, the micro application editor supports automatic addition of an interactive function for the micro application, wherein the interactive function comprises at least one of sharing and sharing. In one possible implementation, in response to a triggering operation on a submission control in the micro-application editing interface, the computer device displays a submission setting interface, wherein the submission setting interface is used for setting basic application information and interaction information of the micro-application. The basic application information may include an application name, an application icon, an application description, and the like, and the interaction information is used to indicate a specific interaction manner of the micro application.
In response to submitting an interaction mode selection operation within the settings interface, the computer device determines target interaction information for the micro-application. Optionally, the target interaction information includes at least one of a sharing mode and a sharing mode of the micro application, and the sharing (sharing) mode may include at least one of a bump-to-bump sharing (sharing), a link sharing (sharing), or a two-dimensional code sharing (sharing).
Illustratively, as shown in fig. 15, a sharing mode selection control 1502 is arranged in a submission setting interface 1501, and a user can set a sharing mode of a micro application before submitting the micro application.
Further, the computer equipment packages and uploads the micro application and the target interaction information to the server. When other subsequent user equipment downloads the micro application from the micro application store, the target interaction information is obtained besides the micro application script of the micro application. When the micro-applications are used, the micro-application manager (used for uniformly managing the subscribed micro-applications) can share or share the micro-applications to other devices or users based on the target interaction information, and cross-device linkage is further realized by means of the micro-applications.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 16, a block diagram of a development apparatus for a micro application according to an embodiment of the present application is shown. The apparatus may include:
an interface display module 1601, configured to display a micro application editing interface;
a receiving module 1602, configured to receive 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, the logic element is used to implement logic control, the service element is used to implement service invocation, and the editing operation refers to an operation of combining the editable elements;
a structure display module 1603, configured to display a service logic structure corresponding to a trigger in the micro application editing interface, where the service logic structure is obtained by combining the editable elements, and the trigger is configured to execute a service logic represented by the service logic structure based on a trigger event;
a generating module 1604, configured to generate a micro application based on the business logic structure corresponding to at least one trigger.
Optionally, the micro application editing interface includes a logic selection area, a service selection area, and an editing area;
the receiving module 1602 includes:
a first receiving unit, configured to receive a first dragging operation on the logic element in the logic selection area, where the first dragging operation refers to an operation of dragging the logic element from the logic selection area to an editing area;
a second receiving unit, configured to receive 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 structure display module 1603 is configured to:
and displaying the business logic structure corresponding to the trigger in the editing area. .
Optionally, the logic selection area includes at least one type selection control, and different types of selection controls correspond to different types of control logic;
the first receiving unit is configured to:
responding to a trigger operation of a target type selection control, and displaying at least one candidate logic element belonging to a target type in the logic selection area, wherein the target type is a type of a control logic corresponding to the target type selection control;
a first drag operation on a target logical element of the candidate logical elements is received.
Optionally, the apparatus further comprises:
the logic parameter setting module is used for displaying a logic setting interface corresponding to the target logic element, and the logic setting interface is used for setting the logic parameter of the target logic element; and acquiring the set logic parameters through the logic setting interface.
Optionally, the service selection area includes a service search control;
the second receiving unit is configured to:
responding to the triggering operation of the service search control, and displaying at least one candidate service element in the service selection area, wherein the candidate service element is obtained by inquiring from a server based on a service search word;
and receiving a second dragging operation on a target service element in the candidate service elements.
Optionally, the apparatus further comprises:
the service parameter setting module is used for displaying a service setting interface corresponding to the target service element, and the service setting interface is used for setting the service parameters of the target service element;
and acquiring the set service parameters through the service setting interface.
Optionally, the apparatus further comprises:
a position determining module, configured 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;
and the inserting module is used for inserting the editable element into the target element position under the condition that the target element position is legal.
Optionally, the insertion module includes:
the node type determining unit is used for determining the child node type of the child node corresponding to the target element position;
and the inserting unit is used for determining that the position of the target element is legal and inserting the editable element into the position of the target element under the condition that the node type corresponding to the editable element is matched with the type of the child node.
Optionally, the apparatus further comprises:
and the prompting module is used for displaying an invalid prompt under the condition that the position of the target element is illegal, wherein the invalid prompt is used for indicating that the editing operation on the editable element is invalid.
Optionally, the micro application editing interface includes a trigger area, and the trigger area is used for displaying at least one created trigger;
the apparatus further comprises:
the trigger setting module is used for responding to trigger establishing operation in the trigger area and displaying a trigger setting interface, and the trigger setting interface is used for setting a trigger event of the trigger; and acquiring the set trigger event through the trigger setting interface, and setting the trigger.
Optionally, the apparatus further comprises:
and the switching module is used for responding to the trigger switching operation in the trigger area and switching the business logic structure displayed in the micro application editing interface.
Optionally, the generating module 1604 is configured to:
traversing each of the triggers in the micro-application;
for each trigger in the micro application, traversing each node in the business logic structure corresponding to the trigger;
obtaining node codes corresponding to the nodes based on the mapping relation between the nodes and the codes;
generating trigger codes corresponding to the triggers based on the node codes corresponding to the nodes;
and combining the trigger codes corresponding to the triggers to obtain the micro application script of the micro application.
Optionally, the micro application editing interface includes a preview area and a preview control;
the device further comprises:
the preview module is used for receiving the selection operation of the target element in the business logic structure; responding to the trigger operation of the preview control, and generating a preview code corresponding to the target element; and displaying the execution effect of the target element in the preview area by executing the preview code.
Optionally, the apparatus further comprises:
the submission module is used for responding to the triggering operation of the submission control in the micro application editing interface and displaying a submission setting interface; responding to the interaction mode selection operation in the submission setting interface, and determining target interaction information of the micro application; and packaging and uploading the micro application and the target interaction information to a server.
To sum up, in the embodiment of the present application, by performing an editing operation on an editable element in the micro application editing interface, the editable element is used to form a business logic structure corresponding to a trigger in the micro application, and then the micro application is generated based on the business logic structure corresponding to each trigger, so as to implement micro application development. By adopting the scheme provided by the embodiment of the application, a user can complete the development of the micro application through simple editing operation without compiling codes by using a professional programming language, so that the development of the micro application based on the visual component is realized, the development threshold of the micro application is favorably reduced, and the development efficiency of the micro application is improved.
Referring to fig. 17, a block diagram of a computer device according to an exemplary embodiment of the present application is shown. The computer device 1700 may be implemented as a developer device in the various embodiments described above. Computer device 1700 may include one or more of the following components: a processor 1710 and a memory 1720.
The processor 1710 may include one or more processing cores. The processor 1710 interfaces with various components throughout the computer device 1700 using various interfaces and circuitry to perform various functions of the computer device 1700 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1720, as well as invoking data stored in the memory 1720. Alternatively, the processor 1710 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1710 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Neural-Network Processing Unit (NPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing contents required to be displayed by the touch display screen; the NPU is used for realizing an Artificial Intelligence (AI) function; the modem is used to handle wireless communications. It is to be understood that the modem may be implemented by a single chip without being integrated into the processor 1710.
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 medium (non-transitory computer-readable storage medium). The memory 1720 may be used to store an instruction, a program, code, a set of codes, or a set of instructions. The memory 1720 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data (such as audio data, a phonebook) created according to the use of the computer apparatus 1700, and the like.
In addition, those skilled in the art will appreciate that the configuration of computer device 1700 illustrated in the above-described figures does not constitute a limitation of computer devices, which may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. For example, the computer device 1700 further 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, and the like), an audio circuit, a WiFi module, a power supply, a bluetooth module, and the like, which are not described herein again.
The 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 development method of the micro application according to the above embodiments.
Embodiments of the present application provide a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the development method of the micro application provided in the various alternative implementations of the above aspects.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. In addition, the step numbers described herein only exemplarily show one possible execution sequence among the steps, and in some other embodiments, the steps may also be executed out of the numbering sequence, for example, two steps with different numbers are executed simultaneously, or two steps with different numbers are executed in a reverse order to the order shown in the figure, which is not limited by the embodiment of the present application.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (18)

1. A method for developing a micro-application, the method comprising:
displaying a micro application editing interface;
receiving an editing operation on editable elements in the micro application editing interface, wherein the editable elements comprise logic elements and service elements, the logic elements are used for realizing logic control, the service elements are used for realizing service calling, 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, wherein the business logic structure is obtained by combining the editable elements, and the trigger is used for executing the business logic represented by the business logic structure based on a trigger event;
and generating a micro application based on the business logic structure corresponding to at least one trigger.
2. The method of claim 1, wherein the micro application editing interface comprises 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 comprises:
receiving a first dragging operation of the logic element in the logic selection area, wherein the first dragging operation refers to the operation of dragging the logic element from the logic selection area to the editing area;
receiving a second dragging operation of the service element in the service selection area, wherein the second dragging operation refers to an operation of dragging the service element from the service selection area to the editing area;
the displaying of the business logic structure corresponding to the trigger in the micro application editing interface includes:
and displaying the business logic structure corresponding to the trigger in the editing area.
3. The method according to claim 2, wherein the logic selection area comprises at least one type selection control, and different types of selection controls correspond to different types of control logic;
the receiving a first drag operation on the logical element in the logical selection area comprises:
responding to a trigger operation of a target type selection control, and displaying at least one candidate logic element belonging to a target type in the logic selection area, wherein the target type is a type of a control logic corresponding to the target type selection control;
a first drag operation on a target logical element of the candidate logical elements is received.
4. The method of claim 3, wherein after receiving the first drag operation on the target logical element of the candidate logical elements, the method further comprises:
displaying a logic setting interface corresponding to the target logic element, wherein the logic setting interface is used for setting logic parameters of the target logic element;
and acquiring the set logic parameters through the logic setting interface.
5. The method of claim 2, wherein the service selection area includes a service search control;
the receiving a second drag operation on the service element in the service selection area comprises:
responding to the triggering operation of the service search control, and displaying at least one candidate service element in the service selection area, wherein the candidate service element is obtained by inquiring from a server based on a service search word;
and receiving a second dragging operation on a target service element in the candidate service elements.
6. The method of claim 5, wherein after receiving the second drag operation on the target service element of the candidate service elements, the method further comprises:
displaying a service setting interface corresponding to the target service element, wherein the service setting interface is used for setting service parameters of the target service element;
and acquiring the set service parameters through the service setting interface.
7. The method of any of claims 1 to 6, wherein after receiving an editing operation on an editable element in the micro-application editing interface, the method further comprises:
determining a target element position of the editable element in the business logic structure based on the target editing position of the editable element;
and inserting the editable element into the target element position under the condition that the target element position is legal.
8. The method of claim 7, wherein said inserting the editable element into the target element position if the target element position is legal comprises:
determining the child node type of the child node corresponding to the target element position;
and under the condition that the node type corresponding to the editable element is matched with the child node type, determining that the position of the target element is legal, and inserting the editable element into the position of the target element.
9. The method of claim 7, wherein after determining the target element position of the editable element in the business logic structure based on the target edit position of the editable element, the method further comprises:
and in the case that the target element position is illegal, displaying an invalid prompt, wherein the invalid prompt is used for indicating that the editing operation on the editable element is invalid.
10. The method according to any one of claims 1 to 6, wherein a trigger area is included in the micro application editing interface, and the trigger area is used for displaying at least one created trigger;
before the receiving a drag operation on an editable element in the micro application editing interface, the method further includes:
responding to trigger creating operation in the trigger area, and displaying a trigger setting interface, wherein the trigger setting interface is used for setting a trigger event of the trigger;
and acquiring the set trigger event through the trigger setting interface, and setting the trigger.
11. The method of claim 10, further comprising:
and responding to the trigger switching operation in the trigger area, and switching the business logic structure displayed in the micro application editing interface.
12. The method of any of claims 1 to 6, wherein the generating a micro-application based on the business logic structure corresponding to at least one of the triggers comprises:
traversing each of the triggers in the micro-application;
for each trigger in the micro application, traversing each node in the business logic structure corresponding to the trigger;
obtaining node codes corresponding to the nodes based on the mapping relation between the nodes and the codes;
generating trigger codes corresponding to the triggers based on the node codes corresponding to the nodes;
and combining the trigger codes corresponding to the triggers to obtain the micro application script of the micro application.
13. The method of any one of claims 1 to 6, wherein the micro application editing interface comprises a preview area and a preview control;
the method further comprises the following steps:
receiving a selection operation of a target element in the business logic structure;
responding to the trigger operation of the preview control, and generating a preview code corresponding to the target element;
and displaying the execution effect of the target element in the preview area by executing the preview code.
14. The method of any of claims 1 to 6, wherein after generating a micro-application based on the business logic structure corresponding to at least one of the triggers, the method further comprises:
responding to the triggering operation of a submission control in the micro application editing interface, and displaying a submission setting interface;
responding to the interaction mode selection operation in the submission setting interface, and determining target interaction information of the micro application;
and packaging and uploading the micro application and the target interaction information to a server.
15. An apparatus for developing a micro-application, the apparatus comprising:
the interface display module is used for displaying a micro application editing interface;
the micro application editing interface comprises a receiving module and a processing module, wherein the receiving module is used for receiving editing operation on editable elements in the micro application editing interface, the editable elements comprise logic elements and service elements, the logic elements are used for realizing logic control, the service elements are used for realizing service calling, and the editing operation refers to the operation of combining the editable elements;
the structure display module is used for 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 for executing the business logic represented by the business logic structure based on a trigger event;
and the generating module is used for generating the micro application based on the business logic structure corresponding to at least one trigger.
16. A computer device, wherein the computer device comprises a processor and a memory; the memory stores at least one instruction for execution by the processor to implement a method of developing a micro-application as claimed in any one of claims 1 to 14.
17. A computer-readable storage medium having at least one program code stored therein, the program code being loaded and executed by a processor to implement a method of developing a micro application according to any one of claims 1 to 14.
18. A computer program product, characterized in that the computer program product comprises computer instructions, the computer instructions being stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executing the computer instructions causing the computer device to perform the method of developing a micro-application as claimed in any of claims 1 to 14.
CN202111432111.6A 2021-11-29 2021-11-29 Method, apparatus, device, storage medium, and program product for developing micro-application Pending CN114064024A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111432111.6A CN114064024A (en) 2021-11-29 2021-11-29 Method, apparatus, device, storage medium, and program product for developing micro-application
PCT/CN2022/127027 WO2023093414A1 (en) 2021-11-29 2022-10-24 Micro-application development method and apparatus, and device, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111432111.6A CN114064024A (en) 2021-11-29 2021-11-29 Method, apparatus, device, storage medium, and program product for developing micro-application

Publications (1)

Publication Number Publication Date
CN114064024A true CN114064024A (en) 2022-02-18

Family

ID=80277601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111432111.6A Pending CN114064024A (en) 2021-11-29 2021-11-29 Method, apparatus, device, storage medium, and program product for developing micro-application

Country Status (2)

Country Link
CN (1) CN114064024A (en)
WO (1) WO2023093414A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115543290A (en) * 2022-10-12 2022-12-30 睿珀智能科技有限公司 Visual programming method and system
CN115906802A (en) * 2023-02-09 2023-04-04 成都数联云算科技有限公司 Method, device, equipment and medium for analyzing conditional logic data
WO2023093414A1 (en) * 2021-11-29 2023-06-01 Oppo广东移动通信有限公司 Micro-application development method and apparatus, and device, storage medium and program product
CN115543290B (en) * 2022-10-12 2024-04-19 睿珀智能科技有限公司 Visual programming method and system

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116909582B (en) * 2023-09-13 2024-01-30 云账户技术(天津)有限公司 Visual large-screen service deployment method and device and electronic equipment
CN117234470B (en) * 2023-10-08 2024-02-23 开物数智(安徽)智能科技有限公司 Cross-end form development system and method based on low-code platform
CN117251143B (en) * 2023-11-14 2024-02-06 武汉万云网络科技有限公司 Application system, construction method and implementation method of visual development tool of application system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9652203B1 (en) * 2015-11-24 2017-05-16 Corpa Inc. Application development framework using configurable data types
CN108614689B (en) * 2017-01-09 2021-08-13 斑马智行网络(香港)有限公司 Scene service generation method and device and terminal equipment
CN108268260A (en) * 2017-12-21 2018-07-10 博康智能信息技术有限公司 It is a kind of quick micro- using assemble method based on integrated support technology
CN109683905A (en) * 2018-12-24 2019-04-26 国云科技股份有限公司 A kind of system method for automatically releasing
CN110618882A (en) * 2019-09-20 2019-12-27 国网浙江省电力有限公司 Power business application system
CN114064024A (en) * 2021-11-29 2022-02-18 Oppo广东移动通信有限公司 Method, apparatus, device, storage medium, and program product for developing micro-application

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023093414A1 (en) * 2021-11-29 2023-06-01 Oppo广东移动通信有限公司 Micro-application development method and apparatus, and device, storage medium and program product
CN115543290A (en) * 2022-10-12 2022-12-30 睿珀智能科技有限公司 Visual programming method and system
CN115543290B (en) * 2022-10-12 2024-04-19 睿珀智能科技有限公司 Visual programming method and system
CN115906802A (en) * 2023-02-09 2023-04-04 成都数联云算科技有限公司 Method, device, equipment and medium for analyzing conditional logic data

Also Published As

Publication number Publication date
WO2023093414A1 (en) 2023-06-01

Similar Documents

Publication Publication Date Title
US10705942B1 (en) Simulated testing of API
CN114064024A (en) Method, apparatus, device, storage medium, and program product for developing micro-application
CN109597814B (en) Online rapid delivery system of background management information system
CN111026396B (en) Page rendering method and device, electronic equipment and storage medium
US8839192B2 (en) System and method for presentation of cross organizational applications
CN111522552B (en) Sub-application generation method and device, computer equipment and storage medium
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
CN104484189A (en) Construction and design method of application interface
JP2015534145A (en) User interface control framework for stamping out controls using declarative templates
CN109800135B (en) Information processing method and terminal
WO2012140564A1 (en) System and method for mobile application development
WO2022247594A1 (en) Page rendering method and apparatus, electronic device, computer-readable storage medium, and computer program product
WO2017107851A1 (en) Method and device for releasing and updating desktop application component
US10268456B2 (en) Standardized approach to contextual code identification in editors and IDEs
KR20170016362A (en) Converting presentation metadata to a browser-renderable format during compilation
CN113407284A (en) Navigation interface generation method and device, storage medium and electronic equipment
CN114117190A (en) Data processing method, data processing device, storage medium and electronic equipment
CN110971974A (en) Configuration parameter creating method, device, terminal and storage medium
Cardoso et al. PuReWidgets: a programming toolkit for interactive public display applications
WO2021129812A1 (en) Method and system for running artificial intelligence application, and device
WO2023124657A1 (en) Micro-application running method and apparatus, device, storage medium, and program product
CN106998350B (en) Method and system for using frame based on function item of cross-user message
Honkala Web user interaction: a declarative approach based on XForms
CN112068895A (en) Code configuration method and device, video playing equipment and storage medium
KR102385381B1 (en) Method and system for generating script forcamera effect

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination