Mirror image file-based universal vehicle-mounted infotainment system rapid startup method
By processing memory classification and optimal compression algorithms, and using the mirror file method, the problem of data loss and uncontrollable boot time after a complete power outage of the vehicle system is solved, and a fast and reliable boot process is achieved.
Patent Information
- Application Number
- CN202510329843.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art cannot simultaneously avoid data loss after a complete power outage in the vehicle system and ensure rapid power-on. It increases energy consumption based on the low-power sleep mode, while the fully power outage sleep mode cannot control the mirror size and loading time, resulting in uncontrollable boot time and missing functions.
Using a mirror file-based method, the memory is classified into image-to-mirror and non-mirror memory, the memory to be mirrored is collected and the specified program is loaded, and the optimal compression algorithm is used to compress and store it in a non-volatile storage medium. When booting, only the running program file needs to be decompressed and loaded.
It realizes that without increasing energy consumption, reduces the startup time, reduces the risk of data loss, improves the startup efficiency, and ensures the rapid start of key functions.
Smart Images

Figure FDA0005319953760000022
Abstract
Description
Technical Field
[0001] The present invention relates to the field of boot methods, and particularly to a general vehicle-mounted system fast boot method based on an image file. Background Art
[0002] At present, the methods for the vehicle-mounted system to achieve fast boot include: the sleep mode based on low power consumption or the sleep mode of complete power-off.
[0003] The implementation steps of the sleep mode based on low power consumption are as follows: when the system shuts down, some hardware (memory) of the vehicle-mounted device does not completely power off, and the system running data is retained; when the system starts up, data can be directly read from the non-powered-off DRAM, and there is no need to re-establish the software environment for system operation, thus achieving fast startup. The technical disadvantages of this sleep mode based on low power consumption are: 11) Some hardware of the vehicle-mounted device needs to be powered all the time, increasing the battery loss, increasing the energy consumption of the vehicle, and increasing the design complexity of the vehicle-mounted hardware; 12) Once the vehicle-mounted device completely powers off, the system running data retained in the memory will be lost, and the purpose of fast boot cannot be achieved.
[0004] The implementation steps of the sleep mode of complete power-off are as follows: before the system shuts down, the memory during the operation of the vehicle-mounted device is made into an image and stored in a non-volatile storage device; when the system starts up, data can be directly read from the non-volatile storage device and loaded into the memory to directly establish the software environment for system operation, thus achieving fast startup. The disadvantages of this sleep mode of complete power-off technology are: 21) The fast boot time is uncontrollable: the size of the image made from the memory during the operation of the vehicle-mounted device cannot be effectively controlled. If it is too large, it will take too much time to load this image during system startup, resulting in the failure of this method to achieve the purpose of fast boot; in addition, the image loading (including decompression) method is not the best in performance and cannot fully reduce the loading time; 22) It is impossible to control that specific software functions are preferentially made into the image: during the image making process, some memory during operation will be recycled, and the software functions corresponding to the recycled memory will not be made into the image. During system startup, these recycled software functions cannot be quickly started through the image. Summary of the Invention
[0005] The present invention aims to provide a general vehicle-mounted system fast boot method based on an image file to solve the problems in the prior art that it is neither possible to avoid data loss after complete power-off nor ensure a relatively fast running speed.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] The present invention discloses a general vehicle-mounted system fast boot method based on an image file, including:
[0008] Phase 1: Start the loader, which takes time t1;
[0009] Stage 2: The operating system kernel starts, taking time t2;
[0010] Stage 3: The programs and files that are already running at startup start, taking time t3. The programs and files that are already running at startup are used to make the in-vehicle infotainment system and various application services ready;
[0011] Stage 4: Preparation of various functions of the in-vehicle infotainment system, taking time t4. All functions of the in-vehicle infotainment system enter a stable state where they can be used by the user.
[0012] Preferably, before starting the programs and files that are already running at startup in Stage 3, the following preparations need to be made:
[0013] S1. Classify the memory: Classify the memory into memory for files to be mirrored and non-mirrored memory according to their uses;
[0014] S2. Create the programs and files that are already running at startup: S21. Recover the memory for files to be mirrored and release the non-mirrored memory; S22. Load the specified program into the memory for files to be mirrored;
[0015] S3. Obtain the programs and files that are already running at startup: Select the optimal compression algorithm to compress the specified program loaded in each memory for files to be mirrored to obtain the programs and files that are already running at startup;
[0016] S4. Store the programs and files that are already running at startup in a non-volatile storage medium.
[0017] Preferably, Stage 3 includes the following steps:
[0018] First, decompress the programs and files that are already running at startup;
[0019] Then, load the programs and files that are already running at startup into the memory for files to be mirrored;
[0020] Finally, start the programs and files that are already running at startup.
[0021] Preferably, the steps for selecting the optimal compression algorithm in step S3 include the following steps:
[0022] S31. Prepare at least two or more compression algorithms;
[0023] S32. Use each compression algorithm to compress the specified program to obtain the compression time t yn and the decompression time t jn , the compression time t yn is the compression time of the specified program compressed by the nth compression algorithm, and the decompression time t jn is the decompression time of the specified program decompressed by the nth compression algorithm;
[0024] S33. Through the compression time tyn and decompression time t jn find the optimal compression algorithm.
[0025] Preferably, step S33 includes the following steps:
[0026] S331. Let all compression times t yn constitute set Y, and all decompression times t jn constitute set J. There are N kinds of compression algorithms in total, and let the initial value of m be 0;
[0027] S332. Let n = 1;
[0028] S333. Judge whether t jn is less than or equal to the set value t j0 , if so, let m = m + 1, store n in set K and perform step S334; if not, perform step S336;
[0029] S334. Calculate n = n + 1;
[0030] S335. Judge whether n is greater than N. If not, perform step S333; if not, perform step S336;
[0031] S336. Judge whether m is greater than 0. If so, perform step S337; if not, end and output that there is no suitable compression algorithm;
[0032] S337. Judge whether m is equal to 1. If so, end, let q be equal to the m-th value in set K and output the q-th compression algorithm as the optimal compression algorithm; if not, perform step S338;
[0033] S338. Calculate the score of each compression algorithm in set K. Let the m-th value in set K be k m , then the score e m of the k km -th compression algorithm is calculated by the formula: e km = at ykm + bt jkm , where a and b are constants.
[0034] S339. Find the minimum score of the compression algorithm score e km in set K, and the compression algorithm corresponding to the minimum score is the optimal compression algorithm.
[0035] Compared with the prior art, the present invention has the following beneficial effects:
[0036] During the startup process, stage one takes time t1, stage two takes time t2, stage three takes time t3, and stage four takes time t4. The total startup time is t1 + t2 + t3 + t4. The main improvement in this application is in stage three. Since the "already running program file" is loaded in stage three, this already running program file is the program file that has been stored and already run before the previous shutdown. Since it is an already running program file, then when starting up, it only needs to be decompressed and displayed, avoiding the need to run and display again after startup, reducing the time t3, thereby reducing the entire startup time and improving the startup efficiency. At the same time, the already running program file is stored in a non-volatile storage medium before shutdown, reducing the possibility of loss.
[0037] Other advantages, objectives, and features of the present invention will be partially reflected by the following description and partially understood by those skilled in the art through the research and practice of the present invention. Detailed implementation manners
[0038] In order to make the technical means, creative features, achieved objectives, and functions of the present invention clearer and easier to understand, the present invention will be further described below in conjunction with the detailed implementation manners:
[0039] The present invention discloses a method for quickly starting up a general vehicle-mounted system based on an image file, including:
[0040] Stage one: Start the loader, taking time t1;
[0041] Stage two: Start the operating system kernel, taking time t2;
[0042] Stage three: Start the already running program file for startup, taking time t3. The already running program file for startup is used to make the vehicle-mounted system and various application services ready;
[0043] Stage four: Prepare various functions of the vehicle-mounted device, taking time t4. Various functions of the vehicle-mounted device enter a stable state that can be used by the user.
[0044] Preferably, the following pre-run preparations need to be done when starting the already running program file for startup in stage three:
[0045] S1. Classify the memory: Classify the memory into memory for the image file to be processed and non-image memory according to the usage; (This step has classified the memory when the program is established)
[0046] S2. Create the program file that has been run at startup: S21. Recover the memory of the file to be mirrored, and release the non-mirrored memory; S22. Load the specified program into the memory of the file to be mirrored; (In this step, when the program is created, the memory of the file to be mirrored is recovered. Through the classification in step S1, the recovered memory is reduced, and the non-mirrored memory is released, thus reducing the loading of program files that are not required for startup and reducing the startup time.)
[0047] S3. Process to obtain the program file that has been run at startup: Select the optimal compression algorithm to compress the specified program loaded in the memory of each file to be mirrored, and obtain the program file that has been run at startup; (This step compresses the memory of the file to be mirrored to obtain the program file that has been run at startup, which is convenient for storage and subsequent retrieval, and avoids the situation of missing some files during retrieval at startup.)
[0048] S4. Store the program file that has been run at startup in a non-volatile storage medium.
[0049] Phase three includes the following steps:
[0050] First, decompress the program file that has been run at startup;
[0051] Then, load the program file that has been run at startup into the memory of the file to be mirrored;
[0052] Finally, start the program file that has been run at startup. The time-consuming in the third phase of this application is mainly in the decompression and loading steps. Since the corresponding program file that has not been run needs to consume a lot of time if it is run again, this time is much more than the decompression and loading time, which reduces the user experience.
[0053] The steps for selecting the optimal compression algorithm in step S3 include the following steps:
[0054] S31. Prepare at least two or more compression algorithms;
[0055] S32. Use each compression algorithm to compress the specified program to obtain the compression time t yn and the decompression time t jn , where the compression time t yn is the compression time of the specified program compressed by the nth compression algorithm, and the decompression time t jn is the decompression time of the specified program decompressed by the nth compression algorithm;
[0056] S33. Find the optimal compression algorithm through the compression time t yn and the decompression time t jn . The optimal compression algorithm is found.
[0057] Step S33 includes the following steps:
[0058] S331, set all compression time t yn Construct a set Y, all decompression times t jn Construct a set J, there are N compression algorithms in total, and set the initial value of m to 0;
[0059] S332, command n=1;
[0060] S333, judge t jn Is it less than or equal to the set value t j0 If yes, then m=m+1, store n in set K and proceed to step S334; if no, proceed to step S336; (this setting value t j0 It is much shorter than the time required to run the program file without running it, so as to find a more suitable compression algorithm, and store the compression algorithm number n in the set K, so as to facilitate the subsequent finding of the optimal compression algorithm)
[0061] S334, calculate n=n+1;
[0062] S335, determine whether n is greater than N, if not, proceed to step S333; if not, proceed to step S336;
[0063] S336, determine whether m is greater than 0, if so, proceed to step S337; if not, end and output that there is no suitable compression algorithm;
[0064] S337, determine whether m is equal to 1, if so, end, determine q is equal to the mth value in the set K and output the qth compression algorithm as the optimal compression algorithm; if not, proceed to step S338; (subsequent calculation of the score will increase the time consumption)
[0065] S338. Calculate the score of each compression algorithm in the set K. Let the mth value in the set K be k. m , then the kth m The score of the compression algorithm km The calculation formula is: km =at ykm +bt jkm , a and b are constants, (a and b are set by expert experience, a<b, a can be equal to 4, b can be equal to 6, that is, the decompression time accounts for a smaller proportion, so the smaller the decompression time, the smaller the calculated score, which is more in line with the minimum score requirement)
[0066] S339. Find the compression algorithm score e in the set K km The compression algorithm corresponding to the minimum score is the optimal compression algorithm.
[0067] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for quickly booting a general vehicle-mounted system based on an image file, characterized in that, Including: Phase 1: Bootloader startup, taking time t1; Phase 2: Operating system kernel startup, taking time t2; Phase 3: Startup of the programs that have been running during startup, taking time t3. The programs that have been running during startup are used to make the in-vehicle system and various application services ready; Phase 4: Preparation of various functions of the in-vehicle system, taking time t4. Various functions of the in-vehicle system enter a stable state that can be used by users.
2. The method for quickly booting a general vehicle-mounted system based on an image file according to claim 1, wherein Before starting the programs that have been running during startup in Phase 3, the following preparations need to be made: S1. Classify the memory: Classify the memory into memory for files to be mirrored and non-mirrored memory according to their uses; S2. Make the programs that have been running during startup: S21. Recover the memory for files to be mirrored and release the non-mirrored memory; S22. Load the specified program into the memory for files to be mirrored; S3. Obtain the programs that have been running during startup: Select the optimal compression algorithm to compress the specified program loaded in each memory for files to be mirrored to obtain the program file that has been running during startup; S4. Store the program file that has been running during startup in a non-volatile storage medium.
3. The method for quickly booting a general vehicle-mounted system based on an image file according to claim 2, wherein Phase 3 includes the following steps: First, decompress the program file that has been running during startup; Then, load the program file that has been running during startup into the memory for files to be mirrored; Finally, start the program file that has been running during startup.
4. The method for quickly booting a general vehicle-mounted system based on an image file according to claim 3, characterized in that, The steps for selecting the optimal compression algorithm in step S3 include the following steps: S31. Prepare at least two or more compression algorithms; S32. Compress the specified program using each compression algorithm to obtain the compression time t yn and the decompression time t jn , the compression time t yn is the compression time for the nth compression algorithm to compress the specified program, and the decompression time t jn is the decompression time for the nth compression algorithm to decompress the specified program; S33. Find the optimal compression algorithm by compressing time t yn and decompressing time t jn to find the optimal compression algorithm.
5. The method for quickly booting a general vehicle-mounted system based on an image file according to claim 4, characterized in that, Step S33 includes the following steps: S331. Let all compression times be \(t\) yn which form set \(Y\), and all decompression times be \(t\) jn which form set \(J\). There are a total of \(N\) compression algorithms, and let the initial value of \(m\) be \(0\); S332. Let n = 1; S333. Determine whether t jn is less than or equal to the set value t j0 . If so, set m = m + 1, store n in the set K, and proceed to step S334; if not, proceed to step S336. S334. Calculate n = n + 1; S335. Determine whether n is greater than N. If not, proceed to step S333; if not, proceed to step S336; S336. Determine whether m is greater than 0. If so, proceed to step S337; if not, end and output that there is no appropriate compression algorithm; S337. Determine whether m is equal to 1. If so, end, let q be equal to the mth value in set K, and output the qth compression algorithm as the optimal compression algorithm; if not, proceed to step S338; S338. Calculate the scores of each compression algorithm in set K. Let the m-th value in set K be k m , then the score of the k m -th compression algorithm is calculated by the formula: a and b are constants S339. Find the minimum score of the compression algorithms in set K. The compression algorithm corresponding to the minimum score is the optimal compression algorithm. The compression algorithm corresponding to the minimum score is the optimal compression algorithm.
Citation Information
Patent Citations
System recovery method and device based on system snapshot, equipment and medium
CN118550766A
Instance startup acceleration method and related apparatus
WO2024179400A1