Application loading method and related device

CN122249790APending Publication Date: 2026-06-19HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-18
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Existing operating systems have slow startup speeds and low startup efficiency, especially on the AUTOSAR CP platform, where the need to globally initialize all OS objects leads to excessive resource consumption.

Method used

By using differentiated configuration, critical business processes that are sensitive to startup time are configured as self-starting applications and loaded when the operating system starts, while non-critical business processes that are not sensitive to startup time are configured as non-self-starting applications and loaded during the running of the already loaded application objects, thus reducing resource consumption during startup.

Benefits of technology

It speeds up the operating system startup, improves startup efficiency, reduces resource consumption, and meets the needs of critical business operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122249790A_ABST
    Figure CN122249790A_ABST
Patent Text Reader

Abstract

An application loading method and related apparatus are disclosed, applicable to the field of operating system technology. The application loading method is applied to an operating system, where the applications running on the operating system include a first application and a second application. The first application starts running before the second application starts running. The application loading method includes: loading the first application during a first time period, the first time period starting at the operating system's startup time and ending at a first moment, the first moment not later than a second moment, the second moment being the start time of the first object after the operating system starts; and loading the second application while the first object in the first application is running. This method can accelerate the OS startup speed and improve OS startup efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Application loading method and related apparatus Technical Field

[0001] This application relates to the field of operating system technology, and in particular to an application loading method and related apparatus. Background Technology

[0002] AUTOSAR (Automotive Open System Architecture) is an alliance dedicated to developing standards for automotive electronic software. AUTOSAR aims to develop an open, standardized software architecture for the automotive industry, facilitating the exchange and updating of vehicle electronic system software and providing a foundation for the efficient management of increasingly complex vehicle electronic and software systems. The AUTOSAR Classic Platform (AUTOSAR CP) is AUTOSAR's standard platform, an embedded real-time electronic control unit (ECU) standard based on open systems and the corresponding interfaces for the electronics (OSEK) standards. The embedded operating system (OS) based on AUTOSAR CP is a static OS. During development, global OS object information needs to be input to generate corresponding dynamic OS configuration code, which is then compiled together with the source code.

[0003] Current operating systems suffer from slow startup speeds and low startup efficiency.

[0004] Therefore, a feasible solution is urgently needed to address the problems of slow OS startup speed and low startup efficiency.

[0005] Summary of the Invention

[0006] This application provides an application loading method and related apparatus, which can speed up the OS startup and improve the OS startup efficiency.

[0007] In a first aspect, embodiments of this application provide an application loading method, which is applied to an operating system. The applications running on the operating system include a first application and a second application, wherein the start time of the first application is before the start time of the second application; the application loading method includes:

[0008] During the first time period, the first application is loaded. The start time of the first time period is the start time of the operating system, and the end time of the first time period is the first moment. The first moment is no later than the second moment, and the second moment is the start time of the first object after the operating system starts running.

[0009] During the execution of the first object in the first application, the second application is loaded.

[0010] In this embodiment of the application, an application loading method is provided. The application loading method is applied to an operating system, loads a first application during a first time period after the operating system starts, and loads a second application during the running of a first object in the first application.

[0011] The operating system, applications, and objects have the following relationship: The operating system runs one or more applications, and each application includes one or more objects. When the operating system starts up (after power-on), it begins loading one or more applications. After the applications are loaded, it calls and executes one or more objects within the loaded applications.

[0012] The fact that the first application starts running before the second application can be understood as follows: the first application is a business application (also known as a critical business application) that is relatively sensitive to startup time and requires rapid execution upon operating system startup (power-on). This type of application can also be called a self-starting application. The second application is a business application (also known as a non-critical business application) that is relatively insensitive to startup time and does not require rapid execution. This type of application can also be called a non-self-starting application. It can be understood that the startup time of the first application refers to the startup time of the first object within the first application, and the startup time of the second application refers to the startup time of the first object within the second application.

[0013] As can be understood, loading an application means copying the data segments and / or code segments of an application (program) from read-only memory (ROM) to random access memory (RAM) and then running it. Loading an application includes the initialization process, that is, initializing the application's data and state. It also includes operations such as moving data to a specified location and clearing data.

[0014] Understandably, current application loading methods do not differentiate between self-starting and non-self-starting applications based on their sensitivity to startup time. Instead, they load all applications when the operating system starts up, resulting in slow startup speed and low startup efficiency. In this embodiment, however, differentiated configuration controls the application startup loading time. Applications containing critical business functions that are relatively sensitive to startup time are configured as self-starting applications and loaded during the aforementioned first time period. Applications containing non-critical business functions that are relatively insensitive to startup time are configured as non-self-starting applications and loaded during the execution of objects in already loaded applications. This reduces the loading burden on the operating system at startup, decreases the consumption of operating system resources, and thus speeds up the operating system startup and improves startup efficiency.

[0015] In one possible implementation, loading the first application includes:

[0016] Initialize the data of the first application;

[0017] Set the state of the first application to a first state, which indicates that the application is loading.

[0018] In this embodiment, a possible specific implementation for loading a first application is provided. Specifically, loading the first application includes initializing the data of the first application and setting the state of the first application to a first state, indicating that the first application is being loaded. Optionally, the first state can be represented by the field "APPLICATION_LOADING".

[0019] In one possible implementation, the application loading method further includes:

[0020] During the first time period, the state of the second application is set to a second state, which indicates that the application is not loaded.

[0021] In this embodiment, during the aforementioned first time period, the state of the second application can also be set to a second state, indicating that the second application is not loaded. Optionally, this second state can be represented by the field "APPLICATION_NOLOAD". Through the embodiments of this application, applications containing non-critical business functions that are relatively insensitive to startup time can be configured as non-auto-start applications. These applications are not loaded when the operating system starts up, thereby reducing the loading burden on applications during operating system startup, reducing the consumption of operating system resources, and thus accelerating the startup speed and improving the startup efficiency of the operating system.

[0022] In one possible implementation, the application loading method further includes:

[0023] After loading the first application, the state of the first application is adjusted to a third state, which indicates that the application has finished loading.

[0024] In this embodiment, after loading the first application, the state of the first application is adjusted to the third state, indicating that the first application has been successfully loaded. At this point, one or more objects contained in the first application can be called and executed. Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0025] In one possible implementation, loading the second application includes:

[0026] The first interface provided by the operating system is invoked, and the first interface is used to instruct the second application;

[0027] The second application is loaded according to the first interface.

[0028] This embodiment provides a possible specific implementation for loading a second application. Specifically, during the execution of the first object in the first application, a first interface provided by the operating system is called, and the second application is loaded based on this first interface. Optionally, the first interface can be represented by the field "OS API_1", the content of which can be "Os_LoadApplication(OSA2)" to indicate the second application. It is understood that the start of the first object in the first application means that the operating system has completed its startup. Through this embodiment, for non-auto-starting applications containing non-critical business processes that are relatively insensitive to startup time, this type of application is not loaded when the operating system starts up, but is loaded during the execution of the first object in the first application (after the operating system has completed its startup). This not only reduces the loading burden on the operating system during startup, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business processes.

[0029] In one possible implementation, loading the second application includes:

[0030] Initialize the data for the second application;

[0031] Adjust the state of the second application to the first state, which indicates that the application is loading.

[0032] In this embodiment, a possible specific implementation for loading a second application is provided. Specifically, loading the second application includes initializing the data of the second application and adjusting the state of the second application to a first state, indicating that the second application is loading. Optionally, the first state can be represented by the field "APPLICATION_LOADING".

[0033] In one possible implementation, the application loading method further includes:

[0034] After loading the second application, the state of the second application is adjusted to a third state, which indicates that the application has finished loading.

[0035] In this embodiment, after loading the second application, the state of the second application is adjusted to the third state, indicating that the second application has been successfully loaded. At this point, one or more objects contained in the second application can be called and executed. Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0036] In one possible implementation, the application running on the operating system further includes a third application, the third application starting to run after the second application; the application loading method further includes:

[0037] During the execution of the second object in the second application, the third application is loaded.

[0038] In this embodiment, a possible specific implementation of the application loading method is also provided, specifically, loading a third application during the execution of a second object in a second application.

[0039] The fact that the third application starts running after the second application can be understood as meaning that the third application is an application containing business processes that are relatively insensitive to startup time and do not require rapid execution (also known as non-critical business processes), or a non-auto-starting application. It is understood that the startup time of the third application refers to the startup time of the first object within the third application. It is also understood that both the third and second applications are non-auto-starting applications; the third application is loaded during the execution of the second object in the second application. The loading order of the two applications may be related to the business requirements of a specific application scenario, or it may be related to the sensitivity to startup time. This application embodiment does not impose any restrictions on this.

[0040] Through the embodiments of this application, for a third application containing non-critical business that is relatively insensitive to startup time, the third application is not loaded when the operating system starts up. Instead, the third application is loaded during the running of the second object in the second application (after the operating system has finished starting up). This not only reduces the loading burden on the application when the operating system starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business.

[0041] Alternatively, the third application may be loaded during the execution of the first object in the first application described above.

[0042] It is understood that the loading time of the third application may be related to the business requirements of the specific application scenario, or it may be related to the sensitivity to startup time. This application embodiment does not impose any restrictions on this.

[0043] In one possible implementation, loading the third application includes:

[0044] The operating system provides a second interface, which is used to instruct the third application.

[0045] The third application is loaded according to the second interface.

[0046] This embodiment provides a possible specific implementation for loading a third application. Specifically, during the execution of a second object in a second application, a second interface provided by the operating system is called, and the third application is loaded based on this second interface. Optionally, this second interface can be represented by the field "OS API_2", the content of which can specifically be "Os_LoadApplication(OSA3)" to indicate the third application. It is understood that the start of execution of the second object in the second application means that the operating system has completed its startup. Through this embodiment, for the third application containing non-critical business processes that are relatively insensitive to startup time, the third application is not loaded when the operating system starts up, but rather during the execution of the second object in the second application (after the operating system has completed its startup). This not only reduces the loading burden on the operating system during startup, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business processes.

[0047] In one possible implementation, the application loading method further includes:

[0048] During the first time period, the state of the third application is set to a second state, which indicates that the application is not loaded.

