Micro application running method, device, equipment, storage medium and program product

By managing low-code scripts and triggers for micro-applications, cross-platform micro-application operation is achieved, solving the problems of storage space and development difficulty in traditional applications, and improving storage efficiency and development convenience.

CN114356520BActive Publication Date: 2026-06-02GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
Filing Date
2021-12-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

As applications become more feature-rich, the storage space required by traditional applications gradually increases, leading to more complex installation and operation processes and increased development difficulty.

Method used

It adopts low-code scripts for micro-applications, manages call actions through triggers and data storage areas, realizes the componentization and cross-platform operation of micro-applications, and supports dynamic deployment and updates.

Benefits of technology

It reduces the storage space requirements of micro-applications, improves the reusability of call actions and development efficiency, avoids data conflicts, and simplifies the application installation and update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356520B_ABST
    Figure CN114356520B_ABST
Patent Text Reader

Abstract

Embodiments of the application disclose a micro application running method and device, equipment, storage medium and program product, and belong to the technical field of application. The method comprises the following steps: obtaining a target micro application script of a target micro application; in response to a target trigger event, triggering a target trigger corresponding to the target trigger event in the target micro application script; reading an event parameter corresponding to the target trigger event from a first data storage area, different triggers corresponding to different first data storage areas; and based on the event parameter, executing a target call action corresponding to the target trigger. In the micro application running process, different triggers are provided with special data storage areas, so that the call action associated with the trigger can access the data storage area, which can achieve the purpose of data transmission in the micro application, and can also avoid the conflict problem of data corresponding to different triggers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of application technology, and in particular to a method, apparatus, device, storage medium, and program product for operating a micro-application. Background Technology

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

[0003] Before using an application, users first need to download the application installation package from the app store, then parse the package to install the application in the terminal, and finally click the application icon to launch it. However, as application quality continues to improve, the storage space required by these applications is also increasing. Summary of the Invention

[0004] This application provides a method, apparatus, device, storage medium, and program product for running a micro-application. The technical solution is as follows:

[0005] On one hand, embodiments of this application provide a method for running a micro-application, the method comprising:

[0006] Obtain the target micro-application script of the target micro-application, wherein the target micro-application script consists of at least one trigger;

[0007] In response to a target triggering event, the target trigger corresponding to the target triggering event in the target micro-application script is triggered;

[0008] Read the event parameters corresponding to the target triggering event from the first data storage area; different triggers correspond to different first data storage areas.

[0009] Based on the event parameters, execute the target invocation action corresponding to the target trigger.

[0010] On the other hand, embodiments of this application provide a micro-application operating device, the device comprising:

[0011] The script acquisition module is used to acquire the target micro-application script of the target micro-application, wherein the target micro-application script consists of at least one trigger.

[0012] The triggering module is used to respond to a target triggering event and trigger the target triggering event corresponding to the target triggering event in the target micro-application script;

[0013] The data reading module is used to read the event parameters corresponding to the target triggering event from the first data storage area. Different triggers correspond to different first data storage areas.

[0014] The action invocation module is used to execute the target invocation action corresponding to the target trigger based on the event parameters.

[0015] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory; the memory stores at least one instruction, the at least one instruction being executed by the processor to implement the micro-application operation method as described above.

[0016] On the other hand, embodiments of this application provide a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the micro-application operation method as described above.

[0017] On the other hand, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the micro-application operation method provided in various optional implementations of the above aspects.

[0018] In this embodiment, during the operation of a micro-application, the micro-application script is obtained, and the corresponding trigger in the micro-application script is triggered based on a triggering event. This trigger then executes the corresponding call action to achieve the micro-application's functionality. Since the micro-application operates based on a low-code micro-application script, it requires less storage space compared to traditional applications. Furthermore, assembling call actions into micro-applications and managing the call relationships between them using the micro-application script achieves componentization of the micro-application, improving the reusability of call actions between micro-applications and helping to reduce the development difficulty of micro-applications. In addition, during the operation of the micro-application, a dedicated data storage area is provided for different triggers, allowing the call actions associated with the trigger to access this data storage area. This achieves the purpose of data transfer within the micro-application while avoiding data conflicts between different triggers. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram illustrating a micro-application software package as shown in an exemplary embodiment of this application;

[0021] Figure 2 This is a schematic diagram illustrating a micro-application script in an exemplary embodiment of this application;

[0022] Figure 3 A system architecture diagram of a micro-application system provided in an exemplary embodiment of this application is shown;

[0023] Figure 4 A flowchart illustrating a method for operating a micro-application provided in an exemplary embodiment of this application is shown;

[0024] Figure 5 A schematic diagram illustrating the trigger scope of an exemplary embodiment of this application is shown;

[0025] Figure 6 A flowchart illustrating a method for operating a micro-application provided in another exemplary embodiment of this application is shown;

[0026] Figure 7 A schematic diagram illustrating simple action types and combined action types is shown in an exemplary embodiment of this application;

[0027] Figure 8 This illustration shows a schematic diagram illustrating the action of a child node in an exemplary embodiment of this application;

[0028] Figure 9 This illustration shows a schematic diagram illustrating the relationship between child node scope, trigger scope, and global scope in an exemplary embodiment of this application.

[0029] Figure 10 A flowchart illustrating a method for operating a micro-application provided in another exemplary embodiment of this application is shown;

[0030] Figure 11 A schematic diagram of a condition controller illustrated in an exemplary embodiment of this application is shown;

[0031] Figure 12 A schematic diagram of a loop controller illustrated in an exemplary embodiment of this application is shown;

[0032] Figure 13 A schematic diagram of a delay controller illustrating an exemplary embodiment of this application is shown;

[0033] Figure 14 A schematic diagram of a condition controller illustrated in an exemplary embodiment of this application is shown;

[0034] Figure 15 A schematic diagram of a selection controller illustrating an exemplary embodiment of this application is shown;

[0035] Figure 16A schematic diagram of a parallel controller illustrated in an exemplary embodiment of this application is shown;

[0036] Figure 17 A structural block diagram of a micro-application operating device according to an embodiment of this application is shown;

[0037] Figure 18 A structural block diagram of a computer device provided in an exemplary embodiment of this application is shown. Detailed Implementation

[0038] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0039] For ease of understanding, the terms used in the embodiments of this application will be explained below.

[0040] Microapplications: Microapplications can be viewed as collections of services used to implement specific business logic through calls between services; that is, the microapplication functionality. Unlike traditional applications that can only run on a specific operating system, microapplication services can run on different operating systems, meaning microapplications support heterogeneous operating systems and can achieve cross-platform operation.

[0041] Unlike traditional applications that require downloading and are tied to a device before use, micro-applications use a subscription mechanism and are tied to the user. That is, after a user subscribes to a micro-application through a device under a user account, all devices under that user account can use the micro-application.

[0042] like Figure 1 As shown, the micro-application package 100 consists of an application description file 110, a program file 120 (micro-application script), and an MD5 file 130. The application description file 110 is used to provide a simple description of the micro-application, including the author, version information, and time of the micro-application. The program file 120 is the core file of the micro-application package. It is the main generated component edited by the developer through the editor and is also the scheduling object of the micro-application engine. The MD5 file 130 is used for integrity verification of the micro-application package 100.

[0043] Microapplication scripts, also known as microapplication definitions, are used to control the calling relationships between services within a microapplication. They describe a general business logic using a scripting language. This scripting language can be XML, JavaScript, JSON, YMAL, C++, Python, or user-defined syntax.

[0044] like Figure 2As shown, the micro-application script 11 consists of several triggers 12, and each trigger 12 consists of a trigger event 13, control logic 14, and several services 15 controlled by the control logic 14. Here, the services in the micro-application script are not the services themselves, but rather service identifiers. Optionally, in this embodiment, the service 15 can also be referred to as a simple action or an action.

