Equipment starting method and related device

By reading and decompressing compressed data blocks in parallel when the device is powered on, the problem of slow cold start speed in embedded systems is solved, and faster device startup and better user experience is achieved.

CN120045232APending Publication Date: 2025-05-27BEIJING YIZHUANG JIEFA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411897609.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-20
Publication Date
2025-05-27

AI Technical Summary

Technical Problem

In embedded systems, the device needs to load and verify the data file during cold startup, resulting in a slow startup speed. In the prior art, the data reading and compression are performed serially, and the device's parallel processing capabilities cannot be fully utilized.

Method used

When the device is powered on, the controller reads the compressed data blocks in the compressed data from the storage device, and decompresses while reading the current data block until all data blocks are decompressed to obtain the startup data and control the device to start up.

Benefits of technology

By parallel processing, reading and decompressing compressed data blocks improves the speed of the controller to acquire startup data, shortens the startup time of the device, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045232A_ABST
    Figure CN120045232A_ABST
Patent Text Reader

Abstract

The invention discloses an equipment starting method and a related device. The method comprises the steps that the electronic equipment is responded to be powered on, a controller reads compressed data blocks in compressed data from storage equipment, and the compressed data blocks in the compressed data are obtained by compression of starting data of the electronic equipment; the controller reads the next compressed data block while decompressing the current compressed data block until all the compressed data blocks are decompressed; and the controller reads and decompresses all the compressed data blocks in the compressed data to obtain starting data, and controls the electronic equipment to start by using the starting data. In this way, the starting speed of the equipment can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer control, and particularly to a device startup method and related devices. Background Art

[0002] In common embedded systems, the startup speed is often an important indicator affecting user experience. The startup methods are generally divided into cold startup and warm startup. Cold startup refers to the startup process of the product from complete power-off to power-on. Warm startup refers to the process of restarting when the product is not completely powered off but in a low-power sleep state upon receiving a user instruction. During cold startup, the device needs to read out the data files stored in the memory and use these data files to control the device startup. The time-consuming of the cold startup process mainly lies in the loading and verification processes of these data files. Common operations to improve the cold startup time-consuming include increasing the reading / loading speed, improving the device running performance, optimizing the startup process, compressing the data files to reduce the data transmission volume, etc. Among the above means, limited by the conditions of the device system itself and the rigid requirements such as process needs, data compression, as a low-cost and high-benefit solution, has become a relatively mainstream technical means to accelerate the startup speed. However, in the conventional data compression startup method, the reading and compression of data are executed serially. Summary of the Invention

[0003] The main objective of this application is to provide a device startup method and related devices, which can improve the device startup speed.

[0004] The first technical solution adopted by this application is: providing a device startup method. This device startup method is applied to an electronic device, and the electronic device is provided with a controller and a storage device. The method includes that in response to the power-on of the electronic device, the controller reads a compressed data block from the compressed data in the storage device, and the compressed data block in the compressed data is obtained by compressing the startup data of the electronic device; while the controller decompresses the current compressed data block, it reads the next compressed data block until all compressed data blocks are decompressed; the controller reads and decompresses all compressed data blocks in the compressed data to obtain startup data, and uses the startup data to control the startup of the electronic device.

[0005] The second technical solution adopted by this application is: providing a startup device. This startup device includes a storage module for storing compressed data, and the compressed data includes compressed data blocks, and the compressed data blocks in the compressed data are obtained by compressing the startup data of the startup device; a control module for, in response to the power-on of the startup device, reading a compressed data block from the compressed data in the storage device, decompressing the current compressed data block while reading the next compressed data block until all compressed data blocks are decompressed, reading and decompressing all compressed data blocks in the compressed data to obtain startup data, and using the startup data to control the startup of the startup device.

[0006] The third technical solution adopted in this application is: to provide an electronic device. The electronic device includes a memory and a processor. The memory is used to store program data, and the program data can be executed by the processor to implement the method described in the first technical solution.

[0007] The fourth technical solution adopted in this application is: to provide a computer-readable storage medium / computer program product. The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions can be executed by the processor to implement the method described in the first technical solution. The computer program product includes a computer program, and when the computer program is executed by the processor, it implements the method described in the first technical solution.