[0049] In this embodiment, during the aforementioned first time period, the state of the third application can also be set to a second state, indicating that the third application is not loaded. Optionally, this second state can be represented by the field "APPLICATION_NOLOAD". Through the embodiments of this application, applications containing non-critical business functions that are relatively insensitive to startup time can be configured as non-auto-start applications. These applications are not loaded when the operating system starts up, thereby reducing the loading burden on applications during operating system startup, reducing the consumption of operating system resources, and thus accelerating the startup speed and improving the startup efficiency of the operating system.

[0050] In one possible implementation, loading the third application includes:

[0051] Initialize the data of the third application;

[0052] The state of the third application is adjusted to a first state, which indicates that the application is loading.

[0053] This embodiment provides a possible specific implementation for loading a third application. Specifically, loading the third application includes initializing the data of the third application and adjusting the state of the third application to a first state, indicating that the third application is loading. Optionally, this first state can be represented by the field "APPLICATION_LOADING".

[0054] In one possible implementation, the application loading method further includes:

[0055] After the third application is loaded, the state of the third application is adjusted to a third state, which indicates that the application has finished loading.

[0056] In this embodiment, after loading the third application, the state of the third application is adjusted to the third state, indicating that the third application has been successfully loaded. At this point, one or more objects contained in the third application can be called and executed. Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0057] In one possible implementation, the loading start time of the application running on the operating system is configured via a first field;

[0058] Wherein, when the first field is a first value, it indicates that the application running on the operating system is loaded during the first time period; or, when the first field is a second value, it indicates that the application running on the operating system is loaded during the execution of any object after the operating system starts.

[0059] This embodiment provides a possible specific implementation for configuring the application startup loading time node. Specifically, the start time of loading an application running on the operating system can be configured through a first field. If the first field is a first value (e.g., "true"), it indicates that the application will be loaded within the aforementioned first time period. If the first field is a second value (e.g., "false"), it indicates that the application will be loaded during the execution of any object after the operating system starts. Optionally, the specific content of the first and second values ​​is not limited in this embodiment. Through this embodiment, the application startup loading time node can be controlled by differentiated configuration. Applications containing critical business functions that are relatively sensitive to startup time can be configured as self-starting applications and loaded within the aforementioned first time period. Applications containing non-critical business functions that are relatively insensitive to startup time can be configured as non-self-starting applications and loaded during the execution of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup of the operating system and improving its startup efficiency.

[0060] In one possible implementation, the state of the application running on the operating system is configured via a second field;

[0061] Wherein, when the second field is a third value, it indicates that the application is loading; or, when the second field is a fourth value, it indicates that the application has not been loaded; or, when the second field is a fifth value, it indicates that the application has finished loading.

[0062] This embodiment provides a possible specific implementation for configuring the status of applications. Specifically, the status of applications running on the operating system can be configured through a second field. If the second field is a third value (e.g., "APPLICATION_LOADING"), it indicates that the application is loading; if the second field is a fourth value (e.g., "APPLICATION_NOLOAD"), it indicates that the application is not loaded; and if the second field is a fifth value (e.g., "APPLICATION_ACCESSIBLE"), it indicates that the application has completed loading. Optionally, the specific content of the third, fourth, and fifth values ​​is not limited in this embodiment. Through this embodiment, the configured second field can be used to determine which applications need to be loaded, thereby improving the utilization of operating system resources.

[0063] In one possible implementation, the loading time of the first object is before the loading time of the third object, which is another object in the first application that is different from the first object.

[0064] In this embodiment, the first application includes multiple objects, such as a first object and a third object. The first object is loaded before the third object. This can be understood as the first object containing business processes (also known as critical business processes) that are relatively sensitive to startup time and require rapid execution after the operating system has started. This type of object can also be called a self-starting object. The second object contains business processes (also known as non-critical business processes) that are relatively insensitive to startup time and do not require rapid execution. This type of object can also be called a non-self-starting object. In this case, the second application is loaded during the execution of the first object, not during the execution of the third object. It is understood that, based on the urgency of the business requirements for the second application in different application scenarios, or the sensitivity to the startup time of the second application, the second application can be loaded during the execution of the corresponding object in the first application to meet the business requirements of the second application.

[0065] In one possible implementation, the first object includes any one or more of the following:

[0066] First task, first timer, first schedule table.

[0067] In this embodiment, the objects in the application running on the above-mentioned operating system include, but are not limited to, one or more of the following: tasks, alarms, and schedule tables. This application embodiment does not impose any restrictions on this.

[0068] In one possible implementation, the operating system includes an operating system running on the AUTOSAR CP standard platform for automotive open systems architecture.

[0069] In this embodiment, the aforementioned operating system includes, but is not limited to, an operating system running on the Automotive Open System Architecture Classic Platform (AUTOSAR CP). This application embodiment does not impose any limitations on this. Accordingly, the operating system applications (OSAs) running on the AUTOSAR CP operating system are categorized into self-starting OSAs and non-self-starting OSAs based on their sensitivity to startup time.

[0070] In one possible implementation, the first application includes applications involving functional safety, and the second application includes applications not involving functional safety.

[0071] In this embodiment, the application loading method described above can be applied to the field of functional safety. In this scenario, the self-starting applications, taking the first application as an example, include applications involving functional safety, while the non-self-starting applications, taking the second application as an example, include applications not involving functional safety. By controlling the time nodes for loading each application through differentiated configuration, applications involving functional safety are loaded during the first time period, and applications not involving functional safety are loaded during the execution of objects in the already loaded applications. This not only reduces the loading burden on the operating system when it starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also benefits security.

[0072] Secondly, embodiments of this application provide an application loading apparatus, which includes units for performing the method as described in any of the first aspects.

[0073] In one possible design, the device is applied to an operating system, on which applications running include a first application and a second application, wherein the first application starts running before the second application starts running; the device includes:

[0074] The processing unit is configured to load the first application within a first time period, wherein the start time of the first time period is the start time of the operating system, the end time of the first time period is a first moment, the first moment is not later than a second moment, and the second moment is the start time of the first object after the operating system starts running.

[0075] The processing unit is further configured to load the second application during the execution of the first object in the first application.

[0076] In one possible implementation, the device further includes:

[0077] A communication unit is used to acquire the first application and the second application.

[0078] Regarding the processing unit and communication unit described in the second aspect and any possible implementation, the steps performed thereon can be referred to the corresponding implementations in the first aspect.

[0079] For the technical effects of the second aspect and any possible implementation, please refer to the description of the technical effects corresponding to the first aspect and the corresponding implementation.

[0080] Optionally, in the application loading apparatus described in the second aspect above and any possible implementation:

[0081] In one implementation, the application loading device is an application loading apparatus. When the application loading device is an application loading apparatus, the communication unit can be a transceiver or an input / output interface; the processing unit can be at least one processor. Optionally, the transceiver can be a transceiver circuit. Optionally, the input / output interface can be an input / output circuit.

[0082] In another implementation, the application loading device is a chip (system) or circuit used in the application loading device. When the application loading device is a chip (system) or circuit used in the application loading device, the communication unit can be a communication interface (input / output interface), interface circuit, output circuit, input circuit, pin, or related circuit on the chip (system) or circuit; the processing unit can be at least one processor, processing circuit, or logic circuit.

[0083] Thirdly, embodiments of this application provide an application loading apparatus, which includes a processor. The processor is coupled to a memory and can be used to execute instructions in the memory to implement the methods of any one of the first to second aspects and any possible implementations described above. Optionally, the application loading apparatus further includes a memory. Optionally, the application loading apparatus further includes a communication interface, and the processor is coupled to the communication interface.

[0084] Fourthly, embodiments of this application provide a chip, including: logic circuitry and a communication interface. The communication interface is used to receive or send information; the logic circuitry is used to receive or send information through the communication interface, causing the chip to execute the methods described in the first aspect and any of the possible implementations.

[0085] Fifthly, embodiments of this application provide a computer-readable storage medium for storing a computer program (also referred to as code or instructions); when the computer program is run on a computer, the methods described in the first aspect and any possible implementation are implemented.

[0086] In a sixth aspect, embodiments of this application provide a computer program product, the computer program product comprising: a computer program (also referred to as code or instructions); and, when the computer program is run, causing a computer to perform the methods described in the first aspect and any possible implementation thereof.

[0087] In a seventh aspect, embodiments of this application provide a mobile terminal, the mobile terminal including at least one application loading device as described in the second aspect, or the application loading device as described in the third aspect, or the chip as described in the fourth aspect.

[0088] Optionally, the mobile terminal can be a means of transportation, such as a car, truck, aircraft, drone, slow transport vehicle, spacecraft, or ship, or any other possible means of transportation used in any possible scenario. This application embodiment does not limit this.

[0089] Optionally, the mobile terminal is used to implement the method described in the first aspect and any possible implementation.

[0090] Optionally, the application loading method described in the first aspect above and any possible implementation can be carried in the vehicle operating system (VOS) of a mobile terminal in the form of an executable file.

[0091] Furthermore, in the process of performing the method described in the first aspect and any possible implementation above, the processes related to sending and / or receiving information in the above methods can be understood as the process of the processor outputting information, and / or the process of the processor receiving input information. When outputting information, the processor can output the information to a transceiver (or communication interface, or transmitting module) so that the transceiver can transmit it. After the information is output by the processor, it may need to undergo other processing before reaching the transceiver. Similarly, when the processor receives input information, the transceiver (or communication interface, or transmitting module) receives the information and inputs it to the processor. Furthermore, after the transceiver receives the information, the information may need to undergo other processing before being input to the processor.

[0092] Based on the above principles, for example, the information sent mentioned in the aforementioned method can be understood as information output by the processor. Similarly, the information received can be understood as information received by the processor from input.

[0093] Optionally, unless otherwise specified, the operations of transmitting, sending, and receiving involved by the processor can be more generally understood as processor output and receiving, input, and other operations, unless they contradict their actual function or internal logic in the relevant description.

[0094] Optionally, in performing the methods described in the first aspect and any possible implementation above, the processor may be a processor specifically designed to perform these methods, or it may be a processor that performs these methods by executing computer instructions stored in memory, such as a general-purpose processor. The memory may be a non-transitory memory, such as read-only memory (ROM), which may be integrated with the processor on the same chip or disposed on different chips. This application does not limit the type of memory or the arrangement of the memory and processor.

[0095] In one possible implementation, at least one of the aforementioned memories is located outside the device.

[0096] In yet another possible implementation, at least one of the aforementioned memories is located within the device.

[0097] In another possible implementation, a portion of the memory of the at least one memory is located inside the device, while another portion is located outside the device.

