File downloading method, apparatus and device

CN116647551BActive Publication Date: 2026-09-29SHENZHEN ZHENGTONG ELECTRONIC CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310732304.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2026-09-29
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

[0004]本申请的主要目的在于提供一种文件下载方法、装置以及设备,旨在解决大文件升级过程中,大文件下载缺乏较好的文件管理方式,导致系统升级维护过程的复杂度较高的问题

Benefits of technology

[0046]合并模块,用于根据所述本地元文件信息列表将所述拆分后文件内容进行合并。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116647551B_ABST
    Figure CN116647551B_ABST
Patent Text Reader

Abstract

The application discloses a file downloading method, device and equipment, which is applied to an operating system management platform connected with an operating system. The file downloading method comprises the following steps: determining configuration information of a to-be-split file; splitting the to-be-split file into split file content according to the configuration information, and generating a metafile information list; and uploading the split file content and the metafile information list into a file storage data table, wherein the file storage data table is used by the operating system to download a local metafile information list and split file content of the operating system in combination with a version upgrade notification obtained, and the split file content is combined according to the local metafile information list. The application solves the problem that, in the large file upgrade process, the complexity of the system upgrade maintenance process is high due to the lack of a good file management mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of document processing technology, and in particular to a document download method, apparatus, and device. Background Technology

[0002] OpenHarmony is an open-source operating system developed by the OpenAtom Foundation of my country, designed for all application scenarios. As a system software, OpenHarmony differs from other application software in that, besides its complex architecture, it also features large patch sizes for software upgrades (typically, a single system.img file is 1.2GB, and even after compression, it's still 300MB). Traditional software upgrades handle large files incrementally, only upgrading the modified parts. However, for large files like operating systems, even incremental upgrades can result in significant memory usage for system patch packages. Therefore, for such unavoidable large file downloads during upgrades, the conventional approach is to split the large file into several smaller files and download them separately.

[0003] However, existing methods for splitting large files into smaller ones for downloading are complex due to the large number of smaller files and the lack of effective file management. This makes the system upgrade and maintenance process quite complicated. Summary of the Invention

[0004] The main purpose of this application is to provide a file download method, apparatus, and device, which aims to solve the problem that the lack of a good file management method during the large file download process leads to a high degree of complexity in the system upgrade and maintenance process.

[0005] To achieve the above objectives, this application provides a file download method applied to an operating system management platform, wherein the operating system management platform is connected to the operating system, and the file download method includes:

[0006] Determine the configuration information of the file to be split;

[0007] Based on the configuration information, the file to be split is split into the contents of the split files, and a list of metafile information is generated;

[0008] The split file content and the metafile information list are uploaded to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list.

[0009] Optionally, the step of splitting the file to be split into the split file content according to the configuration information and generating a list of metafile information includes:

[0010] The MD5 value of the file to be split is calculated based on the file to be split.

[0011] Based on the file size information in the configuration information, the file to be split is split into a set of split files of the corresponding file size, and the storage path of the set of split files is recorded.

[0012] The contents of the split files in the split file set are read into the first memory according to the storage path, and the MD5 value of the first memory is calculated based on the first memory.

[0013] The string is appended to the first memory location with zero to obtain the first memory value, and the MD5 value of the first memory value is calculated based on the first memory value.

[0014] The metafile information list is generated based on the configuration information, the MD5 value of the file to be split, the MD5 value of the first memory, and the MD5 value of the first memory value, so as to complete the splitting of the file to be split.

[0015] Optionally, the operating system management platform is also connected to a file download service platform, and the step of uploading the split file content and the meta-file information list to the file storage data table includes:

[0016] In response to the upload command, the batch upload interface of the file download service platform is invoked;

[0017] Based on the batch upload interface, the split file content and the meta file information list are read;

[0018] The insert statement will upload the data obtained by reading the split file content and the metafile information list to the file storage data table.

[0019] This application also proposes a file download method applied to an operating system, wherein the operating system is connected to an operating system management platform, and the file download method includes:

[0020] Get version upgrade notifications;

[0021] According to the version upgrade notification and the file storage data table uploaded by the operating system management platform, the local metafile information list and the split file content of the operating system are downloaded. The file storage data table is obtained by the operating system management platform by splitting the file to be split into the split file content according to the configuration information, generating the metafile information list, and uploading the split file content and the metafile information list to the file storage database.

[0022] The contents of the split files are merged based on the local metadata information list.

[0023] Optionally, the operating system is also connected to a file download service platform, and the step of downloading the local metafile information list and the split file content of the operating system based on the version upgrade notification and the file storage data table uploaded by the operating system management platform includes:

[0024] The download list information interface of the file download service platform is called according to the version upgrade notification to obtain the number of split files;

[0025] Call the file transfer interface of the file download service platform, and pass in the local metafile information and the number of split files from the version upgrade notification;

[0026] The file download service platform receives record information from the file storage data table based on the local metafile information and the number of split files, wherein the record information includes at least the content of the split files;

[0027] The local metadata information, the number of split files, and the record information are written into the local metadata information list to complete the download of the local metadata information list and the content of the split files.

[0028] Optionally, the step of merging the split file contents according to the local metafile information list includes:

[0029] Call the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metafile information list;

[0030] The downloaded, split file content is read into the second memory, and the MD5 value of the second memory is calculated based on the second memory.

[0031] Compare whether the MD5 value of the first memory and the MD5 value of the second memory are equal;

[0032] If the MD5 value of the first memory is equal to the MD5 value of the second memory, the string is appended to the second memory from zero to obtain the second memory value, and the MD5 value of the second memory value is calculated based on the second memory value.

[0033] Compare the MD5 value of the first memory value with the MD5 value of the second memory value to see if they are equal;

[0034] If the MD5 value of the first memory value is equal to the MD5 value of the second memory value, the downloaded split file contents are merged.

[0035] Optionally, after the step of merging the split file contents according to the local metafile information list, the method further includes:

[0036] The MD5 value of the merged file is calculated based on the merged file.

[0037] Compare the MD5 value of the merged file with the MD5 value of the file to be split in the local metafile information list to see if they are equal;

[0038] If the MD5 value of the merged file is equal to the MD5 value of the file to be split, the version upgrade process is initiated.

[0039] This application also proposes a file download device applied to an operating system management platform, wherein the operating system management platform is connected to an operating system, and the file download device includes:

[0040] The configuration module is used to determine the configuration information of the files to be split.

[0041] The splitting module is used to split the file to be split into split file contents according to the configuration information and generate a list of metafile information;

[0042] The upload module is used to upload the split file content and the metafile information list to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content of the operating system in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list.

[0043] This application also proposes a file download device applied to an operating system, wherein the operating system is connected to an operating system management platform, and the file download device includes:

[0044] The retrieval module is used to retrieve version upgrade notifications;

[0045] The download module is used to download the local metafile information list and the split file content of the operating system according to the version upgrade notification and the file storage data table uploaded by the operating system management platform. The file storage data table is obtained by the operating system management platform splitting the file to be split into the split file content according to the configuration information, generating the metafile information list, and uploading the split file content and the metafile information list to the file storage database.

[0046] The merging module is used to merge the contents of the split files based on the local metadata information list.

[0047] This application also proposes a file download device, which includes a memory, a processor, and a file download program stored in the memory and executable on the processor. When the file download program is executed by the processor, it implements the steps of the file download method described above.

[0048] The file download method, apparatus, and device proposed in this application are applied to an operating system management platform. The operating system management platform is connected to the operating system. The file download method involves: determining the configuration information of the file to be split; splitting the file into smaller file contents based on the configuration information and generating a metafile information list; uploading the split file contents and the metafile information list to a file storage data table. This file storage data table is used by the operating system to download its local metafile information list and the split file contents in conjunction with received version upgrade notifications; and merging the split file contents based on the local metafile information list. By splitting the file to be split into smaller files for download, the download and transmission efficiency are improved, enhancing the user experience.

[0049] Based on the proposed solution, by combining version upgrade notifications with a file storage data table consisting of a list of metadata and the contents of the split files, the local metadata list and the contents of the split files of the operating system can be downloaded. The contents of the split files can then be merged into a large file based on the local metadata list. This approach can improve file download and transmission efficiency while effectively managing a large number of split small files, significantly reducing the complexity of the system upgrade and maintenance process. Attached Figure Description

[0050] Figure 1 This is a schematic diagram of the functional modules of the device to which the document download device belongs;

[0051] Figure 2 This is a schematic diagram of the system architecture involved in the embodiments of the document download method of this application;

[0052] Figure 3 This is a flowchart illustrating an exemplary embodiment of the document download method of this application.

[0053] Figure 4 This is a schematic diagram of an information configuration platform involved in an exemplary embodiment of the document download method of this application;

[0054] Figure 5 This is a schematic diagram of a meta-file information list template involved in an exemplary embodiment of the document download method of this application;

[0055] Figure 6 This is an example of an exemplary embodiment of the document download method of this application, representing the file storage data of information items written into the metafile information list;

[0056] Figure 7 This is a schematic diagram illustrating the large file splitting and uploading process involved in an exemplary embodiment of the document download method of this application;

[0057] Figure 8 This is a flowchart illustrating another exemplary embodiment of the document download method of this application.

[0058] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0059] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0060] The functional modules of the devices involved in the embodiments of this application can be referred to. Figure 1 .