[0008] The beneficial effect of this application is: when the electronic device is powered on and started, start reading the compressed data in the storage device of the electronic device. When reading the compressed data blocks in the compressed data, parallelly execute the decompression and reading processes of the compressed data blocks, and read the next compressed data block while decompressing the current compressed data block. Through parallel processing, the acquisition speed of the start-up data obtained by the controller is improved, the start-up speed of the electronic device is increased, the time consumed by the user to start is reduced, and the user experience is improved. Description of the Drawings

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0010] Figure 1 It is a schematic flowchart of the first embodiment of the device start-up method of this application;

[0011] Figure 2 It is a schematic flowchart of the second embodiment of the device start-up method of this application;

[0012] Figure 3 It is a schematic diagram of obtaining a compressed data block based on the data reading time and the data decompression time of this application;

[0013] Figure 4 It is a schematic flowchart of the third embodiment of the device start-up method of this application;

[0014] Figure 5 It is a schematic diagram of parallel decompression and reading of the compressed data block of this application;

[0015] Figure 6 It is a schematic structural diagram of an embodiment of the start-up device of this application;

[0016] Figure 7 It is a schematic structural diagram of an embodiment of the electronic device of the present application;

[0017] Figure 8 It is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. Detailed implementation manners

[0018] The embodiments of the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solutions of the present application more clearly, so they are only examples and cannot be used to limit the protection scope of the present application.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the description and claims of this application and the above drawings are intended to cover non-exclusive inclusion.

[0020] Referring to "embodiments" herein means that the specific features, structures or characteristics described in connection with the embodiments can be included in at least one embodiment of this application. The phrase appears in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.

[0021] In the description of the embodiments of this application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of this application, "a plurality of" means more than two, unless otherwise specifically defined.

[0022] In the description of the embodiments of this application, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0023] In the description of the embodiments of this application, the term "a plurality of" refers to more than two (including two). Similarly, "a plurality of groups" refers to more than two groups (including two groups), and "a plurality of pieces" refers to more than two pieces (including two pieces).

[0024] In the description of the embodiments of the present application, the orientation or positional relationship indicated by technical terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the embodiments of the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the embodiments of the present application.

[0025] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installation", "connection", "connection", "fixation", etc. should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or integrated; it can also be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to specific circumstances.

[0026] Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for starting up the device of the present application. This method is applied to an electronic device, and the electronic device is provided with a controller and a storage device. This method includes but is not limited to the following steps.

[0027] S11: In response to the power-on of the electronic device, the controller reads the compressed data block in the compressed data from the storage device, and the compressed data block in the compressed data is obtained by compressing the startup data of the electronic device.

[0028] When the electronic device is powered on, data reading usually starts from the default reading address of the storage device. During the upgrade process of the electronic device, the electronic device stores the compressed data obtained by compressing the startup data of the electronic device in the storage device for reading when powered on.

[0029] The startup data of the electronic device may include a read-only startup program, a startup boot program, etc. This startup data is used to control the startup of the electronic device.

[0030] The obtained compressed data includes multiple compressed data blocks.

[0031] S12: While the controller decompresses the current compressed data block, it reads the next compressed data block until all compressed data blocks are decompressed.

[0032] After the controller reads the current compressed data block, it starts to read the next compressed data block while starting to decompress the current data block.

[0033] For example, the compressed data includes several compressed data blocks A, B, C, D, etc. The electronic device first reads the compressed data block A. After reading the compressed data block A, it decompresses the compressed data block A. When starting to decompress the compressed data block A, it starts to read the next compressed data block B. After reading the compressed data block B, when starting to decompress the compressed data block B, it starts to read the next compressed data block C. Then when starting to decompress the compressed data block C, it starts to read the next compressed data block D, and so on.

[0034] S13: The controller reads and decompresses all the compressed data blocks in the compressed data to obtain the startup data, and uses the startup data to control the startup of the electronic device.

[0035] When all the compressed data blocks in the compressed data are decompressed, the startup data can be obtained, and the controller executes the startup data to control the startup of the electronic device.

[0036] In this embodiment, when the electronic device is powered on and started, it starts to read the compressed data in the storage device of the electronic device. When reading the compressed data blocks in the compressed data, the decompression and reading processes of the compressed data blocks are executed in parallel, and the next compressed data block is read while the current compressed data block is being decompressed. Through parallel processing, the acquisition speed of the startup data obtained by the controller is improved, the startup speed of the electronic device is increased, the time consumed by the user for startup is reduced, and the user experience is improved.