[0098] In this application, the processor and memory may also be integrated into a single device, that is, the processor and memory can be integrated together. Attached Figure Description

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

[0100] Figure 1 is a schematic diagram of the OS standard startup process of AUTOSAR CP provided in an embodiment of this application;

[0101] Figure 2 is a flowchart illustrating an application loading method provided in an embodiment of this application;

[0102] Figure 3 is a flowchart illustrating another application loading method provided in an embodiment of this application;

[0103] Figure 4 is a flowchart illustrating another application loading method provided in an embodiment of this application;

[0104] Figure 5 is a flowchart illustrating another application loading method provided in an embodiment of this application;

[0105] Figure 6 is a schematic diagram of an application switching method provided in an embodiment of this application;

[0106] Figure 7 is a schematic diagram of an OSA startup configuration interface provided in an embodiment of this application;

[0107] Figure 8 is a schematic diagram of an OS startup time provided in an embodiment of this application;

[0108] Figure 9 is a schematic diagram of an OSA startup configuration provided in an embodiment of this application;

[0109] Figure 10 is a flowchart illustrating another application loading method provided in an embodiment of this application;

[0110] Figure 11 is a schematic diagram of another OSA startup configuration provided in an embodiment of this application;

[0111] Figure 12 is a flowchart illustrating another application loading method provided in an embodiment of this application;

[0112] Figure 13 is a schematic diagram of an application loading device provided in an embodiment of this application;

[0113] Figure 14 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0114] Figure 15 is a schematic diagram of the structure of a chip provided in an embodiment of this application. Detailed Implementation

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

[0116] The terms "first" and "second," etc., used in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0117] The term "embodiment" as used herein means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that, unless otherwise specified or logically conflicting, the terminology and / or descriptions between the various embodiments of this application are consistent and can be mutually referenced, and technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.

[0118] It should be understood that in this application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three or more, and "and / or" is used to describe the relationship between related objects, indicating that there can be three relationships. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the related objects before and after are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0119] It should be noted that, in this application, "instruction" can include direct instruction, indirect instruction, explicit instruction, and implicit instruction. When describing a certain instruction information for the purpose of instructing A, it can be understood that the instruction information carries A, directly instructs A, or indirectly instructs A.

[0120] In this application, the information indicated by the instruction information is called the information to be instructed. In specific implementations, there are many ways to indicate the information to be instructed, such as, but not limited to, directly indicating the information to be instructed, such as the information to be instructed itself or its index. It can also indirectly indicate the information to be instructed by indicating other information, where there is a correlation between the other information and the information to be instructed. It can also indicate only a part of the information to be instructed, while the other parts are known or pre-agreed upon. For example, the instruction of specific information can be achieved by using a pre-agreed (e.g., protocol-defined) arrangement of various information, thereby reducing instruction overhead to some extent. The information to be instructed can be sent as a whole or divided into multiple sub-information units, and the sending period and / or timing of these sub-information units can be the same or different. This application does not limit the specific sending method. The sending period and / or timing of these sub-information units can be predefined, for example, according to a protocol, or configured by the transmitting device by sending configuration information to the receiving device.

[0121] It should be noted that in this application, "send" can be understood as "output" and "receive" can be understood as "input". "Send information to A", where "to A" simply indicates the direction of information transmission, and A is the destination, does not limit "send information to A" to a direct transmission over the air interface. "Send information to A" includes sending information directly to A, as well as sending information indirectly to A through a transmitter. Therefore, "send information to A" can also be understood as "outputting information destined for A". Similarly, "receive information from A" indicates that the source of the information is A, including receiving information directly from A, as well as receiving information indirectly from A through a receiver. Therefore, "receive information from A" can also be understood as "inputting information from A".

[0122] This application provides an application loading method and related apparatus, applicable to the field of operating system technology, such as an application loading method in the operating system on the Automotive Open System Architecture Classic Platform (AUTOSAR CP). To better understand the technical solution of this application, the relevant terms and concepts that may be involved in the embodiments of this application are introduced below.

[0123] AUTOmotive Open System Architecture (AUTOSAR) is an alliance dedicated to developing automotive electronic software standards. It is a collaborative development framework for automotive electronic systems, jointly participated in by global automakers, parts suppliers, and various research and service organizations. It has established an open standard software architecture for automotive electronic control units (ECUs).

[0124] The Automotive Open System Architecture Classic Platform (AUTOSAR CP) is the standard platform of AUTOSAR, a standard for embedded real-time electronic control units (ECUs) based on open systems and corresponding interfaces for the electronics (OSEK). The embedded operating system (OS) based on AUTOSAR CP is a static OS. During development, global OS object information needs to be input to generate corresponding dynamic OS configuration code, which is then compiled together with the source code.

[0125] An operating system (OS) is a computer program that manages and controls computer hardware and software resources. It is the most basic system software that runs directly on the "bare metal," and all other software or systems must run with the support of the operating system. The operating system is the interface between the user and the computer, as well as the interface between the computer hardware and other software. The functions of an operating system include managing the computer system's hardware, software, and data resources; controlling program execution; improving the human-computer interface; providing support for other application software; maximizing the utilization of all computer system resources; providing various forms of user interfaces to create a good working environment for users; and providing necessary services and corresponding interfaces for the development of other software.

[0126] Operating system application (OSA): It is a collection of multiple objects in the OS. An object is the smallest scheduling unit of the OS, such as a task, an alarm, and a schedule table.

[0127] The operating system, applications, and objects have the following relationship: The operating system runs one or more applications, and each application includes one or more objects. When the operating system starts up (after power-on), it begins loading one or more applications. After the applications are loaded, it calls and executes one or more objects within the loaded applications.

[0128] Critical business: Businesses that are relatively sensitive to startup time and require to be executed quickly when the operating system starts up (after power-on) can be called critical business.

[0129] Non-critical business: Businesses that are relatively insensitive to start-up time and do not require rapid execution can be called non-critical business.

[0130] The AUTOSAR CP specification requires the OS to complete the loading and initialization of all OS objects before starting task scheduling, which results in slow OS startup speed and low startup efficiency.

[0131] For details, please refer to Figure 1, which is a schematic diagram of the OS standard startup process of AUTOSAR CP provided in an embodiment of this application.

[0132] As shown in Figure 1, when AUTOSAR CP starts loading the OS, it initializes the data segments used by the OS kernel and initializes the state of all OSAs to APPLICATION_NOLOAD. Optionally, APPLICATION_NOLOAD indicates that the OSA is not loaded. This can also be replaced with other forms of representation, and this embodiment does not limit this.

[0133] After the OS starts, AUTOSAR CP will start objects in OSA, placing self-starting objects into the task queue and initiating task scheduling. The highest-priority self-starting objects will then begin execution. It can be understood that objects containing business processes that are relatively sensitive to startup time and require rapid execution upon operating system startup (power-on) (also known as critical business processes) can be called self-starting objects; objects containing business processes that are relatively insensitive to startup time and do not require rapid execution (also known as non-critical business processes) can be called non-self-starting objects.

[0134] The OS startup process shown in Figure 1 above provides object-level auto-start configuration. Users can configure objects containing critical business functions as auto-start objects and call them when the OS starts, while configuring objects containing non-critical business functions as non-auto-start objects and activating them after the OS starts through application programming interface (API) calls, thus saving some OS startup time.

[0135] However, the OS startup process shown in Figure 1 above requires initialization of all OSAs in order to achieve object-level auto-start configuration, which results in a slow OS startup speed and low startup efficiency.

[0136] In view of this, this application provides an application loading method that is applied to the field of operating system technology, such as the application loading method in the operating system on AUTOSAR CP. By controlling the application startup loading time node through differentiated configuration, the loading burden on the application when the operating system starts can be reduced, the occupation of operating system resources can be reduced, thereby speeding up the startup speed of the operating system and improving the startup efficiency of the operating system.

[0137] Please refer to Figure 2, which is a flowchart illustrating an application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in an operating system on AUTOSAR CP.

[0138] Specifically, this application loading method is applied to an operating system, where applications running on the operating system include a first application and a second application, wherein the first application starts running before the second application starts running; the application loading method includes, but is not limited to, the following steps:

[0139] S201: The application loading device loads the first application within the first time period.

[0140] S202: The application loading device loads the second application during the execution of the first object of the first application.

[0141] It is understood that the application loading device in the embodiments of this application may be a device equipped with a processor / chip that can execute computer execution instructions, or it may be a processor / chip that can execute computer execution instructions. Optionally, the application loading device may be an electronic device, or it may be a processor / chip within an electronic device, used to execute the application loading method in the embodiments of this application to speed up the OS startup and improve the OS startup efficiency.

[0142] Optionally, the application loading device and application loading method in the embodiments of this application can be applied to, but are not limited to, vehicle systems. The vehicle equipped with the vehicle system is an intelligent driving vehicle and can be replaced by a terminal device. The terminal device can be, but is not limited to, vehicles such as commercial vehicles, passenger cars, trains, industrial vehicles (such as forklifts, trailers, tractors, etc.), engineering vehicles (such as excavators, bulldozers, cranes, etc.), robots, etc. The embodiments of this application do not specifically limit this.

[0143] The first type of application is one that is relatively sensitive to startup time and requires rapid execution of business processes (also known as critical business processes) when the operating system starts up (after power-on). This type of application can also be called a self-starting application. The second type of application is one that is relatively insensitive to startup time and does not require rapid execution of business processes (also known as non-critical business processes). This type of application can also be called a non-self-starting application.

[0144] The fact that the first application starts running before the second application can be understood as the first application starting running before the first object in the first application, and the second application starting running before the first object in the second application.

[0145] The starting point of the first time period mentioned above is the start time of the operating system, and the ending point of the first time period is the first moment, which is no later than the second moment, which is the start time of the first object after the operating system starts running. It can be understood that the first time period refers to the time period between the start of the operating system and the start of the first object after the operating system starts running.

[0146] Loading the first application and / or the second application can be understood as copying the data segments and / or code segments of the application (program) from read-only memory (ROM) to random access memory (RAM) and then running them. Loading an application includes an initialization process, that is, initializing the application's data and state. Loading an application also includes operations such as moving data to a specified location and clearing data.

[0147] The running of the first object in the first application can be understood as the running of any object within the first application. The first object can be either the first object to run in the first application or the last object to run in the first application; this embodiment does not impose any limitations on this. It is understood that the operating system has already completed its startup before the first object in the first application begins running. In other words, objects in the first application only have the conditions to run if the operating system has completed its startup.

