Method and device for loading application program
By capturing the target macros and hardware IDs on the system-level chip development platform of the automotive intelligent cockpit and performing corresponding processing processes, the problem of waste of software development resources for multiple models and multiple hardware is solved, and efficient software development and R&D costs are achieved.
Patent Information
- Application Number
- CN202411664878.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-11
AI Technical Summary
In the development process of automotive smart cockpits, the different configurations and hardware requirements of multiple models lead to waste of software development resources. How to improve development efficiency and reduce R&D costs has become an urgent problem.
By running the target operating system on the system-level chip development platform, capturing the target model variables in the target macro, and executing the corresponding processing process in combination with the hardware ID, the unified software development for different models and hardware is achieved.
This method allows the implementation of multi-model and multi-hardware software development without developing separate software branches for each vehicle model and hardware ID, improving development efficiency and reducing R&D costs.
Smart Images

Figure CN119597364A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of automobile intelligent cockpits, and in particular to a method and device for loading an application program. Background Art
[0002] With the development of society, the number of cars has increased rapidly, and users' requirements for the intelligence of cars have become higher and higher. It is imperative to vigorously promote the intelligent cockpit of cars.
[0003] For car manufacturers, the variety of car products plays an important role in attracting users in the fierce car market. However, for the developers of car smart cockpits, multiple product types of models mean that software development for multiple models is required. In addition, different configurations of each model may also have different external devices during the production process, such as different screens, cameras, speakers, microphones, etc. Or, when using the same hardware, users experience different software functions.
[0004] Therefore, in the related art, if a software branch is developed separately for each model, it means consuming huge development resources. Therefore, how to improve development efficiency and reduce R&D costs for multiple models has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present disclosure provides a method and device for loading an application program to solve the problem of how to improve development efficiency and reduce research and development costs for multiple vehicle models.
[0006] In a first aspect, the present disclosure provides a method for loading an application, the method being used for a system-on-chip development platform, and a target operating system running on the development platform, the method comprising: in response to starting a target application, capturing a target macro, and the target application running in a target operating system; based on a target vehicle type variable in the target macro, executing a first processing flow corresponding to the target vehicle type variable to obtain a first processing result, and obtaining a hardware ID in a target command line parameter; executing a second processing flow corresponding to the first processing result and the hardware ID to obtain a second processing result.
[0007] In a second aspect, the present disclosure provides a device for launching an application, the device is used for a system-on-chip development platform, and a target operating system is run on the development platform. The device includes: a macro capture module, which is used to capture a target macro in response to launching a target application, and the target application runs in a target operating system; a first processing module, which is used to execute a first processing flow corresponding to a target vehicle type variable based on a target vehicle type variable in a target macro, and obtain a first processing result; a parameter acquisition module, which is used to obtain a hardware ID in a target command line parameter; and a second processing module, which is used to execute a second processing flow corresponding to the first processing result and the hardware ID, and obtain a second processing result.
[0008] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the method for loading an application according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0009] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for loading an application according to the first aspect or any corresponding embodiment thereof.
[0010] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the method for loading an application according to the first aspect or any corresponding embodiment thereof.
[0011] The method for loading an application in the above-mentioned embodiment of the present disclosure, in response to starting a target application, captures a target macro to obtain a target vehicle model variable in the target macro; thereafter, based on the target vehicle model variable, a first processing flow corresponding to the target vehicle model variable can be executed to obtain a first processing result, and the hardware ID in the target command line parameter can be obtained, and a second processing flow corresponding to the first processing result and the hardware ID can be executed to obtain a second processing result. In this process, the target vehicle model variable and the hardware ID are respectively used as parameters introduced at different stages, so that for different target vehicle model variables and different hardware IDs, only the parameters need to be changed to achieve software development using the same method, without the need to develop software branches separately for the corresponding vehicle models and hardware IDs. When developing software for multiple vehicle models, the software development efficiency is improved and the R&D cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0013] Figure 1 is a flowchart of a method for loading an application according to an embodiment of the present disclosure;
[0014] Figure 2 is a flowchart of another method for loading an application according to an embodiment of the present disclosure;
[0015] Figure 3ais a flowchart of a method for loading an application program in a compiling phase according to an embodiment of the present disclosure;
[0016] Figure 3b is a flow chart of a method for loading an application program in a running stage according to an embodiment of the present disclosure;
[0017] Figure 4 is a structural block diagram of a device for loading an application according to an embodiment of the present disclosure;
[0018] Figure 5 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0020] According to an embodiment of the present disclosure, a method embodiment for loading an application is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0021] In this embodiment, a method for loading an application is provided, which can be used in a management control module of a target operating system of a system-on-chip development platform. Figure 1 is a flowchart of a method for loading an application according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:
[0022] Step S101 , in response to starting a target application, capturing a target macro, the target application running in a target operating system.
[0023] In this embodiment, the target application refers to the driver software corresponding to the target hardware ID. The hardware ID can be a unique identifier of a device under different hardware versions or configurations, that is, the hardware ID indicates the version information of the hardware and can be used to distinguish different devices or different configurations of the same device. The target operating system can be an operating system running on a system-on-chip development platform, such as a real-time operating system (such as QNX, Micro C / OS, VxWorks, etc.) or an intelligent operating system (such as Android, Hongmeng, etc.).
[0024] The target macro is a macro variable of the target vehicle model corresponding to the target hardware ID, that is, the target macro includes the target vehicle model variable. The target macro can be pre-set, or it can be obtained by compiling the macro including the target environment variable into the running code when compiling the target application, and the target environment variable includes the pre-exported target vehicle model variable.
[0025] In some specific examples, the target macro can be determined based on the following steps: when compiling the target operating system, determine the target hardware according to the input of the menu function, set the target environment variable (i.e., compilation configuration) corresponding to the target hardware; determine whether the target application indicates to export the target vehicle model variable, if so, export the target vehicle model variable from the target environment variable, and compile the macro including the target environment variable into the running code of the target application to obtain the target macro. This example can quickly and accurately obtain the target macro.
[0026] Thus, the above execution subject can capture the target macro when running the compiled target application.
[0027] Step S102: Based on the target vehicle model variable in the target macro, a first processing flow corresponding to the target vehicle model variable is executed to obtain a first processing result.
[0028] In this embodiment, the first processing flow is a pre-set processing flow that needs to be executed for the corresponding target vehicle model variable. After capturing the target macro, the execution subject can execute the first processing flow corresponding to the target vehicle model variable based on the target vehicle model variable in the target macro, thereby obtaining a first processing result.
[0029] Step S103, obtaining the hardware ID in the target command line parameter.
[0030] In this embodiment, the target command line parameter refers to a command line parameter used to store the hardware ID, which can be a piece of data information in a real-time operating system (such as QNX, Micro C / OS, VxWorks, etc.) or an intelligent operating system (such as Android, Hongmeng, etc.).
[0031] For example, the target command line parameter may be cmdline, which is a piece of data information in Android or QNX. The target command line parameter is pre-stored in the hardware ID when the hardware ID is successfully checked. Thus, the above execution subject can obtain the hardware ID in the target command line parameter.
[0032] Step S104, executing a second processing flow corresponding to the first processing result and the hardware ID to obtain a second processing result.
[0033] In this embodiment, the second processing flow is a pre-set flow that needs to be processed and matches the first processing result and the hardware ID in the target command line parameter.
[0034] The execution subject can execute a second processing flow corresponding to the first processing result and the target command line parameter to obtain a second processing result, thereby achieving targeted processing of the combined information of the target vehicle model and the target hardware.
[0035] The method for loading an application provided in this embodiment captures a target macro in response to starting a target application to obtain a target vehicle model variable in the target macro; thereafter, based on the target vehicle model variable, a first processing flow corresponding to the target vehicle model variable is executed to obtain a first processing result, and the hardware ID in the target command line parameter is obtained, and a second processing flow corresponding to the first processing result and the hardware ID is executed to obtain a second processing result. In this process, the target vehicle model variable and the hardware ID are respectively used as parameters introduced at different stages, so that for different target vehicle model variables and different hardware IDs, only the parameters need to be changed to achieve software development using the same method, without the need to develop software branches separately for the corresponding vehicle models and hardware IDs. When developing software for multiple vehicle models, the software development efficiency is improved and the R&D cost is reduced.
[0036] In some optional implementations of this embodiment, the target command line parameters can be obtained based on the following setting steps: when loading the boot program of the target operating system, read the hardware ID from the board; if the hardware ID exists in the hardware ID table, write the hardware ID into the memory; record the hardware IDs corresponding to each application in the hardware ID table; when the target application calls the application program interface to read the hardware ID from the memory, pass the read hardware ID into the target command line parameters.
[0037] In this implementation, the above-mentioned execution subject will read the hardware ID and obtain the hardware version information when the program is just started. The hardware ID is represented by the high and low levels of the general input and output (GPIO) on the hardware board. After obtaining the hardware version information, a hardware ID table corresponding to the version information is maintained in the present disclosure. The hardware IDs corresponding to all software are recorded in the table, so that it is possible to compare whether the read hardware ID is registered in the hardware ID table.
[0038] For hardware IDs registered in the hardware ID table, the hardware IDs will be written to the memory, and applications in real-time operating systems (such as QNX, Micro C / OS, VxWorks, etc.) can call APIs to read version information. The version information will also be passed to the target command line parameters (such as cmdline in Android systems) for use by applications in another intelligent operating system (such as Android, Hongmeng, etc.).
[0039] The step of setting the target command line parameters in this implementation method improves the accuracy and effectiveness of the hardware ID passed by the target command line parameters by using a hardware ID table to confirm the validity of the hardware ID, and passes the valid hardware ID into the target command line parameters, thereby improving the hardware ID corresponding to the existing software, using the same method to carry out software development, improving software development efficiency, and reducing R&D costs.
[0040] In some optional implementations of this embodiment, the above-mentioned setting steps may also include: detecting the hardware ID read from the board, and when the result of detecting the hardware ID is correct, executing at least one of the following: triggering execution if the hardware ID exists in the hardware ID table, writing the hardware ID into the memory; if the hardware ID does not exist in the hardware ID table, prompting that loading the target operating system has failed.
[0041] In this implementation, before executing the target command line parameter setting step, the vehicle's diagnostic system (such as an OBD system) or a special scanning tool can be used to detect the hardware ID read from the board, and when the result of detecting the hardware ID is correct, the above-mentioned target command line parameter setting step is triggered to execute, thereby avoiding executing the target command line parameter setting step when the result of detecting the hardware ID is incorrect, thereby improving the effectiveness of the executed target command line parameter setting step.
[0042] Alternatively or additionally, when the result of detecting the hardware ID is correct, if the hardware ID does not exist in the hardware ID table, a prompt will be given that loading the target operating system has failed, so that the staff can proceed with subsequent processing or adjustment operations according to the prompt, thereby improving the effectiveness of the setting steps of the executed target command line parameters.
[0043] In this embodiment, a method for loading an application is provided, which can be used in the management control module of the target operating system of the above-mentioned system-on-chip development platform. Figure 2 is a flowchart of a method for loading an application according to an embodiment of the present disclosure. Figure 2 As shown, the process includes the following steps:
[0044] Step S201, in response to starting a target application, capturing a target macro, the target application running in a target operating system.
[0045] In this embodiment, the target application refers to the driver software corresponding to the target hardware ID. The hardware ID can be a unique identifier of a device under different hardware versions or configurations, that is, the hardware ID can be used to distinguish different devices or different configurations of the same device.
[0046] The target macro is a macro variable of the target vehicle model corresponding to the target hardware ID, that is, the target macro includes the target vehicle model variable. The target macro can be obtained by compiling the macro including the target environment variable into the running code when compiling the target application, and the target environment variable includes the pre-exported target vehicle model variable.
[0047] In some specific examples, the target macro can be determined based on the following steps: when compiling the target operating system, determine the target hardware based on the input of the menu function, and set the target environment variables (that is, the compilation configuration) corresponding to the target hardware; determine whether the target application indicates to export the target vehicle model variables, and if so, export the target vehicle model variables from the target environment variables, and compile the macro including the target environment variables into the running code of the target application to obtain the target macro.
[0048] Thus, the above execution subject can capture the target macro when running the compiled target application.
[0049] Step S202: Based on the target vehicle model variable in the target macro, execute a first processing flow corresponding to the target vehicle model variable to obtain a first processing result.
[0050] In this embodiment, the first processing flow is a pre-set processing flow that needs to be executed for the corresponding target vehicle model variable. After capturing the target macro, the execution subject can execute the first processing flow corresponding to the target vehicle model variable based on the target vehicle model variable in the target macro, thereby obtaining a first processing result.
[0051] Step S203, obtaining the hardware ID in the target command line parameter.
[0052] In this embodiment, the target command line parameter refers to a command line parameter used to store the hardware ID, which can be a piece of data information in a real-time operating system (such as QNX, Micro C / OS, VxWorks, etc.) or an intelligent operating system (such as Android, Hongmeng, etc.).
[0053] For example, the target command line parameter may be cmdline, which is a piece of data information in Android or QNX. The target command line parameter is pre-stored in the hardware ID when the hardware ID is successfully checked. Thus, the above execution subject can obtain the hardware ID in the target command line parameter.
[0054] Step S204, executing a second processing flow corresponding to the first processing result and the hardware ID to obtain a second processing result.
[0055] In this embodiment, the second processing flow is a pre-set flow that needs to be processed and matches the first processing result and the hardware ID in the target command line parameter.
[0056] The execution subject can execute a second processing flow corresponding to the first processing result and the target command line parameter to obtain a second processing result, thereby achieving targeted processing for both the target vehicle model and the target hardware.
[0057] Step S205: if the target macro fails to be captured, the default vehicle model variable is obtained.
[0058] In this embodiment, the default vehicle model variable refers to a variable that is preset and corresponds to the default vehicle model. The above execution subject can obtain the default vehicle model variable through a preset path when the target macro fails to be captured.
[0059] Step S206, executing the third processing flow corresponding to the default vehicle model variable to obtain a third processing result.
[0060] In this embodiment, a processing flow corresponding to the default vehicle model variable, that is, the third processing flow, may be pre-set. Thus, after acquiring the default vehicle model variable, the execution subject may execute the third processing flow based on the default vehicle model variable, thereby achieving the desired third processing result.
[0061] Step S207, executing a fourth processing flow corresponding to the third processing result and the hardware ID in the target command line parameter to obtain a fourth processing result.
[0062] In this embodiment, a corresponding processing flow, i.e., a fourth processing flow, is pre-set corresponding to the third processing result and the hardware ID in the target command line parameter. It is understandable that, even if the third processing result is the same, the processing flow corresponding to the third processing result and the hardware ID in the target command line parameter is different according to the different hardware IDs.
[0063] Thus, the execution subject can execute the fourth processing flow corresponding to the third processing result and the hardware ID in the target command line parameter, thereby obtaining the fourth processing result corresponding to the third processing result and the hardware ID.
[0064] The method for loading an application program provided in this embodiment is as follows: Figure 1 On the basis of the illustrated embodiment, it is clarified that in the case where the target vehicle model variable in the target macro is not obtained, the third processing flow corresponding to the default vehicle model variable is executed to obtain the third processing result, and then the fourth processing flow is executed according to the third processing result and the hardware ID to obtain the fourth processing result. Therefore, for the case where the target vehicle model variable is not pre-set, the same method can be used for software development. There is no need to develop software branches corresponding to the vehicle model and hardware ID respectively. Different vehicle models and different hardware IDs can be developed and maintained on the same software platform, which improves software development efficiency and reduces R&D costs.
[0065] In this embodiment, some exemplary application scenarios of a method for loading an application are provided, which can be used for the above-mentioned execution subject. Figure 3a and Figure 3b , to describe these exemplary application scenarios:
[0066] Figure 3a is a flowchart of a method for loading an application program in a compiling phase according to an embodiment of the present disclosure, such as Figure 3a As shown, the process includes the following steps:
[0067] Step S301, start the compilation of the target application when loading the device that needs to be compiled, and then execute step S302.
[0068] Step S302, determine whether the target application indicates to export the target vehicle model variable, if so, execute step 303, if not, execute step 304.
[0069] Step S303, embedding the target vehicle model variable into the target application, and then executing step S305.
[0070] Step S304, using the default vehicle model variable, that is, the default value of the vehicle model variable, and then executing step S305.
[0071] Step S305, compile the target application.
[0072] Figure 3b is a flow chart of a method for loading an application program in a running stage according to an embodiment of the present disclosure, such as Figure 3b As shown, the process includes the following steps:
[0073] Step S311, the target application is started, and then step S312 is executed;
[0074] Step S312, read the hardware ID, and then execute step S313;
[0075] Step S313, check the hardware ID, and then execute step S314;
[0076] Step S314, determine whether the hardware ID check is successful, if so, execute step S315, if not, jump to execute step S311;
[0077] Step S315, write into the memory and input the target data information segment; then, execute step S316;
[0078] Step S316, the application process is started, and then step S317 is executed;
[0079] Step S317, determining whether there is a target vehicle model variable, if there is a target vehicle model variable, executing step S318, if not, executing step S321;
[0080] Step S318, executing logic A, that is, executing the first processing flow corresponding to the target vehicle model variable, obtaining the first processing result, and then executing step S319;
[0081] Step S319, obtaining the hardware ID, and then executing step S320;
[0082] Step S320, executing logic C, that is, executing the second processing flow corresponding to the first processing result and the hardware ID obtained in step S319, obtaining the second processing result, and then executing step S324;
[0083] Step S321: if there is no target vehicle model variable, logic B is executed according to the default vehicle model variable, that is, the third processing flow corresponding to the default vehicle model variable is executed to obtain a third processing result, and then step S322 is executed;
[0084] Step S322, obtaining the hardware ID, and then executing step S323;
[0085] Step S323, executing logic D, that is, executing the fourth processing flow corresponding to the third processing result and the hardware ID obtained in step S322, obtaining the fourth processing result, and then executing step S324;
[0086] Step S324, presenting a prompt indicating successful startup.
[0087] In a specific exemplary application scenario of the above embodiment of the present application, the above method of loading an application is a compatible method based on the QNX multi-model common platform. It can be used for a system-on-chip development platform (SOC development platform, such as Qualcomm 8155, 8295 chips, etc.), which includes a memory module and a software system (real-time operating system QNX + intelligent operating system Android system).
[0088] The method can be implemented in both the software compilation stage and the running stage.
[0089] This method exports an environment variable when the software is compiled, after loading the device to be compiled. For example, we are currently compiling the car XXX, but this car has three models, A, B, and C. Before compiling, we need to execute export vehicle_mode = A. This method will compile the exported macro into the running code during compilation, so that the macro will be captured and used during the software running process.
[0090] After the compilation is completed, this method will read the hardware version information during the startup loading phase when the program is just started. The hardware version information is represented by the high and low levels of GPIO on the hardware board. After reading the high and low levels, the hardware ID (hwid) is combined according to the level information to obtain the hardware version information. This method provides a version ID information table. All the hardware IDs corresponding to the software are recorded in the table, and then the read hardware ID is compared to see if it is registered in the table.
[0091] After the comparison in the previous step is completed, for the hardware version information registered in the table, this method will write the hardware version information into the memory, and the QNX application can call the API to read the hardware version information; the hardware version information will also be passed to the target command line parameter cmdline, and passed to the Android side during the program startup process for use by the application on the Android side.
[0092] The target program can obtain the environment variable vehicle mode information and hardware version (hwid) information during operation, and the target program can perform different software logic according to the combination of these two information. This method supports distinguishing any vehicle model settings during compilation and operation, supports multiple hwid hardware versions, supports any combination of vehicle models and multiple hwid hardware versions, and supports the detection of hardware version information.
[0093] In the present embodiment, a device for loading an application is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0094] This embodiment provides a device for starting an application program, the device being used in a system-on-chip development platform, where a target operating system is running, such as Figure 4 As shown, the device comprises:
[0095] A macro capture module 401, for capturing a target macro in response to starting a target application, the target application running in the target operating system;
[0096] A first processing module 402 is used to execute a first processing flow corresponding to the target vehicle model variable based on the target vehicle model variable in the target macro to obtain a first processing result;
[0097] The parameter acquisition module 403 is used to acquire the hardware ID in the target command line parameter;
[0098] The second processing module 404 is used to execute a second processing flow corresponding to the first processing result and the hardware ID to obtain a second processing result.
[0099] In some optional implementations of this embodiment, the target command line parameters acquired in the parameter acquisition module 403 are obtained based on the following setting units (not shown in the figure):
[0100] A hardware reading unit, used to read the hardware ID from the board when loading the boot program of the target operating system;
[0101] A memory writing unit, used for writing the hardware ID into the memory if the hardware ID exists in the hardware ID table; the hardware ID table records the hardware IDs corresponding to each application program;
[0102] The parameter input unit is used to input the read hardware ID into the target command line parameter when the target application calls the application program interface to read the hardware ID from the memory.
[0103] In some optional implementations of this embodiment, the setting unit further includes:
[0104] The detection execution unit is used to detect the hardware ID read from the board, and when the result of detecting the hardware ID is correct, execute at least one of the following:
[0105] Trigger execution If the hardware ID exists in the hardware ID table, write the hardware ID to memory;
[0106] If the hardware ID does not exist in the hardware ID table, it indicates that loading the target operating system has failed.
[0107] In some optional implementations of this embodiment, the target macro is obtained by compiling a macro including target environment variables into a running code when compiling a target application, and the target environment variables include pre-exported target vehicle model variables.
[0108] In some optional implementations of this embodiment, the target macro is determined based on the following units:
[0109] The variable setting unit is used to determine the target hardware according to the input of the menu function when compiling the target operating system, and set the target environment variables corresponding to the target hardware;
[0110] The variable judgment unit is used to judge whether the target application indicates to export the target vehicle model variable. If so, the target vehicle model variable is exported from the target environment variable, and the macro including the target environment variable is compiled into the running code of the target application to obtain the target macro.
[0111] In some optional implementations of this embodiment, the device further includes:
[0112] The variable acquisition module is used to obtain the default vehicle model variable if the target macro capture fails;
[0113] A third processing module, configured to execute a third processing flow corresponding to the default vehicle model variable to obtain a third processing result; and
[0114] The fourth processing module is used to execute a fourth processing flow corresponding to the third processing result and the hardware ID in the target command line parameter to obtain a fourth processing result.
[0115] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0116] The device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0117] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present disclosure, and the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0118] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0119] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0120] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0121] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0122] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0123] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present disclosure through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0124] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for loading an application, characterized in that: The method is used for a system-on-chip development platform, where a target operating system runs, and the method comprises: In response to launching a target application, capturing a target macro, the target application running in the target operating system; Based on the target vehicle model variable in the target macro, a first processing flow corresponding to the target vehicle model variable is executed to obtain a first processing result, and Get the hardware ID in the target command line parameter; A second processing flow corresponding to the first processing result and the hardware ID is executed to obtain a second processing result.
2. The method according to claim 1, characterized in that The target command line parameters are obtained based on the following setup steps: When loading the boot program of the target operating system, reading the hardware ID from the board; If the hardware ID exists in the hardware ID table, writing the hardware ID into the memory; The hardware ID table records the hardware IDs corresponding to each application program; When the target application calls an application program interface to read the hardware ID from the memory, the read hardware ID is passed into the target command line parameter.
3. The method according to claim 2, characterized in that The setting step further includes: Check the hardware ID read from the board. If the result of checking the hardware ID is correct, perform at least one of the following: Triggering the execution of the step of writing the hardware ID into the memory if the hardware ID exists in the hardware ID table; If the hardware ID does not exist in the hardware ID table, it indicates that loading the target operating system has failed.
4. The method according to claim 1, characterized in that The target macro is obtained by compiling a macro including target environment variables into a running code when compiling a target application, wherein the target environment variables include pre-exported target vehicle model variables.
5. The method according to any one of claims 1 or 4, characterized in that: The target macro is determined based on the following steps: When compiling the target operating system, the target hardware is determined according to the input of the menu function, and the target environment variables corresponding to the target hardware are set; Determine whether the target application indicates to export the target vehicle model variable. If so, export the target vehicle model variable from the target environment variable, and compile the macro including the target environment variable into the running code of the target application to obtain the target macro.
6. The method according to claim 1, characterized in that The method further comprises: If the target macro fails to be captured, the default vehicle model variable is obtained; Executing a third processing flow corresponding to the default vehicle model variable to obtain a third processing result; and A fourth processing flow corresponding to the third processing result and the hardware ID in the target command line parameter is executed to obtain a fourth processing result.
7. A device for starting an application, characterized in that: The device is used for a system-on-chip development platform, and a target operating system is run on the development platform. The device includes: a macro capture module, for capturing a target macro in response to starting a target application, the target application running in the target operating system; A first processing module, configured to execute a first processing flow corresponding to the target vehicle type variable based on the target vehicle type variable in the target macro, and obtain a first processing result; The parameter acquisition module is used to obtain the hardware ID in the target command line parameters; The second processing module is used to execute a second processing flow corresponding to the first processing result and the hardware ID to obtain a second processing result.
8. A system-on-chip development platform, characterized in that: The platform includes computer instructions, and the computer instructions are used to enable the system-on-chip development platform to execute the method for loading an application program according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for loading an application as described in any one of claims 1 to 6 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for loading an application program according to any one of claims 1 to 6.