[0045] Unlike traditional applications that require downloading and installing an application package before running (e.g., an APK file for Android), micro-applications only need to download the corresponding micro-application script before running. During the micro-application process, the micro-application engine executes this script to implement the micro-application's functionality. Compared to traditional applications, micro-application scripts have less code, thus occupying less storage space and facilitating dynamic deployment and updates.

[0046] Services: As the smallest unit in the execution of a micro-application, services are used to perform specific tasks. For example, a screenshot service is used to implement the device screenshot function, and a screen mirroring service is used to enable screen mirroring between devices. Furthermore, the services called during the execution of a micro-application can be services on the current device or services on other devices. For instance, during the execution of a micro-application, it can call the screenshot service on another device to obtain a screenshot from that device, and then call the image display service to display that screenshot.

[0047] Actions (simple actions): These refer to the smallest granularity action entity directly invoked and executed during the operation of a micro-application. Simple actions include actions provided by the micro-application system itself and service actions registered by service developers. System-provided actions include: device selection actions, multiple actions, application reset actions, list traversal actions, custom parameter actions, parameter setting actions, etc. Service actions are actions automatically generated in the micro-application when a service developer registers a service, such as: screenshot actions, camera activation actions, screen mirroring server activation actions, screen mirroring client activation actions, etc. In this embodiment, during the operation of the micro-application, simple actions are executed through control logic to invoke the corresponding services. For example, during the operation of the micro-application, a screenshot action can be executed to invoke the screenshot service on other devices to obtain screenshots from those devices, and a display action can be executed to invoke the image display service to display the screenshots from those devices. It should be noted that in a micro-application, executing an action is essentially invoking a service.

[0048] Unlike traditional application installations, which require all services used during runtime to be pre-installed locally, micro-applications dynamically assemble their business logic during runtime. Therefore, services within micro-applications support dynamic deployment; that is, services corresponding to the business logic executed on the current device are dynamically deployed to that device. Consequently, when the same micro-application functionality is implemented across multiple devices, the deployed services may differ due to variations in business logic across devices. This means that services within micro-applications exhibit differential deployment characteristics.

[0049] In this embodiment of the application, the services constituting a micro-application may include static services and dynamic services. Static services refer to services provided by the host application that need to be pre-installed on the device, while dynamic services refer to services that support dynamic deployment and can be dynamically deployed on the device during the operation of the micro-application.

[0050] Figure 3 A system architecture diagram of a micro-application system provided in an exemplary embodiment of this application is shown. The system includes at least one computer device 210 and a server 220.

[0051] Computer device 210 is an electronic device with micro-application running function. This electronic device can be a smartphone, tablet computer, personal computer, vehicle system, etc., and this embodiment does not limit it. Figure 3 The example of device 210 includes smartphones, tablets, and in-vehicle systems, but this does not constitute a limitation.

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

[0053] The script management module 2111 manages the micro-application scripts of various micro-applications stored in the computer device 210, and is responsible for parsing the micro-application scripts to determine the triggers and services under the triggers in the micro-application script. Optionally, the script management module 2111 is also used to download the corresponding micro-application script when a subscription operation for a micro-application is received, and to delete the micro-application script corresponding to the micro-application when a subscription cancellation operation for a micro-application is received.

[0054] The event bus module 2112 works in conjunction with the application scheduling module 2113 to schedule micro-applications based on trigger events. In some embodiments, the event bus module 2112 has triggers corresponding to multiple micro-applications attached to it. Since the same trigger event may trigger multiple subscribed micro-applications, after receiving a trigger event, the event bus module 2112 hands it over to the application scheduling module 2113 to determine the micro-application that needs to be run from among several micro-applications. The application scheduling module 2113 can automatically determine the micro-application based on a scheduling strategy, or it can allow the user to manually select the micro-application.

[0055] The runtime module 2114 is used to execute the control logic in the micro-application script, and then interacts with the service scheduling module 2115 based on the control logic, so that the service scheduling module 2115 can make service calls.

[0056] In addition to the micro-application engine 211, the computer device 210 also includes a service governance module 212, a data synchronization module 213, and a service gateway 214.

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

[0058] Service gateway 214 is used to make service calls based on service call requests from service scheduling module 2115, specifically including proxy management module 2141 and lifecycle management module 2142. Proxy management module 2141 has different service proxies configured to convert service call requests in a uniform format to obtain requests that conform to the actual service format requirements. Lifecycle management module 2142 manages the service lifecycle and may include static service lifecycle management module and dynamic service lifecycle management module.

[0059] During the operation of the micro-application, in addition to making service calls through its own service gateway 214, the computer device 210 can also make service calls through the service gateway 214 of other devices (determined by the business logic of the micro-application), thus enabling cross-device service calls.

[0060] Services for different deployment methods, such as Figure 3 As shown, the computer device 210 also includes a static service module 216 and a dynamic service module 215. The static service module 216 manages pre-installed static services, while the dynamic service module 215 manages dynamically deployed dynamic services.

[0061] In some embodiments, the services included in the dynamic service module 215 may correspond to different operating environments, different deployment forms, or different programming languages. Figure 3 The example of the dynamic service module 215, which includes Android dynamic service 2151, Web dynamic service 2152, and container dynamic service 2153, is provided for illustration, but does not constitute a limitation.

[0062] Server 220 refers to a service cluster or cloud computing center consisting of a single server or several servers. It is divided according to the functions performed by each server in the server cluster, such as... Figure 3 As shown, the server cluster includes a user resource management server 221, a micro-application store server 222, a service market server 223, and a cloud service library 224.

[0063] 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 manages user accounts using micro-applications; the application management module 2212 manages micro-applications subscribed to by different user accounts; the service management module 2213 manages the services invoked; the device management module 2214 manages the binding relationship between user accounts and devices; and the security module 2215 performs security verification during interactions.

[0064] The micro-app store server 222 is used to provide micro-app subscription services. When users need to use micro-apps, they can search for micro-apps through the micro-app search engine 2221 provided by the micro-app store server 222, and then select and subscribe to micro-apps from the search results.

[0065] In some embodiments, after receiving a subscription operation for a 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. The application management module 2212 in the user resource management server 221 then updates the subscription relationship between the user account and the micro-application. Further, the user management module 2211 and the device management module 2214 identify other devices under the user account and push subscription notifications to these other devices so that they can download the micro-application script from the micro-application store server 222. (Illustrative example follows.) Figure 3 As shown, after user "Zhang San" subscribes to the micro-application via his smartphone, the vehicle's infotainment system and tablet computer logged into the user account "Zhang San" receive a subscription notification pushed by the user resource management server 221, and then download the micro-application script based on the application identifier in the notification.

[0066] Service marketplace server 223 is a server for developers to provide service query services. Developers can search for services through the service search engine 2231 provided by service marketplace server 223, apply the searched services to their developed micro-applications, and then upload the completed micro-applications to micro-application store server 222 for other users to download and use.

[0067] In addition, developers can also develop dynamic services and upload them to the cloud service repository 224. The computer device 210 can then download and deploy the dynamic services from the cloud service repository 224.

[0068] It should be noted that the above embodiments only illustrate the basic architecture of the micro-application system. The micro-application system may also include other computer devices (such as developer devices) or servers that implement other functions, and this embodiment does not constitute a limitation.

[0069] Please refer to Figure 4 It illustrates a flowchart of a method for operating a micro-application provided in an exemplary embodiment of this application, wherein the embodiment of this application applies the method to... Figure 3 Taking the computer device shown as an example, the method includes:

[0070] Step 401: Obtain the target micro-application script of the target micro-application, which consists of at least one trigger.

