Grouping-based process starting method and process configuration method

By starting processes in the vehicle system in group-based startup, the problem of multiple processes seizing CPU resources is solved, the rapid startup of core processes is achieved, and the system startup efficiency and stability are improved.

CN120469731APending Publication Date: 2025-08-12BOSCH AUTOMOTIVE PRODUCTS (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510428456.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

In a vehicle system, multiple processes snatch CPU resources when starting at the same time, resulting in the core process being delayed starting, affecting the system startup efficiency and stability.

Method used

By grouping the startup processes, the core processes that need to be started quickly are placed in a high-priority process startup group, and each process startup group is started in order in priority order to ensure that the core process starts first.

Benefits of technology

It improves process startup efficiency, reduces the system startup time, ensures timely startup of core processes, and improves system stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120469731A_ABST
    Figure CN120469731A_ABST
Patent Text Reader

Abstract

The invention provides a process starting method and a process configuration method based on grouping, according to the method provided by the invention, processes to be started are grouped, when a system is started, each process starting group is acquired, and each process starting group is read in sequence according to a priority sequence of each process starting group; the corresponding process is started based on each process starting file in the process starting group, so that the process starting efficiency is improved, and the system starting time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle control, and in particular to a group-based process starting method and process configuration method. Background Art

[0002] With the increasing popularity of electric vehicles, the number of processes in vehicle systems is increasing, and some processes have increasingly stringent startup performance requirements. In software systems, when multiple processes are started, there are often dependencies and startup order relationships between them. When starting any target process, it is necessary to first determine whether its dependent processes are started. Only when all of its dependent processes are started can the target process be started; otherwise, the target process cannot be started.

[0003] However, in the related art, for processes that do not have clear dependencies, when the process starts, multiple processes that do not have clear dependencies will start at the same time and compete for CPU resources, which will cause the vehicle core process that needs to start quickly to be delayed, thereby delaying the overall startup time of the system. Summary of the Invention

[0004] Based on this, the present invention provides a group-based process startup method and a process configuration method. By adopting the group-based process startup method and process configuration method, the core processes that need to be started quickly are grouped and placed in a process startup group with a higher startup priority. When the system starts, each process in each process startup group is started in the order of the priority of the process startup group, thereby avoiding the situation where the core process is delayed due to the simultaneous startup of multiple processes to grab CPU resources, thereby improving the startup efficiency and system startup time.

[0005] In one aspect, the present invention provides a group-based process startup method, comprising:

[0006] Obtaining each process startup group;

[0007] The process startup groups are read in sequence according to the priority order of each process startup group, and corresponding processes are started based on each process startup file in the process startup group.

[0008] Furthermore, in some embodiments, the reading of each of the process startup groups in sequence according to the priority order of each of the process startup groups includes:

[0009] Obtaining the group serial numbers corresponding to the process startup groups;

[0010] The process startup groups are read in order from small to large according to the group sequence numbers.

[0011] Furthermore, in some embodiments, each of the process startup groups includes a first process startup group and a second process startup group, and the priority of the first process startup group is higher than that of the second process startup group;

[0012] The step of sequentially reading each of the process startup groups according to the priority order of each of the process startup groups and starting a corresponding process based on each process startup file in the process startup group includes:

[0013] Reading each process startup file in the first process startup group to start a corresponding process based on each process startup file;

[0014] After the first process startup group is read, each process startup file in the second process startup group is read to start a corresponding process based on each process startup file.

[0015] Furthermore, in some embodiments, the process startup file includes dependency relationships between the processes;

[0016] The starting of the corresponding process based on each process startup file includes:

[0017] The processes are started based on the dependency relationship between the processes.

[0018] In another aspect, the present invention provides a group-based process configuration method, comprising:

[0019] Determine the processes to be started, and configure process startup files corresponding to the processes, wherein the process startup files contain dependency relationships between the processes;

[0020] Creating at least two process startup groups, each of which is read sequentially by the process manager according to a predefined priority order;

[0021] According to the predefined process startup priority order, each process startup file is stored in a different process startup group.

[0022] Furthermore, in some embodiments, the at least two process startup groups include a first process startup group and a second process startup group, and the first process startup group has a higher priority than the second process startup group;

[0023] The storing of each process startup file in a different process startup group according to a predefined process startup priority order includes:

[0024] Determining a core process and a non-core process in each of the processes, wherein the core process has a higher startup priority than the non-core process;

[0025] The process startup files corresponding to the core processes are stored in the first process startup group, and the process startup files corresponding to the non-core processes are stored in the second process startup group.

[0026] In another aspect, the present invention provides a process starting device, comprising:

[0027] A process group acquisition module, used to obtain each process startup group;

[0028] The process group reading module is used to read each process startup group in sequence according to the priority order of each process startup group, and start the corresponding process based on each process startup file in the process startup group.

[0029] On the other hand, the present invention further provides a computer program product, which includes a computer program, and implements the above method steps when the computer program is executed.

[0030] On the other hand, the present invention further provides a vehicle controller comprising: a processor and a memory; wherein the memory stores computer-readable instructions, and the computer-readable instructions are suitable for being loaded by the processor and executing the steps of the above method.

[0031] On the other hand, the present invention further provides a vehicle comprising the above-mentioned process starting device or vehicle controller.

[0032] According to the group-based process startup method provided by the present invention, by grouping the processes to be started, the core processes that need to be started quickly are placed in the process startup group with a higher startup priority. When the system starts, each process in each process startup group is started in the order of the priority of the process startup group, thereby avoiding the situation where the core process is delayed due to the simultaneous startup of multiple processes competing for CPU resources, improving the process startup efficiency and reducing the system startup time.

[0033] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of a process flow diagram of a group-based process startup method provided by an embodiment of the present invention;

[0035] Figure 2 A schematic diagram of a process flow diagram of a group-based process startup method provided by an embodiment of the present invention;

[0036] Figure 3An exemplary schematic diagram of a first process group n1 and a second process group n2 provided in an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of a process flow diagram of a group-based process startup method provided by an embodiment of the present invention;

[0038] Figure 5 A schematic diagram of the structure of a process starting device provided by an embodiment of the present invention;

[0039] Figure 6 A schematic structural diagram of a vehicle controller provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and corresponding drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0041] In the description of one or more embodiments of the present invention, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The terms "first," "second," etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0042] The QNX operating system is a distributed real-time operating system that utilizes a microkernel architecture. Core functions (such as task scheduling, message passing, and hardware interrupt handling) are provided by the microkernel, while other functions (such as the file system and network protocols) run in user space. This design makes the system more secure, reliable, and easily scalable. The QNX operating system is widely used in vehicle systems due to its high reliability, real-time nature, and modular design.