[0148] The aforementioned loading of the second application during the execution of the first object of the first application can be understood as loading the second application during the execution of any object within the first application. This can be loading the second application during the execution of the first running object in the first application, or loading it during the execution of the last running object in the first application; this embodiment does not impose any limitations on this. It is understood that loading the second application during the execution of the first object of the first application means loading the second application after the operating system has completed its startup.

[0149] Optionally, the first object mentioned above includes any one or more of the following:

[0150] First task, first timer, first schedule table.

[0151] It is understood that the objects in the applications running on the aforementioned operating system include, but are not limited to, one or more of the following: tasks, alarms, and schedule tables. This application embodiment does not impose any restrictions on this.

[0152] Optionally, the aforementioned operating system includes an operating system running on the AUTOSAR CP standard platform for automotive open systems architecture.

[0153] It is understood that the aforementioned operating system includes, but is not limited to, the operating system running on AUTOSAR CP, and may also include operating systems running in other fields. This application embodiment does not limit this.

[0154] Accordingly, the operating system applications (OSAs) running on the AUTOSAR CP are divided into self-starting OSAs and non-self-starting OSAs based on their sensitivity to startup time.

[0155] Understandably, the current application loading method does not differentiate between self-starting and non-self-starting applications based on their sensitivity to startup time. Instead, it loads all applications when the operating system starts up, which results in a slower operating system startup speed and lower startup efficiency.

[0156] In this embodiment of the application, an application loading method is provided. This application loading method is applied to an operating system, loads a first application during a first time period after the operating system starts, and loads a second application during the running of a first object in the first application.

[0157] This application embodiment controls the application startup loading time node through differentiated configuration. The application containing the critical business that is relatively sensitive to startup time (the first application) is configured as an auto-start application and loaded during the aforementioned first time period. The application containing the non-critical business that is relatively insensitive to startup time (the second application) is configured as a non-auto-start application and loaded during the running process of objects in the already loaded application. This can reduce the loading burden on the operating system when it starts up, reduce the occupation of operating system resources, thereby speeding up the startup speed of the operating system and improving the startup efficiency of the operating system.

[0158] It is understood that the embodiments of this application can achieve the following functions:

[0159] (1) Defines the standard behavior for application startup in the operating system. Based on the application startup behavior, two types of applications are defined: self-starting applications and non-self-starting applications. Furthermore, the application startup behavior can be configured, which solves the problem that OSA cannot customize the loading behavior in the AUTOSAR CP operating system.

[0160] (2) The startup process of the non-self-starting OSA is decoupled from the startup process of the operating system. It is not strongly bound to the startup process of the operating system, but is placed after the task scheduling of the operating system starts, which can improve the startup speed and startup efficiency of the OS.

[0161] (3) Provides an API interface for loading non-auto-starting OSA; before being loaded, non-auto-starting OSA will not occupy any OS resources. Users can choose to load or not load non-auto-starting OSA according to their usage scenarios, which improves the flexibility of loading OSA.

[0162] In one possible embodiment, loading the first application as described above may specifically involve performing steps including but not limited to the following:

[0163] Initialize the data for the first application.

[0164] Set the state of the first application to the first state.

[0165] The first state indicates that the application is loading.

[0166] Optionally, this first state can be represented by the field "APPLICATION_LOADING".

[0167] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0168] In one possible embodiment, the application loading method described above may also perform the following steps, including but not limited to:

[0169] During the first time period mentioned above, the state of the second application is set to the second state.

[0170] The second state indicates that the application has not been loaded.

[0171] Optionally, this second state can be represented by the field "APPLICATION_NOLOAD".

[0172] Optionally, "APPLICATION_NOLOAD" indicates that the application is not loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0173] Optionally, in addition to setting the state of the second application to the second state during the first time period mentioned above, the state of all applications (including but not limited to the second application) can also be initialized to the second state when the operating system loads. This application embodiment does not limit this.

[0174] Through the embodiments of this application, applications (second applications) containing non-critical business functions that are relatively insensitive to startup time can be configured as non-auto-start applications. These applications are not loaded when the operating system starts up, thereby reducing the loading burden on the operating system and reducing the occupation of operating system resources. This can speed up the startup of the operating system and improve its startup efficiency.

[0175] In one possible embodiment, the application loading method described above may also perform the following steps, including but not limited to:

[0176] After loading the first application, adjust the state of the first application to the third state.

[0177] The third state indicates that the application has finished loading.

[0178] Understandably, at this point, one or more objects contained in the first application can be invoked and executed.

[0179] Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0180] Optionally, "APPLICATION_ACCESSIBLE" indicates that the loading has been completed. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0181] In one possible embodiment, loading the second application as described above may specifically involve performing steps including but not limited to the following:

[0182] Call the first interface provided by the operating system.

[0183] Load the second application based on the first interface.

[0184] The first interface is used to indicate the second application.

[0185] It is understandable that during the execution of the first object in the first application, the first interface provided by the operating system is called, and the second application is loaded based on the first interface.

[0186] Optionally, the first interface can be represented by the field "OS API_1", the content of which can be "Os_LoadApplication(OSA2)" to indicate the second application.

[0187] Optionally, “OS API_1: Os_LoadApplication(OSA2)” indicates that the first interface indicates the second application. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0188] Understandably, the fact that the first object in the first application starts running means that the operating system has already started up.

[0189] Through the embodiments of this application, for non-auto-starting applications (second applications) where non-critical business is located and whose startup time is relatively insensitive, this type of application is not loaded when the operating system starts up. Instead, it is loaded through API calls during the execution of the first object in the first application (after the operating system has finished starting up). This not only reduces the loading burden on the application when the operating system starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business.

[0190] In one possible embodiment, loading the second application as described above may specifically involve performing steps including but not limited to the following:

[0191] Initialize the data for the second application.

[0192] Adjust the state of the second application to the first state.

[0193] The first state indicates that the application is loading.

[0194] Understandably, at this point, the state of the second application is adjusted from the aforementioned second state to the first state.

[0195] Optionally, this first state can be represented by the field "APPLICATION_LOADING".

[0196] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0197] In one possible embodiment, the application loading method described above may also perform the following steps, including but not limited to:

[0198] After loading the second application, adjust the state of the second application to the third state.

[0199] The third state indicates that the application has finished loading.

[0200] Understandably, at this point, one or more objects contained in the second application can be invoked and executed.

[0201] Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0202] Optionally, "APPLICATION_ACCESSIBLE" indicates that the application has been loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0203] In one possible embodiment, the application running on the aforementioned operating system may also include a third application.

[0204] The third application starts running after the second application.

[0205] In this case, the above application loading method may also perform the following steps, including but not limited to:

[0206] During the execution of the second object in the second application, the third application is loaded.

[0207] Among them, the third type of application is an application that is relatively insensitive to startup time and does not require rapid execution (also known as non-critical business). This type of application can also be called a non-auto-starting application.

[0208] The fact that the third application starts running after the second application can be understood as referring to the start time of the first object within the third application. It is understood that both the third and second applications are non-auto-starting applications. The third application is loaded during the execution of the second object within the second application. The loading order of the two applications may be related to the business requirements of a specific application scenario or to the sensitivity to startup time; this embodiment does not impose any limitations on this.

[0209] Loading a third application, as described above, can be understood as the process of copying the data segments and / or code segments of the application (program) from read-only memory (ROM) to random access memory (RAM) and then running it. Loading an application includes an initialization process, that is, initializing the application's data and state. It also includes operations such as moving data to a specified location and clearing data.

[0210] The running of the second object in the second application can be understood as the running of any object within the second application. The second object can be the first or the last object to run in the second application; this embodiment does not impose such limitations. It is understood that an object in the third application only has the conditions to run while any object in the second application is running.

[0211] The aforementioned loading of the third application during the execution of the second object in the second application can be understood as loading the third application during the execution of any object within the second application. This can be loading the third application during the execution of the first running object in the second application, or loading it during the execution of the last running object in the second application; this embodiment does not impose any limitations on this. It is understood that loading the third application during the execution of the second object in the second application means loading the third application after the operating system has completed its startup.

[0212] Optionally, the second object mentioned above includes any one or more of the following:

[0213] Second task, second timer, second schedule table.

[0214] It is understood that the objects in the applications running on the aforementioned operating system include, but are not limited to, one or more of the following: tasks, alarms, and schedule tables. This application embodiment does not impose any restrictions on this.

[0215] Through the embodiments of this application, for a third application containing non-critical business that is relatively insensitive to startup time, the third application is not loaded when the operating system starts up. Instead, the third application is loaded during the running of the second object in the second application (after the operating system has finished starting up). This not only reduces the loading burden on the application when the operating system starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business.

[0216] Alternatively, the third application may be loaded during the execution of the first object in the first application described above.

[0217] It is understood that the loading time of the third application may be related to the business requirements of the specific application scenario, or it may be related to the sensitivity to startup time. This application embodiment does not impose any restrictions on this.

[0218] In one possible embodiment, loading the third application described above may specifically involve performing steps including but not limited to the following:

[0219] Call the second interface provided by the operating system.

[0220] Load the third application based on the second interface.

[0221] The second interface is used to indicate a third application.

[0222] It is understandable that during the execution of the second object in the second application, the second interface provided by the operating system is called, and the third application is loaded based on the second interface.

[0223] Optionally, the second interface can be represented by the field "OS API_2", the content of which can be "Os_LoadApplication(OSA3)" to indicate a third application.

[0224] Optionally, “OS API_2: Os_LoadApplication(OSA3)” indicates that the second interface indicates a third application. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0225] It is understandable that the fact that the second object in the second application starts running means that the operating system has already finished booting up.

[0226] Through the embodiments of this application, for a third application containing non-critical business that is relatively insensitive to startup time, the third application is not loaded when the operating system starts up. Instead, the third application is loaded through API calls during the running of the second object in the second application (after the operating system has finished starting up). This not only reduces the loading burden on the application when the operating system starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also meets the business needs of the corresponding non-critical business.

[0227] In one possible embodiment, the application loading method described above may also perform the following steps, including but not limited to:

[0228] During the first time period mentioned above, the state of the third application is set to the second state.

[0229] The second state indicates that the application has not been loaded.

[0230] Optionally, this second state can be represented by the field "APPLICATION_NOLOAD".