[0061] like Figure 1 As shown, Figure 1 This is a schematic diagram of the functional modules of the device to which the document download device belongs in this application belongs. The document download device can be a device independent of the device itself, capable of splitting, uploading, downloading, and merging files. It can be implemented on the device in hardware or software form. This device can be a smart mobile terminal with data processing capabilities, such as a mobile phone or tablet computer, or it can be a fixed device or server with data processing capabilities.

[0062] In this embodiment, the device to which the file download device belongs includes at least an output module 110, a processor 120, a memory 130, and a communication module 140.

[0063] The memory 130 stores the operating system and file download program. The file download device can store the configuration information of the determined file to be split, the split file content obtained by splitting the file according to the configuration information, the metafile information list generated according to the configuration information, the file storage data table, the obtained version upgrade notification, the local metafile information list of the operating system downloaded by combining the file storage data table and the version upgrade notification, the split file content, and the merged file formed by merging the split file content according to the local metafile information list in the memory 130. The output module 110 may be a display screen, etc. The communication module 140 may include a WIFI module, a mobile communication module, and a Bluetooth module, etc., and communicates with external devices or servers through the communication module 140.

[0064] When the file download program in memory 130 is executed by the processor, it performs the following steps:

[0065] Determine the configuration information of the file to be split;

[0066] Based on the configuration information, the file to be split is split into the contents of the split files, and a list of metafile information is generated;

[0067] The split file content and the metafile information list are uploaded to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list.

[0068] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0069] The MD5 value of the file to be split is calculated based on the file to be split.

[0070] Based on the file size information in the configuration information, the file to be split is split into a set of split files of the corresponding file size, and the storage path of the set of split files is recorded.

[0071] The contents of the split files in the split file set are read into the first memory according to the storage path, and the MD5 value of the first memory is calculated based on the first memory.

[0072] The string is appended to the first memory location with zero to obtain the first memory value, and the MD5 value of the first memory value is calculated based on the first memory value.

[0073] The metafile information list is generated based on the configuration information, the MD5 value of the file to be split, the MD5 value of the first memory, and the MD5 value of the first memory value, so as to complete the splitting of the file to be split.

[0074] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0075] In response to the upload command, the batch upload interface of the file download service platform is invoked;

[0076] Based on the batch upload interface, the split file content and the meta file information list are read;

[0077] The insert statement will upload the data obtained by reading the split file content and the metafile information list to the file storage data table.

[0078] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0079] Get version upgrade notifications;

[0080] According to the version upgrade notification and the file storage data table uploaded by the operating system management platform, the local metafile information list and the split file content of the operating system are downloaded. The file storage data table is obtained by the operating system management platform by splitting the file to be split into the split file content according to the configuration information, generating the metafile information list, and uploading the split file content and the metafile information list to the file storage database.

[0081] The contents of the split files are merged based on the local metadata information list.

[0082] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0083] The download list information interface of the file download service platform is called according to the version upgrade notification to obtain the number of split files;

[0084] Call the file transfer interface of the file download service platform, and pass in the local metafile information and the number of split files from the version upgrade notification;

[0085] The file download service platform receives record information from the file storage data table based on the local metafile information and the number of split files, wherein the record information includes at least the content of the split files;

[0086] The local metadata information, the number of split files, and the record information are written into the local metadata information list to complete the download of the local metadata information list and the content of the split files.

[0087] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0088] Call the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metafile information list;

[0089] The downloaded, split file content is read into the second memory, and the MD5 value of the second memory is calculated based on the second memory.

[0090] Compare whether the MD5 value of the first memory and the MD5 value of the second memory are equal;