[0071] In one possible implementation, when a launch command for a target micro-application is received, the computer device retrieves the target micro-application script corresponding to the target micro-application from the micro-application scripts stored locally, wherein the computer device locally stores the micro-application scripts of micro-applications subscribed to by the currently logged-in user account.

[0072] Optionally, the launch command can be triggered by the user by clicking the micro-application icon, or by interaction (such as voice, shake, tap, scene awareness, etc.). This application embodiment does not limit the specific way of launching the target micro-application.

[0073] In this embodiment of the application, a micro-application is a collection of services, and its business logic is implemented by a computer device through a micro-application engine executing micro-application scripts. The micro-application scripts of different micro-applications are all executed by the same micro-application engine.

[0074] Microapplication scripts are low-code script files consisting of several triggers. Each trigger is used to activate under a specific triggering event, and after activation, the corresponding call action of the trigger is executed to make a service call.

[0075] Optionally, the calling action can be a simple action or a combined action. When the calling action is a simple action, the simple action can be executed directly to make a service call after the trigger is triggered. When the calling action is a combined action, the simple action needs to be executed through the controller to make a service call after the trigger is triggered. The controller is used to indicate the calling logic of the simple action.

[0076] In some embodiments, the microapplication script includes at least an initialization trigger and a termination trigger. The initialization trigger is used to trigger the microapplication to start running, and the termination trigger is used to trigger the microapplication to end running. In addition to the initialization trigger and the termination trigger, the microapplication script also includes other triggers that implement specific microapplication functions, which are not limited in this embodiment.

[0077] Step 402: In response to the target trigger event, trigger the target trigger corresponding to the target trigger event in the target micro-application script.

[0078] During the operation of a microapplication, when a target trigger event is received, the computer device determines the target trigger that was triggered by the target trigger event from the target microapplication script, and then sets the target trigger from a non-triggered state to a triggered state. In the triggered state, the computer device executes the corresponding call action of the trigger through the microapplication engine, calling the corresponding service to implement the corresponding business logic.

[0079] Optionally, the target triggering event can be a user-triggered event, such as a tapping event, a shake event, etc., or it can be an event output after a service call, such as the event returned after the previous trigger's corresponding service call is completed. This embodiment does not limit this.

[0080] Step 403: Read the event parameters corresponding to the target trigger event from the first data storage area. Different triggers correspond to different first data storage areas.

[0081] In addition to executing invocation actions, the micro-application operation also involves data transmission. For example, a "screen casting event" carries relevant parameter information of the source and destination devices. This parameter information is stored in the trigger scope of the trigger corresponding to the "screen casting event" so that the target invocation action under this trigger can access the relevant parameter information. Therefore, in one possible implementation, when a target trigger event is received, the event parameters corresponding to the target trigger event are also stored in the first data storage area so that the target invocation action corresponding to the target trigger can access the first data storage area to obtain the corresponding event parameters and continue to execute the subsequent service invocation process.

[0082] Since a microapplication contains several triggers, each triggered by a different event, to avoid excessive data conflicts or lengthy data lookups during the invocation process, one possible implementation is to set different first data storage areas (trigger scopes) for different triggers. This ensures that the event parameters corresponding to the target trigger event can only be accessed by the target invocation action corresponding to the target trigger event. Optionally, when the target invocation action includes multiple controllers and multiple simple actions, then the parameters can only be accessed by the controller and simple actions corresponding to the target trigger.

[0083] It should be noted that when a target trigger event is received, the target trigger corresponding to the target trigger event in the target micro-application script is triggered, and the event parameters corresponding to the target trigger event can be stored in the trigger action (first data storage area) of the target trigger.

[0084] In some exemplary examples, the event parameters can be data carried by the target triggering event, such as the source and destination device information carried by the "casting event".

[0085] like Figure 5 The diagram illustrates a schematic of the trigger scope in an exemplary embodiment of this application. When a target event 503 is received, the trigger 501 corresponding to the target event 503 is triggered. The event parameters corresponding to the target event 503 can be stored in the trigger scope 510. Controllers 1 to 4 associated with the trigger 501, as well as actions 1 to 4, can all access the event parameters; however, controllers 5 to 7, and actions 5 to 9 cannot access the data in the trigger scope 510. When a target event 504 is received, the trigger 502 corresponding to the target event 504 is triggered. The event parameters corresponding to the target event 504 can be stored in the trigger scope 520. Controllers 5 to 7 associated with the trigger 502, as well as actions 5 to 9, can all access the event parameters; however, controllers 1 to 4, and actions 1 to 4, cannot access the data in the trigger scope 520.

[0086] The operation of micro-applications involves data transfer processes. For example, the event parameters of a screen mirroring event are required when executing the screen mirroring service call. Therefore, the event parameters need to be obtained during the call process so that subsequent service calls can be performed based on them. Thus, in one possible implementation, before executing the target call action corresponding to the target trigger, the first data storage area is accessed to read the event parameters corresponding to the target trigger event.

[0087] Step 404: Based on the event parameters, execute the target invocation action corresponding to the target trigger.

[0088] In one possible implementation, the computer device executes the target call action corresponding to the target trigger based on event parameters through the runtime module in the micro-application engine, so as to realize the call to the target service and thus realize the specific micro-application function of the micro-application.

[0089] It should be noted that the calling action in this application embodiment is essentially calling a certain service. By executing the target calling action, the target service is called to realize the micro-application function. For example, if the target calling action is a screenshot action, then the process of executing the screenshot action is the process of calling the screenshot service. The screenshot function of the micro-application is realized by calling the screenshot service.

[0090] In this embodiment of the application, the target service called by the computer device can be a service of the current device or a service of an external device, that is, cross-device service calls can be realized, thereby realizing the micro-application function of the target micro-application through interaction with external devices.

[0091] In addition, in this embodiment of the application, since the services of micro-applications support not only static deployment but also dynamic deployment during operation, the computer device needs to determine whether the target service has been deployed locally before calling the target service, and dynamically deploy the target service if it has not been deployed (for dynamic services).

[0092] It should be noted that when a microapplication contains multiple triggers, the computer device repeatedly executes steps 402 to 404 above, and after triggering the end trigger, executes the control logic of the end trigger to terminate the running of the microapplication.

[0093] In summary, in this embodiment, during the operation of a micro-application, the micro-application script is obtained, and the corresponding trigger in the micro-application script is triggered based on a triggering event, thereby executing the calling action corresponding to the trigger to realize the micro-application function. Since the operation of the micro-application is based on a low-code micro-application script, it requires less storage space compared to traditional applications. Furthermore, assembling calling actions into a micro-application and using the micro-application script to manage the calling relationships between calling actions achieves componentization of the micro-application, improves the reusability of calling actions between micro-applications, and helps reduce the development difficulty of micro-applications. In addition, during the operation of the micro-application, a dedicated data storage area is provided for different triggers, allowing the calling actions associated with the trigger to access this data storage area. This achieves the purpose of data transfer within the micro-application while avoiding data conflicts between different triggers.

[0094] In addition to the transmission of event parameters, the data transmission process involved in the operation of micro-applications also involves the transmission of service return values. For example, the "screenshot action" will return the captured image data, and the "image display action" needs to access the captured image data when it is executed. Therefore, in one possible implementation, a corresponding data space scope is also set for the service return value.

[0095] Please refer to Figure 6 It illustrates a flowchart of a method for operating a micro-application provided in another exemplary embodiment of this application, which is applied to... Figure 3 Taking the computer device shown as an example, the method includes:

[0096] Step 601: Obtain the target micro-application script of the target micro-application, which consists of at least one trigger.