[0043] SLM (System Launch and Monitor) is a key component of the QNX operating system, responsible for system startup management and status monitoring. SLM reads parameter configurations and process dependencies from XML configuration files to start each process in sequence, ultimately completing the startup of the entire process set. This startup mechanism works effectively in most situations, ensuring normal system startup and operation.

[0044] While the SLM startup mechanism works well in most situations, it presents significant issues in specific scenarios. For example, in a vehicle-mounted system, there are two types of programs: basic core service programs and general programs. Basic core service programs, such as power management processes, must be started as soon as possible after the vehicle-mounted system is powered on to ensure system stability and reliability. General programs, such as client application processes, can be delayed and begin running after the system boots up.

[0045] However, when neither the foundational core service program nor the standard program has any dependencies, the SLM-based startup logic causes the two processes to start concurrently. In this case, the standard program may compete with the foundational core service program for resources like the CPU, causing the foundational core service program's startup to be delayed. Because the foundational core service program is fundamental to the system, a delay in its startup can significantly impact the startup time of the entire system, potentially even affecting system stability and reliability.

[0046] Based on this, an embodiment of the present invention provides a group-based process startup method and a process configuration method. By grouping the processes to be started, the core processes that need to be started quickly are placed in a process startup group with a higher startup priority. When the system starts, each process in each process startup group is started in the order of the priority of the process startup group, thereby avoiding the situation where the core process is delayed due to multiple processes starting at the same time to grab CPU resources, improving the process startup efficiency and reducing the system startup time.

[0047] See Figure 1 , which is a flow chart illustrating a packet-based process initiation method provided in an embodiment of the present invention. The process may be executed by a process initiation device, or by a vehicle controller or vehicle equipped with the process initiation device, or by other devices capable of communicating with a vehicle controller or vehicle, without specific limitation.