[0091] If the MD5 value of the first memory is equal to the MD5 value of the second memory, the string is appended to the second memory from zero to obtain the second memory value, and the MD5 value of the second memory value is calculated based on the second memory value.

[0092] Compare the MD5 value of the first memory value with the MD5 value of the second memory value to see if they are equal;

[0093] If the MD5 value of the first memory value is equal to the MD5 value of the second memory value, the downloaded split file contents are merged.

[0094] Furthermore, when the file download program in memory 130 is executed by the processor, it also performs the following steps:

[0095] The MD5 value of the merged file is calculated based on the merged file.

[0096] Compare the MD5 value of the merged file with the MD5 value of the file to be split in the local metafile information list to see if they are equal;

[0097] If the MD5 value of the merged file is equal to the MD5 value of the file to be split, the version upgrade process is initiated.

[0098] This embodiment, through the above-described scheme, specifically involves determining the configuration information of the file to be split; splitting the file into smaller files based on the configuration information and generating a metafile information list; and uploading the split file content and the metafile information list to a file storage data table. This file storage data table is used by the operating system to download its local metafile information list and the split file content in conjunction with received version upgrade notifications, and then merging the split file content based on the local metafile information list. By splitting the file to be split into smaller files for download, download and transmission efficiency are improved, enhancing the user experience.

[0099] Based on the proposed solution, by combining version upgrade notifications with a file storage data table consisting of a list of metadata and the contents of the split files, the local metadata list and the contents of the split files of the operating system can be downloaded. The contents of the split files can then be merged into a large file based on the local metadata list. This approach can improve file download and transmission efficiency while effectively managing a large number of split small files, significantly reducing the complexity of the system upgrade and maintenance process.

[0100] The system framework involved in the embodiments of this application can be referred to... Figure 2 , Figure 2 This is a schematic diagram of the system architecture involved in the embodiments of the document download method of this application. The system architecture involved in the embodiments of this application includes at least an operating system and an operating system management platform, wherein the operating system and the operating system management platform are connected.

[0101] The operating system encapsulates independent component services, which may include, but are not limited to, operating system version management services, file download services, and file merging services. The operating system provides these component service interfaces to the outside world to deliver functionality.

[0102] The operating system management platform is interconnected with various databases, such as the file storage database, which stores the list of metadata information uploaded by the operating system management platform into the file storage data table.

[0103] Furthermore, the system architecture may also include a file download service platform, which is connected to the operating system's file download service and also connected to a file storage database that is connected to the operating system's management platform.

[0104] Based on, but not limited to, the above-described device architecture, this application proposes an embodiment of a method for downloading documents.

[0105] Reference Figure 3 , Figure 3This is a flowchart illustrating a first exemplary embodiment of the file download method of this application. In this embodiment, the file download method is applied to an operating system management platform, which is connected to the operating system. The file download method includes:

[0106] Step S10: Determine the configuration information of the file to be split;

[0107] Specifically, the configuration information of the file to be split is obtained or determined by providing an information configuration platform for the file to be split. In this embodiment, the file to be split is a system upgrade file, which is generally a large file with relatively large memory usage. After splitting the large file to be split, several smaller files with relatively smaller memory usage are obtained. In this embodiment, the configuration information items may include, but are not limited to, system name, current version / base version, target version, channel provider, sub-channel provider, small file size, number of small files, and large file path, etc.

[0108] For example, the method for determining the configuration information of the file to be split can refer to Figure 4 Based on the information of the provided file to be split, the configuration platform sequentially sets the file metadata and file splitting principles. For example, it determines the system name, base version, target version, channel provider and secondary channel provider, and sets the file size and number of each split small file. Then, it selects the path of the large file and then clicks the split button to split the large file.

[0109] Step S11: Split the file to be split into the split file content according to the configuration information, and generate a metafile information list;

[0110] Specifically, based on the determined configuration information, the file to be split is split into several smaller files, each with a relatively small memory footprint, and a list of metadata is generated. In other words, based on the determined system name, current / base version, target version, channel provider, sub-channel provider, small file size, number of small files, and large file path, a large file splitting tool is applied to split the file to be split into corresponding smaller files, and a list of metadata is generated.

[0111] For example, the template for the metafile information list can be referred to Figure 5 The metadata items may include, but are not limited to: system name, current system version, target system version, channel provider, sub-channel provider, large file checksum, small file sequence number, small file checksum, previous composite file checksum, small file content, and small file size.

[0112] Step S12: Upload the split file content and the metafile information list to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content of the operating system in conjunction with the obtained version upgrade notification, and merge the split file content according to the local metafile information list.

[0113] Specifically, by calling the backend interface, the split file content and the generated metafile information list are uploaded to the file storage data table. That is, the split file content and the information items in the generated metafile information list are written into the file storage data table. In this embodiment, the file storage data table uploaded to the file storage database is used by the operating system to combine with the obtained version upgrade notification, download the local metafile information list and the split file content in the operating system, and merge the split file content according to the downloaded local metafile information list to obtain a merged file for the operating system to perform a version upgrade.

[0114] For example, the file storage data table for the information items written into the metafile information list can be referred to Figure 6 The description of the file storage data table may include, but is not limited to: system name, current system version, target system version, channel provider, sub-channel provider, target file / large file checksum, small file sequence number, small file checksum, previous composite file checksum, small file content, creation time, and update time. The small file content is stored in binary format in the data table fields.

[0115] For example, refer to Figure 7 , Figure 7 This is a schematic diagram illustrating the large file splitting and uploading process involved in the first exemplary embodiment of the document download method of this application. The operating system management platform obtains or determines the configuration information of the file to be split by providing an information configuration platform for the file to be split; the large file splitting tool splits the file to be split according to the determined configuration information, resulting in a set of small files composed of the contents of several split small files, and generates a small file cloud information list, i.e., a metafile information list; in response to the upload command issued by the management system page, the split small file contents and the metafile information list are uploaded to the file storage data table.

[0116] This embodiment, through the above-described scheme, specifically involves determining the configuration information of the file to be split; splitting the file into smaller files based on the configuration information and generating a metafile information list; and uploading the split file content and the metafile information list to a file storage data table. This file storage data table is used by the operating system to download its local metafile information list and the split file content in conjunction with received version upgrade notifications, and then merging the split file content based on the local metafile information list. By splitting the file to be split into smaller files for download, download and transmission efficiency are improved, enhancing the user experience.