[0231] Optionally, "APPLICATION_NOLOAD" indicates that the application is not loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0232] Optionally, in addition to setting the state of the third application to the second state during the first time period mentioned above, the state of all applications (including but not limited to the third application) can also be initialized to the second state when the operating system loads. This application embodiment does not limit this.

[0233] Through the embodiments of this application, applications (third applications) containing non-critical business functions that are relatively insensitive to startup time can be configured as non-auto-start applications. These applications are not loaded when the operating system starts up, thereby reducing the loading burden on the operating system and reducing the occupation of operating system resources. This can speed up the startup of the operating system and improve its startup efficiency.

[0234] In one possible embodiment, loading the third application described above may specifically involve performing steps including but not limited to the following:

[0235] Initialize the data for the third application.

[0236] Adjust the state of the third application to the first state.

[0237] The first state indicates that the application is loading.

[0238] Understandably, at this point, the state of the third application is adjusted from the second state to the first state.

[0239] Optionally, this first state can be represented by the field "APPLICATION_LOADING".

[0240] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0241] In one possible embodiment, the application loading method described above may also perform the following steps, including but not limited to:

[0242] After loading the third application, adjust the state of the third application to the third state.

[0243] The third state indicates that the application has finished loading.

[0244] Understandably, at this point, one or more objects contained in a third application can be invoked and executed.

[0245] Optionally, this third state can be represented by the field "APPLICATION_ACCESSIBLE".

[0246] Optionally, "APPLICATION_ACCESSIBLE" indicates that the application has been loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0247] In one possible embodiment, the loading start time of the application running on the aforementioned operating system can be configured via the first field.

[0248] Wherein, when the first field is a first value, it indicates that the application running on the operating system is loaded during the first time period; or, when the first field is a second value, it indicates that the application running on the operating system is loaded during the execution of any object after the operating system starts.

[0249] Optionally, if the first field is a first value (e.g., it could be "true"), it can indicate that the application was loaded during the aforementioned first time period.

[0250] Alternatively, if the first field is a second value (e.g., it could be "false"), it can indicate that the application is loaded during the execution of any object after the operating system starts.

[0251] Optionally, the specific content of the first and second values ​​is not limited in the embodiments of this application. For example, the first value can also be "1", the second value can also be "0", and so on.

[0252] Through the embodiments of this application, the application startup loading time can be controlled by differentiating configurations. Applications containing critical business functions that are relatively sensitive to startup time can be configured as self-starting applications and loaded during the aforementioned first time period. Applications containing non-critical business functions that are relatively insensitive to startup time can be configured as non-self-starting applications and loaded during the running process of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup speed of the operating system and improving the startup efficiency of the operating system.

[0253] In one possible embodiment, the state of the application running on the aforementioned operating system can be configured via a second field.

[0254] When the second field is the third value, it indicates that the application is loading; or when the second field is the fourth value, it indicates that the application has not been loaded; or when the second field is the fifth value, it indicates that the application has finished loading.

[0255] Optionally, if the second field is a third value (for example, it could be "APPLICATION_LOADING"), it can indicate that the application is loading.

[0256] Alternatively, if the second field is a fourth value (e.g., "APPLICATION_NOLOAD"), it may indicate that the application has not been loaded.

[0257] Alternatively, if the second field is a fifth value (for example, it could be "APPLICATION_ACCESSIBLE"), it can indicate that the application has finished loading.

[0258] Optionally, the specific content of the third, fourth, and fifth values ​​is not limited in the embodiments of this application.

[0259] Through the embodiments of this application, it is possible to determine which applications need to be loaded based on the configured second field, thereby improving the utilization of operating system resources.

[0260] In one possible embodiment, the loading time of the first object is before the loading time of the third object.

[0261] The third object is another object in the first application that is different from the first object.

[0262] It is understandable that the first application mentioned above includes multiple objects, such as the first object and the third object. The first object is loaded before the third object. This can be interpreted as the first object being the object containing business processes (also known as critical business processes) that are relatively sensitive to startup time and require rapid execution after the operating system has finished booting. This type of object can also be called a self-starting object. The second object is the object containing business processes (also known as non-critical business processes) that are relatively insensitive to startup time and do not require rapid execution. This type of object can also be called a non-self-starting object.

[0263] In this case, the second application is loaded during the execution of the first object, not during the execution of the third object.

[0264] Understandably, the second application can be loaded during the execution of the corresponding object in the first application, depending on the urgency of the business needs for the second application in different application scenarios, or the sensitivity to the startup time of the second application, in order to meet the business needs of the second application.

[0265] In one possible embodiment, the first application mentioned above includes an application involving functional safety, and the second application mentioned above includes an application not involving functional safety.

[0266] It is understandable that the above application loading method can be applied to the field of functional safety. In this scenario, the self-starting application, taking the first application as an example, includes applications involving functional safety, while the non-self-starting application, taking the second application as an example, includes applications that do not involve functional safety.

[0267] Understandably, by controlling the loading time of each application through the aforementioned differentiated configuration, applications involving functional safety are loaded during the first time period, while applications not involving functional safety are loaded during the execution of objects in already loaded applications. This not only reduces the loading burden on the operating system when it starts up, reduces the occupation of operating system resources, speeds up the startup of the operating system, and improves the startup efficiency of the operating system, but also contributes to security.

[0268] This application also provides an application loading method, as shown in Figure 3, which is a flowchart illustrating another application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in the operating system on AUTOSAR CP.

[0269] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in FIG2 above; or, it is understood that the application loading method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0270] It is understood that the application loading device involved in the application loading method provided in this application embodiment can refer to the relevant description of the application loading device involved in the application loading method shown in Figure 2 above, and will not be repeated here.

[0271] Specifically, this application loading method applies to an operating system, and the applications running on that operating system include:

[0272] There are two types of applications: self-starting applications (OSAs) and non-self-starting applications (OSAs). The self-starting OSA is responsible for applications that are relatively sensitive to startup time and require rapid execution upon operating system startup (power-on). The self-starting OSA must begin running before the non-self-starting OSA. The application loading method includes, but is not limited to, the following steps:

[0273] S301: When the application loading device starts loading the OS, it initializes the data segments used by the OS kernel and initializes the state of all OSAs to APPLICATION_NOLOAD.

[0274] Optionally, APPLICATION_NOLOAD indicates that the OSA is not loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0275] Alternatively, the circles in Figure 3 can be interpreted as the OS powering on, and the OS starting to load after powering on.

[0276] S302: When the OS starts, the application loading device begins loading the self-booting OSA.

[0277] It is understandable that the time period for loading the self-starting OSA refers to the time period between the start of OS startup and the start of the first object running after OS startup.

[0278] S303: Start running from the first object in the OSA.

[0279] S304: During the execution of any object in a self-starting OSA, a non-self-starting OSA is loaded via API calls.

[0280] It is understandable that during the execution of any object in a self-starting OSA, an interface provided by the OS is called, and a non-self-starting OSA is loaded based on this interface, which is used to indicate the non-self-starting OSA.

[0281] It is understandable that the OS has completed its startup when the first object in the OSA begins running.

[0282] S305: The application loading device loads the non-auto-starting OSA and feeds back the result of the non-auto-starting OSA loading to the task scheduling thread.

[0283] Optionally, step S304 above may be executed by the "task scheduling" module in the application loading device, which is a module that has at least task scheduling function.

[0284] Optionally, step S305 above may be executed by the "OS kernel service" module in the application loading device, which is a module that has at least OS kernel service functions.

[0285] Optionally, the "task scheduling" module and the "OS kernel service" module mentioned above can be understood as two different modules in the application loading device. The processes of task scheduling and OS kernel service in this application can be executed by the two modules mentioned above respectively.

[0286] Optionally, the aforementioned "task scheduling" module and "OS kernel service" module can also be understood as the same module or a combination of multiple modules in the application loading device. This application does not impose any restrictions on this, nor does it impose any restrictions on the execution modules of the processes related to task scheduling and OS kernel services.

[0287] This application embodiment controls the application startup loading time node through differentiated configuration. Applications containing critical business functions that are relatively sensitive to startup time are configured as self-starting applications and loaded when the OS starts. Applications containing non-critical business functions that are relatively insensitive to startup time are configured as non-self-starting applications and loaded during the running of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup speed of the operating system and improving the startup efficiency of the operating system.

[0288] This application also provides an application loading method, as detailed in Figure 4, which is a flowchart illustrating another application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in the operating system on AUTOSAR CP.

[0289] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in Figure 2 or Figure 3 above; or, it is understood that the application loading method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0290] It is understood that the application loading device involved in the application loading method provided in this application embodiment can refer to the relevant description of the application loading device involved in the application loading method shown in Figure 2 above, and will not be repeated here.

[0291] Specifically, this application loading method applies to an operating system, and the applications running on that operating system include:

[0292] There are two types of applications: self-starting applications (OSAs) and non-self-starting applications (OSAs). The self-starting OSA is responsible for applications that are relatively sensitive to startup time and require rapid execution upon operating system startup (power-on). The self-starting OSA must begin running before the non-self-starting OSA. The application loading method includes, but is not limited to, the following steps:

[0293] S401: When the application loading device starts loading the OS, it initializes the data segments used by the OS kernel and initializes the state of all OSAs to APPLICATION_NOLOAD.

[0294] Understandably, before booting the OS, the memory containing the data and code segments used by the OS kernel will be initialized. The OS kernel's data and kernel segments are initialized, and the default state of all OSAs is APPLICATION_NOLOAD.

[0295] Optionally, APPLICATION_NOLOAD indicates that the OSA is not loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0296] Alternatively, the circles in Figure 4 can be interpreted as the OS powering on, and the OS starting to load after powering on.

[0297] S402: Entering the OS startup phase, when starting the OS, the status of the self-starting OSA is set to APPLICATION_LOADING.

[0298] It is understandable that the time period for loading the self-starting OSA refers to the time period between the start of OS startup and the start of the first object running after OS startup.

[0299] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0300] S403: Initialize data for the self-starting OSA.

[0301] Initialize the memory used by the self-starting OSA. If the memory has not been initialized, initialize it, specifically by initializing the self-starting OSA data segment and code segment.

[0302] It is understood that there is no specific order between steps S403 and S402. S402 can be executed first and then S403, or S403 can be executed first and then S402, or S402 and S403 can be executed simultaneously. This application embodiment does not impose any restrictions on this.