[0048] The following is for Figure 1 The process shown in FIG. 1 is described in detail. The group-based process startup method may specifically include the following steps:

[0049] Step S102, obtaining each process startup group;

[0050] It's important to note that during the early stages of system startup, such as the IPL (Initial Program Loader) and Startup phases, hardware is initialized, the operating system kernel is loaded, and the basic system environment is configured. The process startup device, as part of the system, is also loaded and initialized after the kernel boots. The process startup device is used to start, monitor, and manage processes in the system.

[0051] Specifically, after the process starting device is started, each pre-configured process starting group is obtained.

[0052] The process startup groups are pre-configured by the developer, and each process startup group can be started in sequence by the process startup device according to a predefined priority order. The developer can place the process startup file corresponding to the core program in the process startup group with a higher priority so that the core program can be started as soon as possible.

[0053] Step S104: read each process startup group in sequence according to the priority order of each process startup group, and start the corresponding process based on each process startup file in the process startup group.

[0054] Specifically, after obtaining each process startup group, each process startup group is read in sequence according to the priority order of each process startup group. When reading the process startup group, the corresponding process is started according to each process startup file stored in the process startup group.

[0055] In an embodiment of the present invention, by grouping the processes to be started, the core processes that need to be started quickly are placed in a process startup group with a higher startup priority. When the system starts, each process in each process startup group is started in the order of the priority of the process startup group, thereby avoiding the situation where the core process is delayed due to multiple processes starting at the same time to compete for CPU resources, improving the process startup efficiency and reducing the system startup time.

[0056] In a feasible implementation, in step S104, each process startup group is read in sequence according to the priority order of each process startup group, which can be specifically: obtaining the group serial number corresponding to each process startup group; and reading each process startup group in sequence from small to large group serial number.

[0057] Specifically, when configuring each process startup group, a corresponding group serial number is set for each group. When the system starts, the process startup device can first read the group serial number corresponding to each process startup group, and then determine the priority order corresponding to each process startup group based on the group serial number corresponding to each process startup group. For example, each process startup group is read in order from the smallest group serial number to the largest group serial number.

[0058] The group sequence number may be set in the group name corresponding to each process startup group.

[0059] In actual applications, the priority relationship between different process startup groups can also be defined by setting other identifiers.

[0060] In one embodiment, there may be two pre-set process startup groups, specifically a first process startup group and a second process startup group, wherein the first process startup group has a higher priority than the second process startup group. The first process startup group may store process startup files corresponding to system basic core processes, and the second process startup group may store process startup files corresponding to ordinary processes.

[0061] See Figure 2 , is a flow chart of a group-based process startup method provided by an embodiment of the present invention. Figure 2 As shown, the method includes the following steps:

[0062] Step S202, obtaining a first process startup group and a second process startup group;

[0063] Step S204, reading each process startup file in the first process startup group to start the corresponding process based on each process startup file;

[0064] Step S206: After the first process startup group is read, each process startup file in the second process startup group is read to start a corresponding process based on each process startup file.

[0065] In an embodiment of the present invention, a pre-set process startup group includes a first process startup group and a second process startup group. The first process startup group has a higher priority than the second process startup group. The first process startup group may store process startup files corresponding to the system's basic core processes, and the second process startup group may store process startup files corresponding to ordinary processes. When the system is started, after the process startup device is activated, the first process startup group and the second process startup group are first obtained. Then, according to the priority order, each process startup file in the first process startup group is first read, and each core process in the first process startup group is started according to each process startup file in the first process startup group. After the first process startup group is read and the process is started, the process startup device reads each process startup file in the second process startup group and starts each ordinary process in the first process startup group according to each process startup file in the second process startup group. This ensures that core processes can be started faster, avoids the situation where core processes are delayed due to multiple processes starting simultaneously competing for CPU resources, improves process startup efficiency, and reduces system startup time.