[0117] Compared to existing technologies, this application's solution combines version upgrade notifications with a file storage data table consisting of a list of metadata and the contents of the split files. This allows for the downloading of the operating system's local metadata list and the contents of the split files. The split files are then merged into a large file based on the local metadata list. This approach improves file download and transmission efficiency while effectively managing a large number of split small files, significantly reducing the complexity of system upgrade and maintenance processes.

[0118] Further, based on the embodiments shown above, in this embodiment, step S11, which involves splitting the file to be split into the split file content according to the configuration information and generating a meta-file information list, may include:

[0119] Step S111: Calculate the MD5 value of the file to be split based on the file to be split.

[0120] Specifically, in the process of splitting a large file, the MD5 value of the file to be split is first calculated. Then, the file to be split is read into memory.

[0121] Step S112: Based on the file splitting size information in the configuration information, split the file to be split into a set of split files of corresponding file sizes, and record the storage path of the set of split files.

[0122] Specifically, based on the split file size information in the determined configuration information, the file to be split is split into a set of split files of the corresponding file size. For example, according to the configured split file size information, the contents of the file to be split stored in memory are written to the storage unit in sequence to generate a series of split small files f0, f1, ..., fn, i.e., a set of split files. The storage paths p0, p1, ..., pn of the set of split files f0, f1, ..., fn are recorded and stored in memory.

[0123] Step S113: Read the contents of the split files in the split file set into the first memory according to the storage path, and calculate the MD5 value of the first memory according to the first memory.

[0124] Step S114: Append the string from zero to the first memory to obtain the first memory value, and calculate the MD5 value of the first memory value based on the first memory value;

[0125] Step S115: Generate the metafile information list based on the configuration information, the MD5 value of the file to be split, the MD5 value of the first memory, and the MD5 value of the first memory value, so as to complete the splitting of the file to be split.

[0126] Specifically, the content of a split file from the set of split files is read into the first memory according to the saved storage path, and the MD5 value of the first memory is calculated. Then, the string is appended to the first memory with zeros to obtain the first memory value, and the MD5 value of the first memory value is calculated. Based on the determined configuration information, the MD5 value of the file to be split, the MD5 value of the first memory, and the MD5 value of the first memory value, a metafile information list is generated to complete the splitting of the file to be split.

[0127] In this embodiment, for each split file content in the split file set, the above process is repeated to calculate the MD5 value of the first memory of each split file content and the MD5 value of the first memory value. Then, a metafile information list is generated based on the configuration information, the MD5 value of the file to be split, the MD5 value of the first memory of each split file content, and the MD5 value of the first memory value of each split file content.

[0128] For example, the MD5 value desMac of the file to be split is calculated based on the file to be split. In a worker thread, the contents of the small file f0 are read into memory n0 according to the storage path p0 of the small file, and the MD5 value of memory n0 is calculated to obtain preMac0.

[0129] Append the string 0 to memory n0 to obtain memory value x0. Calculate the MD5 value of memory value x0 to obtain fileMac0. Write the system name, distributor, base version, secondary distributor, target version, file size, etc. from the configuration information, along with desMac, preMac0, fileMac0, and n0, as a single record to the metafile information list.

[0130] In a worker thread, based on the storage paths p0 and p1 of small files, the contents n0 and n1 of small files f0 and f1 are read respectively. The contents are merged in the order of n0 and n1 to obtain memory n01. The MD5 value of memory n01 is calculated to obtain preMac1. The string 1 is appended to memory n1 to obtain memory value x1. The MD5 value of memory value x1 is calculated to obtain fileMac1. The system name, channel provider, base version, secondary channel provider, target version, file size, etc. in the configuration information, along with desMac, preMac1, fileMac1, and n1, are added as a record to the metafile information list.

[0131] In a worker thread, based on the storage paths p0, p1, and p2 of small files, the contents n0, n1, and n2 of small files f0, f1, and f2 are read respectively. The contents are merged in the order n0, n1, and n2 to obtain memory n012. The MD5 value of memory n012 is calculated to obtain preMac2. String 2 is appended to memory n2 to obtain memory value x2. The MD5 value of memory value x2 is calculated to obtain fileMac2. The system name, channel provider, base version, secondary channel provider, target version, file size, etc., from the configuration information, along with desMac, preMac2, fileMac2, and n2, are appended as a single record to the metafile information list.

[0132] Repeat the above steps until the information of all small files is recorded in the metafile information list. At this point, the splitting of the large file is complete.

[0133] This embodiment is based on a configurable file splitting method. By splitting the file to be split into its constituent parts according to configuration information and generating a metafile information list, it effectively manages the split smaller files while improving the download efficiency of large files. Based on the records in the generated metafile information list, it can not only accurately record the position of the smaller file contents within the larger file, but also detect whether the smaller files have been completely downloaded during subsequent file downloads.

[0134] Furthermore, in one embodiment, the operating system management platform is also connected to a file download service platform, and step S12 above, uploading the split file content and the meta-file information list to the file storage data table, may include:

[0135] Step S121: In response to the upload command, the batch upload interface of the file download service platform is invoked;

[0136] Step S122: Read the split file content and the meta file information list based on the batch upload interface;

[0137] Step S123: Execute the insert statement to upload the data obtained by reading the split file content and the metafile information list to the file storage data table.

[0138] Specifically, in response to the upload command, the batch upload interface provided by the file download service platform is invoked, passing in the token parameter and the path to the metadata information list. The batch upload interface reads the metadata information list and the split file content, and then executes an insert statement to upload the data from the read metadata information list and the split file content to the file storage data table. The split file content is stored in binary format in a field of the file storage data table. This completes the upload of the large file.

[0139] This embodiment uses the above-described scheme to upload the split small file content and meta-file information list to the file storage data table by calling the batch upload interface of the file download service platform, so as to facilitate the subsequent download of files by the operating system.

[0140] This application also proposes a file download method, which is mainly applied to an operating system, wherein the operating system is connected to an operating system management platform. For ease of understanding, the operating system and operating system management platform in this embodiment can be any of the operating systems and operating system management platforms involved in the above embodiments.

[0141] Reference Figure 8 , Figure 8 This is a flowchart illustrating another exemplary embodiment of the file download method of this application. The file download method is applied to an operating system and includes:

[0142] Step S20: Receive version upgrade notification.

[0143] Specifically, when a system version upgrade is required, the operating system receives the corresponding version upgrade notification. More specifically, the operating system obtains the corresponding version upgrade notification from the operating system management platform through the operating system's operating system version management service.