[0303] S404: Load objects from the self-starting OSA.

[0304] Specifically, it can be a self-starting object loaded from the self-starting OSA, such as, but not limited to, self-starting tasks (TASK), self-starting timers (ALARM), self-starting schedule tables (ScheduleTable), etc., and this application embodiment does not limit this.

[0305] S405: Adjust the status of the self-starting OSA to APPLICATION_ACCESIBLE.

[0306] Optionally, "APPLICATION_ACCESSIBLE" indicates that the loading has been completed. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0307] Understandably, at this point, one or more objects contained in the self-starting OSA can be invoked and executed.

[0308] S406: Start task scheduling, starting with the first object in the startup OSA.

[0309] As is consistent with S303 in Figure 3 above, it will not be described again here.

[0310] It is understandable that the application loading method shown in Figure 4 above is the loading and startup process for self-starting OSA.

[0311] Optionally, for information about the "task scheduling" module in Figure 4, please refer to the relevant description of the "task scheduling" module in Figure 3 above, which will not be repeated here.

[0312] By implementing the embodiments of this application, applications containing critical business processes that are relatively sensitive to startup time are configured as self-starting applications and loaded when the OS starts. Applications containing non-critical business processes that are relatively insensitive to startup time are configured as non-self-starting applications and loaded during the execution of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup of the operating system and improving the startup efficiency of the operating system.

[0313] This application also provides an application loading method, as detailed in Figure 5, which is a flowchart illustrating another application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in the operating system on AUTOSAR CP.

[0314] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in Figures 2, 3 or 4 above; or, it is understood that the application loading method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0315] It is understood that the application loading device involved in the application loading method provided in this application embodiment can refer to the relevant description of the application loading device involved in the application loading method shown in Figure 2 above, and will not be repeated here.

[0316] Specifically, this application loading method applies to an operating system, and the applications running on that operating system include:

[0317] There are two types of applications: self-starting applications (OSAs) and non-self-starting applications (OSAs). The self-starting OSA is responsible for applications that are relatively sensitive to startup time and require rapid execution upon operating system startup (power-on). The self-starting OSA must begin running before the non-self-starting OSA. The application loading method includes, but is not limited to, the following steps:

[0318] S501: When the application loading device starts loading the OS, it initializes the data segments used by the OS kernel and initializes the state of all OSAs to APPLICATION_NOLOAD.

[0319] As is consistent with S401 in Figure 4 above, it will not be described again here.

[0320] Alternatively, the circles in Figure 5 can be interpreted as the OS powering on, and the OS starting to load after powering on.

[0321] S502: When the OS starts, the application loading device begins loading the self-booting OSA.

[0322] It is understandable that the time period for loading the self-starting OSA refers to the time period between the start of OS startup and the start of the first object running after OS startup.

[0323] It is understood that the specific implementation of S502 can be referred to steps S402 to S405 in Figure 4 above, and will not be repeated here.

[0324] S503: Starts running from the first object in the OSA.

[0325] As is consistent with S303 in Figure 3 above, it will not be described again here.

[0326] S504: During the execution of any object in a self-starting OSA, a non-self-starting OSA is loaded via API calls.

[0327] It is understandable that during the execution of any object in a self-starting OSA, an interface provided by the OS is called, and a non-self-starting OSA is loaded based on this interface, which is used to indicate the non-self-starting OSA.

[0328] Understandably, after the OS starts task scheduling, during the execution of a certain object (which may be determined by the user), it calls the API interface provided by the OS, which can specify which non-auto-starting OSA to start.

[0329] It is understandable that the OS has completed its startup when the first object in the OSA begins running.

[0330] S505: Adjust the status of non-auto-starting OSA to APPLICATION_LOADING.

[0331] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0332] S506: Initialize data for non-auto-starting OSA.

[0333] Initialize the memory used by the non-auto-starting OSA. If the memory has not been initialized, initialize it, specifically by initializing the non-auto-starting OSA data segment and code segment.

[0334] It is understood that steps S505 and S506 are not in any particular order. S505 can be executed first and then S506, or S506 can be executed first and then S505, or S505 and S506 can be executed simultaneously. This application embodiment does not impose any restrictions on this.

[0335] S507: Load objects from a non-auto-starting OSA.

[0336] Specifically, it can be loading a startup object from a non-startup OSA, such as, but not limited to, a startup task (TASK), a startup timer (ALARM), a startup schedule table (ScheduleTable), etc. This application embodiment does not limit this.

[0337] S508: Adjust the status of non-auto-starting OSA to APPLICATION_ACCESIBLE.

[0338] Optionally, "APPLICATION_ACCESSIBLE" indicates that the loading has been completed. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0339] Understandably, at this point, one or more objects contained in a non-auto-starting OSA can be invoked and executed.

[0340] It is understandable that the application loading method shown in Figure 5 above is the loading and startup process for non-auto-starting OSA.

[0341] Optionally, for the "Task Scheduling" module and "OS Kernel Service" module in Figure 5, please refer to the relevant descriptions of the "Task Scheduling" module and "OS Kernel Service" module in Figure 3 above, which will not be repeated here.

[0342] By implementing the embodiments of this application, applications containing critical business processes that are relatively sensitive to startup time are configured as self-starting applications and loaded when the OS starts. Applications containing non-critical business processes that are relatively insensitive to startup time are configured as non-self-starting applications and loaded during the execution of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup of the operating system and improving the startup efficiency of the operating system.

[0343] This application also provides a method for switching application states, as detailed in Figure 6, which is a schematic diagram of application switching provided in an embodiment of this application. This application state switching method is applied in the field of operating system technology, such as application state switching in the operating system on AUTOSAR CP.

[0344] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in Figures 2, 3, 4 or 5 above; or, it is understood that the application state switching method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0345] Specifically, this application state switching method applies to the operating system, and the applications running on the operating system include:

[0346] There are two types of applications: self-starting applications (OSAs) and non-self-starting applications (OSAs). The self-starting OSA is responsible for applications that are relatively sensitive to startup time and require rapid execution upon operating system startup (power-on). The self-starting OSA must begin running before the non-self-starting OSA. The methods for switching application states include, but are not limited to, the following steps:

[0347] First, before starting the OS, initialize the state of all OSAs to APPLICATION_NOLOAD.

[0348] Optionally, APPLICATION_NOLOAD indicates that the OSA is not loaded. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0349] Then, when the OS is started and the loaded OSA is an auto-starting OSA, the status of the auto-starting OSA is adjusted to APPLICATION_LOADING.

[0350] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0351] Secondly, after the self-starting OSA is loaded, adjust the status of the self-starting OSA to APPLICATION_ACCESIBLE.

[0352] Optionally, "APPLICATION_ACCESSIBLE" indicates that the loading has been completed. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0353] On the other hand, after the self-starting OSA is loaded, if the API is called and the loaded OSA is a non-self-starting OSA, the status of the non-self-starting OSA is adjusted to APPLICATION_LOADING.

[0354] Optionally, "APPLICATION_LOADING" indicates that the application is loading, but it can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0355] After the non-auto-starting OSA is loaded, adjust the status of the non-auto-starting OSA to APPLICATION_ACCESIBLE.

[0356] Optionally, "APPLICATION_ACCESSIBLE" indicates that the loading has been completed. This can also be replaced with other forms of representation, and this application embodiment does not limit this.

[0357] The OSA state switching in this embodiment clearly defines the states of each OSA and the steps that each OSA should execute in each state. Loading self-starting OSA during OS startup and loading non-self-starting OSA during the execution of objects in already loaded self-starting OSA reduces the application loading burden at startup and decreases the consumption of operating system resources, thereby accelerating the operating system startup speed and improving its startup efficiency.

[0358] This application adds a new attribute related to startup loading to OSA, defining two startup loading behaviors for OSA: self-starting OSA and non-self-starting OSA.

[0359] Optionally, OSA's startup loading behavior can also be exposed to user configuration. For example, a new configuration item related to startup loading can be provided for OSA objects, which determines whether OSA's startup loading behavior is automatic or non-automatic.

[0360] For details, please refer to Figure 7, which is a schematic diagram of an OSA startup configuration interface provided in an embodiment of this application.

[0361] As shown in Figure 7, a new configuration item related to startup loading is provided for OSA(OsApplication_0), and this configuration item is open to user configuration. Users can use this configuration item to determine whether the startup loading behavior of OSA(OsApplication_0) is automatic or non-automatic.

[0362] For example, when configured as "true", it means that the above OSA(OsApplication_0) is an auto-starting OSA, which is loaded when the OS starts.

[0363] When configured as "false", it indicates that the above OSA(OsApplication_0) is a non-auto-starting OSA, and the OSA(OsApplication_0) is loaded during the execution of any object after the operating system starts.

[0364] Optionally, the configuration items regarding "true" and "false" are merely examples, and the configuration items can also be "1" and "0", etc., and this application embodiment does not limit them.

[0365] This application embodiment controls the application startup loading time node through differentiated configuration. Applications containing critical business functions that are relatively sensitive to startup time are configured as self-starting applications and loaded when the OS starts. Applications containing non-critical business functions that are relatively insensitive to startup time are configured as non-self-starting applications and loaded during the running of objects in already loaded applications. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup speed of the operating system and improving the startup efficiency of the operating system.

[0366] This application also provides a schematic diagram comparing the startup times under two OS startup methods. For details, please refer to Figure 8, which is a schematic diagram of an OS startup time provided by an embodiment of this application.

[0367] As shown in Figure 8, the OS boot method to the left of the dashed line (which can be called OS boot method 1) can be referred to in the description of the OS boot method in Figure 1 above, and will not be repeated here. The OS boot method to the right of the dashed line (which can be called OS boot method 2) can be referred to in the description of the OS boot methods in Figures 2 to 5 above, and will not be repeated here.

[0368] As can be seen from Figure 8, the OS startup time T1 corresponding to OS startup mode 1 is much longer than the OS startup time T2 corresponding to OS startup mode 2.

[0369] Understandably, since OS startup method 1 does not differentiate between self-starting OSA and non-self-starting OSA based on the OSA's sensitivity to startup time, but instead loads all OSA when the operating system starts up, this results in a slower operating system startup speed and lower startup efficiency.

