Application program running method and system, electronic equipment and storage medium
By determining the target runtime environment platform during the embedded operating system startup process, it supports the download and execution of applications from multiple different runtime environments, solving the problem of existing embedded operating systems being incompatible with applications from different ecosystems, and achieving multi-application compatibility within the same operating system.
Patent Information
- Application Number
- CN202411202240.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2026-02-10
AI Technical Summary
Existing embedded operating systems can only download and run applications that match the runtime environment, virtual machine, and application programming interface, and cannot be compatible with applications from different ecosystems, making it impossible to run multiple applications within the same embedded operating system.
During the startup process of the embedded operating system, the target runtime environment platform is determined from multiple different runtime environment platforms through the runtime environment platform management module, and its startup is controlled, supporting the download, installation and running of applications in multiple different runtime environments.
This enables applications from different ecosystems to run within the same embedded operating system, improving the compatibility of the embedded operating system and meeting the diverse application needs of external entities.
Smart Images

Figure CN121501352A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to an application running method, system, electronic device, and storage medium. Background Technology
[0002] In resource-constrained embedded operating systems, applications typically need to be developed according to industry-specific technical specifications. Embedded operating systems that can only run a single application are called Native Card Operating Systems (Native COS), lacking the ability to download and run new applications. Embedded operating systems that meet the needs of multiple business domains and support the downloading and running of multiple applications are called multi-application operating systems. Based on the runtime environment supporting application execution and the programming languages and interfaces required for application development, we further classify operating systems into runtime environment-dependent multi-application operating systems, such as Javacard embedded operating systems.
[0003] Figure 1a This can be a schematic diagram of the structure corresponding to a Javacard embedded operating system, such as... Figure 1a As shown, the Javacard embedded operating system includes a Runtime Environment (RTE), a Virtual Machine (VM), and an Application Programming Interface (API). An embedded operating system has common underlying modules, including communication management modules, algorithm interface modules, and storage resource management modules, responsible for supporting the runtime environment of multiple applications. Card Manager, as a multi-application management module, is also a special application with card management capabilities developed based on the runtime environment, VM, and API. Native Applications, independent of the application runtime environment, are pre-installed local applications within the operating system, developed and run based on the underlying capabilities, and cannot be downloaded to the operating system later.
[0004] However, existing embedded operating systems (such as Figure 1a As shown, only applications that match the runtime environment, virtual machine, and application programming interface can be downloaded and run. That is, the final executable file compiled and converted by the application must be consistent with the runtime environment. Therefore, the above-mentioned embedded operating system can only download and run one type of executable file. Different application ecosystems in the same field are not compatible. Application executable files that run on other embedded operating systems cannot be downloaded, installed, or run. Summary of the Invention
[0005] This invention provides an application running method, system, electronic device, and storage medium that can meet the needs of external entities to download, install, and run applications based on different operating environments, enabling the running of applications from different ecosystems within the same embedded operating system and improving the compatibility of the embedded operating system.
[0006] According to one aspect of the present invention, an application running method is provided, executed by an application running system configured in an embedded operating system; the method includes:
[0007] During the startup process of an embedded operating system, a target runtime environment platform to be started is determined from multiple different runtime environment platforms;
[0008] Control the target runtime environment platform to start up and run the target application that matches the target runtime environment platform.
[0009] According to another aspect of the present invention, an application running system is provided, the application running system comprising: an operating system base layer, an application running layer, an application layer, and a running environment platform management module;
[0010] The operating system base layer includes: a storage management module, a transaction management module, an algorithm interface module, and a communication management module;
[0011] The application runtime layer includes multiple different runtime environment platforms;
[0012] The application layer includes applications that match each runtime platform, local applications, and a multi-application management module.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the application running method described in any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the application running method described in any embodiment of the present invention.
[0018] The technical solution provided by this invention, through the means of determining a target runtime environment platform to be started among multiple different runtime environment platforms during the startup process of the embedded operating system, controlling the target runtime environment platform to start, and running a target application that matches the target runtime environment platform, can meet the needs of external entities to download, install, and run applications based on different runtime environments. It can flexibly switch between different runtime environment platforms according to the actual application scenario requirements. Compared with the existing technology where the embedded operating system only supports a single runtime environment and application, it can realize the running of applications from different ecosystems within the same embedded operating system, thereby improving the compatibility of the embedded operating system.
[0019] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1a This is a schematic diagram of the structure of a Javacard embedded operating system in the prior art;
[0022] Figure 1b This is a flowchart of an application running method provided according to an embodiment of the present invention;
[0023] Figure 2 This is a flowchart of another application running method provided according to an embodiment of the present invention;
[0024] Figure 3 This is a schematic diagram of the structure of an application running system according to an embodiment of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the application running method of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] Figure 1b This is a flowchart illustrating an application execution method provided by an embodiment of the present invention. This embodiment is applicable to situations where multiple applications based on different runtime environments are run within the same embedded operating system. The method can be executed by an application execution system configured within the embedded operating system. The method includes:
[0029] Step 110: During the startup process of the embedded operating system, determine the target runtime environment platform to be started from among multiple different runtime environment platforms.
[0030] In this embodiment, multiple different application runtime environments can be pre-deployed in the application runtime system, and each runtime environment supports one or more applications. Each application runtime environment can be an independent Runtime Environment Platform (REP). Each runtime environment platform has its own independent virtual machine, runtime environment, and application programming interface necessary for application execution.
[0031] Simultaneously, the application runtime system can also deploy a Runtime Environment Platform Manager (REPM) module and a Card Manager module. The REPM module manages all runtime environment platforms, such as performing operations like registration, activation, startup, and recycling. The Card Manager module manages applications based on different runtime environment platforms, such as supporting external entities to download, install, delete, and run applications.
[0032] In one specific embodiment, in the application runtime system, multiple different runtime environment platforms reuse the same volatile storage space and user data space. The user data space is stored in non-volatile storage space and includes application datasets and module assemblies. The volatile storage space stores global variables, indirect variable stacks, virtual machine stacks, and module datasets provided by each runtime environment platform for application execution, including temporary data within the application datasets. All runtime environment platforms in the application runtime system share the same data storage services, transaction management mechanisms, communication management mechanisms, and algorithm services.
[0033] The advantage of this setup is that by reusing the same volatile storage space and user data space across multiple different operating environment platforms, the storage space occupied by data can be saved, and the utilization rate of storage resources can be improved.
[0034] In this step, optionally, after the embedded operating system is detected to be running, the runtime environment platform management module can determine a runtime environment platform to be started (i.e., the target runtime environment platform) from among several pre-deployed different runtime environment platforms according to the actual application scenario requirements.
[0035] Step 120: Control the target runtime environment platform to start and run the target application that matches the target runtime environment platform.
[0036] The technical solution provided by this invention, through the means of determining a target runtime environment platform to be started among multiple different runtime environment platforms during the startup process of the embedded operating system, controlling the target runtime environment platform to start, and running a target application that matches the target runtime environment platform, can meet the needs of external entities to download, install, and run applications based on different runtime environments. It can flexibly switch between different runtime environment platforms according to the actual application scenario requirements. Compared with the existing technology where the embedded operating system only supports a single runtime environment and application, it can realize the running of applications from different ecosystems within the same embedded operating system, thereby improving the compatibility of the embedded operating system.
[0037] Figure 2 A flowchart of another application running method provided in an embodiment of the present invention, such as Figure 2 As shown, the method includes:
[0038] Step 201: Power on and start the embedded operating system.
[0039] Step 202: Use the runtime environment platform management module to query all runtime environment platform management entry points.
[0040] In this embodiment, optionally, prior to this step, in order to facilitate the management of the runtime environment platform, a Runtime Environment Platform Entry (REPE) corresponding to each runtime environment platform can be established in advance through the runtime environment platform management module to respond to the registration management requests of each runtime environment platform.
[0041] Among all runtime environment platform management portals, only one can be set as the default startup or activation portal. Runtime environment platforms that have not registered and created a management portal in the runtime environment platform management module will not be managed by the runtime environment platform management module.
[0042] Step 203: Through the runtime environment platform management module, check whether there is an activated runtime environment platform in all runtime environment platform management entry points. If so, use the activated runtime environment platform as a target runtime environment platform to be started, and then execute step 204. If not, execute step 213.
[0043] In this step, specifically, the runtime environment platform management module can be used to check if there is an activated runtime environment platform management entry. If so, it can be confirmed that the runtime environment platform corresponding to the management entry is activated, and the runtime environment platform can be used as the target runtime environment platform to be started.
[0044] In one embodiment of this example, before checking whether an activated runtime environment platform exists in all runtime environment platform management entry points through the runtime environment platform management module, the method further includes: assigning a corresponding platform identity identifier (REP_ID) to each runtime environment platform through the runtime environment platform management module, so that the multi-application management module can manage applications based on the platform identity identifier. Optionally, the runtime environment platform management module can assign a corresponding platform identity identifier to each runtime environment platform using the application identifier (AID) encoding method.
[0045] In one embodiment of this example, the method further includes: in response to an activation request for a runtime environment platform triggered by an external entity through a multi-application management module, obtaining a platform identity identifier specified in the activation request for a runtime environment platform; and setting a runtime environment platform corresponding to the platform identity identifier as the activated runtime environment platform through a runtime environment platform management module.
[0046] In one specific embodiment, when the runtime environment platform management module activates a specified runtime environment platform through the platform identity identifier, it does not immediately set the state of this runtime environment platform to the active state. That is, the runtime environment platform currently in the active state in the application runtime system is still in the running state. Only after the embedded operating system is reset and restarted can the runtime environment platform management module set the state of the specified runtime environment platform to the active state and start running.
[0047] Step 204: Control the target operating environment platform to start.
[0048] Step 205: Determine whether there is a default selected application based on the runtime environment in the target runtime environment platform; if yes, proceed to step 206; otherwise, proceed to step 207.
[0049] In this embodiment, a target runtime environment platform can support one or more applications. After the target runtime environment platform is started, it can be determined whether there is a default selected application among all the applications corresponding to the target runtime environment platform.
[0050] Step 206: Select the application that was selected by default through the target runtime environment platform.
[0051] Step 207: Control the target operating environment platform to enter the state of waiting to receive instructions.
[0052] In this embodiment, if there is no application selected by default among all applications corresponding to the target runtime environment platform, the target runtime environment platform is controlled to directly enter the state of waiting to receive instructions.
[0053] Step 208: The target operating environment platform completes the reception of the processing instructions.
[0054] Step 209: Determine whether the processing instruction includes a target application selection instruction. If yes, proceed to step 210; otherwise, proceed to step 211.
[0055] Step 210: Query the target application based on the application identifier in the target application selection instruction.
[0056] Step 211: Run the application and execute the processing instructions.
[0057] In this embodiment, if the processing instruction includes a target application selection instruction, then the target application is selected and run, and the processing instruction is executed through the target application;
[0058] Conversely, if the processing instructions do not include a target application selection instruction, the processing instructions are executed through the application that is selected by default.
[0059] Step 212: After the processing instruction is executed, the execution result is fed back to the external entity, and then the operation of step 207, which controls the target operating environment platform to enter the state of waiting to receive instructions, is returned.
[0060] Step 213: Check through the runtime environment platform management module whether there is a runtime environment platform set as the default startup platform. If so, use the runtime environment platform set as the default startup platform as a target runtime environment platform to be started, and then execute step 204. If not, execute step 214.
[0061] In this step, specifically, you can check through the runtime environment platform management module whether there is a runtime environment platform management entry that is set to start by default. If so, you can confirm that the runtime environment platform corresponding to the management entry is set to start by default and use that runtime environment platform as the target runtime environment platform to be started.
[0062] Step 214: Control the operating environment platform management module to enter the waiting to receive instructions state.
[0063] Step 215: The runtime environment platform management module receives the processing instructions.
[0064] Step 216: Determine whether the runtime environment platform management module has received an application selection instruction sent by an external entity. If yes, proceed to step 217; otherwise, proceed to step 219.
[0065] Step 217: Query the target application according to the application identifier in the application selection instruction, and select the runtime environment platform corresponding to the target application as a target runtime environment platform to be launched.
[0066] Step 218: Control the target operating environment platform to start.
[0067] Following this step, step 211 is executed, which involves running a target application that matches the target runtime platform and executing processing instructions sent by the external entity through that target application.
[0068] Step 219: Feedback the execution error message to the external entity, and then return to the operation of step 214 to control the runtime environment platform management module to enter the waiting to receive instructions state.
[0069] The technical solution provided in this embodiment of the invention checks whether an activated or default-started runtime environment platform exists through a runtime environment platform management module. If so, it controls the activated or default-started runtime environment platform to be launched as the target runtime environment platform. If a default-selected application exists, it selects the default-selected application through the target runtime environment platform and controls the target runtime environment platform to enter a state waiting to receive instructions. If the received processing instruction includes a target application selection instruction, it queries the target application based on the application identifier in the target application selection instruction and runs the target application. Otherwise, it controls the runtime environment platform management module to enter a state waiting to receive instructions. If the runtime environment platform management module receives an external instruction... The system sends an application selection command, then queries the target application based on the application identifier in the command, selects the runtime environment platform corresponding to the target application as the target runtime environment platform to be started, and controls the target runtime environment platform to start and run the target application that matches the target runtime environment platform. This technical means can meet the needs of external entities to download, install, and run applications based on different runtime environments. It can flexibly switch between different runtime environment platforms according to the actual application scenario requirements. Compared with the existing technology where embedded operating systems only support a single runtime environment and application, it can realize the running of applications from different ecosystems within the same embedded operating system, thereby improving the compatibility of the embedded operating system.
[0070] Based on the above embodiments, the method further includes: responding to a runtime environment platform recycling request triggered by an external entity through the multi-application management module, deleting the corresponding runtime environment platform and application according to the platform identity identifier in the recycling request through the runtime environment platform management module, and clearing the corresponding runtime environment platform management entry in the runtime environment platform management module.
[0071] In one specific embodiment, deleting the corresponding runtime environment platform and application includes: deleting the application, then releasing the code space to which the runtime environment platform belongs, and using the released space as user space.
[0072] The advantage of this setup is that the runtime environment platform in the application's operating system can be tailored according to the actual application scenario requirements, avoiding the problem of excessive resource consumption caused by having multiple different runtime environment platforms.
[0073] Figure 3 This is a schematic diagram of the structure of an application running system provided in an embodiment of the present invention. The application running system includes: an operating system base layer, an application running layer, an application layer, and a running environment platform management module.
[0074] like Figure 3 As shown, the operating system base layer includes basic functional modules required for the operation of the operating system, such as a storage management module, a transaction management module, an algorithm interface module, and a communication management module. The application runtime layer is a logical layer that provides the runtime environment for applications, including multiple different runtime environment platforms (e.g., REP corresponding to an Advanced Operating System (AOS), Javacard REP, etc.). The application layer includes applications matching each runtime environment platform (e.g., AOS APP, Javacard APP, etc.), native applications, and a multi-application management module (Card Manager).
[0075] In one specific embodiment, the storage management module provides basic data storage services for the operating system and application execution, and all runtime environments share the same data storage services. The transaction management module ensures the integrity and consistency of stored data during application execution, and all runtime environments share the same transaction management mechanism. The communication management module manages communication between the application and external entities during execution, responsible for data transmission, and all runtime environments share the same communication management mechanism. The algorithm management module provides basic algorithm services for the application, and all runtime environments share the same algorithm services.
[0076] The advantage of this setup is that by deploying a unified operating system base layer in the application runtime system, the redundant development of the basic functions required for application operation can be avoided.
[0077] In this embodiment, each runtime environment platform has an independent virtual machine, runtime environment, and application programming interface. When multiple different runtime environment platforms are deployed in the application runtime system, the implementation logic and operation logic of the virtual machine, runtime environment, and application programming interface in each runtime environment platform are not entirely the same.
[0078] To avoid excessive resource consumption, multiple different runtime environments reuse the same volatile storage space and user data space. The user data space is stored in non-volatile storage space and includes application datasets and module assemblies. The volatile storage space is used to store global variables, indirect variable stacks, virtual machine stacks, and module datasets provided by each runtime environment for application execution, including temporary data in the application datasets.
[0079] The technical solution provided by this invention deploys an operating system base layer, an application runtime layer, an application layer, and a runtime environment platform management module in the application runtime system. Different runtime environment platforms are deployed in the application runtime layer, and applications running based on different runtime environments are deployed in the application layer. This can meet the needs of external entities to download, install, and run applications based on different runtime environments. Different runtime environment platforms can be flexibly switched according to the actual application scenario requirements. Compared with the existing technology where embedded operating systems only support a single runtime environment and application, this invention can realize the running of applications from different ecosystems within the same embedded operating system, thereby improving the compatibility of the embedded operating system.
[0080] The system described above can execute the methods provided in all the foregoing embodiments of the present invention, and possesses the corresponding functional modules and beneficial effects for executing the methods. Technical details not described in detail in the embodiments of the present invention can be found in the methods provided in all the foregoing embodiments of the present invention.
[0081] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement embodiments of the present invention is shown, such as... Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0082] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0083] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as application execution methods.
[0084] In some embodiments, the application running method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the application running method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the application running method by any other suitable means (e.g., by means of firmware).
[0085] Various embodiments 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-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0086] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0087] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0088] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 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 provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).
[0089] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0090] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0091] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0092] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for running an application, characterized in that, Executed by an application runtime system configured within an embedded operating system, the method includes: During the startup process of an embedded operating system, a target runtime environment platform to be started is determined from multiple different runtime environment platforms; Control the target runtime environment platform to start up and run the target application that matches the target runtime environment platform.
2. The method according to claim 1, characterized in that, Among multiple different runtime environment platforms, a target runtime environment platform to be launched is determined, including: By using the runtime environment platform management module, check whether there is an activated runtime environment platform in all runtime environment platform management entry points; If so, the activated runtime environment platform will be used as a target runtime environment platform to be launched.
3. The method according to claim 2, characterized in that, After checking for the existence of an activated runtime environment platform, the process also includes: If not, check if there is a runtime environment platform that is set as the default startup platform; If so, the runtime environment platform that is set as the default startup platform will be used as a target runtime environment platform to be started.
4. The method according to claim 3, characterized in that, After checking if a runtime environment platform is set as the default startup platform, the following is also included: If not, the operating environment platform management module is controlled to enter a state of waiting to receive instructions; If the runtime environment platform management module receives an application selection instruction sent by an external entity, it queries the target application based on the application identifier in the application selection instruction. The runtime environment platform corresponding to the target application is used as a target runtime environment platform to be launched.
5. The method according to any one of claims 2-3, characterized in that, Running a target application that matches the target runtime environment platform includes: Determine whether a default selected application exists by examining the runtime environment of the target runtime platform. If so, the application selected by default is selected through the target runtime platform, and then the target runtime platform is controlled to enter a state of waiting to receive instructions; After receiving the processing instruction, the target runtime platform determines whether the processing instruction includes a target application selection instruction. If so, the target application is queried based on the application identifier in the target application selection instruction, and the target application is run.
6. The method according to claim 5, characterized in that, After determining whether the processing instruction includes a target application selection instruction, the method further includes: If not, the processing instructions are executed through the default selected application.
7. The method according to claim 5, characterized in that, After determining whether a default selected application exists, the process also includes: If not, the target operating environment platform will directly enter a state of waiting to receive instructions.
8. The method according to claim 2, characterized in that, Before checking whether an active runtime environment platform exists in all runtime environment platform management entry points through the runtime environment platform management module, the following steps are also included: The runtime environment platform management module establishes a corresponding runtime environment platform management entry for each runtime environment platform to respond to registration management requests from each runtime environment platform.
9. The method according to claim 2, characterized in that, Before checking whether an active runtime environment platform exists in all runtime environment platform management entry points through the runtime environment platform management module, the following steps are also included: The runtime environment platform management module assigns a corresponding platform identity identifier to each runtime environment platform, enabling the multi-application management module to manage applications based on the platform identity identifier.
10. The method according to claim 9, characterized in that, The method further includes: In response to an external entity's request to activate the runtime environment platform triggered by the multi-application management module, obtain the platform identity identifier specified in the activation runtime environment platform request; The runtime environment platform management module sets the runtime environment platform corresponding to the platform identity identifier as the activated runtime environment platform.
11. The method according to claim 1, characterized in that, The method further includes: In response to a runtime environment platform recycling request triggered by an external entity through the multi-application management module, the runtime environment platform management module deletes the corresponding runtime environment platform and application based on the platform identity identifier in the recycling request, and clears the corresponding runtime environment platform management entry in the runtime environment platform management module.
12. The method according to claim 11, characterized in that, Remove the corresponding runtime environment platform and applications, including: The application is deleted, the code space belonging to the runtime environment platform is released, and the released space is used as user space.
13. The method according to claim 9, characterized in that, The runtime environment platform management module assigns a corresponding platform identity identifier to each runtime environment platform, including: The runtime environment platform management module uses an application identifier encoding method to assign a corresponding platform identity identifier to each runtime environment platform.
14. The method according to claim 1, characterized in that, Each runtime platform has its own virtual machine, runtime environment, and application programming interface.
15. The method according to claim 1, characterized in that, In the application runtime system, multiple different runtime environment platforms reuse the same volatile storage space and user data space; The user data space is stored in a non-volatile storage space; The volatile storage space is used to store the global variables, indirect variable stack, virtual machine stack required by each runtime environment platform, as well as the module dataset provided by each runtime environment platform for application execution.
16. The method according to claim 1, characterized in that, All runtime environments within the application's operating system share the same data storage services, transaction management mechanisms, communication management mechanisms, and algorithm services.
17. An application running system, characterized in that, The application runtime system includes: an operating system base layer, an application runtime layer, an application layer, and a runtime environment platform management module; The operating system base layer includes: a storage management module, a transaction management module, an algorithm interface module, and a communication management module; The application runtime layer includes multiple different runtime environment platforms; The application layer includes applications that match each runtime platform, local applications, and a multi-application management module.
18. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the application running method according to any one of claims 1-16.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the application running method according to any one of claims 1-16.
Citation Information
Patent Citations
Application starting method and device
CN110858142A