[0144] Step S21: Download the local metafile information list and the split file content of the operating system according to the version upgrade notification and the file storage data table uploaded by the operating system management platform. The file storage data table is obtained by the operating system management platform splitting the file to be split into the split file content according to the configuration information, generating the metafile information list, and uploading the split file content and the metafile information list to the file storage database.

[0145] Specifically, based on the local metafile information such as the current version information of the operating system, channel provider information, sub-channel provider information, and target version information received from the version upgrade notification, the operating system obtains the file storage data table uploaded by the operating system management platform based on the local metafile information. Based on the obtained file storage data table, the operating system downloads the local metafile information list and the split file content.

[0146] In this embodiment, the file storage data table uploaded by the operating system management platform is obtained by splitting the file to be split according to the configuration information, resulting in several split file contents and generating a metafile information list; then the split file contents and the metafile information list are uploaded to the file storage database.

[0147] Step S22: Merge the contents of the split files according to the local metafile information list.

[0148] Specifically, based on the downloaded local metadata information list and the split file content, the split file content is merged according to the local metadata information list to obtain a merged large file, which is used to upgrade the current system version.

[0149] This embodiment, through the above-described scheme, specifically obtains a version upgrade notification; downloads the operating system's local metadata list and the split file content based on the version upgrade notification and the file storage data table uploaded by the operating system management platform. The file storage data table is obtained by the operating system management platform from which the file to be split is divided into split file content according to configuration information, generating a metadata list, and uploading the split file content and the metadata list to the file storage database; the split file content is then merged based on the local metadata list. By splitting the file to be split into smaller files for download, the download and transmission efficiency is improved, enhancing the user experience. Based on this application's scheme, by combining the version upgrade notification with the file storage data table composed of the metadata list and the split file content, the operating system's local metadata list and the split file content are downloaded, and the split file content is merged into a large file based on the local metadata list. This improves file download and transmission efficiency while effectively managing a large number of split small files, significantly reducing the complexity of the system upgrade and maintenance process.

[0150] Furthermore, based on the embodiments shown above, in this embodiment, the operating system is also connected to a file download service platform. This file download service platform is connected to the operating system's file download service and also to a file storage database that has a connection to the operating system management platform. In this embodiment, step S21, downloading the local metafile information list and the split file content of the operating system based on the version upgrade notification and the file storage data table uploaded by the operating system management platform, may include:

[0151] Step S211: Based on the version upgrade notification, call the download list information interface of the file download service platform to obtain the number of split files.

[0152] Specifically, based on the local metadata information such as the current version information of the operating system, channel provider information, sub-channel provider information, and target version information obtained from the version upgrade notification, the system calls the download list information interface of the connected file download service platform based on the local metadata information, and obtains the number of split files based on the download list information interface.

[0153] More specifically, the system calls the operating system's component service—the file download service—based on the input local metadata information. The file download service then calls the download list information interface of the file download service platform based on the parameter token and the local metadata information, and obtains the number of split files required for the version upgrade based on the download list information interface.

[0154] Step S212: Call the file transfer interface of the file download service platform and pass in the local metafile information and the number of split files from the version upgrade notification.

[0155] Specifically, the operating system's file download service calls the file transfer interface of the file download service platform and sends the local metafile information and the number of split files obtained based on the version upgrade notification to the file download service platform.

[0156] Step S214: Receive record information from the file storage data table returned by the file download service platform based on the local metadata and the number of split files, wherein the record information includes at least the content of the split files.

[0157] Specifically, after receiving the local metadata and the number of split files from the file download service, the file download service platform will return the corresponding record information stored in the file storage data table of the file storage database to the file download service. In this embodiment, the file download service receives the record information from the file storage data table returned by the file download service platform.

[0158] In this embodiment, the record information in the file storage data table may include, but is not limited to: system name, current system version, target system version, channel provider, sub-channel provider, target file / large file checksum, small file sequence number, small file checksum, previous composite file checksum, small file content / split file content, creation time, and update time. The split file content is stored in binary format in the file storage data table fields.

[0159] Step S215: Write the local metadata information, the number of split files, and the record information into the local metadata information list to complete the download of the local metadata information list and the content of the split files.

[0160] Specifically, the local cloud file information, the number of split files, and the record information from the file storage data table returned by the file download service platform are written into the local metafile information list to complete the download of the local metafile information list and the split file content.

[0161] Optionally, this embodiment can also write the local cloud file information, the number of split files information, and the record information in the file storage data table returned by the file download service platform, except for the split file content, into the local metafile information list to complete the download of the local metafile information list; at the same time, the returned split file content is written into a small file in binary information form and stored separately to complete the download of the split file content.

[0162] For example, the process of downloading the local metadata list and the split file content can be as follows:

[0163] First, the file download service calls the file transfer interface provided by the file download service platform, passing in the parameters token, local metadata file, and sequence number 0 to obtain the information of the 0th small file. Then, the local metadata file, sequence number 0, and the record information in the file storage database table returned by the file download service platform, except for the content of the split small file, are all written into the local metadata file information list. The content of the split small file is written as a separate small file f1 in the form of file binary information.

[0164] Then, the file download service calls the file transfer interface provided by the file download service platform, passing in the parameters token, local metadata file, and sequence number 1 to obtain the information of the first small file; then, the local metadata file, sequence number 1, and the record information in the file storage database table returned by the file download service platform, except for the content of the split small file, are all written into the local metadata file information list; the content of the split small file is written as a separate small file f2 in the form of file binary information.

[0165] Repeat the above steps until all small files are downloaded to the local machine. At the same time, record the corresponding metadata in the local metadata information list. Write the contents of the split small files into a separate small file in the form of file binary information to complete the download of the local metadata information list and the contents of the split small files.

[0166] In this embodiment, the file download process is treated as a separate file download service within the operating system, making the file download process independent of business operations and facilitating subsequent maintenance of the file download service.

[0167] Further, in one embodiment, step S22 above, merging the split file contents according to the local metafile information list, may include:

[0168] Step S221: Call the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metafile information list;

[0169] Step S222: Read the downloaded split file content into the second memory, and calculate the MD5 value of the second memory based on the second memory.

[0170] Step S223: Compare whether the MD5 value of the first memory and the MD5 value of the second memory are equal;

[0171] Step S224: If the MD5 value of the first memory is equal to the MD5 value of the second memory, append the string from zero to the second memory to obtain the second memory value, and calculate the MD5 value of the second memory value based on the second memory value.

[0172] Step S225: Compare whether the MD5 value of the first memory value is equal to the MD5 value of the second memory value;