[0037] Under normal circumstances, during the process of decompressing and reading the compressed data blocks, affected by the reading performance of the storage device, the decompression performance of the controller, and some other related factors, there may still be a difference in the decompression time of the current compressed data block and the reading time of the next compressed data block. Even when the reading speed of the storage device and the decompression speed of the controller are similar and the data volume of each compressed data block is equal, the decompression time of each compressed data block may still vary, and there is still a difference in the time difference between the maximum decompression time and the minimum decompression time, and there may also be a certain difference from the data reading time of the compressed data block. Therefore, in order to further make full use of the transmission and decompression performance of the electronic device, the present application uses the following method to perform dynamic compression on the compressed data to obtain multiple compressed data blocks.

[0038] In some embodiments, the compressed data block is obtained by compressing the startup data based on the data reading time and the data decompression time.

[0039] During the data reading process, the data reading speed is usually stable. It is related to the hardware performance of the device. The data reading speed can be obtained through testing the storage device. For example, when reading 100 MB of data from the storage device and it takes 1 second, the data reading speed of this electronic device is 100 MB / s. Then the data reading time is correspondingly stable, that is, when reading different 100 MB of data at a reading speed of 100 MB / s, the time may be around 1 second.

[0040] However, during the data decompression process, the data decompression speed is variable, which is related to the data content in the decompressed data block. Therefore, there will be differences in the decompression times of compressed data blocks with the same data volume. Taking the decompression speed of the electronic device as 100 MB / s (the decompression speed under macroscopic conditions, the average speed obtained by decompressing a large amount of data) as an example, when decompressing 100 MB of data, some may take 1.5 seconds, some 1 second, and some 0.5 seconds. The difference between these is much larger than the difference between the reading times.

[0041] When performing parallel reading and decompression on compressed data blocks with the same data volume, due to the large difference between the decompression time and the reading time of the data block, it may cause delays in data processing, that is, waiting for the data block to be decompressed before transmission or waiting for the data block to be read before decompression.

[0042] The above is a description when the data reading speed and decompression speed (under macroscopic conditions) of the electronic device are equal. When the data reading speed and decompression speed of the electronic device are not equal, the gap between the decompression time and the reading time of compressed data blocks with the same data volume may be even larger.

[0043] Therefore, in order to reduce this gap, this application selects to divide the compressed data block according to the data reading time and data decompression time of the compressed data block. Specifically, refer to the following embodiments.

[0044] Refer to Figure 2 , Figure 2 is a schematic flowchart of the second embodiment of the device startup method of this application. This method is a further limitation of the above embodiment. This method includes but is not limited to the following steps.

[0045] S21: Divide the startup data into multiple data sub - blocks.

[0046] When compressing the startup data into compressed data blocks based on the data reading time and data decompression time, first divide the startup data into multiple data sub - blocks.

[0047] S22: Compress each of the multiple data sub - blocks respectively to obtain corresponding multiple compressed data sub - blocks.

[0048] Each data sub-block is compressed respectively by using a compression algorithm to obtain a corresponding compressed data sub-block.

[0049] S23: Divide multiple compressed data sub-blocks to obtain at least two compressed data blocks, where the start data corresponding to the compressed data sub-blocks in a compressed data block is continuous, and both the data reading time and the data decompression time of the compressed data block are within a preset range centered on a preset time.

[0050] After obtaining multiple compressed data sub-blocks, according to the data reading time and the data decompression time, divide the multiple compressed data sub-blocks into at least two compressed data blocks, so that both the data reading time and the decompression time of these compressed data blocks are within a preset range centered on a preset time.

[0051] The start data corresponding to the compressed data in the obtained compressed data block is continuous. That is, when obtaining the compressed data block, the corresponding compressed data sub-blocks are divided and compressed in the order of the start data.

[0052] Similar to the above description, since the reading speed is usually stable, the data reading times of compressed data sub-blocks with the same data volume do not differ much.

[0053] The data decompression time of the compressed data sub-block needs to be determined according to the actual decompression situation of the compressed data sub-block.

[0054] Therefore, in the process of parallel processing of reading and decompressing compressed data, in order to further reduce the difference in reading and decompression times of the compressed data block, the present application first divides the compressed data sub-blocks to reduce the difference between the decompression time and the reading time, and then through the combination adjustment of the compressed data sub-blocks, and then according to the different decompression times of the compressed data sub-blocks, combines and divides them, so that the data reading time and the data decompression time of the obtained compressed data block are closer, thereby reducing the difference between the reading time and the decompression time during parallel processing and reducing the waiting time during parallel processing.

