Cold start optimization method for quick start system of low-power-consumption electronic product
By designing dual Flash functions and dual LZMA hardware decompression modules in low-power electronic products, parallel loading and rapid decompression are achieved, the problem of excessive cold start time is solved, product performance and user experience are improved, and the high-end market is met. need.
Patent Information
- Application Number
- CN202311053538.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-21
- Publication Date
- 2025-02-21
AI Technical Summary
Existing low-power electronic products have been in cold start for too long, which affects product performance and user experience. Especially in doorbell products, too long cold start time may lead to uncaptured photos of visitors and cannot meet the design needs. .
The dual Flash function and dual LZMA hardware decompression module are designed to load the kernel and file system in parallel through two Flash controllers, and the two LZMA hardware decompression modules are used to quickly decompress and compress files, reducing the loading and decompression process involved in the CPU and improving the startup speed. .
It realizes the fast cold start function, shortens the start time of the device, improves product performance and user experience, and meets the needs of the high-end market.
Smart Images

Figure CN119493601A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of consumer electronic products, and in particular relates to a cold start optimization method for a fast start system of a low-power electronic product. Background Art
[0002] Existing low-power electronic products, such as doorbells, have very high requirements for the cold start time of the device. In real commercial scenarios, if the cold start time of the device is too long, it will greatly affect the product performance and user experience.
[0003] Take the product doorbell as an example. In actual application scenarios, if there are other events such as guests visiting or passers-by passing by the door, the visitor or passer-by may only appear for a few seconds in the normal viewing angle of the doorbell. When the doorbell detects a person passing by, it will normally wake up the SOC main control through PIR or other means. At this time, the main control is equivalent to a cold start process. After the main control is awakened, it will enable the SENSOR, ISP and other modules to record the scene under the camera. If the cold start time is very long, the visitor may have strayed from the doorbell's field of view or left after the main control is fully started. The photos captured by the product do not capture the visitor, the product does not meet the design requirements, and the product experience is poor.
[0004] Flash memory is what we often call non-volatile random access memory. Its characteristic is that the data does not disappear after power failure. It is mainly divided into NOR type and NAND type.
[0005] When it comes to the cold start process of electronic devices, the first thing that comes to mind is the storage medium. Since the product demand positioning is the faster the cold start time, different storage media will inevitably have different product startup times.
[0006] Generally speaking, compared with NAND flash, NOR flash has a smaller capacity, usually 1-16MByte, compared with NAND flash. NOR flash is more expensive than NAND flash. NOR flash is faster than NAND flash in terms of read operation. Taking all factors into consideration, NOR flash is generally selected to improve product performance.
[0007] The software will also select a file system to reduce the startup time. Common products of this type generally choose the ramfs type file system, sacrificing a certain amount of physical storage space in exchange for cold startup time.
[0008] The above existing operations are to optimize the startup performance in terms of solutions and software. However, in actual products, it is still impossible to achieve the ultimate startup time.
[0009] The performance optimized from the solution and software alone is limited. In the case that the existing science and technology has not broken through the data reading speed of NOR Flash, the reading operation speed of NOR Flash in quad mode is generally 133MHz. Taking the Linux operating system as an example, the boot process of the device is load uboot->kernel->rootfs->other mtd. Since this process is a serial operation in the boot phase of the system boot, it is necessary to wait until the kernel is loaded from the flash before loading the rootfs operation. In actual products, rootfs and kernel are generally compressed to save memory. Conventional solutions use software CPU to perform decompression operations, which not only occupies the CPU, but also takes time to decompress the software when the compressed content is large. Generally, the compression rate and decompression time are inversely proportional. If a compression format with a higher compression rate is selected, the decompression time will be longer. If a compression format with a faster decompression rate is used, it will occupy more flash memory. You cannot have both.
[0010] Therefore, in actual products, this solution of serially reading flash data and decompressing it with software has little room for optimization in terms of cold start time.
[0011] In addition, the commonly used terms in the prior art include:
[0012] Flash: A type of memory device, which is a non-volatile memory.
[0013] LZMA: (abbreviation of Lempel-Ziv-Markov chain-Algorithm) is a compression algorithm that is improved and optimized from Deflate and LZ77 algorithms.
[0014] Cold start: Just like a computer can only work after being connected to the power supply, the same is true for any electronic device. From the time the device is connected to the power supply to the time it is ready to work, a series of initialization operations must be performed. This process is called a cold start. Summary of the invention
[0015] In order to solve the above problems, the purpose of this application is: on other low-power products, the existing operations can basically enable the products to meet certain market needs, but they still do not have an advantage in the high-end market. In response to this, Beijing Ingenic Integrated Circuit Co., Ltd. (abbreviated as: Ingenic) T41 platform has designed a dual Flash function in hardware. This design allows the originally serial operations to read flash data in parallel to achieve a fast cold start function. And in an environment where software is conventionally used for decompression, a dual LZMA hardware decompression module (named JZLZMA) is designed. The LZMA hardware module can quickly decompress files in the JZLZMA compression format. JZLZMA is a compression algorithm developed by the Ingenic platform, which couples the two standard compression formats of LZO and LZMA.
[0016] Specifically, the present invention provides a cold start optimization method for a fast start system of a low-power electronic product, the method comprising the following steps:
[0017] S1, device power on;
[0018] S2, boot starts: dual Flash operation and LZMA dual hardware decompression module in the boot stage, that is, the following three operations are performed simultaneously:
[0019] A, an SFC is recorded as SFC0, which loads the kernel compression; after the data is loaded, the LZMA hardware decompression kernel continues;
[0020] B, another SFC is recorded as SFC1, loads the rootfs compression; after the data is loaded, continue to decompress the rootfs with LZMA hardware;
[0021] C, the CPU processes other tasks other than loading kernel and loading rootfs in parallel;
[0022] S3, boot is completed.
[0023] The step S2 further comprises: at the same time,
[0024] A, boot Flash controller SFC loads the compressed kernel on load Flash1;
[0025] B, boot another Flash controller SFC to load the compressed rootfs on Flash2 in parallel; after waiting for all the data to be loaded, the hardware LZMA module will decompress the kernel and rootfs in parallel;
[0026] C, and the CPU does not need to participate in the data loading process and the compressed data decompression process; at this time, the CPU synchronously and parallelly processes other operations including the reading of photosensitive data and the configuration of sensor registers.
[0027] After the device is powered on, the method assumes that the Linux operating system is used. The Linux operating system only needs to load two partitions, namely kernel and rootfs. Therefore, in step S2, the two partitions are placed on different Flashes to perform load data operations at the same time, and the hardware module is used for decompression.
[0028] The dual Flash operation and LZMA dual hardware decompression module include:
[0029] In order to achieve the ultimate fast startup speed, the design uses two Flash controllers and two LZMA hardware decompression modules;
[0030] The two Flash controllers are SFC controllers that can load the kernel and file system in parallel during system startup, thus improving the startup time.
[0031] The two LZMA controllers enable users to compress the kernel and file system in lzma format during development. The compressed format will save Flash storage space. Combined with LZMA hardware decompression, it can quickly decompress files and improve startup speed.
[0032] The method designs a dual Flash function in hardware; the design enables originally serial operations to read Flash data in parallel to realize a fast cold start function; in a conventional software decompression environment, a dual LZMA hardware decompression module is designed, denoted as a JZLZMA hardware module, and the JZLZMA hardware module can quickly decompress files in a JZLZMA compression format, and the JZLZMA compression format is a self-developed compression algorithm that couples two standard compression formats, LZO and LZMA, and the self-developed compression algorithm optimizes the encoding dictionary, that is, the search logic of the internal dictionary is modified to meet the decoding efficiency, so as to realize the purpose of fast decompression.
[0033] Therefore, the advantages of this application are: taking the Linux operating system as an example, the system generally only needs to load two partitions, namely kernel and rootfs, so it is the best solution to put the two partitions on different Flash and load the partition data at the same time, and use the hardware module to perform the decompression operation. The CPU is not involved in the loading and decompression process. At this time, the CPU can process other services in parallel, which greatly improves efficiency and startup time. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.
[0035] Figure 1 It is a schematic diagram of the startup process of low-power electronic products in the prior art.
[0036] Figure 2 It is a schematic diagram of the startup process in this application. DETAILED DESCRIPTION
[0037] In order to more clearly understand the technical content and advantages of the present invention, the present invention is now further described in detail in conjunction with the accompanying drawings.
[0038] The present application proposes a cold start optimization method for a fast-start system of low-power electronic products, which relates to IPC security and consumer electronic products.
[0039] In order to break through the existing cold start time limit, Ingenic T41 chip is designed with a dual flash architecture and a hardware dual LZMA decompression module (named JZLZMA).
[0040] In the prior art, taking the startup process of other low-power products as an example, after the device is powered on, the boot guides the flash controller to load the compressed kernel. After the loading is completed, the CPU performs software decompression. At this time, in order to start as quickly as possible, the flash controller is generally enabled and the compressed rootfs is loaded. After waiting for both to complete, the CPU will decompress the rootfs. During the soft decompression process, the CPU cannot handle other services and needs to wait for the decompression operation to end. At this time, some necessary operations for software startup also take a certain amount of time to process. The process is as follows: Figure 1 As shown:
[0041] S1, device power on;
[0042] S1, boot starts;
[0043] S2, load kernel compression;
[0044] S3, perform the following two operations simultaneously:
[0045] A, CPU decompresses the kernel;
[0046] B, load rootfs compression;
[0047] S4, CPU decompresses rootfs;
[0048] S5, CPU processes other services;
[0049] S6, boot is completed.
[0050] In contrast, the technical solution of the present application optimizes the startup process to a certain extent. In this solution, after the device is powered on, the boot guides the Flash controller to load the kernel in compressed format on flash1, and the Flash controller loads the compressed rootfs on flash2 in parallel. After waiting for all the data to be loaded, the hardware LZMA module (the embodiment uses the JZLZMA module) will decompress the kernel and rootfs in parallel, and the CPU does not need to participate in the data loading process and the compressed data decompression process. At this time, the CPU can synchronously and parallelly process some other operations such as reading of photosensitive data, configuration of sensor registers, etc. The process is as follows: Figure 2 As shown:
[0051] S1, device power on;
[0052] S2, boot starts: dual flash operation and LZMA dual hardware decompression modules in the boot stage, which are self-developed by Ingenic. The traditional design generally has only one flash controller to communicate with the flash. In order to achieve the ultimate fast startup speed, the Ingenic T41 platform uses two flash controllers and two LZMA hardware decompression modules in design;
[0053] Two SFC controllers can load the kernel and file system in parallel during system startup, improving the startup time;
[0054] The two LZMA controllers allow users to compress the kernel and file system in lzma format during development, which will save a lot of flash storage space and achieve cost savings. Combined with LZMA hardware decompression, it can quickly decompress files and improve startup speed;
[0055] That is, perform the following three operations simultaneously:
[0056] A, an SFC is recorded as SFC0, which loads the kernel compression; after the data is loaded, the LZMA hardware decompression kernel continues;
[0057] B, another SFC is recorded as SFC1, loads the rootfs compression; after the data is loaded, continue to decompress the rootfs with LZMA hardware;
[0058] C, the CPU processes other tasks other than loading kernel and loading rootfs in parallel;
[0059] S3, boot is completed.
[0060] The step S2 further comprises: at the same time,
[0061] A, boot Flash controller SFC loads the compressed kernel on load Flash1;
[0062] B, boot another Flash controller SFC to load the compressed rootfs on Flash2 in parallel; after waiting for all the data to be loaded, the hardware LZMA module will decompress the kernel and rootfs in parallel;
[0063] C, and the CPU does not need to participate in the data loading process and the compressed data decompression process; at this time, the CPU synchronously and parallelly processes other operations including the reading of photosensitive data and the configuration of sensor registers.
[0064] The method designs a dual Flash function in hardware; the design enables the originally serial operation to read the Flash data in parallel to realize the fast cold start function; in the environment where software is conventionally used for decompression, a dual LZMA hardware decompression module is designed, which is recorded as the JZLZMA hardware module. The JZLZMA hardware module can quickly decompress files in the JZLZMA compression format. The JZLZMA compression format is a self-developed compression algorithm that couples two standard compression formats, LZO and LZMA. The self-developed compression algorithm optimizes the encoding dictionary. The use of the existing official compression algorithm dictionary is not conducive to the decoding efficiency after the hardware is made. The more complex the dictionary, the better the compression rate, but the slower the decoding. Therefore, the search logic of the internal dictionary is modified, that is, the official default algorithm is modified, and the complexity of the original algorithm dictionary is reduced, thereby improving the efficiency of decoding the compressed file, so that it meets the decoding efficiency and achieves the purpose of fast decompression.
[0065] After the device is powered on, the method assumes that the Linux operating system is used. The Linux operating system only needs to load two partitions, namely kernel and rootfs. Therefore, the optimal solution is to place the two partitions on different Flashes and load data at the same time through step S2, and use the hardware module for decompression.
[0066] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A cold start optimization method for a fast start system of a low-power electronic product, characterized in that: The method comprises the following steps: S1, device power on; S2, boot starts: dual Flash operation and LZMA dual hardware decompression module in the boot stage, that is, the following three operations are performed simultaneously: A, an SFC is recorded as SFC0, which loads the kernel compression; after the data is loaded, the LZMA hardware decompression kernel continues; B, another SFC is recorded as SFC1, loads the rootfs compression; after the data is loaded, continue to decompress the rootfs with LZMA hardware; C, the CPU processes other tasks other than loading kernel and loading rootfs in parallel; S3, boot is completed.
2. A cold start optimization method for a fast start system of a low-power electronic product according to claim 1, characterized in that: The step S2 further comprises: at the same time, A, boot Flash controller SFC loads the compressed kernel on load Flash1; B, boot another Flash controller SFC to load the compressed rootfs on Flash2 in parallel; after waiting for all the data to be loaded, the hardware LZMA module will decompress the kernel and rootfs in parallel; C, and the CPU does not need to participate in the data loading process and the compressed data decompression process; at this time, the CPU synchronously and parallelly processes other operations including the reading of photosensitive data and the configuration of sensor registers.
3. The cold start optimization method for a fast start system of a low-power electronic product according to claim 1, characterized in that: After the device is powered on, the method assumes that the Linux operating system is used. The Linux operating system only needs to load two partitions, namely kernel and rootfs. Therefore, in step S2, the two partitions are placed on different Flashes to perform load data operations at the same time, and the hardware module is used for decompression.
4. The cold start optimization method for a fast start system of a low-power electronic product according to claim 1, characterized in that: The dual Flash operation and LZMA dual hardware decompression module include: In order to achieve the ultimate fast startup speed, the design uses two Flash controllers and two LZMA hardware decompression modules; The two Flash controllers are SFC controllers that can load the kernel and file system in parallel during system startup, thus improving the startup time. The two LZMA controllers enable users to compress the kernel and file system in lzma format during development. The compressed format will save Flash storage space. Combined with LZMA hardware decompression, it can quickly decompress files and improve startup speed.
5. A cold start optimization method for a fast start system of a low-power electronic product according to claim 4, characterized in that: The method, The dual Flash function is designed in hardware; this design allows the original serial operation to read Flash data in parallel to achieve a fast cold start function; In an environment where software is conventionally used for decompression, a dual LZMA hardware decompression module is designed, denoted as the JZLZMA hardware module. The JZLZMA hardware module can quickly decompress files in the JZLZMA compression format. The JZLZMA compression format is a self-developed compression algorithm that couples the two standard compression formats of LZO and LZMA. The self-developed compression algorithm optimizes the encoding dictionary, that is, the search logic of the internal dictionary is modified to meet the decoding efficiency, thereby achieving the purpose of fast decompression.