[0173] Step S226: If the MD5 value of the first memory value is equal to the MD5 value of the second memory value, merge the downloaded split file contents.

[0174] Specifically, during the file merging process, the operating system's file download service calls the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory location from the local metadata information list; it then reads the downloaded split file content into the second memory and calculates the MD5 value of the second memory location; next, it compares whether the MD5 values ​​of the first and second memory locations are equal; if they are equal, the string is appended from zero to the second memory location to obtain the second memory location, and the MD5 value of the second memory location is calculated based on this second memory location; then, it compares whether the MD5 values ​​of the first and second memory locations are equal; if they are equal, the downloaded split file content is merged to obtain the merged file.

[0175] For example, first read the 0th record in the local metafile information list to obtain the MD5 value preMac0 of memory n0 and the MD5 value fileMac0 of memory x0 in the list.

[0176] Then, the contents of the downloaded small file f0 are read into memory n0. The MD5 hash of memory n0, preMac00, is calculated. preMac0 is compared with preMac00. If the two values ​​are not equal, an error is returned. The operating system version management service is notified of the file merging error, and the process ends. If the two values ​​are equal, the string 0 is appended to memory n0, resulting in memory value x0. The MD5 hash of value x0 is calculated, resulting in fileMac00. fileMac0 is compared with fileMac00. If the two values ​​are not equal, an error is returned. The operating system version management service is notified of the file merging error, and the process ends. If the two values ​​are equal, the process continues to the next step.

[0177] Read the first record in the local metafile information list to obtain the MD5 value preMac1 of memory n01 and the MD5 value fileMac1 of memory x1 in the list.

[0178] The process reads the contents of downloaded small files f0 and f1 into memory locations n0 and n1, respectively. It calculates the MD5 hash of memory locations n0 and n1 as preMac11, and compares preMac1 with preMac11. If the two values ​​are not equal, it returns an error and notifies the operating system's version management service of the file merging error, ending the process. If the two values ​​are equal, it appends the string "1" to memory location n1, obtaining memory value x1. It then calculates the MD5 hash of value x1 to obtain fileMac11, comparing fileMac1 with fileMac11. If the two values ​​are not equal, it returns an error and notifies the operating system's version management service of the file merging error, ending the process. If the two values ​​are equal, it continues with the following steps.

[0179] Read the second record in the local metafile information list to obtain the MD5 value preMac2 of memory n012 and the MD5 value fileMac2 of memory x2.

[0180] The process reads the contents of downloaded small files f0, f1, and f2 into memory locations n0, n1, and n2. It calculates the MD5 hash of memory locations n0, n1, and n2 as preMac22, and compares preMac2 with preMac22. If the two values ​​are not equal, it returns an error and notifies the operating system's version management service of the file merging error, ending the process. If the two values ​​are equal, it appends the string "2" to memory location n2, obtaining the memory value x2. It then calculates the MD5 hash of value x2 to obtain fileMac22, and compares fileMac2 with fileMac22. If the two values ​​are not equal, it returns an error and notifies the operating system's version management service of the file merging error, ending the process. If the two values ​​are equal, it continues with the following steps.

[0181] Repeat the above steps until all metadata information recorded in the local metadata information list is verified against the downloaded small file information. If successful, read the downloaded small files f0, f1, ..., fn and merge them into file F.

[0182] This embodiment, through the above-described scheme, compares the local metadata list with the downloaded, split file content, ensuring the integrity of the downloaded file data while also verifying the integrity of important metadata.

[0183] This embodiment addresses the issue by creating two independent OpenHarmony component services for small file downloading and large file merging: a file download service and a file merging service. This facilitates independent management of the two services. By encapsulating the complex processing flow into independent components and providing functionality externally through component service interfaces, the complexity of upper-layer development is reduced, and system stability is improved.

[0184] Furthermore, in one embodiment, after merging the split file contents according to the local metafile information list, step S22 may further include:

[0185] Step S23: Calculate the MD5 value of the merged file based on the merged file;

[0186] Step S24: Compare the MD5 value of the merged file with the MD5 value of the file to be split in the local metafile information list.

[0187] Step S25: If the MD5 value of the merged file is equal to the MD5 value of the file to be split, the version upgrade process is initiated.

[0188] Specifically, the MD5 value of the merged file is calculated based on the merged files; the MD5 value of the merged file is compared with the MD5 value of the file to be split in the local metafile information list; if the MD5 value of the merged file is equal to the MD5 value of the file to be split, the version upgrade process is initiated.

[0189] For example, calculate the MD5 value desMac1 of the merged large file F. Compare desMac1 with the MD5 value desMac of the file to be split in the local metadata list. If the two values ​​are not equal, return an error. Notify the operating system version management service that the file merging has failed and end the process. If the two values ​​are equal, proceed with the operating system upgrade process.

[0190] This embodiment simplifies the complex large file processing process by automating file splitting, downloading, merging, and verification, thereby improving the efficiency of file downloads and transfers and enhancing the user experience.

[0191] Furthermore, this application also proposes a file download device applied to an operating system management platform, wherein the operating system management platform is connected to the operating system, and the file download device includes:

[0192] The configuration module is used to determine the configuration information of the files to be split.

[0193] The splitting module is used to split the file to be split into split file contents according to the configuration information and generate a list of metafile information;

[0194] The upload module is used to upload the split file content and the metafile information list to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content of the operating system in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list.

[0195] The principle and implementation process of file download in this embodiment are explained in the above embodiments, and will not be repeated here.

[0196] Furthermore, this application also proposes a file download device applied to an operating system, wherein the operating system is connected to an operating system management platform, and the file download device includes:

[0197] The retrieval module is used to retrieve version upgrade notifications;

[0198] The download module is used to download the local metafile information list and the split file content of the operating system according to the version upgrade notification and the file storage data table uploaded by the operating system management platform. The file storage data table is obtained by the operating system management platform splitting the file to be split into the split file content according to the configuration information, generating the metafile information list, and uploading the split file content and the metafile information list to the file storage database.

[0199] The merging module is used to merge the contents of the split files based on the local metadata information list.

[0200] The principle and implementation process of file download in this embodiment are explained in the above embodiments, and will not be repeated here.

[0201] Furthermore, this application also proposes a file download device, which includes a memory, a processor, and a file download program stored in the memory and executable on the processor. When the file download program is executed by the processor, it implements the steps of the file download method described above.

[0202] Since this file download program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it possesses at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be elaborated upon here.