[0055] When the data reading speed and the data decompression speed of the electronic device differ greatly, since the difference is already large, the division of the compressed data block in the present application may not be particularly obvious in reducing the waiting time during the parallel process. However, when the data reading speed and the data decompression speed of the electronic device are similar, dividing the compressed data block according to the above embodiments of the present application can reduce more waiting time during the parallel process.

[0056] Refer to Figure 3 , Figure 3This is a schematic diagram of obtaining compressed data blocks based on data reading time and data decompression time. Taking the startup data including Image_P1 as an example, assuming the size of Image_P1 is 10MB, it is divided into units of 1MB for processing. The preset time is set to 10ms, and the corresponding preset range is set to 9 - 11ms. The size of the compressed data of the first 1MB of data (labeled ①) is 512KB, and it takes 5ms to decompress; the size of the compressed data of the second 1MB of data (labeled ②) is 480KB, and it takes 4ms to decompress. Then, the first 1MB and the second 1MB are combined into the first split compressed block Image_Z1_1. This split block compresses the first 1MB of data and the second 1MB of data. The size of the compressed data is 512KB + 480KB = 992KB, and it takes 5ms + 4ms = 9ms to decompress this data. It is expected to take (992KB) / (100MB / S) = 9.5ms to read 992KB from the storage device. In this way, the reading time and the decompression time are basically equivalent and within the preset range of the preset time. By analogy, the same processing is performed on the remaining 8 1MB of data. According to the above method, the selection and compression of 1MB data sub - blocks are carried out. The second split compressed block Image_Z1_2 can be composed of ③④⑤⑥, and the size of the compressed data is 1001KB. The third split compressed block Image_Z1_3 is composed of ⑦⑧⑨⑩, and the size of the compressed data is 1020KB, so that the data reading time and data decompression time of the obtained split compressed blocks also meet the above requirements.

[0057] In this embodiment, when obtaining the compressed data block, the startup data is divided into multiple parts to obtain multiple compressed data sub - blocks, and then they are combined to obtain the compressed data block, so that the reading time and decompression time of the obtained compressed data block are within the preset range centered on the preset time. Taking the reading time and decompression time as constraints, the size of the compressed data block is dynamically adjusted, so that during the parallel execution of reading and decompressing the compressed data block, the matching degree between the decompression time and the reading time of the compressed data block is higher and the gap is smaller, thereby further optimizing the startup process of the electronic device and reducing the startup time consumption of the electronic device.

[0058] In some embodiments, the startup data is divided into multiple data sub - blocks with a preset fixed data volume. Dividing the startup data with a fixed data volume to obtain data sub - blocks can make the data volumes of the obtained compressed data sub - blocks not differ too much, and their data reading times will not differ too much, which is convenient for the subsequent process of obtaining the division of the compressed data block.

[0059] The fixed data volume can be set according to the actual situation. For example, if the fixed data volume is 1MB, when dividing the startup data, it is divided into multiple 1MB data sub-blocks. If the fixed data volume is 2MB, when dividing the startup data, it is divided into multiple 2MB data sub-blocks. The smaller the fixed data volume, the larger the adjustment space of the compressed data sub-blocks in the compressed data block when dividing the compressed data block. Therefore, the gap between the data reading time and the data decompression time of the obtained compressed data block is smaller.

[0060] In some embodiments, before the controller reads a compressed data block from the storage device, it includes: obtaining compression parameters for decompressing the compressed data block, where the compression parameters include at least one of the following: compression algorithm type, the number of compressed data sub-blocks in each compressed data block, the offset and data volume of the compressed data block in the compressed data, the offset and data volume of the original data corresponding to the compressed data block in the startup data.