[0097] Step 602: In response to the target trigger event, trigger the target trigger corresponding to the target trigger event in the target micro-application script.

[0098] Step 603: Read the event parameters corresponding to the target trigger event from the first data storage area. Different triggers correspond to different first data storage areas.

[0099] The implementation methods for steps 601 to 603 can be referred to the above embodiments, and will not be repeated here.

[0100] Step 604: When the target invocation action includes at least one target controller, at least one target simple action is executed through the control of at least one target controller based on the event parameters.

[0101] The action types for calling actions include simple action types and combined action types. Under the simple action type, the calling action consists of a single simple action. Under the combined action type, the calling action consists of at least one controller and at least one simple action. The controller is used to indicate the calling logic of the simple action.

[0102] like Figure 7The diagram illustrates a simple action type and a combined action type according to an exemplary embodiment of this application. When the action type of the invoked action is a simple action type, upon receiving event 1, trigger 1 corresponding to event 1 is triggered, and trigger 1 executes the simple action 701 to invoke the service. When the action type of the invoked action is a combined action type, upon receiving event 2, trigger 2 corresponding to event 2 is triggered, and trigger 2 executes the combined action 702. This combined action 702 consists of controllers 1 to 5 and actions 1 to 8, where actions 1 to 8 are all simple actions. During the execution of the invoked action, controllers 1 and 2 control the execution of action 1; controllers 1, 2, and 4 control the execution of action 2; controllers 1, 2, and 5 control the execution of actions 3 to 5; and controllers 1 and 3 control the execution of actions 6 to 8.

[0103] Since the simple action type invocation action contains only a single simple action and does not contain a controller, in one possible implementation, when the invocation action does not contain a controller, it can carry the event parameters of the target event, execute the target simple action, call the corresponding target service, and thus realize the micro-application function of the micro-application.

[0104] Simple action calls can only invoke a single service. However, in the actual application scenarios of micro-applications, if a certain micro-application function needs to be completed, a single simple action is often insufficient. It may require several simple actions to work together. Therefore, in order to achieve more complex micro-application functions, micro-applications provide a mechanism for developing combined action call types. By defining the calling logic between various simple actions through the controller, the combination of different simple actions can be achieved, thereby realizing more complex micro-application functions.

[0105] It should be noted that when the invoked action is a composite action type, it consists of several controllers and several simple actions, such as... Figure 7 The structure shown can be a multi-branch tree; where the leaf nodes of the tree are always "simple actions", the root node (the node connected to the trigger) is the controller, and the child nodes of the controller can be either controllers or simple actions; the child nodes of a simple action can be either simple actions or controllers. When the microapplication engine triggers the action through the trigger, it will traverse the entire tree sequentially from the controller of the root node, and according to the control logic of the controller, it will eventually traverse to different leaf nodes (simple actions) and execute the simple action.

[0106] For combined action types of invocation actions, during the operation of the micro-application, when the computer device receives the target trigger event, it triggers the target trigger corresponding to the target event, triggering the execution of at least one target simple action through at least one target controller to realize the invocation of the target service. During the execution of the target invocation action, both the target controller and the target simple action can read event parameters from the first data storage area. Through data transmission and action invocation, the micro-application function of the micro-application is realized.

[0107] In addition to the transmission of event parameters, the data transmission process during the operation of a micro-application also involves the transmission of service return values. For example, the "screenshot action" returns the captured image data, and the "image display action" needs to access the captured image data when it is executed. Therefore, in one possible implementation, a corresponding data space scope is also set for the service return value. In an exemplary example, step 604 may also include steps 604A to 604C.

[0108] Step 604A involves controlling the execution of a simple target action located on the parent node via the target controller, and obtaining target service data fed back after the execution of the simple target action located on the parent node.

[0109] like Figure 7 As shown, in the combined action 702, actions 7 and 8 are child nodes of action 6, meaning action 6 is the parent node. During the execution of this combined action 702, according to the scheduling logic, action 6 needs to be executed first, followed by action 8 and / or action 7. During the execution of action 7 or action 8, the service data fed back after the execution of action 6 may be needed. Schematic, when the target call action contains a simple action with a relationship like that between action 6 and action 7, it is determined that the target call action contains a target simple action located at the parent node and a target simple action located at the child node. Correspondingly, during the micro-application operation, the target controller first controls the execution of the target simple action located at the parent node. If the target service data can be obtained after executing the target simple action, the target service data can be stored in a specific data storage area so that it can be referenced when executing subsequent target simple actions.

[0110] Step 604B: Read the target service data from the second data storage area. Different simple actions of the target located in the parent node correspond to different second data storage areas.

[0111] To facilitate the transfer of target service data fed back by the target simple action located at the parent node to the target simple action located at the child node, in one possible implementation, a second data storage area is provided to store the target service data fed back after the target simple action located at the parent node is executed.

[0112] Optionally, to avoid data conflicts, different second data storage areas are set up for different target simple actions located on the parent node. These second data storage areas only allow target simple actions of child nodes associated with the target simple action of the same parent node to be called.

[0113] In one possible implementation, if the target simple action located on the child node needs to reference the target service data returned by the previous node during the execution of the target simple action, the target service data needs to be read from the second data storage area first, and then the target simple action located on the child node is executed based on the target service data.

[0114] Optionally, in the micro-application, a special symbol is set to reference the target service data from the child node scope (secondary data storage area). Schematic, this special symbol can be $, such as "showPicture=$picture", indicating that the action of displaying a picture references the picture in the child node scope.

[0115] Step 604C: Based on the target service data, execute the target simple action located in the child node.

[0116] In one possible implementation, after obtaining the target service data fed back by the previous node (parent node), the target service data can be referenced to execute the target simple action located on the child node, thereby realizing the invocation of the target service corresponding to the target simple action.

[0117] like Figure 8 The diagram illustrates the action of a child node in an exemplary embodiment of this application. Upon receiving event 801, trigger 802 corresponding to event 801 is activated. Controllers 1 and 2 control the invocation of a screenshot action and an image display action to achieve the screenshot display function. The image display action is a child node of the screenshot action. In the implementation of this screenshot display function, controller 2 first controls the execution of the screenshot action to obtain the target image captured after the screenshot action. This target image is stored in the child node scope 803. When the image display action is executed, the target image returned by the screenshot action needs to be displayed. Therefore, the target image needs to be called from the child node scope 803 and passed as an input parameter for image display. Optionally, since action 2 is also a child node of the screenshot action, if a target image is also needed when executing action 2, it can also be called from the child node scope 803.

[0118] Optionally, in addition to the first data storage area (trigger scope) and the second data storage area (child node scope) mentioned above, the data space scope of a micro-application also includes a third data storage area (global scope). This third data storage area stores the runtime environment parameters corresponding to the target micro-application, as well as user-defined parameters, such as the device information of the current computer device. Data stored in the third data storage area can be accessed by calls triggered by various triggers. That is, the data in the global scope can be accessed by all controllers and simple actions used by the micro-application.

[0119] like Figure 9 The diagram illustrates the relationship between child node scopes, trigger scopes, and global scopes in an exemplary embodiment of this application. The microapplication 900 includes a global scope 910, a trigger scope 920, and a child node scope 930. The microapplication's runtime environment parameters and custom parameters are stored in the global scope 910. Controllers and actions associated with triggers 901 and 902 can access data from the global scope 910. When a target event is received, the corresponding trigger 901 is triggered. The event parameters corresponding to the target event can be stored in the trigger scope 920. Controllers 1 to 4 associated with trigger 901, as well as actions 1 to 4, can access these event parameters. However, controllers 5 to 7, and actions 5 to 9 cannot access data in the trigger scope 920. The service data fed back after executing action 6 is stored in the child node scope 930, allowing actions 7 to 9 to access data in the child node scope 930 during execution. However, action 5 cannot access data in the child node scope 930.