[0370] In OS startup method 2, the OSA containing critical services that are relatively sensitive to startup time is configured as an auto-starting OSA and loaded when the OS starts. The OSA containing non-critical services that are relatively insensitive to startup time is configured as a non-auto-starting OSA and loaded during the execution of objects in the already loaded auto-starting OSA. This can reduce the loading burden on applications when the operating system starts up, reduce the occupation of operating system resources, thereby speeding up the startup of the operating system and improving the startup efficiency of the operating system.

[0371] This application also provides an application loading method, as detailed in Figures 9 and 10. Figure 9 is a schematic diagram of an OSA startup configuration provided in an embodiment of this application, and Figure 10 is a flowchart illustrating another application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in the operating system on AUTOSAR CP.

[0372] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in Figures 2, 3, 4 or 5 above; or, it is understood that the application loading method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0373] It is understood that the application loading device involved in the application loading method provided in this application embodiment can refer to the relevant description of the application loading device involved in the application loading method shown in Figure 2 above, and will not be repeated here.

[0374] As shown in Figure 9, in tools including but not limited to AUTOSAR CPOS, if the auto-start attribute of an auto-starting OSA is configured to true, the corresponding field in the dynamic code generated by the tool will be true; if the auto-start attribute of a non-auto-starting OSA is configured to false, the corresponding field in the dynamic code generated by the tool will be false.

[0375] Based on the above configuration, OSA1 is an auto-starting OSA, and OSA2 is a non-auto-starting OSA. All OSAs are initially set to ALLPICATION_NOLOAD, indicating that the OSA is not loaded. Furthermore, OSA1 includes auto-starting Task1, non-auto-starting Task2, and auto-starting Alarm1, while OSA2 includes auto-starting Task3, non-auto-starting Task4, and auto-starting Alarm2.

[0376] As shown in Figure 10, based on the above configuration, the application loading method includes, but is not limited to, the following steps:

[0377] (1) During the OS startup process, start OSA1 and change the status of OSA1 to APPLICATION_LOADING, indicating that OSA1 is loading.

[0378] (2) Initialize the memory where OSA1 resides. If the data segment used by OSA1 and the memory where it resides have not been initialized, initialize them.

[0379] (3) Initialize the data segment (and code segment) of OSA1.

[0380] (4) Start the self-starting objects in OSA1, such as Task1 and / or Alarm1.

[0381] (5) Change the status of OSA1 to APPLICATION_ACCESSIBLE, indicating that OSA1 has been loaded.

[0382] (6) Start task scheduling, schedule and run objects in OSA1.

[0383] (7) Task1 is scheduled.

[0384] (8) After Task1 is scheduled, the OS API is called during the execution of Task1 to load OSA2. Optionally, the field content of the OS API can be "Os_LoadApplication(OSA2)".

[0385] (9) Change the status of OSA2 to APPLICATION_LOADING, indicating that OSA2 is being loaded.

[0386] (10) Initialize the memory where OSA2 is located.

[0387] (11) Initialize the data segment of OSA2.

[0388] (12) Start the auto-starting objects in OSA2, such as Task3 and / or Alarm2.

[0389] (13) Change the status of OSA2 to APPLICATION_ACCESSIBLE, indicating that OSA2 has been loaded.

[0390] (14) OSA2 is successfully loaded. Objects in OSA2 can be accessed by other OSAs and task scheduling can continue.

[0391] By using the embodiments of this application, the application startup loading time is controlled through differentiated configuration. Applications containing critical business functions that are relatively sensitive to startup time are configured as self-starting applications (OSA1) and loaded when the OS starts. Applications containing non-critical business functions that are relatively insensitive to startup time are configured as non-self-starting applications (OSA2) and loaded during the running of objects in the already loaded application (OSA1). This reduces the loading burden on applications when the operating system starts up, reduces the occupation of operating system resources, and thus speeds up the startup of the operating system and improves the startup efficiency of the operating system.

[0392] This application also provides an application loading method, as detailed in Figures 11 and 12. Figure 11 is a schematic diagram of another OSA startup configuration provided in an embodiment of this application, and Figure 12 is a flowchart illustrating yet another application loading method provided in an embodiment of this application. This application loading method is applied in the field of operating system technology, such as application loading in the operating system on AUTOSAR CP.

[0393] It is understood that the steps in the embodiments of this application can be regarded as reasonable modifications or supplements to the embodiments in Figures 2, 3, 4, 5 or 10 above; or, it is understood that the application loading method in the embodiments of this application can also be regarded as an embodiment that can be executed independently, and this application does not limit it.

[0394] It is understood that the application loading device involved in the application loading method provided in this application embodiment can refer to the relevant description of the application loading device involved in the application loading method shown in Figure 2 above, and will not be repeated here.

[0395] As shown in Figure 11, in tools including but not limited to AUTOSAR CPOS, if the auto-start attribute of an auto-starting OSA is configured to true, the corresponding field in the dynamic code generated by the tool will be true; if the auto-start attribute of a non-auto-starting OSA is configured to false, the corresponding field in the dynamic code generated by the tool will be false.

[0396] Based on the above configuration, OSA1 and OSA2 are auto-starting OSAs, while OSA3 and OSA4 are non-auto-starting OSAs. All OSAs are initially set to ALLPICATION_NOLOAD, indicating that the OSA is not loaded. Furthermore, OSA1 includes auto-starting Task1, non-auto-starting Task2, and auto-starting Alarm1; OSA2 includes auto-starting Task3, non-auto-starting Task4, and auto-starting Alarm2; OSA3 includes auto-starting Task5, non-auto-starting Task6, and auto-starting Alarm3; and OSA4 includes auto-starting Task7, non-auto-starting Task8, and auto-starting Alarm4.

[0397] As shown in Figure 12, based on the above configuration, the application loading method includes, but is not limited to, the following steps:

[0398] (1) During the OS startup process, OSA1 and OSA2 are started, and the status of OSA1 and OSA2 is changed to APPLICATION_LOADING, indicating that OSA1 and OSA2 are loading.

[0399] (2) Initialize the memory where OSA1 and OSA2 are located. If the data segments used by OSA1 and OSA2 and the memory they are located in have not been initialized, initialize them.

[0400] (3) Initialize the data segment (and code segment) of OSA1 and OSA2.

[0401] (4) Start the auto-starting objects in OSA1, such as Task1 and / or Alarm1, and start the auto-starting objects in OSA2, such as Task3 and / or Alarm2.

[0402] (5) Change the status of OSA1 and OSA2 to APPLICATION_ACCESSIBLE, indicating that OSA1 and OSA2 have been loaded.

[0403] (6) Start task scheduling, schedule and run objects in OSA1 and / or OSA2.

[0404] (7) Task3 is scheduled.

[0405] (8) After Task3 is scheduled, the OS API is called during the execution of Task3 to load OSA3. Optionally, the field content of the OS API can be "Os_LoadApplication(OSA3)".

[0406] (9) Change the status of OSA3 to APPLICATION_LOADING, indicating that OSA3 is being loaded.

[0407] (10) Initialize the memory where OSA3 is located.

[0408] (11) Initialize the data segment of OSA3.

[0409] (12) Start the auto-starting objects in OSA3, such as Task5 and / or Alarm3.

[0410] (13) Change the status of OSA3 to APPLICATION_ACCESSIBLE, indicating that OSA3 has been loaded.

[0411] (14) OSA3 is loaded successfully. Objects in OSA3 can be accessed by other OSAs and task scheduling can continue.

[0412] (15) Task5 is scheduled.

[0413] (16) After Task5 is scheduled, the OS API is called during the execution of Task5 to load OSA4. Optionally, the field content of the OS API can be "Os_LoadApplication(OSA4)".

[0414] (17) Change the status of OSA4 to APPLICATION_LOADING, indicating that OSA4 is being loaded.

[0415] (18) Initialize the memory where OSA4 is located.

[0416] (19) Initialize the data segment of OSA4.

[0417] (20) Start the auto-starting objects in OSA4, such as Task7 and / or Alarm4.

[0418] (21) Change the status of OSA4 to APPLICATION_ACCESSIBLE, indicating that OSA4 has been loaded.

[0419] (22) OSA4 is loaded successfully. Objects in OSA4 can be accessed by other OSAs and task scheduling can continue.

[0420] This application embodiment controls the application startup loading time node through differentiated configuration. Applications containing critical business functions that are relatively sensitive to startup time are configured as self-starting applications (OSA1, OSA2) and loaded when the OS starts. Applications containing non-critical business functions that are relatively insensitive to startup time are configured as non-self-starting applications (OSA3, OSA4) and loaded during the running of objects in already loaded applications (OSA1 and / or OSA2). This reduces the loading burden on applications when the operating system starts up, reduces the occupation of operating system resources, and thus speeds up the startup of the operating system and improves the startup efficiency.

[0421] The methods of the embodiments of this application have been described in detail above. The following provides an apparatus for implementing any one of the methods in the embodiments of this application. For example, an apparatus is provided that includes a unit (or means) for implementing the steps performed by the device in any of the above methods.

[0422] Please refer to Figure 13, which is a schematic diagram of the structure of an application loading device provided in an embodiment of this application.

[0423] As shown in Figure 13, the application loading device 130 may include a communication unit 1301 and a processing unit 1302. The communication unit 1301 and the processing unit 1302 may be software, hardware, or a combination of software and hardware.

[0424] The communication unit 1301 can implement sending and / or receiving functions, and can also be described as a transceiver unit. The communication unit 1301 can also be a unit integrating an acquisition unit and a sending unit, wherein the acquisition unit is used to implement the receiving function, and the sending unit is used to implement the sending function. Optionally, the communication unit 1301 can be used to receive information sent by other devices, and can also be used to send information to other devices.

[0425] In one possible design, the application loading device 130 may correspond to the application loading device in the method embodiments shown in Figures 2 to 5, 10, and 12. For example, the application loading device 130 may be an electronic device or a chip within an electronic device. The application loading device 130 may include units for performing the operations executed by the application loading device in the method embodiments shown in Figures 2 to 5, 10, and 12. Each unit in the application loading device 130 is responsible for implementing the operations executed by the application loading device in the method embodiments shown in Figures 2 to 5, 10, and 12. The device is applied to an operating system, and the applications running on this operating system include a first application and a second application. The first application starts running before the second application starts running. The descriptions of the various units are as follows:

[0426] The processing unit 1302 is configured to load the first application within a first time period, wherein the starting point of the first time period is the start time of the operating system, the ending point of the first time period is a first moment, the first moment is not later than a second moment, and the second moment is the start time of the first object after the operating system starts running.