[0203] Furthermore, embodiments of this application also propose a computer-readable storage medium storing a file download program, which, when executed by a processor, implements the steps of the file download method described above.

[0204] Since this file download program employs all the technical solutions of all the foregoing embodiments when executed by the processor, it possesses at least all the beneficial effects brought about by all the technical solutions of all the foregoing embodiments, which will not be elaborated upon here.

[0205] Compared to existing technologies, the file download method, apparatus, and device proposed in this application are applied to an operating system management platform. The operating system management platform is connected to the operating system. The file download method involves determining the configuration information of the file to be split; splitting the file into smaller files based on the configuration information and generating a metafile information list; and uploading the smaller files and the metafile information list to a file storage data table. This file storage data table is used by the operating system to download its local metafile information list and the split files based on received version upgrade notifications. The split files are then merged according to the local metafile information list. By splitting the file into smaller files for download, the download and transmission efficiency are improved, enhancing the user experience.

[0206] Compared to existing technologies, this application's solution combines version upgrade notifications with a file storage data table consisting of a list of metadata and the contents of the split files. This allows for the downloading of the operating system's local metadata list and the contents of the split files. The split files are then merged into a large file based on the local metadata list. This approach improves file download and transmission efficiency while effectively managing a large number of split small files, significantly reducing the complexity of system upgrade and maintenance processes.

[0207] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0208] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0209] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, controlled terminal, or network device, etc.) to execute the methods of each embodiment of this application.

[0210] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A file download method, characterized in that, The file download method is applied to an operating system management platform, which is connected to the operating system, and includes: Determine the configuration information of the file to be split; among which, based on the information of the provided file to be split, the configuration platform sequentially sets the file metadata and file splitting principles; The process involves splitting the file to be split into its constituent files based on the configuration information, and generating a metafile information list. Specifically, this includes: calculating the MD5 value of the file to be split; splitting the file to be split into a set of split files of corresponding file sizes based on the file size information in the configuration information, and recording the storage path of the split file set; reading the constituent file content from the split file set into a first memory location based on the storage path, and calculating the MD5 value of the first memory location; appending a string from zero to the first memory location to obtain a first memory value, and calculating the MD5 value of the first memory value; and finally, based on the configuration information, the MD5 value of the file to be split, the MD5 value of the first memory location, and the generated metafile information list. The MD5 value of the first memory value is used to generate the metafile information list to complete the splitting of the file to be split; wherein, the MD5 value desMac of the file to be split is calculated based on the file to be split; according to the storage paths p0, p1, ..., pi of the small files, the contents of the small files f0, f1, ..., fi are read into the corresponding memory locations n0, n1, ..., ni respectively, and the contents are merged in order to obtain memory locations n01...i. The MD5 value of memory locations n01...i is calculated to obtain preMaci, where the small file is the split file; the string i is appended to the memory location ni corresponding to the small file fi to obtain the memory value xi, and the MD5 value of memory value xi is calculated to obtain fileMaci; the information of all small files is recorded in the metafile information list; The split file content and the metafile information list are uploaded to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list. The step of merging the split file content according to the local metadata information list includes: calling the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metadata information list; reading the downloaded split file content into the second memory and calculating the MD5 value of the second memory based on the second memory; comparing whether the MD5 value of the first memory and the MD5 value of the second memory are equal; if the MD5 value of the first memory and the MD5 value of the second memory are equal, appending the string from zero to the second memory to obtain the second memory value, and calculating the MD5 value of the second memory value based on the second memory value; comparing whether the MD5 value of the first memory value and the MD5 value of the second memory value are equal; if the MD5 value of the first memory value and the MD5 value of the second memory value are equal, merging the downloaded split file content.

2. The file download method as described in claim 1, characterized in that, The operating system management platform is also connected to a file download service platform, and the step of uploading the split file content and the meta-file information list to the file storage data table includes: In response to the upload command, the batch upload interface of the file download service platform is invoked; Based on the batch upload interface, the split file content and the meta file information list are read; The insert statement will upload the data obtained by reading the split file content and the metafile information list to the file storage data table.

3. A file download method, characterized in that, Applied to an operating system, which is connected to an operating system management platform, the file download method includes: Get version upgrade notifications; The local metadata list and split file content of the operating system are downloaded based on the version upgrade notification and the file storage data table uploaded by the operating system management platform. Specifically, the file metadata and file splitting principles are set sequentially based on the information of the file to be split by the provided configuration platform. The file storage data table is obtained by the operating system management platform splitting the file to be split into split file content according to the configuration information, generating a metadata list, and uploading the split file content and the metadata list to the file storage database. The step of the operating system management platform splitting the file to be split into split file contents according to configuration information and generating a metafile information list specifically includes: calculating the MD5 value of the file to be split based on the file to be split; splitting the file to be split into a set of split files of corresponding file sizes according to the split file size information in the configuration information, and recording the storage path of the split file set; reading the split file contents from the split file set into the first memory according to the storage path, and calculating the MD5 value of the first memory according to the first memory; appending a string from zero to the first memory to obtain the first memory value, and calculating the MD5 value of the first memory value according to the first memory value; and calculating the MD5 value of the first memory value according to the configuration information, the MD5 value of the file to be split, and the MD5 value of the first memory. The MD5 hash of the first memory value and the MD5 hash of the first memory value are used to generate the metafile information list to complete the splitting of the file to be split. Specifically, the MD5 hash of the file to be split, desMac, is calculated based on the file to be split. According to the storage paths p0, p1, ..., pi of the small files, the contents of the small files f0, f1, ..., fi are read into the corresponding memory locations n0, n1, ..., ni, and the contents are merged sequentially to obtain memory locations n01...i. The MD5 hash of memory locations n01...i is calculated to obtain preMaci, where the small file is the split file. The string i is appended to the memory location ni corresponding to the small file fi to obtain the memory value xi. The MD5 hash of memory value xi is calculated to obtain fileMaci. All the information of the small files is recorded in the metafile information list. The process of merging the split file content according to the local metadata information list specifically includes: calling the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metadata information list; reading the downloaded split file content into the second memory and calculating the MD5 value of the second memory based on the second memory; comparing whether the MD5 value of the first memory and the MD5 value of the second memory are equal; if the MD5 value of the first memory and the MD5 value of the second memory are equal, appending the string from zero to the second memory to obtain the second memory value, and calculating the MD5 value of the second memory value based on the second memory value; comparing whether the MD5 value of the first memory value and the MD5 value of the second memory value are equal; and merging the downloaded split file content if the MD5 value of the first memory value and the MD5 value of the second memory value are equal.