[0066] See Figure 3 , is an example schematic diagram of a first process group n1 and a second process group n2 provided by an embodiment of the present invention. Figure 3As shown, the first process group n1 includes core process A and core process B, and core process B depends on core process A. The second process group n2 includes ordinary process C, ordinary process D, ordinary process E, and ordinary process F. When the system starts, the process starting device first reads the first process group n1, and according to the dependency relationship between core process A and core process B, it first starts core process A and then starts core process B. Then the process starting device reads the second process group n2, and further according to the dependency relationship between ordinary process C, ordinary process D, ordinary process E, and ordinary process F, it starts each process in the second process group n2 in sequence.

[0067] Furthermore, the process startup file includes the dependency relationship between the processes. When starting a process by reading the process startup file in the process startup group, the processes are started in sequence mainly based on the dependency relationship between the processes.

[0068] Furthermore, a process startup file may specifically include startup commands, dependencies, environment variables, restart policies, and logging. The startup command includes the commands and parameters required to start the process; dependencies include other processes or services that must be running before the process starts; environment variables include setting the environment variables required for the process to run; restart policies include the restart behavior defined in the event of a process failure; and logging includes configuring the log file path and log level.

[0069] It should be noted that for different operating systems, the process startup file can be a configuration file in different formats. The specific file format of the process startup file is not specifically limited by one or more embodiments of the present invention. For example, in the QNX operating system, the process startup file can be an XML configuration file.

[0070] In one embodiment, see Figure 4 , is a flow chart of a group-based process configuration method provided by an embodiment of the present invention. Figure 4 As shown, the method may include the following steps:

[0071] Step S302: Determine the processes to be started, configure process startup files corresponding to the processes, and include dependency relationships between the processes in the process startup files.

[0072] There are dependencies between system processes. To ensure the normal startup and operation of system processes, developers need to define the dependencies between processes by writing configuration files, thereby determining the startup order of each process and ensuring that each process can start normally.

[0073] The processes to be started are all the processes that need to be started in the system. After determining the system processes to be started, the developer configures the process startup files corresponding to each process. The process startup files contain the dependencies between the processes.

[0074] Step S304: creating at least two process startup groups, and each process startup group is read in sequence by the process manager according to a predefined priority order;

[0075] Step S306: storing each process startup file in a different process startup group according to a predefined process startup priority order.

[0076] The process manager is responsible for starting, monitoring, and managing processes in the system. It is initialized and started at the beginning of the system startup, after the kernel starts. In an embodiment of the present invention, after startup, the process manager reads each process startup group in order of priority. Each process startup group contains a process startup file. The process manager reads each process startup group, that is, each process startup file therein, and starts the process corresponding to each process startup file.

[0077] In one embodiment, there may be two pre-set process startup groups, which may specifically include a first process startup group and a second process startup group, wherein the priority of the first process startup group is higher than that of the second process startup group. Developers may determine the basic core processes and non-core processes that need to be started as soon as possible in the system processes to be started, and store the process startup files corresponding to each core process in the first process startup group, and store the process startup files corresponding to each non-core process in the second process startup group. Thus, when the system starts, the process manager reads the startup processes of each process startup group in the predefined priority order, ensuring that the basic core processes can be started faster, avoiding the situation where the core processes are delayed due to the simultaneous startup of multiple processes to grab CPU resources, improving process startup efficiency and reducing system startup time.

[0078] See Figure 5 , is a structural diagram of a process startup device provided by an embodiment of the present invention. Figure 5 As shown, the process starting device 01 can be implemented as all or part of the vehicle controller through software, hardware, or a combination of both. According to some embodiments, the process starting device 01 may include a process group acquisition module 11 and a process group reading module 12, specifically including:

[0079] The process group acquisition module 11 is used to obtain each process startup group;

[0080] The process group reading module 12 is configured to read each of the process startup groups in sequence according to the priority order of each of the process startup groups, and start a corresponding process based on each process startup file in the process startup group.

[0081] Optionally, when the process group reading module 12 reads each process startup group in sequence according to the priority order of each process startup group, it is specifically configured to:

[0082] Obtaining the group serial numbers corresponding to the process startup groups;

[0083] The process startup groups are read in order from small to large according to the group sequence numbers.

[0084] Optionally, each of the process startup groups includes a first process startup group and a second process startup group, and the priority of the first process startup group is higher than that of the second process startup group;

[0085] The process group reading module 12 is specifically used to:

