Application program running method and device, equipment and storage medium
By deploying launchers and applications in electronic devices and using the common functional modules integrated into the launcher to achieve common functions, the problem of each business function in the prior art requires the development of a separate application, and the development efficiency and operation stability are improved.
Patent Information
- Application Number
- CN202411882285.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-15
AI Technical Summary
In the prior art, each business function requires the development of corresponding applications, resulting in high development costs, low efficiency, and high probability of errors in functional modules during application runtime.
Deploy the initiator and multiple applications in the electronic device. The initiator integrates the shared functional modules of multiple applications, and the applications integrate unique functional modules respectively. By calling common functional modules in the initiator, general functions are realized and functional module integration of applications is reduced.
Improves code reuse rate, reduces application development costs and development cycles, and improves application runtime stability and business processing stability.
Smart Images

Figure CN119829147A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to the field of Internet of Things technology. Background Art
[0002] With the development of Internet of Things technology, the application of electronic devices such as smart office equipment and smart home equipment is becoming more and more extensive. These electronic devices are generally used to realize set business functions and bring convenience to work or daily life.
[0003] Electronic devices can provide a variety of business functions. Currently, a corresponding application is generally developed for each business function. Then, the electronic devices provide different business functions to users by running different application programs. Summary of the invention
[0004] The present disclosure provides an application program running method, apparatus, device and storage medium.
[0005] According to a first aspect of the present disclosure, there is provided an application running method, which is applied to an electronic device, wherein a launcher and a plurality of applications are deployed in the electronic device, wherein the launcher integrates a first common function module of the plurality of applications, and each application integrates a unique function module, the method comprising:
[0006] running a first application among the plurality of applications;
[0007] In response to determining that the first application calls an access interface of a second common function module in the first common function module, the launcher is controlled to execute a processing flow of the second common function module.
[0008] According to a second aspect of the present disclosure, there is provided an application running device, which is applied to an electronic device, wherein a launcher and a plurality of applications are deployed in the electronic device, wherein the launcher integrates a first common function module of the plurality of applications, and each application integrates a unique function module, and the device comprises:
[0009] A program running unit, configured to run a first application program among the plurality of application programs;
[0010] The first response unit controls the launcher to execute the processing flow of the second common function module in response to determining that the first application calls the access interface of the second common function module in the first common function module.
[0011] According to a third aspect of the present disclosure, there is provided an electronic device, including:
[0012] at least one processor; and
[0013] a memory communicatively connected to the at least one processor; wherein,
[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.
[0015] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the first aspect.
[0016] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein the computer program implements the method described in the first aspect when executed by a processor.
[0017] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, a launcher and multiple applications are deployed in the electronic device, wherein the launcher integrates the first common function modules of the multiple applications, and each application integrates a unique function module. In this way, when the first application is running, the electronic device can control the launcher to execute the processing flow of the second common function module in response to determining that the first application calls the access interface of the second common function module in the first common function module. It can be seen that when the first application is running, it implements specific business logic based on its own unique function module, and implements general functions based on the common function modules integrated by the launcher. In this way, the first application and the launcher cooperate with each other to jointly implement the business function corresponding to the first application.
[0018] In addition, since the launcher integrates the common functional modules of multiple applications, the application can implement common functions by calling the common functional modules integrated in the launcher. In this way, during the application development phase, you only need to focus on developing the specific business logic of the application, without developing common functions, which significantly improves the code reuse rate, reduces the development cost of the application, and improves the development efficiency of the application, thereby shortening the business development cycle. In addition, since there is no need to integrate common functions in the application, the number of functional modules integrated in the application is reduced, which reduces the probability of functional modules errors when the application is running, improves the stability of the application when it is running, and thus improves the stability of business processing.
[0019] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0021] Figure 1 A flowchart of a first application program running method provided in an embodiment of the present disclosure;
[0022] Figure 2 A flowchart of a second application program running method provided in an embodiment of the present disclosure;
[0023] Figure 3 A flowchart of an application deployment method provided in an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of the relationship between an application and a launcher provided in an embodiment of the present disclosure;
[0025] Figure 5 A schematic diagram of the architecture of a launcher provided in an embodiment of the present disclosure;
[0026] Figure 6a A comparative schematic diagram of an application development process provided by an embodiment of the present disclosure;
[0027] Figure 6b A comparative schematic diagram of an application deployment process provided by an embodiment of the present disclosure;
[0028] Figure 7 A schematic diagram of the structure of an application program running device provided in an embodiment of the present disclosure;
[0029] Figure 8 The present invention is a block diagram of an electronic device used to implement the application program running method provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0031] First, the application scenarios of the embodiments of the present disclosure are introduced.
[0032] The application scenario of the embodiment of the present disclosure is: a scenario in which a service function is provided based on the installation of an application program in an electronic device.
[0033] The electronic device may provide a variety of business functions. The embodiments of the present disclosure do not limit the above business functions, and they may be specifically set according to actual business needs.
[0034] In one case, the above application scenarios may be scenarios such as smart offices and smart parks.
[0035] In the above scenario, the business functions may include conference reservation function, equipment repair function, conference room central control function, etc.
[0036] In the related art, a corresponding application is generally developed for each business function, and then the electronic device provides different business functions for users by running different applications. In this way, common functions such as registration, activation, upgrade, and log storage need to be developed separately for each application, resulting in high development costs and low development efficiency.
[0037] In view of the above situation, an embodiment of the present disclosure provides an application running solution.
[0038] The following is a detailed description of the application program running solution provided by the embodiment of the present disclosure.
[0039] The application program running solution provided by the embodiment of the present disclosure is applied to an electronic device, in which a launcher (Launcher) and multiple application programs are deployed.
[0040] The launcher is a software program installed in an electronic device, in which a first common functional module of a plurality of application programs is integrated, and the first common functional module encapsulates a processing flow or processing logic of a common function.
[0041] The first common function module may also be called a basic function module, a general function module, etc., which can be understood as some function modules that need to be implemented by multiple applications, and is used to provide common functions for multiple applications. The common functions may also be called general functions or basic functions.
[0042] The embodiment of the present disclosure does not specifically limit the first common functional module.
[0043] For example, the first common functional module may be a module for implementing functions such as application upgrade, communication, and logging, and details will be described later.
[0044] Each of the above-mentioned applications is integrated with a unique functional module. The unique functional module can be a module used by the application to implement specific business logic, that is, it encapsulates a specific business processing flow or business processing logic; the unique functional module can also be a unique module that needs to be relied upon when implementing business logic, that is, it encapsulates a processing flow or business logic that needs to be relied upon when implementing business logic.
[0045] See also Figure 1, which is a flow chart of the first application running method provided in the embodiment of the present disclosure, the method includes the following steps S101-S102.
[0046] Step S101: running a first application among multiple applications.
[0047] The first application may be any one of a plurality of applications.
[0048] As can be seen from the above introduction, each application program is integrated with a unique functional module. Therefore, the first application program, as one of the multiple application programs, is also integrated with its own unique functional module.
[0049] Step S102: in response to determining that the first application program calls the access interface of the second common function module in the first common function module, controlling the launcher to execute the processing flow of the second common function module.
[0050] The first application integrates its own unique function module, but does not integrate the first common function module. Therefore, the first application does not have general functions. When the first application implements business functions, it not only needs the functions provided by the unique function module, but also needs to rely on general functions. Therefore, the first application needs to implement general functions by calling the access interface of the first common function module.
[0051] Each first common function module integrated in the launcher can expose an access interface to the outside for external application program to call. In this way, the first application program can call the access interface of the first common function module.
[0052] When the first application program calls the access interface of the first common functional module, the access interface of the second functional module to be called can be determined from among the plurality of first common functional modules according to the code setting and the requirements.
[0053] For example, when the first application detects that it has not been registered or activated, it can call the application registration module and the application activation module; for another example, when the first application detects that it has a functional abnormality, it can call the exception capture module, etc.
[0054] Furthermore, when the first application calls the access interface of the second common function module, it may call the access interface of each second common function module that needs to be called in sequence, or may call the access interfaces of multiple second common function modules that need to be called in parallel, which is reasonable.
[0055] In this way, the electronic device can control the launcher to execute the processing flow of the second common function module in response to the first application calling the access interface of the second common function module, thereby providing the first application with the common functions corresponding to the second common module.
[0056] The first application integrates its own unique function module, and the launcher integrates the common function module. Therefore, when the first application is running, it actually implements specific business logic based on its own unique function module and implements general functions based on the common function module integrated by the launcher. In this way, the first application and the launcher cooperate with each other to jointly implement the business functions corresponding to the first application.
[0057] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, a launcher and multiple applications are deployed in the electronic device, wherein the launcher integrates the first common function modules of the multiple applications, and each application integrates a unique function module. In this way, when the first application is running, the electronic device can control the launcher to execute the processing flow of the second common function module in response to determining that the first application calls the access interface of the second common function module in the first common function module. It can be seen that when the first application is running, it implements specific business logic based on its own unique function module, and implements general functions based on the common function modules integrated by the launcher. In this way, the first application and the launcher cooperate with each other to jointly implement the business function corresponding to the first application.
[0058] In addition, since the launcher integrates the common functional modules of multiple applications, the application can implement common functions by calling the common functional modules integrated in the launcher. In this way, during the application development phase, you only need to focus on developing the specific business logic of the application, without developing common functions, which significantly improves the code reuse rate, reduces the development cost of the application, and improves the development efficiency of the application, thereby shortening the business development cycle. In addition, since there is no need to integrate common functions in the application, the number of functional modules integrated in the application is reduced, which reduces the probability of functional modules errors when the application is running, improves the stability of the application when it is running, and thus improves the stability of business processing.
[0059] In addition, through functional modularization, the common functional modules of multiple applications are integrated into the launcher, which realizes the decoupling between general functions and specific business logic. The subsequent addition or modification of general functions can be easily completed on the launcher side, reducing the difficulty and cost of business maintenance.
[0060] The first common functional module is introduced in detail below.
[0061] In one embodiment of the present disclosure, the first common function module may include a first function module for assisting in realizing a unique function, a communication function module, and a second function module for interacting with an operating system.
[0062] Among them, the first functional module that assists in realizing unique functions can be understood as: a common module or a general module that the application needs to rely on when realizing unique functions; the communication functional module can be understood as: a module used to implement a commonly used communication framework; the second functional module that interacts with the operating system can be understood as: a functional module that needs to be called by the operating system.
[0063] In this way, functional modules at multiple levels can be integrated into the launcher, including modules that assist in implementing unique functions, modules that implement commonly used communication frameworks, and functional modules that require operating system calls. Based on these functional modules, general functions at multiple levels can be provided to the application, which is beneficial for the application to implement various businesses based on the general functions at multiple levels, thereby improving business processing effects and stability.
[0064] The following is an introduction to the above three types of modules.
[0065] 1. The first functional module that assists in realizing unique functions
[0066] Specifically, the first functional module may include at least one of the following modules:
[0067] Application upgrade module, log storage module, exception capture module, screenshot module, function debugging module, and tracking point detection module.
[0068] Among them, the application upgrade module is used to update the running version of the application; the log storage module is used to store the log information generated during the operation of the application; the exception capture module is used to capture the exceptions generated by the application during operation; the screenshot module is used to capture the image of the application interface; the function debugging module is used to perform relevant debugging on the application. When the electronic device is a terminal with an Android system such as a mobile phone or a tablet phone, the function debugging module may include the Android Debug Bridge (ADB) tool to achieve communication and debugging between the computer and the terminal device; the tracking point detection module is used to preset checkpoints in the application to collect data generated during the operation of the application, so as to facilitate subsequent performance analysis or troubleshooting of the application.
[0069] It should be noted that the above content is only an example introduction to the first functional module, and the staff can integrate other first functional modules in the launcher based on experience and / or actual scenario requirements.
[0070] 2. Communication function module
[0071] Specifically, the communication function module may include an inter-device communication module or an inter-process communication module.
[0072] Among them, the inter-device communication module encapsulates the inter-device communication framework, such as the Hypertext Transfer Protocol (HTTP) communication framework, the Message Queuing Telemetry Transport (MQTT) communication framework, etc.
[0073] The inter-process communication module encapsulates the inter-process communication framework, such as the Android Interface Definition Language (AIDL) communication framework, the Binder communication framework, etc.
[0074] In one case, if the electronic device is a high-performance device such as a mobile phone or a tablet computer, the device-to-device communication module in the launcher can integrate the HTTP communication framework; if the electronic device is a low-performance device such as a smart home appliance or a wearable device, the device-to-device communication module in the launcher can integrate the MQTT communication framework.
[0075] 3. The second functional module that interacts with the operating system
[0076] Specifically, the second functional module may include at least one of the following modules:
[0077] Sensor management module, virtual button management module, system upgrade module, application keep-alive module, device information acquisition module, time calibration module, timed restart module, external hardware control module.
[0078] Among them, the sensor management module is used to start, shut down, and call various sensors deployed in electronic devices, such as fingerprint sensors, light sensors, temperature sensors, inertial sensors, and gyroscopes, etc.; the virtual key management module is used to display or hide virtual keys such as virtual navigation keys. This module can reduce the probability of people accidentally touching virtual keys and causing erroneous operations; the system upgrade module is used to upgrade the operating system version; the application keep-alive module is used to provide an application keep-alive mechanism to reduce the probability of the application being stopped by the operating system due to insufficient system resources, etc., to ensure the stable operation of the application, which is conducive to improving user experience and reducing equipment failure rate; the device information acquisition module is used to obtain various device information such as device IP, serial number, hardware address, etc. of the electronic device; the time calibration module is used to calibrate the system time; the scheduled restart module is used to control the application to restart at a set time; the external hardware control module allows users to manage the external hardware of the electronic device, such as managing the light ring switch, brightness, color, etc. set around the electronic device.
[0079] It can be seen that the common functional modules at all levels in the launcher can include specific modules with rich types. Based on the specific modules with rich types, the general needs of the application can be more comprehensively met, thereby eliminating the need to develop the above-mentioned specific modules in the application, further improving the code reuse rate and application development efficiency.
[0080] exist Figure 1 Based on the embodiment shown, the electronic device can also display the user interaction interface of the launcher, and perform program switching in response to receiving a program switching operation triggered on the user interaction interface. In view of the above situation, the embodiment of the present disclosure provides another application program running method.
[0081] See also Figure 2 , which is a flow chart of a second application running method provided in an embodiment of the present disclosure, the method includes the following steps S201-S205.
[0082] Step S201: Run a first application among multiple applications.
[0083] Step S202: in response to determining that the first application program calls the access interface of the second common function module in the first common function module, controlling the launcher to execute the processing flow of the second common function module.
[0084] The above steps S201-S202 are the same as the above steps Figure 1 In the illustrated embodiment, steps S101 and S102 are the same and will not be described in detail here.
[0085] Step S203: Displaying the user interaction interface of the launcher.
[0086] The launcher is integrated with a user interaction interface, which provides functional interfaces of multiple functions, including a functional interface of a program switching function.
[0087] In this way, the program switching operation can be triggered in the function interface of the program switching function.
[0088] Step S204: in response to receiving a program switching operation triggered on the user interaction interface, stopping the first application and running the target application.
[0089] In this step, you can use a variety of methods to switch programs. The target application programs are different in different methods, which are introduced below.
[0090] In one implementation, multiple application logos are displayed in the user interaction interface. In this case, in response to receiving a program switching operation triggered on the user interaction interface, the application corresponding to the logo selected in the program switching operation can be determined as the target application.
[0091] That is, the target application is: the application corresponding to the identifier selected by the program switching operation.
[0092] Then, the first application is stopped and the target application is run, that is, the currently running first application is switched to another application.
[0093] In this way, the target application corresponding to the identifier selected by the program switching operation can be determined according to the program switching operation triggered on the user interaction interface, and then the first application can be switched to the target application, thereby conveniently realizing flexible switching between different applications and thus realizing flexible switching between different business functions.
[0094] In another embodiment, the running version information of the first application is displayed in the user interaction interface. In this case, in response to receiving a program switching operation triggered on the user interaction interface, the application corresponding to the running version information selected by the program switching operation can be determined as the target application.
[0095] That is, the target application is: the application corresponding to the running version information selected by the program switching operation.
[0096] Then, the first application is stopped and the target application is run, that is, the running version of the currently running first application is switched to another running version.
[0097] In this way, based on the program switching operation triggered on the user interaction interface, the running version information of the first application corresponding to the identifier selected by the program switching operation can be determined, and then the first application can be switched to the target application corresponding to the running version information, that is, the running version of the currently running first application can be switched to other running versions, thereby conveniently realizing flexible switching between different running versions of the application.
[0098] The following is a detailed introduction to the running version information.
[0099] In one case, the running version information may include test version information, which may specifically include test version information of multiple test versions of the first application currently installed, or may be one test version information of the test version information of multiple test versions of the first application currently installed.
[0100] In another case, the running version information may include published version information, which may specifically include published version information of multiple published versions of the first application currently installed, or may be one of the published version information of multiple published versions of the first application currently installed.
[0101] In another case, the running version information may include test version information and released version information, wherein the test version information and the released version information may be one or more.
[0102] It can be seen that the running version information of the first application may include test version information and released version information. In this way, when the program is switched through the running version information selected by the program switching operation, the running version of the first application can be flexibly switched to the test version, or the running version of the first application can be switched to the released version information according to actual needs, thereby improving the flexibility and applicability of the solution.
[0103] Step S205: in response to determining that the target application calls the access interface of the third common function module in the first common function module, controlling the launcher to execute the processing flow of the third common function module.
[0104] The implementation of the above step S205 can refer to the above Figure 1 In step S202 of the illustrated embodiment, the only difference is that the first application is replaced by the target application and the second common functional module is replaced by the third common module, which will not be described in detail here.
[0105] In this embodiment, the electronic device can stop running the first application and run the target application in response to the program switching operation triggered on the user interaction interface of the launcher, and the switched target application can also implement the general function by calling the access interface of the common function module integrated in the launcher. It can be seen that this realizes the efficient and flexible switching of the application and improves the applicability of the solution.
[0106] In one embodiment of the present disclosure, the launcher is integrated with an automatic deployment function of the application program, so that the first application program can be automatically deployed based on the launcher before the first application program is run. In view of the above situation, an embodiment of the present disclosure provides an application program deployment method.
[0107] See also Figure 3 , is a flow chart of an application deployment method provided in an embodiment of the present disclosure, the method includes the following steps S301-S302.
[0108] Step S301: in response to determining that an application deployment condition for a first application is met, controlling a launcher to obtain application deployment data of the first application from a background server.
[0109] First, the above application deployment conditions are introduced.
[0110] In one case, the application deployment condition may include: receiving a deployment operation triggered on a user interaction interface of the launcher to instruct deployment of the first application program.
[0111] As can be seen from the above introduction, the user interaction interface of the launcher can include multiple functional interfaces, including an application deployment interface, so the above deployment operation can be triggered based on selecting the identifier of the first application in the application deployment interface. At this time, the electronic device receives the above deployment operation and can be considered to have met the application deployment conditions of the first application.
[0112] In another case, the application deployment condition may include receiving a deployment notification of the first application program sent by the background server.
[0113] In this case, the application to be deployed may be configured in the background server, and the background server may be controlled to send a deployment notification of the application to be deployed to the electronic device.
[0114] In this case, if the electronic device receives a deployment notification of the first application sent by the background server, it can be considered that the application deployment condition of the first application is met.
[0115] In another case, the application deployment condition may include: receiving the above deployment operation triggered in the user interaction interface of the launcher, and receiving a deployment notification of the first application program sent by the background server.
[0116] In this embodiment, when the electronic device receives the above deployment operation triggered by the user interaction interface of the launcher, it can determine that the deployment conditions of the first application are met; it can also determine that the deployment conditions of the first application are met when receiving the deployment notification of the first application sent by the background server. That is, the application to be deployed can be flexibly determined through two methods: interface operation and background configuration, so that the launcher automatically deploys the above application, which improves the efficiency and flexibility of application deployment.
[0117] Among them, the electronic device can store the access address of the application deployment data corresponding to each first application in the background server. In this way, after the electronic device determines that the deployment conditions of the first application are met, it can control the launcher to obtain the application deployment data of the first application from the background server.
[0118] In one embodiment of the present disclosure, the electronic device may be controlled to restart in response to determining that an application deployment condition for a first application is met; then, during the initialization process of the electronic device, the launcher is controlled to obtain application deployment data of the first application from a background server.
[0119] In this way, since the electronic device has determined that the application deployment conditions of the first application are met, the electronic device can be restarted, and during the initialization process, the launcher can be controlled to obtain the application deployment data of the first application from the background server, so that after the device completes initialization, the first application can be quickly deployed based on the application deployment data.
[0120] Step S302: deploying a first application program in the electronic device based on the application deployment data.
[0121] The application deployment data includes an installation package of the first application program, so that the electronic device can install the first application program by executing the installation package.
[0122] In one embodiment of the present disclosure, in addition to the installation package of the first application, the application deployment data may also include at least one of a configuration file of the first application and activation information of the first application. In this case, after the electronic device installs the first application, it may also configure the first application based on the configuration file; it may also use activation parameters to activate the first application. When the first application is activated based on the launcher, the launcher may use AIDL to send the activation parameters to the first application to activate the first application.
[0123] In this way, when deploying the first application, the electronic device can not only obtain the installation package of the first application based on the launcher, but also obtain the configuration file and activation information of the first application based on the launcher, and then can realize automatic configuration and automatic activation of the first application based on the configuration file and activation information respectively, thereby improving the deployment efficiency of the first application.
[0124] In this embodiment, the electronic device can control the launcher to obtain the application deployment data of the first application from the background server in response to determining that the application deployment condition for the first application is met, and then the first application can be deployed in the electronic device based on the application deployment data. It can be seen that the solution provided by the embodiment of the present disclosure can automatically deploy the application in the electronic device based on the launcher, improve the deployment efficiency of the application, and reduce the probability of errors when deploying and configuring the application.
[0125] Based on the introduction of the aforementioned embodiment, the relationship between the application and the launcher is intuitively introduced below.
[0126] See also Figure 4 , Figure 4 The device repair application, conference booking application, conference room control application and launcher are shown in FIG.
[0127] Among them, the first dotted box from top to bottom represents: the above three applications need to implement various basic functions such as application registration, activation, upgrade, log, restart, screenshot, inter-device communication, inter-process communication, etc. These basic functions are all implemented through the general functions, basic capabilities and common technologies provided by the launcher. Specifically, they are implemented by calling the access interface of the common functional modules of the launcher.
[0128] The second dotted box from top to bottom represents: the business logic integrated in the above three applications, which can interact with the business logic in the launcher to implement functions such as application upgrades.
[0129] The following is an introduction to a specific architecture of the launcher.
[0130] See also Figure 5 , the following is an analysis of the view, communication, storage, and main functions. Figure 5 The launcher shown is introduced.
[0131] 1. View
[0132] The launcher includes an activation page, a main page, and a settings page. The activation page is a page used to configure and activate the application; the settings page is a page that displays various setting functions. For a detailed introduction to the setting functions, please refer to the subsequent instructions; the main page is the initial page, through which you can jump to the above-mentioned activation page and settings page.
[0133] 2. Communication
[0134] The launcher integrates an inter-device communication framework and an inter-process communication framework, wherein the inter-device communication framework may include an HTTP communication framework and an MQTT communication framework, etc.; the inter-process communication framework may include an AIDL communication framework, etc.
[0135] 3. Storage
[0136] The data generated during the launcher's operation is stored in the SharedPreferences storage class.
[0137] 4. Main functions
[0138] The main functions integrated into the launcher include:
[0139] Initialize deployment-related functions, such as service environment switching and business switching. Service environment switching can refer to switching the running version of the application, such as switching the online released version to the offline internal version.
[0140] Basic operation and maintenance functions may include application upgrades, device screenshots, scheduled restarts, function debugging, time calibration, log storage, exception capture, and point detection.
[0141] The setting function may include functions for performing relevant settings for the launcher and displaying device information, including restoring factory settings, configuring or displaying server addresses, configuring or displaying device Internet Protocol (IP) addresses, restarting the launcher, displaying the application version of the launcher, displaying the device's hardware address Media Access Control Address (MAC), network detection, launcher system settings, displaying the device serial number, etc.
[0142] Among them, when applying the above-mentioned application upgrade function, the launcher can establish an Erlang message queue telemetry transmission agent (Erlang MQTT Broker, EMQ) long connection with the background server, receive the upgrade instructions sent by the background server through the above-mentioned long connection, and download the corresponding application installation package according to the instruction content, thereby completing the application upgrade based on the installation package.
[0143] It can be seen that the launcher in the embodiment of the present disclosure provides a detailed device information display interface and an operation interface, which can improve the user's operating experience and satisfaction.
[0144] The following is a comparison between the application development process based on the solution provided by the embodiment of the present disclosure and the application development process in the related art.
[0145] See also Figure 6a , Figure 6a The process above the middle arrow represents the application development process in the related technology, including business development, activation logic development, operation and maintenance capability building, basic information display, testing and launch; the process below the arrow represents the application development process based on the solution provided by the embodiment of the present disclosure, including business development, launcher function integration, testing and launch.
[0146] It can be seen that compared with the related art, the general functions of the application development process provided by the solution of the embodiment of the present disclosure are modularized, and the general functions of the application such as activation logic development, operation and maintenance capability construction, and basic information display are integrated into the launcher. In this way, there is no need to develop the above-mentioned general functions for each application, which reduces the difficulty and complexity of business application development. And the launcher can be reused in multiple projects, which improves the code reuse rate. In addition, by integrating the general functions into the launcher, the stable operation of the business application can be guaranteed and the equipment failure rate can be reduced.
[0147] The following compares the application deployment process based on the solution provided by the embodiment of the present disclosure with the application deployment process in the related art.
[0148] See also Figure 6b , Figure 6b The process above the middle arrow represents the application deployment process in the related technology, including device power-on, flashing, boot check, background configuration and online, where flashing refers to flashing the application installation package into the device. The process below the arrow represents the application deployment process based on the solution provided by the embodiment of the present disclosure, including background configuration, online and switching, where background configuration refers to configuring the application to be deployed on the background server, so that the launcher can automatically deploy and configure the application to realize the online application; switching refers to switching different applications, thereby realizing the switching of different business functions.
[0149] It can be seen that compared with the related technology, in the application deployment process based on the solution provided by the embodiment of the present disclosure, the application can be automatically deployed in the electronic device based on the launcher, which reduces the cost required to deploy the application, improves the deployment efficiency of the application, and reduces the probability of errors when deploying and configuring the application.
[0150] Corresponding to the above-mentioned application running method, the embodiment of the present disclosure also provides an application running device.
[0151] See also Figure 7 , is a structural diagram of an application running device provided by an embodiment of the present disclosure, the device is applied to an electronic device, a launcher and multiple applications are deployed in the electronic device, wherein the launcher integrates a first common function module of the multiple applications, and each application integrates a unique function module, including the following units:
[0152] A program running unit 701, configured to run a first application program among the plurality of application programs;
[0153] The first responding unit 702 controls the launcher to execute a processing flow of the second common function module in response to determining that the first application calls an access interface of the second common function module in the first common function module.
[0154] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, a launcher and multiple applications are deployed in the electronic device, wherein the launcher integrates the first common function modules of the multiple applications, and each application integrates a unique function module. In this way, when the first application is running, the electronic device can control the launcher to execute the processing flow of the second common function module in response to determining that the first application calls the access interface of the second common function module in the first common function module. It can be seen that when the first application is running, it implements specific business logic based on its own unique function module, and implements general functions based on the common function modules integrated by the launcher. In this way, the first application and the launcher cooperate with each other to jointly implement the business function corresponding to the first application.
[0155] In addition, since the launcher integrates the common functional modules of multiple applications, the application can implement common functions by calling the common functional modules integrated in the launcher. In this way, during the application development phase, you only need to focus on developing the specific business logic of the application, without developing common functions, which significantly improves the code reuse rate, reduces the development cost of the application, and improves the development efficiency of the application, thereby shortening the business development cycle. In addition, since there is no need to integrate common functions in the application, the number of functional modules integrated in the application is reduced, which reduces the probability of functional modules errors when the application is running, improves the stability of the application when it is running, and thus improves the stability of business processing.
[0156] In addition, through functional modularization, the common functional modules of multiple applications are integrated into the launcher, which realizes the decoupling between general functions and specific business logic. The subsequent addition or modification of general functions can be easily completed on the launcher side, reducing the difficulty and cost of business maintenance.
[0157] In one embodiment of the present disclosure, the device further includes:
[0158] An interface display unit, used to display a user interaction interface of the launcher;
[0159] a second response unit, configured to stop running the first application in response to receiving a program switching operation triggered on the user interaction interface;
[0160] A target application running unit, used for running a target application program;
[0161] A third response unit is configured to control the launcher to execute a processing flow of the third common function module in response to determining that the target application calls an access interface of the third common function module in the first common function module.
[0162] In this embodiment, the electronic device can stop running the first application and run the target application in response to the program switching operation triggered on the user interaction interface of the launcher, and the switched target application can also implement the general function by calling the access interface of the common function module integrated in the launcher. It can be seen that this realizes the efficient and flexible switching of the application and improves the applicability of the solution.
[0163] In one embodiment of the present disclosure, the identifiers of the multiple application programs are displayed in the user interaction interface; the target application program includes: the application program corresponding to the identifier selected by the program switching operation.
[0164] In this way, the target application corresponding to the identifier selected by the program switching operation can be determined according to the program switching operation triggered on the user interaction interface, and then the first application can be switched to the target application, thereby conveniently realizing flexible switching between different applications and thus realizing flexible switching between different business functions.
[0165] In one embodiment of the present disclosure, the running version information of the first application is displayed in the user interaction interface; the target application includes: the application corresponding to the running version information selected by the program switching operation.
[0166] In this way, based on the program switching operation triggered on the user interaction interface, the running version information of the first application corresponding to the identifier selected by the program switching operation can be determined, and then the first application can be switched to the target application corresponding to the running version information, that is, the running version of the currently running first application can be switched to other running versions, thereby conveniently realizing flexible switching between different running versions of the application.
[0167] In one embodiment of the present disclosure, the running version information includes at least one of the following information:
[0168] Test version information, released version information.
[0169] It can be seen that the running version information of the first application may include test version information and released version information. In this way, when the program is switched through the running version information selected by the program switching operation, the running version of the first application can be flexibly switched to the test version, or the running version of the first application can be switched to the released version information according to actual needs, thereby improving the flexibility and applicability of the solution.
[0170] In one embodiment of the present disclosure, the device further includes:
[0171] a data acquisition unit, configured to control the launcher to acquire application deployment data of the first application from a background server in response to determining that an application deployment condition for the first application is met before the program running unit 701 is triggered;
[0172] A program deployment unit is used to deploy the first application program in the electronic device based on the application deployment data.
[0173] In this embodiment, the electronic device can control the launcher to obtain the application deployment data of the first application from the background server in response to determining that the application deployment condition for the first application is met, and then the first application can be deployed in the electronic device based on the application deployment data. It can be seen that the solution provided by the embodiment of the present disclosure can automatically deploy the application in the electronic device based on the launcher, improve the deployment efficiency of the application, and reduce the probability of errors when deploying and configuring the application.
[0174] In one embodiment of the present disclosure, the application deployment condition includes at least one of the following conditions:
[0175] receiving a deployment operation triggered on a user interaction interface of the launcher indicating selection of deployment of the first application;
[0176] A deployment notification of the first application program sent by a backend server is received.
[0177] In this embodiment, when the electronic device receives the above deployment operation triggered by the user interaction interface of the launcher, it can determine that the deployment conditions of the first application are met; it can also determine that the deployment conditions of the first application are met when receiving the deployment notification of the first application sent by the background server. That is, the application to be deployed can be flexibly determined through two methods: interface operation and background configuration, so that the launcher automatically deploys the above application, which improves the efficiency and flexibility of application deployment.
[0178] In one embodiment of the present disclosure, the program deployment unit is specifically used to control the electronic device to restart in response to determining that the application deployment condition is met; during the initialization process of the electronic device, control the launcher to obtain the application deployment data from the background server.
[0179] In this way, since the electronic device has determined that the application deployment conditions of the first application are met, the electronic device can be restarted, and during the initialization process, the launcher can be controlled to obtain the application deployment data of the first application from the background server, so that after the device completes initialization, the first application can be quickly deployed based on the application deployment data.
[0180] In one embodiment of the present disclosure, the application deployment data includes: an installation package of the first application program and at least one of the following data:
[0181] a configuration file of the first application and activation information of the first application;
[0182] The program deployment unit is specifically used to install the first application in the electronic device by executing the installation package; configure the first application based on the configuration file; and / or activate the first application using the activation parameter.
[0183] In this way, when deploying the first application, the electronic device can not only obtain the installation package of the first application based on the launcher, but also obtain the configuration file and activation information of the first application based on the launcher, and then can realize automatic configuration and automatic activation of the first application based on the configuration file and activation information respectively, thereby improving the deployment efficiency of the first application.
[0184] In one embodiment of the present disclosure, the first common functional module includes:
[0185] A first functional module for assisting in realizing unique functions, a communication functional module, and a second functional module for interacting with an operating system.
[0186] In this way, functional modules at multiple levels can be integrated into the launcher, including modules that assist in implementing unique functions, modules that implement commonly used communication frameworks, and functional modules that require operating system calls. Based on these functional modules, general functions at multiple levels can be provided to the application, which is beneficial for the application to implement various businesses based on the general functions at multiple levels, thereby improving business processing effects and stability.
[0187] In one embodiment of the present disclosure, the first functional module includes at least one of the following modules:
[0188] Application upgrade module, log storage module, exception capture module, screenshot module, function debugging module, and tracking point detection module;
[0189] The communication function module includes: an inter-device communication module and / or an inter-process communication module;
[0190] The second functional interface includes at least one of the following modules:
[0191] Sensor management module, virtual button management module, system upgrade module, application keep-alive module, device information acquisition module, time calibration module, timed restart module, external hardware control module.
[0192] It can be seen that the common functional modules at all levels in the launcher can include specific modules with rich types. Based on the specific modules with rich types, the general needs of the application can be more comprehensively met, thereby eliminating the need to develop the above-mentioned specific modules in the application, further improving the code reuse rate and application development efficiency.
[0193] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0194] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0195] Figure 8 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0196] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0197] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0198] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the application running method. For example, in some embodiments, the application running method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the application running method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the application running method in any other appropriate manner (e.g., by means of firmware).
[0199] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0200] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0201] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0202] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0203] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0204] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0205] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0206] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for running an application program, applied to an electronic device, wherein a launcher and a plurality of application programs are deployed in the electronic device, wherein: The launcher is integrated with a first common function module of the plurality of application programs, and each application program is respectively integrated with a unique function module. The method includes: running a first application among the plurality of applications; In response to determining that the first application calls an access interface of a second common function module in the first common function module, the launcher is controlled to execute a processing flow of the second common function module.
2. The method according to claim 1, further comprising: Displaying the user interaction interface of the launcher; In response to receiving a program switching operation triggered on the user interaction interface, stopping the running of the first application; Run the target application; In response to determining that the target application calls an access interface of a third common function module in the first common function module, the launcher is controlled to execute a processing flow of the third common function module.
3. The method according to claim 2, wherein: Displaying the identifications of the multiple application programs in the user interaction interface; The target application includes: an application corresponding to the identifier selected by the program switching operation.
4. The method according to claim 2, wherein: Displaying the running version information of the first application in the user interaction interface; The target application includes: the application corresponding to the running version information selected by the program switching operation.
5. The method according to claim 4, wherein: The running version information includes at least one of the following information: Test version information, released version information.
6. The method according to claim 1, wherein: The method further comprises: Before running the first application, in response to determining that an application deployment condition for the first application is met, controlling the launcher to obtain application deployment data of the first application from a background server; Based on the application deployment data, the first application is deployed in the electronic device.
7. The method according to claim 6, wherein: The application deployment condition includes at least one of the following conditions: receiving a deployment operation triggered on a user interaction interface of the launcher to instruct deployment of the first application; A deployment notification of the first application program sent by a backend server is received.
8. The method according to claim 6, wherein: In response to determining that the application deployment condition for the first application is met, controlling the launcher to obtain application deployment data of the first application from the background server includes: In response to determining that the application deployment condition is met, controlling the electronic device to restart; During the initialization process of the electronic device, the launcher is controlled to obtain the application deployment data from the background server.
9. The method according to claim 6, wherein: The application deployment data includes: an installation package of the first application and at least one of the following data: a configuration file of the first application and activation information of the first application; The deploying the first application program in the electronic device based on the application deployment data includes: Installing the first application in the electronic device by executing the installation package; Based on the configuration file, configure the first application; and / or, use the activation parameters to activate the first application.
10. The method according to any one of claims 1 to 9, wherein: The first common functional module includes: A first functional module for assisting in realizing unique functions, a communication functional module, and a second functional module for interacting with an operating system.
11. The method according to claim 6, wherein: The first functional module includes at least one of the following modules: Application upgrade module, log storage module, exception capture module, screenshot module, function debugging module, and tracking point detection module; The communication function module includes: an inter-device communication module and / or an inter-process communication module; The second functional interface includes at least one of the following modules: Sensor management module, virtual button management module, system upgrade module, application keep-alive module, device information acquisition module, time calibration module, timed restart module, external hardware control module.
12. An application running device, applied to an electronic device, wherein a launcher and a plurality of applications are deployed in the electronic device, wherein: The launcher is integrated with a first common function module of the plurality of application programs, and each application program is respectively integrated with a unique function module. The device comprises: A program running unit, configured to run a first application program among the plurality of application programs; The first response unit controls the launcher to execute the processing flow of the second common function module in response to determining that the first application calls the access interface of the second common function module in the first common function module.
13. The device according to claim 12, further comprising: An interface display unit, used to display a user interaction interface of the launcher; a second response unit, configured to stop running the first application in response to receiving a program switching operation triggered on the user interaction interface; A target application running unit, used for running a target application program; A third response unit is configured to control the launcher to execute a processing flow of the third common function module in response to determining that the target application calls an access interface of the third common function module in the first common function module.
14. The device according to claim 13, wherein: Displaying the identifications of the multiple application programs in the user interaction interface; The target application includes: an application corresponding to the identifier selected by the program switching operation.
15. The apparatus according to claim 13, further comprising: Displaying the running version information of the first application in the user interaction interface; The target application includes: the application corresponding to the running version information selected by the program switching operation.
16. The device according to claim 15, wherein: The running version information includes at least one of the following information: Test version information, released version information.
17. The device according to claim 12, wherein: The device also includes: a data acquisition unit, configured to control the launcher to acquire application deployment data of the first application from a background server in response to determining that an application deployment condition for the first application is met before the program execution unit is triggered; A program deployment unit is used to deploy the first application program in the electronic device based on the application deployment data.
18. The device according to claim 17, wherein: The application deployment condition includes at least one of the following conditions: receiving a deployment operation triggered on a user interaction interface of the launcher indicating selection of deployment of the first application; A deployment notification of the first application program sent by a backend server is received.
19. The device according to claim 17, wherein: The program deployment unit is specifically configured to control the electronic device to restart in response to determining that the application deployment condition is met; and to control the launcher to obtain the application deployment data from a background server during the initialization process of the electronic device.
20. The device according to claim 17, wherein: The application deployment data includes: an installation package of the first application and at least one of the following data: a configuration file of the first application and activation information of the first application; The program deployment unit is specifically used to install the first application in the electronic device by executing the installation package; configure the first application based on the configuration file; and / or activate the first application using the activation parameter.
21. The device according to any one of claims 12 to 20, wherein: The first common functional module includes: A first functional module for assisting in realizing unique functions, a communication functional module, and a second functional module for interacting with an operating system.
22. The device according to claim 21, wherein The first functional module includes at least one of the following modules: Application upgrade module, log storage module, exception capture module, screenshot module, function debugging module, and tracking point detection module; The communication function module includes: an inter-device communication module and / or an inter-process communication module; The second functional interface includes at least one of the following modules: Sensor management module, virtual button management module, system upgrade module, application keep-alive module, device information acquisition module, time calibration module, timed restart module, external hardware control module.
23. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 11.
24. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-11.
25. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 11.