[0120] In this embodiment, by dividing the scope into global scope, trigger scope, and child node scope, and defining the data reference relationships or restrictions between different scopes, the purpose of data transfer within the micro-application can be achieved while avoiding conflicts caused by excessive data.

[0121] To enable more complex micro-application functionalities, the concept of combined action types is introduced. A call action is composed of several controllers and several simple actions. In actual applications, there are various scheduling logics, such as cyclic scheduling, sequential scheduling, and conditional scheduling. To implement these scheduling logics, this embodiment defines a variety of controllers that indicate different scheduling logics. By combining different types of controllers, the micro-application functionality can be further enriched.

[0122] Please refer to Figure 10 It illustrates a flowchart of a method for operating a micro-application provided in another exemplary embodiment of this application, which is applied to... Figure 3Taking the computer device shown as an example, the method includes:

[0123] Step 1001: Obtain the target micro-application script of the target micro-application, which consists of at least one trigger.

[0124] Step 1002: In response to the target trigger event, trigger the target trigger corresponding to the target trigger event in the target micro-application script.

[0125] Step 1003: Read the event parameters corresponding to the target trigger event from the first data storage area. Different triggers correspond to different first data storage areas.

[0126] The implementation methods for steps 1001 and 1003 can be referred to the above embodiments, and will not be repeated here.

[0127] Step 1004: When the target invocation action includes at least one target controller, determine the target invocation logic indicated by the target controller.

[0128] When a target invocation action includes at least one target controller, the target controller is used to indicate the target invocation logic of at least one target simple action. For example, if the target controller is a loop controller, the target controller defines the loop condition of the target simple action, which is the action connected to the loop controller.

[0129] Step 1005: Based on the event parameters and the target invocation logic, execute the target's simple action.

[0130] In one possible implementation, the computer device executes a simple target action based on the target invocation logic corresponding to the target controller to invoke the target service, thereby realizing the specific application function of the micro-application; and in the process of executing the simple target action, the event parameters of the target event can be referenced.

[0131] The target controller can be a condition controller, a loop controller, a delay controller, a sequential controller, a selection controller, a parallel controller, etc. The embodiments of this application do not limit the controller type of the target controller.

[0132] Taking the target controller as a condition controller as an example, in an exemplary example, steps 1004 and 1005 can be replaced by steps 1004A and 1005A.

[0133] Step 1004A: When the target invocation action includes at least one target controller, determine the target scheduling conditions indicated by the target controller.

[0134] The condition controller is set with judgment conditions. Based on the judgment result of the conditions, it is necessary to determine whether to execute the target simple action corresponding to the branch or not.

[0135] In one possible implementation, when the target invocation action includes a condition controller, when the condition controller is executed, it is necessary to determine the target scheduling conditions indicated by the condition controller, and then determine the target simple action to be executed based on the target scheduling conditions.

[0136] Step 1005A: Based on the target scheduling conditions, determine the target simple action from the candidate simple actions and execute the target simple action.

[0137] In one possible implementation, based on the target scheduling conditions, a target simple action to be executed is determined from at least two candidate simple actions associated with the condition controller, and then the target simple action is executed to invoke the target service.

[0138] Furthermore, when determining the target simple action to be executed based on the target scheduling conditions, it is necessary to determine whether the event parameters meet the target scheduling conditions. If the target scheduling conditions are met, the target simple action corresponding to the yes branch is executed; otherwise, if the target scheduling conditions are not met, the target simple action corresponding to the no branch is executed.

[0139] like Figure 11 The diagram illustrates a condition controller according to an exemplary embodiment of this application. The target invocation action includes a condition controller 1101, a first controller 1102, a second action 1104, and a first action 1103. When the target invocation action is executed, a condition judgment result is first determined based on condition 1105 of the condition controller 1101. If the condition judgment result indicates that condition 1105 is met, the second action 1104 is executed under the control of the first controller 1102 corresponding to the yes branch. If the condition judgment result indicates that condition 1105 is not met, the first action 1103 corresponding to the no branch is executed.

[0140] Taking the target controller as a loop controller as an example, in an exemplary example, steps 1004 and 1005 can also be replaced by steps 1004B and 1005B.

[0141] Step 1004B: When the target invocation action includes at least one target controller, determine the target loop condition indicated by the target controller.

[0142] The loop controller is set with loop conditions, and the target simple action can only be stopped when the loop conditions are met.

[0143] It should be noted that since the loop controller can only define the loop condition and cannot define how two or more simple actions are called, the loop controller only has a single child node, which will be scheduled in a loop.

[0144] In one possible implementation, when the target invocation action includes a loop controller, when the loop controller is executed, it is necessary to determine the target loop condition indicated by the loop controller, and then determine the timing for stopping the execution of the target simple action based on the target loop condition.

[0145] Step 1005B: If the execution state of the target simple action does not meet the target loop condition, continue to execute the target simple action in a loop.

[0146] In one possible implementation, when the target controller is a loop controller, it means that the target simple action associated with the target controller needs to be executed cyclically, and the execution of the target simple action will only stop when the execution state of the target simple action meets the target loop condition. That is, when the loop controller is executed, it is necessary to determine whether the execution state of the target simple action meets the target loop condition. If the target loop condition is not met, the execution of the target simple action continues; otherwise, when the target loop condition is met, the execution of the target simple action stops.

[0147] Optionally, based on different target loop conditions, loop controllers can be divided into loop controllers with a certain number of cycles, loop until success controllers, and loop until failure controllers.

[0148] When the loop control is a count loop controller, when the count loop controller is executed, it is necessary to obtain the number of times the target simple action is executed and determine whether the number of executions has reached the count threshold indicated by the target loop condition. When the number of executions reaches the count threshold, the execution of the target simple action is stopped; otherwise, when the number of executions has not reached the count threshold, the execution of the target simple action continues until the number of executions of the target simple action reaches the count threshold.

[0149] When the loop controller is a loop until success controller, when the loop until success controller is executed, the target simple action needs to be executed repeatedly, and it needs to be determined whether the target service corresponding to the target simple action has been successfully called. If the target service is successfully called, the execution of the target simple action stops; otherwise, if the target service is not successfully called, the execution of the target simple action continues until the target service is successfully called.

[0150] When the loop controller is a loop until failure controller, when the loop until failure controller is executed, the target simple action needs to be executed repeatedly, and it needs to be determined whether the target service corresponding to the target simple action has been successfully called. If the target service is successfully called, the target simple action continues to be executed until the target service call fails; otherwise, the target simple action stops being executed when the target service call fails.

[0151] like Figure 12 The diagram illustrates a loop controller according to an exemplary embodiment of this application. When the target call action includes a loop controller 1201, a first controller 1202, and a first action 1203, during the execution of the target call action, the first controller 1202 controls the loop execution of the first action 1203 until the number of executions of the first action 1203 reaches a threshold, at which point the execution of the first action 1203 stops. When the target call action includes a loop until success controller 1204, a second controller 1205, and a second action 1206, during the execution of the target call action, the second controller 1205 controls the loop execution of the second action 1206 until the second action 1206 is successfully executed, at which point the execution of the second action 1206 stops. When the target call action includes a loop until failure controller 1207, a third controller 1208, and a third action 1209, during the execution of the target call action, the third controller 1208 controls the loop execution of the third action 1209 until the third action 1209 fails, at which point the execution of the third action 1209 stops.

[0152] Taking the target controller as a delay controller as an example, in an exemplary example, steps 1004 and 1005 can also be replaced by steps 1004C and 1005C.

[0153] Step 1004C: When the target invocation action includes at least one target controller, determine the target invocation delay indicated by the target controller.