[0086] Reading each process startup file in the first process startup group to start a corresponding process based on each process startup file;

[0087] After the first process startup group is read, each process startup file in the second process startup group is read to start a corresponding process based on each process startup file.

[0088] Optionally, the process startup file includes dependency relationships between the processes;

[0089] When executing the startup of the corresponding process based on each process startup file, the process group reading module 12 is specifically used to:

[0090] The processes are started based on the dependency relationship between the processes.

[0091] The above device embodiments correspond to the method embodiments. For detailed descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For detailed descriptions, please refer to the corresponding method embodiments.

[0092] In one embodiment, the present invention also provides a computer program product, which may store a computer program, and the computer program may be loaded and executed as in the group-based process startup method of the above-mentioned embodiments. The specific execution process may refer to the specific descriptions in the above-mentioned embodiments and will not be repeated here.

[0093] In one embodiment, the present invention also provides a storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor and executed by the group-based process startup method such as the above-mentioned embodiments. The specific execution process can be found in the specific descriptions of the above-mentioned embodiments, and will not be repeated here.

[0094] In one embodiment, the present invention further provides Figure 6 The structural diagram of the vehicle controller is shown in FIG. Figure 6 At the hardware level, the vehicle controller includes a processor 21, an internal bus 22, a network interface 23, memory 24, and non-volatile storage 25. It may also include other hardware required for other services. The vehicle controller can be installed in a vehicle, where the processor 21 reads the corresponding computer program from the non-volatile storage 25 into the memory and then runs it to implement the above-mentioned process startup method.

[0095] In one embodiment, the present invention further provides a vehicle, which may include a process starting device or a vehicle controller as described above, so as to improve process starting performance by executing a process starting method through the process starting device or the vehicle controller.

[0096] Finally, the various embodiments of the present invention are described in a progressive manner. Similar parts between the various embodiments can be referred to in detail. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so its description is relatively simple. For relevant parts, refer to the description of the method embodiment.

[0097] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A group-based process startup method, comprising: Obtaining each process startup group; The process startup groups are read in sequence according to the priority order of each process startup group, and corresponding processes are started based on each process startup file in the process startup group.

2. The method according to claim 1, wherein the step of sequentially reading each of the process startup groups according to their priority order comprises: Obtaining the group serial numbers corresponding to the process startup groups; The process startup groups are read in order from small to large according to the group sequence numbers.

3. The method according to claim 1, wherein each of the process startup groups comprises a first process startup group and a second process startup group, and the first process startup group has a higher priority than the second process startup group; The step of sequentially reading each of the process startup groups according to the priority order of each of the process startup groups and starting a corresponding process based on each process startup file in the process startup group includes: Reading each process startup file in the first process startup group to start a corresponding process based on each process startup file; After the first process startup group is read, each process startup file in the second process startup group is read to start a corresponding process based on each process startup file.

4. The method according to claim 3, wherein the process startup file includes dependency relationships between the processes; The starting of the corresponding process based on each process startup file includes: The processes are started based on the dependency relationship between the processes.

5. A group-based process configuration method, comprising: Determine the processes to be started, and configure process startup files corresponding to the processes, wherein the process startup files contain dependency relationships between the processes; Creating at least two process startup groups, each of which is read sequentially by the process manager according to a predefined priority order; According to the predefined process startup priority order, each process startup file is stored in a different process startup group.

6. The method according to claim 5, wherein the at least two process startup groups include a first process startup group and a second process startup group, and the first process startup group has a higher priority than the second process startup group; The storing of each process startup file in a different process startup group according to a predefined process startup priority order includes: Determining a core process and a non-core process in each of the processes, wherein the core process has a higher startup priority than the non-core process; The process startup files corresponding to the core processes are stored in the first process startup group, and the process startup files corresponding to the non-core processes are stored in the second process startup group.

7. A process starting device, comprising: A process group acquisition module, used to obtain each process startup group; The process group reading module is used to read each process startup group in sequence according to the priority order of each process startup group, and start the corresponding process based on each process startup file in the process startup group.

8. A computer program product comprising a computer program, wherein when the computer program is executed, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A vehicle controller comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 4.

10. A vehicle comprising the process starting device according to claim 7 and the vehicle controller according to claim 9.