[0061] Referring to Figure 3 , after the controller obtains the compressed data block, it stores the compression parameters related to the compressed data block in the storage device together for subsequent reading and decompression of the compressed data block. The Header is used to record the compression parameters of the compressed data blocks in Image_Z1. Taking Image_Z1_1 as an example, the compression algorithm type is the compression algorithm type used to obtain the compressed data block Image_Z1_1. The offset in the compressed data is the offset position of the compressed data block Image_Z1_1 in the compressed data Image_Z1. The data volume in the compressed data is the data size of the compressed data block Image_Z1_1. The offset and data volume of the original data corresponding to the compressed data in the startup data, that is, the offset and data volume of that part of the startup data corresponding to the compressed data in the entire startup data. The offset of the original data in the startup data is the offset position of the original data ①② of the compressed data block Image_Z1_1 in the startup data Image_P1. The data volume of the original data in the startup data is the data size of the original data ①②.

[0062] The information included in the Header is the compression algorithm used and the number of compressed data blocks is 3. Assume the data capacity of the Header is 1 KB. The information included in the Header for the first compressed data block Image_Z1_1 is the offset position of Image_Z1_1 in Image_Z1, which is 1 KB, the data size of Image_Z1_1, which is 992 KB, the offset position of the corresponding original data ①② in Image_P1, which is 0, and the data size of the corresponding original data ①②, which is 2 MB. The information included in the Header for the second compressed data block Image_Z1_2 is the offset position of Image_Z1_2 in Image_Z1, which is 993 KB, the data size of Image_Z1_1, which is 1001 KB, the offset position of the corresponding original data ①② in Image_P1, which is 2 MB, and the data size of the corresponding original data ①②, which is 4 MB. The information for the remaining compressed data blocks can be inferred in this way.

[0063] Refer to Figure 4 , Figure 4 which is a schematic flowchart of the third embodiment of the device startup method of the present application. This method is a further limitation of the above embodiment. This method includes but is not limited to the following steps.

[0064] S31: When the controller reads and decompresses the compressed data blocks in the compressed data, read the compressed data blocks based on the offset and data volume of the compressed data blocks in the compressed data, and store the original data corresponding to the decompressed compressed data blocks in the running memory based on the offset and data volume of the original data corresponding to the compressed data blocks in the startup data.

[0065] The controller of the electronic device is provided with a running memory. When the controller reads and decompresses all the compressed data blocks in the compressed data to obtain the startup data, it will decompress and store the data in the running memory according to the offset and data volume in the decompression parameters.

[0066] According to the offset and data volume of the current compressed data block, the sum of the two can obtain the offset of the next compressed data block to be read. That is, the next compressed data block to be read can be determined according to the offset.

[0067] For example, the electronic device reads the Header of Image_Z1, parses out the compression algorithm used, the number of compressed data blocks, and the information of each compressed data block. According to the information of the first compressed data block Image_Z1_1, compressed data Image_Z1_1 with a data size of 992 KB is read from the offset position 1K of Image_Z1. The data ①② is decompressed from Image_Z1_1 to the 0 offset position of Image_P1. At the same time, according to the information of the second segmented compressed segment Image_Z1_2, compressed data Image_Z1_2 with a data size of 1001 KB is read from the offset position 993K of Image_Z1. The data ③④⑤⑥ is decompressed from Image_Z1_2 to the 2MB offset position of Image_P1. At the same time, according to the information of the third segmented compressed segment Image_Z1_3, compressed data Image_Z1_3 with a data size of 1020 KB is read from the offset position 1994K of Image_Z1. And so on for the decompression order of subsequent compressed data blocks.

[0068] The decompressed data is stored in the running memory in order according to the offset and data size in Image_P1.

[0069] S32: When all the compressed data blocks in the compressed data are decompressed, the startup data stored in the running memory is obtained.

[0070] After decompressing all the compressed data blocks, complete startup data can be obtained in the running memory. Using this startup data, the startup of the electronic device can be completed.

[0071] In some embodiments, the startup data includes multiple image files. The startup of an electronic device usually requires file data with multiple functions. Different image files correspond to different functions. When the startup data includes multiple image files, the startup data is divided into multiple data sub-blocks, including dividing each image file in the startup data into multiple data sub-blocks, and separately dividing the data compression blocks for each data sub-block corresponding to each image file. Each of the multiple compressed data blocks obtained from each image file has corresponding compression parameters.

[0072] Refer to Figure 5 , Figure 5 which is a schematic diagram of parallel decompression and reading of compressed data blocks in this application.