[0154] The delay controller defines a call delay, and the target simple action can only be executed when the call delay is reached.

[0155] It should be noted that since the delay controller can only define the call delay and cannot define how two or more simple actions are called, the delay controller only has a single child node, which will be executed after a certain delay.

[0156] In one possible implementation, when the target invocation action includes a delay controller, when the delay controller is executed, it is necessary to determine the target invocation delay indicated by the delay controller, and then execute the associated target simple action after extending the target invocation delay.

[0157] Step 1005C: After the target call delay is reached, execute the target simple action.

[0158] In one possible implementation, when the target controller is a delay controller, it means that a certain delay is required before its associated child nodes can be executed. That is, when the delay controller is executed, it is necessary to determine whether the target call delay has been reached. If the target call delay has been reached, the target simple action is executed. Otherwise, if the target call delay has not been reached, it is necessary to wait until the target call delay is reached before the target simple action can be executed.

[0159] like Figure 13 The diagram illustrates a delay controller according to an exemplary embodiment of this application. The child nodes of the delay controller can be other controllers or actions. When the target call action includes a first delay loop controller 1301 and a first action 1302, the first action 1302 is executed only after the target call delay is reached during the execution of the target call action. When the target call action includes a second delay controller 1303, a first controller 1304, and a second action 1305, the second action 1305 is executed by the first controller 1304 after the target call delay is reached during the execution of the target call action.

[0160] Taking the target controller as a sequence controller as an example, in an exemplary example, steps 1004 and 1005 can be replaced by steps 1004D and 1005D.

[0161] Step 1004D: When the target invocation action includes at least one target controller, determine the target invocation order corresponding to each candidate simple action indicated by the target controller.

[0162] The sequence controller is used to define the execution order of several simple actions. Correspondingly, a sequence controller generally contains at least two child nodes, that is, the sequence controller is associated with at least two candidate simple actions.

[0163] In one possible implementation, when the target invocation action includes a sequence controller, when the sequence controller is executed, it is necessary to determine the target invocation order of each candidate simple action indicated by the sequence controller, and then execute the target simple actions sequentially based on the target invocation order.

[0164] Step 1005D: Based on the target invocation order, candidate simple actions are determined as target simple actions in sequence, and each target simple action is executed in sequence.

[0165] In one possible implementation, the execution order of each candidate simple action is determined based on the target call order, and each candidate simple action is determined as the target simple action in turn. Each target simple action is executed in turn. That is, each candidate simple action associated with the sequence controller needs to be executed. Only after all candidate simple actions have been executed can the same micro-application function be realized.

[0166] Furthermore, during the execution of target simple actions based on the target invocation sequence, the execution of the (n+1)th target simple action can only continue after the nth target simple action is executed successfully, until all candidate simple actions are executed successfully; conversely, if the nth target simple action fails, subsequent target simple actions cannot be executed, and the execution of the (n+1)th target simple action is stopped. In other words, each child node of the sequence controller is scheduled sequentially, and execution stops as soon as any child node fails.

[0167] like Figure 14 The diagram illustrates a condition controller according to an exemplary embodiment of this application. The target invocation action includes a sequence controller 1401, a first controller 1402, a first action 1403, a second action 1404, a second controller 1405, and a third action 1406. The sequence controller 1401 defines the invocation order between the actions as first action 1403-second action 1404-third action 1406. When the target invocation action is executed, based on the invocation order indicated by the sequence controller 1401, the first controller 1402 first controls the execution of the first action 1403. After the first action 1403 is successfully executed, the second action 1404 is executed. After the second action 1404 is successfully executed, the second controller 1405 controls the execution of the third action 1406.

[0168] Taking the target controller as the selection controller as an example, in an exemplary example, steps 1004 and 1005 can be replaced by steps 1004E and 1005E.

[0169] Step 1004E: When the target invocation action includes at least one target controller, determine the target invocation sequence indicated by the target controller.

[0170] The selection controller can also define the execution order of several simple actions. Correspondingly, the selection controller generally contains at least two child nodes, that is, the selection controller is associated with at least two candidate simple actions. Unlike the sequence controller, the child nodes of the selection controller are scheduled in sequence, and return when a child node is successfully executed. In other words, multiple child nodes corresponding to the selection controller can implement the same micro-application function.

[0171] In one possible implementation, when the target invocation action includes a selection controller, when the selection controller is executed, it is necessary to determine the target invocation order of each candidate simple action indicated by the selection controller, and then execute the target simple actions sequentially based on the target invocation order until the target simple action is successfully executed.

[0172] Step 1005E: Based on the target call order, execute the candidate simple actions in sequence; when a candidate simple action is successfully executed, determine the candidate simple action as the target simple action and stop executing other candidate simple actions.

[0173] In one possible implementation, each candidate simple action is executed sequentially based on the execution order of the candidate simple actions indicated by the target invocation order. When a candidate simple action is executed successfully, it is determined as the target simple action, and the execution of other candidate simple actions is stopped. Conversely, if a candidate simple action fails to execute, other candidate simple actions continue to be executed according to the target invocation order.

[0174] like Figure 15 The diagram illustrates a selection controller according to an exemplary embodiment of this application. The target invocation action includes a selection controller 1501, a first controller 1502, a first action 1503, a second action 1504, a second controller 1505, and a third action 1506. The selection controller 1501 defines the invocation order between the actions as first action 1503-second action 1504-third action 1506. When the target invocation action is executed, based on the invocation order indicated by the selection controller 1501, the first controller 1502 prioritizes the execution of the first action 1503. If the first action 1503 is executed successfully, the second action 1504 and the third action 1506 do not need to be executed. If the first action 1503 fails, the second action 1504 continues to be executed. If the second action 1504 is executed successfully, the third action 1506 does not need to be executed. If the second action 1504 fails, the second controller 1505 needs to control the execution of the third action 1506.

[0175] Taking the target controller as a parallel controller as an example, in an exemplary example, step 1005 can be replaced by step 1005F.

[0176] Step 1005F: Determine each candidate simple action as the target simple action, and execute each target simple action in parallel.

[0177] In this context, a parallel controller represents a system that needs to execute several simple actions in parallel. Correspondingly, a typical parallel controller also contains at least two child nodes, meaning that the parallel controller is associated with at least two candidate simple actions.

[0178] In a possible implementation, when a parallel controller is included in a target call action, when the execution reaches the parallel controller, each candidate simple action associated with the parallel controller is determined as a target simple action, and then each target simple action is executed in parallel.

[0179] As Figure 16 shown, it shows a schematic diagram of a parallel controller shown in an exemplary embodiment of the present application. The target call action includes a parallel controller 1601, a first controller 1602, a first action 1603, a second action 1604, a second controller 1605, and a third action 1606; when the target call action is executed, the first action 1603, the second action 1604, and the third action 1606 are executed in parallel, that is, the first controller 1602 is triggered to control the execution of the first action 1603, the second action 1604 is triggered to be executed, and the second controller 1605 is triggered to execute the third action 1606.

[0180] Optionally, the target call action may include a combination of several controllers and may include different types of controllers to implement more complex call actions. Schematically, the definition of a target call action including multiple controllers in a micro application script may be:

[0181] <?xml version="1.0" encoding="UTF-8"?>

[0182] <Micro application>

[0183] <Trigger list>

[0184] <Trigger event="Event 1">

[0185] <Parallel controller>

[0186] <Action A parameter1="" parameter2="">

[0187] <Action B parameter1="$ Action A return parameter" / >

[0188] < / Action A>

[0189] <Selection controller>

[0190] <Action C parameter="" / >

[0191] <Action D / >

[0192] <Action E / >

[0193] < / Selection controller>

[0194] < / Parallel controller>