4. The file download method as described in claim 3, characterized in that, The operating system is also connected to a file download service platform. The step of downloading the local metafile information list and the split file content of the operating system based on the version upgrade notification and the file storage data table uploaded by the operating system management platform includes: The download list information interface of the file download service platform is called according to the version upgrade notification to obtain the number of split files; Call the file transfer interface of the file download service platform, and pass in the local metafile information and the number of split files from the version upgrade notification; The file download service platform receives record information from the file storage data table based on the local metafile information and the number of split files, wherein the record information includes at least the content of the split files; The local metadata information, the number of split files, and the record information are written into the local metadata information list to complete the download of the local metadata information list and the content of the split files.

5. The file download method as described in claim 3, characterized in that, After the step of merging the split file contents according to the local metafile information list, the method further includes: The MD5 value of the merged file is calculated based on the merged file. Compare the MD5 value of the merged file with the MD5 value of the file to be split in the local metafile information list to see if they are equal; If the MD5 value of the merged file is equal to the MD5 value of the file to be split, the version upgrade process is initiated.

6. A file download device, characterized in that, The file download device is applied to an operating system management platform, which is connected to the operating system, and includes: The configuration module is used to determine the configuration information of the file to be split; among which, based on the information of the provided file to be split, the configuration platform sequentially sets the file metadata and file splitting principles. The splitting module is used to split the file to be split into split file contents according to the configuration information and generate a metafile information list. Specifically, it includes: calculating the MD5 value of the file to be split based on the file to be split; splitting the file to be split into a set of split files of corresponding file sizes according to the split file size information in the configuration information, and recording the storage path of the split file set; reading the split file contents from the split file set into a first memory according to the storage path, and calculating the MD5 value of the first memory according to the first memory; appending a string from zero to the first memory to obtain a first memory value, and calculating the MD5 value of the first memory value according to the first memory value; and calculating the MD5 value of the first memory value according to the configuration information, the MD5 value of the file to be split, and the MD5 value of the first memory. The MD5 value of the first memory value and the value of the first memory value are used to generate the metafile information list to complete the splitting of the file to be split; wherein, the MD5 value desMac of the file to be split is calculated based on the file to be split; according to the storage paths p0, p1, ..., pi of the small files, the contents of the small files f0, f1, ..., fi are read into the corresponding memory locations n0, n1, ..., ni respectively, and the contents are merged in order to obtain memory locations n01...i. The MD5 value of memory locations n01...i is calculated to obtain preMaci, and the small files are the split files; the string i is appended to the memory location ni corresponding to the small file fi to obtain the memory value xi, and the MD5 value of memory value xi is calculated to obtain fileMaci; the information of all small files is recorded in the metafile information list; The upload module is used to upload the split file content and the metafile information list to the file storage data table. The file storage data table is used by the operating system to download the local metafile information list and the split file content of the operating system in conjunction with the obtained version upgrade notification, and to merge the split file content according to the local metafile information list. The step of merging the split file content according to the local metadata information list specifically includes: calling the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metadata information list; reading the downloaded split file content into the second memory and calculating the MD5 value of the second memory based on the second memory; comparing whether the MD5 value of the first memory and the MD5 value of the second memory are equal; if the MD5 value of the first memory and the MD5 value of the second memory are equal, appending the string from zero to the second memory to obtain the second memory value, and calculating the MD5 value of the second memory value based on the second memory value; comparing whether the MD5 value of the first memory value and the MD5 value of the second memory value are equal; if the MD5 value of the first memory value and the MD5 value of the second memory value are equal, merging the downloaded split file content.

7. A file download device, characterized in that, The file download device is applied to an operating system, which is connected to an operating system management platform, and includes: The retrieval module is used to retrieve version upgrade notifications; The download module is used to download the local metadata list and the split file content of the operating system based on the version upgrade notification and the file storage data table uploaded by the operating system management platform. The download module configures file metadata and file splitting principles sequentially based on the provided information of the file to be split. The file storage data table is obtained by the operating system management platform splitting the file to be split into the split file content according to the configuration information, generating the metadata list, and uploading the split file content and the metadata list to the file storage database. The operating system management platform splits the file to be split into its split file contents according to the configuration information, generating a metafile information list. Specifically, this includes: calculating the MD5 value of the file to be split based on the file to be split; splitting the file to be split into a set of split files of corresponding file sizes according to the split file size information in the configuration information, and recording the storage path of the split file set; reading the split file contents from the split file set into a first memory location according to the storage path, and calculating the MD5 value of the first memory location; appending a string from zero to the first memory location to obtain a first memory value, and calculating the MD5 value of the first memory value; and finally, based on the configuration information, the MD5 value of the file to be split, and the MD5 value of the first memory location... The metafile information list is generated by combining the MD5 value of the first memory value to complete the splitting of the file to be split; wherein, the MD5 value desMac of the file to be split is calculated based on the file to be split; according to the storage paths p0, p1, ..., pi of the small files, the contents of the small files f0, f1, ..., fi are read into the corresponding memory locations n0, n1, ..., ni respectively, and the contents are merged in order to obtain memory locations n01...i. The MD5 value of memory locations n01...i is calculated to obtain preMaci, where the small file is the split file; the string i is appended to the memory location ni corresponding to the small file fi to obtain the memory value xi, and the MD5 value of memory value xi is calculated to obtain fileMaci; the information of all small files is recorded in the metafile information list; The merging module is used to merge the split file content according to the local metadata information list. Specifically, it includes: calling the file merging service interface to read the MD5 value of the first memory and the MD5 value of the first memory value from the local metadata information list; reading the downloaded split file content into the second memory and calculating the MD5 value of the second memory based on the second memory; comparing whether the MD5 value of the first memory and the MD5 value of the second memory are equal; if the MD5 value of the first memory and the MD5 value of the second memory are equal, appending the string from zero to the second memory to obtain the second memory value, and calculating the MD5 value of the second memory value based on the second memory value; comparing whether the MD5 value of the first memory value and the MD5 value of the second memory value are equal; and merging the downloaded split file content if the MD5 value of the first memory value and the MD5 value of the second memory value are equal.

8. A file download device, characterized in that, The file download device includes a memory, a processor, and a file download program stored in the memory and executable on the processor. When the file download program is executed by the processor, it implements the steps of the file download method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • File uploading method, file downloading method and file management device

    CN113273163A

  • Cloud technology-based file fragment uploading method and apparatus, and device and storage medium

    WO2021164178A1