[0427] The processing unit 1302 is further configured to load the second application during the execution of the first object in the first application.

[0428] In one possible implementation, the communication unit 1301 is used to acquire the first application and the second application.

[0429] Regarding the communication unit 1301 and processing unit 1302 described in this design, the steps they perform can be referred to the implementation methods corresponding to the application loading device in the method embodiments shown in Figures 2 to 5, 10 and 12 above.

[0430] Regarding the technical effects of the implementation methods performed by the communication unit 1301 and processing unit 1302 described in this design, please refer to the description of the technical effects of the method embodiments shown in Figures 2 to 5, 10 and 12 above.

[0431] According to embodiments of this application, the various units in the device shown in FIG13 can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effect of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can also be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the electronic device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.

[0432] It should be noted that the implementation of each unit can also refer to the corresponding descriptions of the method embodiments shown in Figures 2 to 5, 10 and 12 above.

[0433] In the application loading device 130 described in Figure 13, the startup speed of the OS can be accelerated and the startup efficiency of the OS can be improved.

[0434] If the application loading device 130 described above can be an electronic device, please refer to the structural schematic diagram of the electronic device shown in FIG14.

[0435] It should be understood that the electronic device 140 shown in FIG14 is only an example. The electronic device in the embodiments of this application may also include other components, or include components that have similar functions to the various components in FIG14, or may not include all the components in FIG14.

[0436] Electronic device 140 includes a transceiver interface 1401 and at least one processor 1402.

[0437] The electronic device 140 can correspond to an application loading device. The transceiver interface 1401 is used for transmitting and receiving signals, and at least one processor 1402 executes program instructions, causing the electronic device 140 to implement the corresponding flow of the method executed by the corresponding device in the above method embodiments.

[0438] In one possible design, the electronic device 140 may correspond to the application loading device in the method embodiments shown in Figures 2 to 5, 10, and 12. For example, the electronic device 140 may be an application loading device or a chip within the application loading device. The electronic device 140 may include components for performing the operations performed by the application loading device in the above method embodiments, and each component in the electronic device 140 is specifically designed to implement the operations performed by the application loading device in the above method embodiments. Specifically, it may be as follows:

[0439] During the first time period, the first application is loaded. The start time of the first time period is the start time of the operating system, and the end time of the first time period is the first moment. The first moment is no later than the second moment, and the second moment is the start time of the first object after the operating system starts running.

[0440] During the execution of the first object in the first application, the second application is loaded.

[0441] Regarding the transceiver interface 1401 and at least one processor 1402 described in this design, the steps performed can be referred to the implementation corresponding to the application loading device in the method embodiments shown in Figures 2 to 5, 10, and 12 above.

[0442] Regarding the technical effects of the implementation methods performed by the transceiver interface 1401 and at least one processor 1402 described in this design, please refer to the description of the technical effects of the method embodiments shown in Figures 2 to 5, 10, and 12 above.

[0443] In the electronic device 140 described in Figure 14, the startup speed of the OS can be accelerated and the startup efficiency of the OS can be improved.

[0444] If the application loading device 130 described above can be a chip or a chip system, please refer to the schematic diagram of the chip structure shown in Figure 15.

[0445] As shown in Figure 15, chip 150 includes processor 1501 and interface 1502. The number of processors 1501 can be one or more, and the number of interfaces 1502 can be multiple. It should be noted that the functions of processor 1501 and interface 1502 can be implemented through hardware design, software design, or a combination of both; no restrictions are placed here.

[0446] Optionally, the chip 150 may also include a memory 1503 for storing necessary program instructions and data.

[0447] In this application, processor 1501 can be used to call the implementation program of the application loading method provided in one or more embodiments of this application in the application loading device from memory 1503, and execute the instructions included in the program. Interface 1502 can be used to output the execution result of processor 1501. In this application, interface 1502 can be specifically used to output various messages or information of processor 1501.

[0448] The application loading method provided by one or more embodiments of this application can be referred to the various embodiments shown in Figures 2 to 5, 10 and 12 above, which will not be repeated here.

[0449] The processor in this application embodiment can be a central processing unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0450] The memory in this application embodiment is used to provide storage space, in which data such as operating system and computer programs can be stored. The memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or compact disc read-only memory (CD-ROM).

[0451] According to the method provided in the embodiments of this application, the embodiments of this application also provide a computer-readable storage medium storing a computer program. When the computer program is run on one or more processors, it can implement the methods shown in Figures 2 to 5, 10 and 12.

[0452] According to the method provided in the embodiments of this application, the embodiments of this application also provide a computer program product, which includes a computer program. When the computer program runs on a processor, it can implement the methods shown in Figures 2 to 5, 10 and 12.

[0453] This application embodiment also provides a mobile terminal, which includes at least one application loading device 130, or electronic device 140, or chip 150.

[0454] Optionally, the mobile terminal can be a means of transportation, such as a car, truck, aircraft, drone, slow transport vehicle, spacecraft, or ship, or any other possible means of transportation used in any possible scenario. This application embodiment does not limit this.

[0455] Optionally, the mobile terminal is used to implement the methods shown in Figures 2 to 5, 10, and 12 above.

[0456] Optionally, the application loading method shown in Figures 2 to 5, 10 and 12 above can be carried in the form of an executable file in the vehicle operating system (VOS) of a mobile terminal.

[0457] This application also provides a processing apparatus, including a processor and an interface; the processor is used to execute the method in any of the above method embodiments.

[0458] It should be understood that the above-described processing device can be a chip. The units in the various device embodiments and the electronic devices in the method embodiments correspond completely, with corresponding modules or units executing corresponding steps. For example, the communication unit (transceiver) executes the receiving or sending steps in the method embodiments, while other steps besides sending and receiving can be executed by the processing unit (processor). The specific functions of each unit can be found in the corresponding method embodiments. There can be one or more processors.

[0459] It is understood that in the embodiments of this application, the electronic device may perform some or all of the steps in the embodiments of this application. These steps or operations are merely examples, and the embodiments of this application may also perform other operations or variations thereof. Furthermore, the steps may be performed in different orders as presented in the embodiments of this application, and it is not necessarily necessary to perform all the operations in the embodiments of this application.

[0460] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0461] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0462] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0463] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the contributing part, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0464] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An application loading method characterized by comprising: Applied to an operating system, the applications running on the operating system include a first application and a second application, wherein the start time of the first application is before the start time of the second application; The application loading method includes: During the first time period, the first application is loaded. The start time of the first time period is the start time of the operating system. The end time of the first time period is the first moment. The first moment is no later than the second moment. The second moment is the start time of the first object after the operating system starts running. During the execution of the first object in the first application, the second application is loaded.

2. The application loading method according to claim 1, wherein Loading the first application includes: Initialize the data of the first application; Set the state of the first application to a first state, which indicates that the application is loading.

3. The method according to claim 1 or 2, characterized in that, The application loading method also includes: During the first time period, the state of the second application is set to a second state, which indicates that the application is not loaded.

4. The application loading method according to any one of claims 1 to 3, wherein, The application loading method also includes: After loading the first application, the state of the first application is adjusted to a third state, which indicates that the application has finished loading.

5. The application loading method according to any one of claims 1 to 4, wherein, Loading the second application includes: The first interface provided by the operating system is invoked, and the first interface is used to instruct the second application; The second application is loaded according to the first interface.

6. The application loading method according to any one of claims 1 to 5, wherein, Loading the second application includes: Initialize the data for the second application; Adjust the state of the second application to the first state, which indicates that the application is loading.

7. The application loading method according to any one of claims 1 to 6, wherein, The application loading method also includes: After loading the second application, the state of the second application is adjusted to a third state, which indicates that the application has finished loading.

8. The application loading method according to any one of claims 1 to 7, wherein, The applications running on the operating system also include a third application, the third application starting to run after the second application. The application loading method also includes: During the execution of the second object in the second application, the third application is loaded.

9. The application loading method according to claim 8, wherein Loading the third application includes: The operating system provides a second interface, which is used to instruct the third application. The third application is loaded according to the second interface.

10. The application loading method according to claim 8 or 9, wherein The application loading method also includes: During the first time period, the state of the third application is set to a second state, which indicates that the application is not loaded.

11. The application loading method according to any one of claims 8 to 10, wherein, Loading the third application includes: Initialize the data of the third application; The state of the third application is adjusted to a first state, which indicates that the application is loading.

12. The application loading method according to any one of claims 8 to 11, wherein, The application loading method also includes: After the third application is loaded, the state of the third application is adjusted to a third state, which indicates that the application has finished loading.

13. The application loading method according to any one of claims 1 to 12, wherein, The loading start time of the application running on the operating system is configured through the first field; Wherein, when the first field is a first value, it indicates that the application running on the operating system is loaded during the first time period; or, when the first field is a second value, it indicates that the application running on the operating system is loaded during the execution of any object after the operating system starts.

14. The application loading method according to any one of claims 1 to 13, wherein, The status of the application running on the operating system is configured through the second field; Wherein, when the second field is a third value, it indicates that the application is loading; or, when the second field is a fourth value, it indicates that the application has not been loaded; or, when the second field is a fifth value, it indicates that the application has finished loading.

15. The application loading method according to any one of claims 1 to 14, wherein, The first object includes any one or more of the following: First task, first timer, first schedule table.

16. The application loading method according to any one of claims 1 to 15, wherein, The operating system includes one that runs on the AUTOSAR CP standard platform for automotive open systems architecture.

17. The application loading method according to any one of claims 1 to 16, wherein, The first application includes applications involving functional safety, and the second application includes applications not involving functional safety.

18. An application loading apparatus characterized by comprising: Includes units for performing the method as described in any one of claims 1 to 17.

19. An application loading apparatus characterized by comprising: Includes a processor for performing the method as described in any one of claims 1 to 17.

20. A chip, characterized by It includes logic circuits and interfaces, wherein the logic circuits and the interfaces are coupled; The interface is used for inputting and / or outputting information, and the logic circuit is used for performing the method as described in any one of claims 1 to 17.

21. A mobile terminal, characterized by This includes the application loading device as described in claim 18, or the application loading device as described in claim 19, or the chip as described in claim 20.

22. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which, when executed, performs the method as described in any one of claims 1 to 17.

23. A computer program product, characterised in that, The computer program product includes a computer program, which, when executed, performs the method as described in any one of claims 1 to 17.