[0073] Taking the startup data including two image files Image_P1 and Image_P2 as an example, the corresponding compressed data after compression is Image_Z1 and Image_Z2. Image_Z1 and Image_Z2 have their respective compression parameters placed in the Header. In the storage device, Image_Z1 and Image_Z2 are stored in sequence, with Image_Z1 having a lower address and Image_Z2 having a higher address. When reading, the controller first reads Image_Z1. After reading the compression parameters in the Header of Image_Z1, the controller reads and decompresses the corresponding compressed data block to the operating memory according to the information of the compression parameters. Read Image_Z1_1. While decompressing Image_Z1_1, read Image_Z1_2. While decompressing Image_Z1_2, read Image_Z1_3. When all of Image_Z1 has been read, read the next image file Image_Z2. The Header of Image_Z2 can be read after Image_Z1_3 has been decompressed. Or the Header of Image_Z2 can be read when Image_Z1_3 starts to be decompressed, which is faster and improves the startup speed of the electronic device. Reading and decompressing Image_Z2 is similar to the above.

[0074] Referring to Figure 6 , Figure 6 is a schematic structural diagram of an embodiment of the startup device of the present application.

[0075] The startup device includes a storage module 110 and a control module 120.

[0076] The storage module 110 is used to store compressed data, and the compressed data includes compressed data blocks, and the compressed data blocks in the compressed data are obtained by compressing the startup data of the startup device.

[0077] The control module 120 is used to, in response to the startup device being powered on, read the compressed data blocks in the compressed data from the storage module 110, read the next compressed data block while decompressing the current compressed data block, until all compressed data blocks are decompressed, read and decompress all compressed data blocks in the compressed data to obtain startup data, and use the startup data to control the startup of the startup device.

[0078] In some embodiments, the compressed data blocks are obtained by compressing the startup data based on the data reading time and the data decompression time.

[0079] In some embodiments, when the control module compresses the startup data based on the data reading time and the data decompression time, it first divides the startup data into multiple data sub-blocks, then compresses the multiple data sub-blocks separately to obtain corresponding multiple compressed data sub-blocks, and then divides the multiple compressed data sub-blocks to obtain at least two compressed data blocks. The startup data corresponding to the compressed data sub-blocks in the compressed data block is continuous, and the transmission time and decompression time of each compressed data block are both within a preset range centered on a preset time.

[0080] In some embodiments, the control module divides the startup data into multiple data sub-blocks with a preset fixed data volume. Dividing the startup data into data sub-blocks with a fixed data volume can make the data volumes of the obtained compressed data sub-blocks not differ too much, and their transmission times will not differ too much, facilitating the subsequent process of dividing the compressed data blocks.

[0081] In some embodiments, before the control module reads the compressed data block in the compressed data from the storage device, it includes: obtaining compression parameters for decompressing the compressed data block. The compression parameters include at least one of the following: compression algorithm type, the number of compressed data sub-blocks in each compressed data block, the offset and data volume of the compressed data block in the compressed data, and the offset and data volume of the original data corresponding to the compressed data block in the startup data.

[0082] In some embodiments, when the control module reads and decompresses the compressed data block in the compressed data, it reads the compressed data block based on the offset and data volume of the compressed data block in the compressed data, and stores the original data corresponding to the decompressed compressed data block in the operating memory of the control module based on the offset and data volume of the original data corresponding to the compressed data block in the startup data. When all the compressed data blocks in the compressed data are decompressed, the startup data stored in the operating memory is obtained.

[0083] In some embodiments, the startup data includes multiple image files. The startup of the startup device usually requires file data for multiple functions. Different image files correspond to different functions. When the startup data includes multiple image files, dividing the startup data into multiple data sub-blocks includes dividing each image file in the startup data into multiple data sub-blocks separately, and dividing the data compression blocks corresponding to the data sub-blocks of each image file separately. Each image file has corresponding compression parameters for the obtained multiple compressed data blocks.

[0084] As Figure 7 shown, Figure 7 is a schematic structural diagram of an embodiment of an electronic device according to the present application.

[0085] The electronic device includes a processor 210 and a memory 220.

[0086] The processor 210 controls the operation of the electronic device. The processor 210 may also be referred to as a CPU (Central Processing Unit). The processor 210 may be an integrated circuit chip with the ability to process signal sequences. The processor 210 may also be a general-purpose processor, a digital signal sequence processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0087] The memory 220 stores the instructions and program data required for the operation of the processor 210.

[0088] The processor 210 is used to execute instructions to implement the device startup method provided by any one of the above embodiments and possible combinations in the present application.