[0195] < / Trigger>

[0196] <Trigger event="Event 2">

[0197] <Condition Controller>

[0198] <Expression Condition expression="Expression 1">

[0199] <True Branch>

[0200] <Action B / >

[0201] < / True Branch>

[0202] <False Branch>

[0203] <Action C / >

[0204] < / False Branch>

[0205] < / Condition Controller>

[0206] < / Trigger>

[0207] < / Trigger List>

[0208] < / Micro Application>

[0209] It can be seen from this definition that this micro - application is implemented by XML syntax. This micro - application includes two triggers: the trigger corresponding to the event "Event 1" and the trigger corresponding to the event "Event 2". Among them, the invocation actions associated with the trigger event "Event 1" consist of a parallel controller, a selection controller, and Actions A to E; the invocation actions associated with the trigger event "Event 2" consist of a condition controller, Action B, and Action C.

[0210] In this embodiment, the control logics of various controllers included in the invocation actions are defined, enabling the combination of several simple actions through the combination of various controllers to support the choreography logic of more complex invocation actions, thereby meeting the application development requirements of developers in different complex scenarios.

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

[0212] Please refer to Figure 17 , which shows the structural block diagram of the running device of the micro - application provided by an embodiment of the present application. This device may include:

[0213] A script acquisition module 1701, configured to acquire a target micro - application script of a target micro - application, where the target micro - application script is composed of at least one trigger;

[0214] Trigger module 1702 is used to trigger the target trigger corresponding to the target trigger event in the target micro-application script in response to the target trigger event;

[0215] The data reading module 1703 is used to read the event parameters corresponding to the target triggering event from the first data storage area. Different triggers correspond to different first data storage areas.

[0216] The action invocation module 1704 is used to execute the target invocation action corresponding to the target trigger based on the event parameters.

[0217] Optionally, the action type of the target invocation action includes a simple action type and a combined action type. Under the simple action type, the target invocation action consists of a single target simple action. Under the combined action type, the target invocation action consists of at least one target controller and at least one target simple action. The target controller is used to indicate the target invocation logic of the target simple action.

[0218] The action invocation module 1704 includes:

[0219] The first action invocation unit is used to control the execution of at least one target simple action through at least one target controller when the target invocation action includes at least one target controller.

[0220] Optionally, the target invocation action includes a target simple action located at the parent node and a target simple action located at the child node;

[0221] The first action invocation unit is further configured to:

[0222] The target controller controls the execution of the target simple action located at the parent node, and obtains the target service data fed back after the execution of the target simple action located at the parent node;

[0223] The target service data is read from the second data storage area. Different simple actions of the target located in the parent node correspond to different second data storage areas.

[0224] Based on the target service data, execute the target simple action located at the child node.

[0225] Optionally, the device further includes:

[0226] The data storage module is used to store the runtime environment parameters corresponding to the target micro-application in a third data storage area, which is accessible by the calling actions triggered by each of the triggers.

[0227] Optionally, the action type of the target invocation action includes a simple action type and a combined action type. Under the simple action type, the target invocation action consists of a single target simple action. Under the combined action type, the target invocation action consists of at least one target controller and at least one target simple action. The target controller is used to indicate the target invocation logic of the target simple action.

[0228] The action invocation module 1704 includes:

[0229] The first determining unit is configured to determine the target invocation logic indicated by the target controller when the target invocation action includes at least one target controller;

[0230] The second action invocation unit is used to execute the target simple action based on the target invocation logic.

[0231] Optionally, the target controller is a condition controller, which is associated with at least two candidate simple actions;

[0232] The first determining unit is further configured to:

[0233] Determine the target scheduling conditions indicated by the target controller;

[0234] The second action invocation unit is also used for:

[0235] Based on the target scheduling conditions, the target simple action is determined from the candidate simple actions, and the target simple action is executed.

[0236] Optionally, the target controller is a loop controller;

[0237] The first determining unit is further configured to:

[0238] Determine the target loop condition indicated by the target controller;

[0239] The second action invocation unit is also used for:

[0240] If the execution state of the target simple action does not meet the target loop condition, the target simple action continues to be executed in a loop.

[0241] Optionally, the second action invocation unit is further configured to:

[0242] If the number of times the target simple action is executed has not reached the threshold, the target simple action will continue to be executed repeatedly.

[0243] If the target service corresponding to the target simple action fails to be invoked, the target simple action will continue to be executed in a loop.

[0244] If the target service corresponding to the target simple action does not fail to be invoked, the target simple action will continue to be executed in a loop.

[0245] Optionally, the target controller is a delay controller;

[0246] The first determining unit is further configured to:

[0247] Determine the target call delay indicated by the target controller;

[0248] The second action invocation unit is also used for:

[0249] After the target call delay is reached, the target simple action is executed.

[0250] Optionally, the target controller is a sequential controller, which is associated with at least two candidate simple actions;

[0251] The first determining unit is further configured to:

[0252] Determine the target invocation order corresponding to each of the candidate simple actions indicated by the target controller;

[0253] The second action invocation unit is also used for:

[0254] Based on the target invocation order, the candidate simple actions are sequentially determined as the target simple actions, and each target simple action is executed sequentially.

[0255] Optionally, the second action invocation unit is further configured to:

[0256] After the nth simple action is successfully executed, continue to execute the (n+1)th simple action.

[0257] The device further includes:

[0258] The stop execution module is used to stop the execution of the (n+1)th target simple action after the nth target simple action fails.

[0259] Optionally, the target controller is a selection controller, which is associated with at least two candidate simple actions;

[0260] The first determining unit is further configured to:

[0261] Determine the target invocation order indicated by the target controller;

[0262] The second action invocation unit is also used for:

[0263] Based on the target invocation order, the candidate simple actions are executed sequentially;

[0264] Once a candidate simple action is successfully executed, the candidate simple action is determined as the target simple action, and the execution of other candidate simple actions is stopped.

[0265] Optionally, the target controller is a parallel controller, which is associated with at least two of the candidate simple actions;

[0266] The second action invocation unit is also used for:

[0267] Each of the candidate simple actions is determined as the target simple action, and each of the target simple actions is executed in parallel.

[0268] In summary, in this embodiment, during the operation of a micro-application, the micro-application script is obtained, and the corresponding trigger in the micro-application script is triggered based on a triggering event, thereby executing the calling action corresponding to the trigger to realize the micro-application function. Since the operation of the micro-application is based on a low-code micro-application script, it requires less storage space compared to traditional applications. Furthermore, assembling calling actions into a micro-application and using the micro-application script to manage the calling relationships between calling actions achieves componentization of the micro-application, improves the reusability of calling actions between micro-applications, and helps reduce the development difficulty of micro-applications. In addition, during the operation of the micro-application, a dedicated data storage area is provided for different triggers, allowing the calling actions associated with the trigger to access this data storage area. This achieves the purpose of data transfer within the micro-application while avoiding data conflicts between different triggers.

[0269] Please refer to Figure 18 This diagram illustrates a structural block diagram of a computer device provided in an exemplary embodiment of this application. The computer device 1800 can be implemented as a source device or a destination device in the various embodiments described above. The computer device 1800 may include one or more components such as a processor 1810 and a memory 1820.

[0270] Processor 1810 may include one or more processing cores. Processor 1810 connects to various parts of the computer device 1800 using various interfaces and lines, and performs various functions and processes data of the computer device 1800 by running or executing instructions, programs, code sets, or instruction sets stored in memory 1820, and by calling data stored in memory 1820. Optionally, processor 1810 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 1810 may integrate one or more of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), Neural-network Processing Unit (NPU), and modem. Specifically, the CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed on the touch screen; the NPU is used to implement Artificial Intelligence (AI) functions; and the modem is used for wireless communication. It is understandable that the aforementioned modem may not be integrated into the processor 1810, but may be implemented as a separate chip.

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

[0272] In addition, those skilled in the art will understand that the structure of the computer device 1800 shown in the above figures does not constitute a limitation on the computer device. The computer device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the computer device 1800 also includes a display screen, camera assembly, microphone, speaker, radio frequency circuit, input unit, sensors (such as accelerometer, angular velocity sensor, light sensor, etc.), audio circuit, WiFi module, power supply, Bluetooth module, etc., which will not be described in detail here.

[0273] This application also provides a computer-readable storage medium storing at least one piece of program code, which is loaded and executed by a processor to implement the micro-application operation method described in the above embodiments.

[0274] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the micro-application operation method provided in various optional implementations of the above aspects.

[0275] It should be understood that "multiple" as used herein refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. Furthermore, the step numbers described herein are merely illustrative of one possible execution order. In some other embodiments, the steps may not be executed in numerical order, such as two steps with different numbers being executed simultaneously, or two steps with different numbers being executed in the reverse order of the illustration. This application does not limit this.

[0276] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for operating a micro-application, characterized in that, The method includes: Obtain the target micro-application script of the target micro-application. The target micro-application script consists of at least one trigger. The target micro-application is used to implement specific business logic through calls between services. The target micro-application script is used to control the call relationship between services in the target micro-application and contains the service identifier of the called service. In response to a target triggering event, the target trigger corresponding to the target triggering event in the target micro-application script is triggered; The event parameters corresponding to the target triggering event are read from the first data storage area corresponding to the target trigger. Different triggers correspond to different first data storage areas. Based on the event parameters, the target invocation action corresponding to the target trigger is executed. The execution of the target invocation action is used to invoke the target service. The target service is either a statically deployed service or a dynamically deployed service. If the dynamically deployed service is not deployed locally, it is downloaded and deployed from the cloud service library.

2. The method according to claim 1, characterized in that, The target invocation action includes simple action type and combined action type. Under the simple action type, the target invocation action consists of a single target simple action. Under the combined action type, the target invocation action consists of at least one target controller and at least one target simple action. The target controller is used to indicate the target invocation logic of the target simple action. The execution of the target invocation action corresponding to the target trigger includes: When the target invocation action includes at least one of the target controllers, at least one of the target simple actions is executed through the control of at least one of the target controllers.

3. The method according to claim 2, characterized in that, The target invocation action includes a target simple action located in the parent node and a target simple action located in the child node; The execution of at least one of the target simple actions by controlling at least one of the target controllers includes: The target controller controls the execution of the target simple action located at the parent node, and obtains the target service data fed back after the execution of the target simple action located at the parent node; The target service data is read from the second data storage area. Different simple actions of the target located in the parent node correspond to different second data storage areas. Based on the target service data, execute the target simple action located at the child node.

4. The method according to claim 1, characterized in that, The method further includes: The runtime environment parameters corresponding to the target micro-application are stored in a third data storage area, which is accessible by the invocation actions triggered by each of the triggers.

5. The method according to any one of claims 1 to 4, characterized in that, The target invocation action includes simple action type and combined action type. Under the simple action type, the target invocation action consists of a single target simple action. Under the combined action type, the target invocation action consists of at least one target controller and at least one target simple action. The target controller is used to indicate the target invocation logic of the target simple action. The execution of the target invocation action corresponding to the target trigger includes: When the target invocation action includes at least one of the target controllers, the target invocation logic indicated by the target controller is determined; Based on the target invocation logic, execute the target simple action.

6. The method according to claim 5, characterized in that, The target controller is a condition controller, which is associated with at least two candidate simple actions; The step of determining the target invocation logic indicated by the target controller includes: Determine the target scheduling conditions indicated by the target controller; The execution of the target simple action based on the target invocation logic includes: Based on the target scheduling conditions, the target simple action is determined from the candidate simple actions, and the target simple action is executed.

7. The method according to claim 5, characterized in that, The target controller is a loop controller; The step of determining the target invocation logic indicated by the target controller includes: Determine the target loop condition indicated by the target controller; The execution of the target simple action based on the target invocation logic includes: If the execution state of the target simple action does not meet the target loop condition, the target simple action continues to be executed in a loop.

8. The method according to claim 7, characterized in that, The step of continuing to execute the target simple action when the execution state of the target simple action does not meet the target loop condition includes any of the following: If the number of times the target simple action is executed has not reached the threshold, the target simple action will continue to be executed repeatedly until the number of times the target simple action is executed reaches the threshold. If the target service corresponding to the target simple action fails to be invoked, the target simple action will continue to be executed in a loop until the target service is invoked successfully. If the target service corresponding to the target simple action does not fail to be invoked, the target simple action continues to be executed in a loop until the target service invocation fails.

9. The method according to claim 5, characterized in that, The target controller is a time-delay controller; The step of determining the target invocation logic indicated by the target controller includes: Determine the target call delay indicated by the target controller; The execution of the target simple action based on the target invocation logic includes: After the target call delay is reached, the target simple action is executed.

10. The method according to claim 5, characterized in that, The target controller is a sequential controller, which is associated with at least two candidate simple actions; The step of determining the target invocation logic indicated by the target controller includes: Determine the target invocation order corresponding to each of the candidate simple actions indicated by the target controller; The execution of the target simple action based on the target invocation logic includes: Based on the target invocation order, the candidate simple actions are sequentially determined as the target simple actions, and each target simple action is executed sequentially.

11. The method according to claim 10, characterized in that, The sequential execution of each of the target simple actions includes: After the nth objective simple action is successfully executed, continue to execute the (n+1)th objective simple action; The method further includes: If the nth target simple action fails to execute, stop executing the (n+1)th target simple action.

12. The method according to claim 5, characterized in that, The target controller is a selection controller, which is associated with at least two candidate simple actions; The step of determining the target invocation logic indicated by the target controller includes: Determine the target invocation order indicated by the target controller; The execution of the target simple action based on the target invocation logic includes: Based on the target invocation order, the candidate simple actions are executed sequentially; when a candidate simple action is successfully executed, the candidate simple action is determined as the target simple action, and the execution of other candidate simple actions is stopped.

13. The method according to claim 5, characterized in that, The target controller is a parallel controller, and the parallel controller is associated with at least two candidate simple actions; The execution of the target simple action based on the target invocation logic includes: Each of the candidate simple actions is determined as the target simple action, and each of the target simple actions is executed in parallel.

14. A device for operating a micro-application, characterized in that, The device includes: The script acquisition module is used to acquire the target micro-application script of the target micro-application. The target micro-application script consists of at least one trigger. The target micro-application is used to implement specific business logic through service calls. The target micro-application script is used to control the call relationship between services in the target micro-application and contains the service identifier of the called service. The triggering module is used to respond to a target triggering event and trigger the target triggering event corresponding to the target triggering event in the target micro-application script; The data reading module is used to read the event parameters corresponding to the target triggering event from the first data storage area corresponding to the target trigger. Different triggers correspond to different first data storage areas. The action invocation module is used to execute the target invocation action corresponding to the target trigger based on the event parameters. Executing the target invocation action is used to invoke the target service. The target service is either a statically deployed service or a dynamically deployed service. If the dynamically deployed service is not deployed locally, it is downloaded and deployed from the cloud service library.

15. A computer device, characterized in that, The computer device includes a processor and a memory; the memory stores at least one instruction, which is executed by the processor to implement the method of running the microapplication as described in any one of claims 1 to 13.

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

17. A computer program product, characterized in that, The computer program product includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions to cause the computer device to perform the method of running the microapplication as described in any one of claims 1 to 13.