[0089] As Figure 8 shown, Figure 8 This is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application.

[0090] An embodiment of the readable storage medium of the present application includes a memory 310. The memory 310 stores program data. When the program data is executed, it implements the device startup method provided by any one of the above embodiments and possible combinations in the present application.

[0091] The memory 310 may include a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc, etc., which can store program instructions, or it may also be a server storing the program instructions. The server can send the stored program instructions to other devices for running, or it can also run the stored program instructions by itself.

[0092] The present application also provides a computer program product. The computer program product includes a computer program. When the computer program is executed, it implements the device startup method provided by any one of the above embodiments and possible combinations in the present application.

[0093] In summary, when the electronic device is powered on and started, it starts to read the compressed data in the storage device of the electronic device. When reading the compressed data blocks in the compressed data, the decompression and reading processes of the compressed data blocks are executed in parallel, and the next compressed data block is read while the current compressed data block is being decompressed. Through parallel processing, the acquisition speed of the startup data obtained by the controller is increased, the startup speed of the electronic device is increased, the time consumed by the user for startup is reduced, and the user experience is improved.

[0094] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

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

[0096] In addition, in each embodiment of the present application, the functional units can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0097] If the integrated units in the above-mentioned other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0098] The above are only the embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A device startup method, characterized in that: Applied to an electronic device, the electronic device is provided with a controller and a storage device, the method comprises: In response to the electronic device being powered on, the controller reads a compressed data block in the compressed data from the storage device, wherein the compressed data block in the compressed data is obtained by compressing the startup data of the electronic device; The controller decompresses the current compressed data block and reads the next compressed data block at the same time until all the compressed data blocks are decompressed; The controller reads and decompresses all the compressed data blocks in the compressed data to obtain the startup data, and uses the startup data to control the startup of the electronic device.

2. The method according to claim 1, characterized in that The compressed data block is obtained by compressing the startup data based on the data reading time and the data decompression time.

3. The method according to claim 2, characterized in that The compressed data block is obtained by compressing the startup data based on the data reading time and the data decompression time, and includes: Dividing the startup data into a plurality of data sub-blocks; Compressing the multiple data sub-blocks respectively to obtain corresponding multiple compressed data sub-blocks; The multiple compressed data sub-blocks are divided into at least two compressed data blocks, the startup data corresponding to the compressed data sub-blocks in the compressed data blocks are continuous, and the data reading time and the data decompression time of the compressed data blocks are both within a preset range centered on a preset time.

4. The method according to claim 3, characterized in that The startup data is divided into a plurality of data sub-blocks with a preset fixed data amount.

5. The method according to claim 1, characterized in that Before the controller reads the compressed data block in the compressed data from the storage device, the method includes: Obtain compression parameters, where the compression parameters are used to decompress the compressed data blocks, and the compression parameters include at least one of the following: a compression algorithm type, the number of compressed data sub-blocks in each compressed data block, an offset and a data amount of the compressed data block in the compressed data, and an offset and a data amount of original data corresponding to the compressed data block in the startup data.

6. The method according to claim 5, characterized in that The controller is provided with a running memory, and the controller reads and decompresses all the compressed data blocks in the compressed data to obtain the startup data, including: When the controller reads and decompresses a compressed data block in the compressed data, the compressed data block is read based on an offset and a data amount of the compressed data block in the compressed data, and the original data corresponding to the compressed data block obtained by decompression is stored in the running memory based on an offset and a data amount of the original data corresponding to the compressed data block in the startup data; When all compressed data blocks in the compressed data are decompressed, the startup data stored in the running memory is obtained.

7. The method according to any one of claims 1 to 6, characterized in that The startup data includes a plurality of image files.

8. A starting device, characterized in that: The starting device comprises: A storage module, used for storing compressed data, wherein the compressed data includes compressed data blocks, and the compressed data blocks in the compressed data are obtained by compressing the startup data of the startup device; A control module is used for reading the compressed data blocks in the compressed data from the storage device in response to the startup device being powered on, decompressing the current compressed data block and reading the next compressed data block at the same time, until all the compressed data blocks are decompressed, reading and decompressing all the compressed data blocks in the compressed data to obtain the startup data, and using the startup data to control the startup device to start.

9. An electronic device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store program data, and the program data can be executed by the processor to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium / computer program product, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor; The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.