A method, device and equipment for loading software

By reorganizing and compressing the software to be loaded, streaming compression packages are generated, which solves the problem of software loading difficulties caused by temporary resources, and realizes loading while receiving, improving loading efficiency.

CN114579154BActive Publication Date: 2025-03-14ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011379597.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-03-14
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

During the software loading process, when the temporary resources are smaller than the size of the upgrade package, it is difficult for the prior art to effectively utilize smaller temporary resources, resulting in the upgrade/installation process being unable to proceed, especially on embedded devices with limited resources.

Method used

By scanning the software to be loaded, the absolute path of the entity file is determined, the reorganized entity file is reorganized, and the reorganized entity file is compressed to generate a streaming compression package, eliminating the dependencies between each block, and realizing loading while receiving.

Benefits of technology

Effectively utilize smaller temporary resources, receive upgrade packages in chunks, improve the efficiency of software loading, and solve the problem that the upgrade/installation process cannot be carried out under resource limitations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114579154B_ABST
    Figure CN114579154B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and equipment for software loading, the method comprising: responding to a software loading request sent by a client, scanning the software to be loaded, determining a first software structure table that maps the absolute path of the entity file in the software to be loaded; adding the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table; using the second software structure table as an index, searching for the entity file in the software to be loaded, reorganizing, and adding the second software structure table to the entity file to obtain the reorganized entity file; compressing the reorganized entity file to obtain a streaming compressed package, and sending the streaming compressed package to the client. Utilizing the method of the present invention, when loading software, when the temporary resource is smaller than the size of the upgrade package, only a smaller temporary resource needs to be used for block reception, eliminating the dependency of each block, and decompressing the streaming blocks to improve loading efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, device and equipment for loading software. Background Art

[0002] With the development and popularization of wireless communication technology, more and more software is put into use, and the software version will be upgraded at regular intervals to fix the defects of the existing version and upgrade the software functions. The general process of software upgrade / installation is: the device receives the software package, decompresses the data in the received software package, and writes it to the storage area for software installation. In the above process, a temporary resource is required to store the software package. If the software package exceeds the limit of the temporary resource, for example, the software package is too large or the temporary resource is too small, the upgrade / installation process will be unable to proceed, especially on embedded devices with limited resources, the above upgrade / installation limitations become more prominent.

[0003] In the face of the above problems, there are two existing technical solutions. The first one is that when the size of the upgrade image file exceeds the maximum allocatable memory size of the OLT (Optical Line Terminal), the network management server negotiates with the OLT to determine the size of the image fragments downloaded by the OLT each time. The image fragments are obtained by the network management server after segmenting the upgrade image file, and the size of each image fragment does not exceed the maximum allocatable memory size; the network management server sends a mirror fragment to the OLT each time, and the OLT stores the received mirror fragment in the pre-allocated download space and then sends it to the ONU (Optical Network Unit), and then clears the download space until all the image fragments are sent. However, the above solution has certain problems. If there is a dependency between the fragments, such as some post-processing operations such as decompression during the upgrade process, the above solution cannot handle this dependency, resulting in upgrade / installation failure.

[0004] The second solution is to divide the source version file and the target version file into multiple blocks according to the length of the temporary resources; compare the blocks of the source version file with the blocks of the target version file to obtain the differential information and replication dependency between the blocks of the source version file and the blocks of the target version file; generate a differential upgrade package based on the differential information and replication dependency. However, the above process of making a differential upgrade package is dependent on the original version file. In the absence of the original version file, such as when installing new software, the above problem cannot be solved; in addition, in some scenarios, the generated differential upgrade package still exceeds the limit of temporary resources, and the upgrade operation cannot be completed. Summary of the invention

[0005] The present invention provides a method, device and equipment for loading software, which solve the problem of how to use smaller temporary resources to load software when the temporary resources are smaller than the size of an upgrade package during software loading.

[0006] In a first aspect, the present invention provides a method for loading software, which is applied to a server, and the method comprises:

[0007] In response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping an absolute path of a physical file in the software to be loaded;

[0008] Add the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0009] Using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files;

[0010] The reorganized entity file is compressed to obtain a stream compression package, and the stream compression package is sent to the client.

[0011] Optionally, after obtaining the stream compression package, the following steps are also included:

[0012] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0013] Optionally, searching for entity files in the software to be loaded using the second software structure table as an index includes performing at least one of the following steps:

[0014] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0015] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0016] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0017] Optionally, searching for entity files in the software to be loaded, reorganizing the entity files, and adding the second software structure table to the entity files to obtain the reorganized entity files, includes:

[0018] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0019] Optionally, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0020] Optionally, the software to be loaded is scanned to obtain at least one of the following information: a configuration file, a script file, a directory structure, and a dependency relationship between the entity files.

[0021] In a second aspect, the present invention provides a method for loading software, which is applied to a client, and the method comprises:

[0022] Send a software loading request to the server;

[0023] Receive the streaming compressed packets sent by the server in blocks and write them into the data receiving window;

[0024] Decompressing the blocks of the streaming compressed package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory;

[0025] According to the second software structure table of the reorganized entity file, the structure of the reorganized entity file in the memory is restored to the structure of the software to be loaded.

[0026] Optionally, decompressing the blocks of the streaming compressed package written into the data receiving window and writing them into a memory, and obtaining a reorganized entity file in the memory, comprises:

[0027] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0028] Optionally, the file description information of the reorganized entity file includes:

[0029] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0030] In a third aspect, the present invention provides a software loading device, applied to a server, comprising a memory and a processor, wherein:

[0031] The memory is used to store computer programs;

[0032] The processor is used to read the program in the memory and execute the following steps:

[0033] In response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping an absolute path of a physical file in the software to be loaded;

[0034] Add the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0035] Using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files;

[0036] The reorganized entity file is compressed to obtain a stream compression package, and the stream compression package is sent to the client.

[0037] Optionally, after obtaining the stream compression package, the processor is further configured to:

[0038] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0039] Optionally, the processor uses the second software structure table as an index to search for a physical file in the software to be loaded, including performing at least one of the following steps:

[0040] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0041] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0042] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0043] Optionally, the processor searches for a physical file in the software to be loaded, reorganizes the physical file, and adds the second software structure table to the physical file to obtain the reorganized physical file, including:

[0044] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0045] Optionally, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0046] Optionally, the processor scans the software to be loaded to obtain at least one of the following information: a configuration file, a script file, a directory structure, and a dependency relationship between the entity files.

[0047] In a fourth aspect, the present invention provides a software loading device, applied to a client, comprising a memory and a processor, wherein:

[0048] The memory is used to store computer programs;

[0049] The processor is used to read the program in the memory and execute the following steps:

[0050] Send a software loading request to the server;

[0051] Receive the streaming compressed packets sent by the server in blocks and write them into the data receiving window;

[0052] Decompressing the blocks of the streaming compressed package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory;

[0053] According to the second software structure table of the reorganized entity file, the structure of the reorganized entity file in the memory is restored to the structure of the software to be loaded.

[0054] Optionally, the processor decompresses the blocks of the streaming compressed package written into the data receiving window, writes the blocks into a memory, and obtains a reorganized entity file in the memory, including:

[0055] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0056] Optionally, the file description information of the reorganized entity file includes:

[0057] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0058] In a fifth aspect, the present invention provides a software loading device, applied to a server, comprising:

[0059] A first structure table generating unit is used to scan the software to be loaded in response to the software loading request sent by the client, and determine a first software structure table mapping the absolute path of the entity file in the software to be loaded;

[0060] A second structure table generating unit, used for adding a corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0061] a structure reorganization unit, configured to use the second software structure table as an index to search for entity files in the software to be loaded, reorganize the entity files, and add the second software structure table to the entity files to obtain the reorganized entity files;

[0062] The compression package generating unit is used to compress the reorganized entity file to obtain a streaming compression package, and send the streaming compression package to the client.

[0063] Optionally, after obtaining the stream compression package, the compression package generation unit is further used to:

[0064] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0065] Optionally, the structure reorganization unit uses the second software structure table as an index to search for entity files in the software to be loaded, including performing at least one of the following steps:

[0066] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0067] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0068] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0069] Optionally, the structure reorganization unit searches for entity files in the software to be loaded, reorganizes the entity files, and adds the second software structure table to the entity files to obtain the reorganized entity files, including:

[0070] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0071] Optionally, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0072] Optionally, the first structure table generating unit scans the software to be loaded to obtain at least one of the following information: a configuration file, a script file, a directory structure, and a dependency relationship between the entity files.

[0073] In a sixth aspect, the present invention provides a software loading device, applied to a client, comprising:

[0074] A request sending unit, used for sending a software loading request to the server;

[0075] A data receiving unit, used for receiving the stream compression packets sent by the server in blocks and writing them into a data receiving window;

[0076] a decompression unit, used for decompressing the blocks of the stream compression package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory;

[0077] A structure recovery unit is used to restore the structure of the reorganized entity file in the memory to the structure of the software to be loaded according to the second software structure table of the reorganized entity file.

[0078] Optionally, the decompression unit decompresses the blocks of the streaming compressed package written into the data receiving window, writes the blocks into a memory, and obtains a reorganized entity file in the memory, including:

[0079] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0080] Optionally, the file description information of the reorganized entity file includes:

[0081] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0082] In a seventh aspect, the present invention provides a computer program medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for loading software applied to a server as provided in the first aspect above.

[0083] In an eighth aspect, the present invention provides a computer program medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a method for loading software applied to a client as provided in the second aspect above.

[0084] The software loading method, device and equipment provided by the present invention have the following beneficial effects:

[0085] When loading software, if the temporary resources are smaller than the size of the upgrade package, only smaller temporary resources need to be used, the upgrade package is received in blocks, dependencies between blocks are eliminated, streaming blocks are decompressed, and loading is achieved while receiving, thus improving loading efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0086] Figure 1 This is a schematic diagram of the general software loading process;

[0087] Figure 2 A schematic diagram of a shard loading solution in the prior art;

[0088] Figure 3 A schematic diagram of a solution for upgrading using a differential upgrade package in the prior art;

[0089] Figure 4 A schematic diagram of an application scenario of a software loading method provided by an embodiment of the present invention.

[0090] Figure 5 A flowchart of a method for loading server software provided by an embodiment of the present invention;

[0091] Figure 6 A flow chart of producing a stream compression package provided by an embodiment of the present invention;

[0092] Figure 7 A schematic diagram of a first software structure table generation process provided by an embodiment of the present invention;

[0093] Figure 8 A schematic diagram of the structure of a compressed file stream provided by an embodiment of the present invention;

[0094] Fig. 9 A schematic diagram of a structural reorganization process provided by an embodiment of the present invention;

[0095] Fig.10 A schematic diagram of a process for generating a streaming compression package provided by an embodiment of the present invention;

[0096] Fig.11 A schematic diagram of a process for filling metadata into a streaming compressed packet provided by an embodiment of the present invention;

[0097] Fig.12A flowchart of a method for loading client software provided by an embodiment of the present invention;

[0098] Fig.13 A schematic diagram of information contained in a description header provided by an embodiment of the present invention;

[0099] Fig.14 A schematic diagram of a process for restoring the original structure of software provided by an embodiment of the present invention;

[0100] Fig.15 A schematic diagram of a client software loading process provided by an embodiment of the present invention;

[0101] Fig.16 A flow chart of a stream block decompression process provided by an embodiment of the present invention;

[0102] Fig.17 A schematic diagram of a device for loading server software provided by an embodiment of the present invention;

[0103] Fig.18 A schematic diagram of a device for loading client software provided by an embodiment of the present invention;

[0104] Fig.19 A schematic diagram of a device for loading server software provided by an embodiment of the present invention;

[0105] Fig. 20 A schematic diagram of a device for loading client software provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0106] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0107] It should be noted that the embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0108] Below, some terms in the embodiments of the present disclosure are explained to facilitate understanding by those skilled in the art.

[0109] (1) The term "load" in the embodiments of the present disclosure includes two situations: upgrade and installation. Installation is a process from 0 to 1, and upgrade is an update operation from 1 to n.

[0110] (2) The term "streaming compressed package" in the embodiments of the present disclosure refers to a fixed compression format that can support decompression while loading, without having to wait until all compressed packages are downloaded before performing the decompression operation.

[0111] (3) The term "optical line terminal" in the embodiments of the present disclosure refers to (Optical Line Terminal, OLT). Its functions are: connected to the front-end (aggregation layer) switch with a network cable, converted into optical signals, and interconnected with the user-side optical splitter with a single optical fiber; realize the control, management, and ranging functions of the user-side device ONU; provide a network-side interface for the optical access network, and connect to one or more optical distribution networks.

[0112] (4) The term "optical network unit" in the embodiments of the present disclosure refers to the general term for optical network unit (ONU) and optical network terminal (ONT). ONU is a terminal device for optical fiber access, which provides multiple service interfaces to users. ONT is directly located at the user end. ONU and ONT are collectively referred to as ONU.

[0113] (5) The term "memory Flash" in the embodiments of the present disclosure refers to a solid-state memory and an animation editor, and performs the function of a memory in the embodiments of the present invention.

[0114] (6) The term "temporary resources" in the embodiments of the present disclosure refers to resources that are generated by one process, used by another process, and become useless after a short period of time, and are therefore also called consumable resources, such as hardware interrupts, signals, messages, messages in a buffer, etc. In the embodiments of the present invention, it specifically refers to a resource that is temporarily used to receive a fragment of a streaming compressed packet.

[0115] In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0116] like Figure 1 The figure shows a general process diagram of software loading.

[0117] The device receives the software package, uses temporary resources to store the software package, decompresses the data in the received software package, and writes it into the storage area for software installation. In the above process, a temporary resource is required to store the software package. If the software package exceeds the limit of the temporary resource, for example, the software package is too large or the temporary resource is too small, the upgrade / installation process will not be able to proceed, especially on embedded devices with limited resources, the above upgrade / installation limitations become more prominent.

[0118] In the face of the above problems, there are two existing technical solutions, the first of which is the fragment upgrade method. When the size of the upgrade image file exceeds the maximum allocatable memory size of the OLT (Optical Line Terminal), the network management server negotiates with the OLT to determine the size of the image fragments downloaded by the OLT each time. The image fragments are obtained by the network management server after segmenting the upgrade image file, and the size of each image fragment does not exceed the maximum allocatable memory size; the network management server sends a mirror fragment to the OLT each time, and the OLT stores the received mirror fragment in the pre-allocated download space and then sends it to the ONU (Optical Network Unit), and then clears the download space until all mirror fragments are sent.

[0119] like Figure 2 As shown in FIG. 1 , it is a schematic diagram of a fragment loading solution in the prior art, wherein the upgrade image file is divided into image fragments S1, S2, S3, S4, ..., Sn. The upgraded segment sends a fragment request to the upgrade image file, such as Figure 2 As shown, the upgraded segment sends a sharding request to the mirror shard S1 of the upgraded image file; after receiving the sharding request, the upgraded image file sends the sharding data to the upgraded memory, such as Figure 2 As shown, the upgrade image file sends image slices S1, image slice S2, ..., image slice Sn respectively; the upgrade memory stores the received slice data into the memory Flash and then clears the upgrade memory, such as Figure 2 As shown, the upgrade memory stores the received data of the mirror slice S1 into the memory Flash and then clears the upgrade memory, and then receives the data of the mirror slice S2 and stores it into the memory Flash and then clears the upgrade memory; repeat the above operation until all the mirror slices are sent.

[0120] However, the above solution has some problems. When the network management server fragments the upgrade package, it fragments it according to the size requested by the upgraded end. If there is a correlation or dependency between the two pieces, for example, some post-processing operations such as decompression during the upgrade process, the upgraded end will delete the single piece after receiving it, resulting in the inability to handle this dependency, causing the upgrade / installation to fail. For example, Figure 2In the case where S2 and Sn are dependent, the upgrade process cannot proceed because when the upgraded end receives Sn, the S2 slice has been deleted and no dependency recovery information is recorded, resulting in the inability to process Sn.

[0121] The second solution is to upgrade using a differential upgrade package.

[0122] like Figure 3 As shown, it is a schematic diagram of the solution of using differential upgrade package to upgrade in the prior art, wherein the source version file and the target version file are respectively divided into multiple blocks according to the length of temporary resources; the blocks of the source version file and the blocks of the target version file are compared to obtain the differential information and replication dependency relationship between the blocks of the source version file and the blocks of the target version file; and a differential upgrade package is generated according to the differential information and replication dependency relationship.

[0123] However, the process of making the differential upgrade package above needs to rely on comparing the old upgrade package, generating the difference items, and making the upgrade package of the difference items; and the solution of upgrading using the differential upgrade package above cannot perform the installation operation from 0-1, but can only perform the update operation from 1-n. In addition, the solution of upgrading using the differential upgrade package above still has upgrade limitations and cannot fundamentally solve the upgrade strategy problem when resources are tight: although the above solution uses the differential method to minimize the size of the upgrade package, there are still some scenarios where the differential upgrade package is too large. In this scenario, when the upgrade resources are tight, the upgrade operation may not be completed.

[0124] Based on the above problems, the embodiments of the present disclosure provide a method, apparatus and device for loading software, which can realize that when loading software, when the temporary resources are smaller than the size of the upgrade package, only smaller temporary resources need to be used, the upgrade package is received in blocks, the dependencies between the blocks are eliminated, and the streaming block decompression is performed to realize loading while receiving, thereby improving the loading efficiency. The following is an implementation method of a method, apparatus and device for loading software provided by the embodiments of the present disclosure.

[0125] The following is a detailed description of each embodiment of the present application in conjunction with the accompanying drawings. It should be noted that the display order of the embodiments of the present application only represents the order of the embodiments, and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.

[0126] Example 1

[0127] like Figure 4 , which is a schematic diagram of an application scenario of a software loading method provided by an embodiment of the present invention.

[0128] The application scenario includes two entities, a client 401 and a server 402. The client 401 sends a software loading request to the server 402. After receiving the software loading request sent by the client 401, the server 402 generates a streaming compressed package and sends the streaming compressed package to the client 401. After receiving the streaming compressed package, the client 401 performs a loading operation.

[0129] like Figure 5 As shown, it is a flow chart of a method for loading server software provided by an embodiment of the present invention, including:

[0130] Step S501, in response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping the absolute path of the entity file in the software to be loaded;

[0131] As an optional implementation, the software to be loaded is scanned to obtain software structure information, which includes at least one of the following information: configuration files, script files, directory structures, and dependencies between the entity files. Based on the above software structure information, a first software structure table mapping the absolute paths of the entity files in the software to be loaded is determined.

[0132] Step S502, adding the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0133] Step S503, using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files;

[0134] As an optional implementation, using the second software structure table as an index to search for entity files in the software to be loaded includes performing at least one of the following steps:

[0135] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0136] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0137] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0138] As an optional implementation, searching for the entity file in the software to be loaded, reorganizing it, and adding the second software structure table to the entity file to obtain the reorganized entity file includes:

[0139] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0140] As an optional implementation, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0141] Step S504: compress the reorganized entity file to obtain a streaming compressed package, and send the streaming compressed package to the client.

[0142] As an optional implementation, after obtaining the stream compression package, the method further includes:

[0143] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0144] like Figure 6 As shown, it is a flow chart of making a stream compression package provided by an embodiment of the present invention, including:

[0145] Step S601, in response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping the absolute path of the entity file in the software to be loaded;

[0146] like Figure 7 , which is a schematic diagram of a first software structure table generation process provided by an embodiment of the present invention.

[0147] It should be noted that the above operation is a pre-processing operation, which pre-checks and scans the software to be loaded, and records the structural information of the software to be loaded for software structure recovery;

[0148] As an optional implementation, the structure of the software to be loaded, that is, the runtime environment of the program, includes information such as the configuration file, script file, directory structure, and dependencies between the entity files of the program.

[0149] It should be noted that the structural information of the software to be loaded needs to be organized locally in advance.

[0150] As an optional implementation, in the above preprocessing process, the structure information pre-organized locally by the user is scanned, and a first software structure table is generated.

[0151] Step S602, adding the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0152] Step S603, using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files;

[0153] It should be noted that the second software structure table can map the entity file dependency relationship in the software to be loaded, and describe the software structure before and after the software reorganization. Relying on the structure table, the original structure of the software to be loaded can be restored when the client loads the software.

[0154] The above structural reorganization reorganizes the complex software structure into a simple software structure, mainly to solve the dependency problem between compression blocks.

[0155] For example, if the software structure is not reorganized and compression is performed directly, when the software program structure is relatively complex, such as when there are directories in the software, in the compressed file stream, the file blocks will be dependent on the directory blocks, and the directory blocks must be parsed first before the file blocks can be parsed.

[0156] like Figure 8 As shown in FIG. 1 , a schematic diagram of a structure of a compressed file stream provided by an embodiment of the present invention is shown in FIG. Figure 8 In the compressed file stream shown, there is a dependency relationship between file block 2 and directory block 4, and the processing of file block 2 depends on the file information of directory block 4. However, if directory block 4 has not been received, file block 2 cannot be processed.

[0157] As an optional implementation, using the second software structure table as an index to search for entity files in the software to be loaded includes performing at least one of the following steps:

[0158] (1) determining and deleting directory structure information in the software to be loaded according to the second software structure table;

[0159] (2) determining, according to the second software structure table, files of non-entity file types in the software to be loaded and deleting them;

[0160] (3) Using the second software structure table as an index, determine the location of the entity file in the software to be loaded, and extract the corresponding entity file.

[0161] The above execution steps include two implementation modes, and the entity files in the software to be loaded can be obtained through the following two implementation modes.

[0162] Implementation method 1: obtaining the entity file in the software to be loaded by deleting the relevant information in the software to be loaded.

[0163] (1) determining and deleting directory structure information in the software to be loaded according to the second software structure table;

[0164] (2) determining, according to the second software structure table, files of non-entity file types in the software to be loaded and deleting them;

[0165] The file of the non-entity file type may be a special file in the software, such as a symbolic link.

[0166] Implementation method 2: using the second software structure table as an index, extracting corresponding entity files.

[0167] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0168] As an optional implementation, Fig. 9 The figure is a schematic diagram of a structural reorganization process provided by an embodiment of the present invention.

[0169] The original structure of the software contains multiple directories, multiple entity files, and some non-entity file types, such as configuration, script, run file, and executable file in the sub-directories of the software, and configuration 1 and configuration 2 in the sub-directories. The entity files in the software to be loaded are searched with the software structure table as an index. The entity files include configuration 1, configuration 2, script 1, library file 1, and executable file, and the reorganized software structure is obtained, which is a single-directory multi-entity file structure. The sub-directories of the software are configuration 1_summary, configuration 2_summary, script 1_summary, library file 1_summary, executable file_summary, and structure table 2_summary, and a software structure package is generated.

[0170] After the software is reorganized in the above manner, it is ensured that the software structure is a simple single-directory multi-entity file structure.

[0171] As an optional implementation, the structure is reorganized in the above manner to generate a temporary intermediate product software structure package to ensure that the compressed blocks in the compressed stream have no cross-block dependencies and can be processed and parsed independently.

[0172] Step S604, compressing the reorganized entity file to obtain a streaming compression package.

[0173] It should be noted that the above compression operation uses a standard zip compression format to compress the software structure package into a streaming compression package.

[0174] As an optional implementation, Fig.10 As shown, it is a schematic diagram of a process of generating a streaming compression package provided by an embodiment of the present invention.

[0175] The software structure package is compressed without directory to obtain a stream compression package. It should be noted that the stream compression package is composed of entity files arranged in sequence, and the tail of the team is a central directory and a directory end mark.

[0176] It should be noted that the entity file includes file description information LocalFileHeader (or ZipFileBlockHeader) and compressed data blocks (FileData) arranged in sequence.

[0177] As an optional implementation, searching for the entity file in the software to be loaded, reorganizing it, and adding the second software structure table to the entity file to obtain the reorganized entity file includes:

[0178] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0179] As an optional implementation, the file description information further includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0180] Step S605: adding metadata of the software to be loaded to the header of the streaming compression package.

[0181] As an optional implementation, the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0182] like Fig.11 FIG. 1 is a schematic diagram of a process of filling metadata into a streaming compression package provided by an embodiment of the present invention.

[0183] The stream compression packet and metadata are post-processed, and the metadata is added to the header of the stream compression packet to become the description header of the stream compression packet.

[0184] It should be noted that the Package Header mentioned above exists as a description header of the complete software compression package. Its function is to describe some basic information of the entire software, such as version, type, signature verification, etc. It is different from the block header of the compression process and will not affect the block decompression.

[0185] like Fig.12 As shown, it is a flowchart of a method for loading client software provided by an embodiment of the present invention, including:

[0186] Step S1201, sending a software loading request to the server;

[0187] As an optional implementation, the client may send a software loading request to the server; or, in response to an instruction to load the software, directly receive a streaming compressed package sent by the server.

[0188] Step 1202, receiving the stream compression packets sent by the server in blocks, and writing them into the data receiving window;

[0189] Step S1203, decompressing the blocks of the stream compression package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory;

[0190] Step S1204: according to the second software structure table of the reorganized entity file, the structure of the reorganized entity file in the memory is restored to the structure of the software to be loaded.

[0191] The method for software loading on the server provided in the embodiment of the present invention belongs to the same inventive concept as the server in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for software loading provided in the above-mentioned embodiment, and can be applied to the method for software loading in this embodiment, and will not be repeated here.

[0192] The method for loading software on the client provided in the embodiment of the present invention belongs to the same inventive concept as the client in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for loading software provided in the above-mentioned embodiment, and can be applied to the method for loading software in this embodiment, and will not be repeated here.

[0193] As an optional implementation manner, decompressing the blocks of the streaming compressed package written into the data receiving window and writing them into a memory, and obtaining a reorganized entity file in the memory, comprises:

[0194] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0195] As an optional implementation manner, the file description information of the reorganized entity file includes:

[0196] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0197] As an optional implementation, Fig.13 FIG. 1 is a schematic diagram of information contained in a description header provided by an embodiment of the present invention.

[0198] Since the stream compression packet is stream data with a fixed format, and there are sufficient description headers in the stream compression packet to describe the actual valid data.

[0199] It should be noted that the above description header is the file description information LocalFileHeader (or ZipFileBlockHeader).

[0200] The description header describes the information of the compressed data block following the description header, including the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, the name of the file to which the compressed data block of the entity file belongs, etc. The above information is sufficient to determine the processing strategy of the compressed data block following the description header.

[0201] Therefore, during the software loading process, there is no need to open up a huge resource (i.e., memory) to receive the complete streaming compressed package. Only a small resource is needed as a receiving window to receive the package in blocks. According to the description of the file description information, the package is decompressed in blocks and written to the idle backup memory flash.

[0202] As an optional implementation, after all data in the streaming compression package is written into the backup memory flash, the data recovery reduce module reads the original structure information of the software and recovers the original structure information of the software.

[0203] like Fig.14 FIG. 1 is a schematic diagram of a process for restoring the original structure of software provided by an embodiment of the present invention.

[0204] The data recovery and reduction module reads the reorganized software structure, and according to the second software structure table of the reorganized entity file, restores the structure of the reorganized entity file in the memory to the structure of the software to be loaded.

[0205] At this point, a complete software loading operation is completed. In this process, the client only opens up a very small window area, such as 32kb, as a receiving and parsing buffer to complete the action of receiving and loading at the same time.

[0206] As an optional implementation, Fig.15 FIG. 1 is a schematic diagram of a process of loading client software provided by an embodiment of the present invention.

[0207] The streaming compressed packets with description headers are continuously written into the data receiving window (window) of the client. When the data receiving window is full, the blocks of the streaming compressed packets written into the data receiving window are decompressed and written into the memory flash.

[0208] The above steps are repeated, and the data receiving window continues to receive data until the streaming compressed packet with the description header is completely received, and the reorganized physical file is obtained in the memory.

[0209] As an optional implementation, Fig.16 As shown, it is a flow chart of a streaming block decompression process provided by an embodiment of the present invention.

[0210] Step S1601, receiving data to a data receiving window;

[0211] Step S1602, determining whether the received data contains file description information, if so, executing step S1603, if not, executing step S1601;

[0212] Step S1603, parsing the file description information;

[0213] Step S1604, writing the slice data into the memory;

[0214] Step S1605, determine whether the entity file is received completely, if yes, execute step S1606, if no, execute step S1601;

[0215] Step S1606, determine whether all physical files are received completely, if so, the operation ends, if not, execute step S1601.

[0216] After the streaming compressed packet with the description header is received, the data on the memory flash is still a reorganized structure. The client's data recovery module (reduce) performs the action of restoring the structure based on the original information, and restores the structure of the reorganized physical file in the memory to the structure of the software to be loaded.

[0217] Example 2

[0218] The embodiment of the present invention provides a software loading device 1700, which is applied to a server and includes a memory 1701 and a processor 1702. Fig.17 As shown, where:

[0219] The memory is used to store computer programs;

[0220] The processor is used to read the program in the memory and execute the following steps:

[0221] In response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping an absolute path of a physical file in the software to be loaded;

[0222] Add the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0223] Using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files;

[0224] The reorganized entity file is compressed to obtain a stream compression package, and the stream compression package is sent to the client.

[0225] Optionally, after obtaining the stream compression package, the processor is further configured to:

[0226] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0227] Optionally, the processor uses the second software structure table as an index to search for a physical file in the software to be loaded, including performing at least one of the following steps:

[0228] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0229] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0230] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0231] Optionally, the processor searches for a physical file in the software to be loaded, reorganizes the physical file, and adds the second software structure table to the physical file to obtain the reorganized physical file, including:

[0232] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0233] Optionally, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0234] Optionally, the processor scans the software to be loaded to obtain at least one of the following information: a configuration file, a script file, a directory structure, and a dependency relationship between the entity files.

[0235] The embodiment of the present invention provides a software loading device 1800, which is applied to a client and includes a memory 1801 and a processor 1802. Fig.18 As shown, where:

[0236] The memory is used to store computer programs;

[0237] The processor is used to read the program in the memory and execute the following steps:

[0238] Send a software loading request to the server;

[0239] Receive the streaming compressed packets sent by the server in blocks and write them into the data receiving window;

[0240] Decompressing the blocks of the streaming compressed package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory;

[0241] According to the second software structure table of the reorganized entity file, the structure of the reorganized entity file in the memory is restored to the structure of the software to be loaded.

[0242] Optionally, the processor decompresses the blocks of the streaming compressed package written into the data receiving window, writes the blocks into a memory, and obtains a reorganized entity file in the memory, including:

[0243] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0244] Optionally, the file description information of the reorganized entity file includes:

[0245] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0246] The device for software loading on the server provided in the embodiment of the present invention belongs to the same inventive concept as the server in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for software loading provided in the above-mentioned embodiment, and can be applied to the method for software loading in this embodiment, which will not be repeated here.

[0247] The device for software loading on the client provided in the embodiment of the present invention belongs to the same inventive concept as the client in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for software loading provided in the above-mentioned embodiment, and can be applied to the method for software loading in this embodiment, which will not be repeated here.

[0248] The embodiment of the present invention provides a software loading device, which is applied to a server, such as Fig.19 As shown, including:

[0249] The first structure table generating unit 1901 is used to scan the software to be loaded in response to the software loading request sent by the client, and determine the first software structure table mapping the absolute path of the entity file in the software to be loaded;

[0250] The second structure table generating unit 1902 is used to add the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;

[0251] The structure reorganization unit 1903 is used to use the second software structure table as an index to search for the entity file in the software to be loaded, reorganize it, and add the second software structure table to the entity file to obtain the reorganized entity file;

[0252] The compression package generation unit 1904 is used to compress the reorganized entity file to obtain a streaming compression package, and send the streaming compression package to the client.

[0253] Optionally, after obtaining the stream compression package, the compression package generation unit is further used to:

[0254] The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

[0255] Optionally, the structure reorganization unit uses the second software structure table as an index to search for entity files in the software to be loaded, including performing at least one of the following steps:

[0256] According to the second software structure table, determining and deleting directory structure information in the software to be loaded;

[0257] According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded;

[0258] Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

[0259] Optionally, the structure reorganization unit searches for entity files in the software to be loaded, reorganizes the entity files, and adds the second software structure table to the entity files to obtain the reorganized entity files, including:

[0260] The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

[0261] Optionally, the file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0262] Optionally, the first structure table generating unit scans the software to be loaded to obtain at least one of the following information: a configuration file, a script file, a directory structure, and a dependency relationship between the entity files.

[0263] The embodiment of the present invention provides a software loading device, which is applied to a client, such as Fig. 20 As shown, including:

[0264] The request sending unit 2001 is used to send a software loading request to the server;

[0265] The data receiving unit 2002 is used to receive the stream compression packets sent by the server in blocks and write them into the data receiving window;

[0266] A decompression unit 2003, configured to decompress the blocks of the stream compression package written into the data receiving window, and write the blocks into a memory, thereby obtaining a reorganized entity file in the memory;

[0267] The structure recovery unit 2004 is used to recover the structure of the reorganized entity file in the memory into the structure of the software to be loaded according to the second software structure table of the reorganized entity file.

[0268] Optionally, the decompression unit decompresses the blocks of the streaming compressed package written into the data receiving window, writes the blocks into a memory, and obtains a reorganized entity file in the memory, including:

[0269] According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

[0270] Optionally, the file description information of the reorganized entity file includes:

[0271] The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

[0272] The device for software loading on the server provided in the embodiment of the present invention belongs to the same inventive concept as the server in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for software loading provided in the above-mentioned embodiment, and can be applied to the method for software loading in this embodiment, which will not be repeated here.

[0273] The device for loading software on the client provided in the embodiment of the present invention belongs to the same inventive concept as the client in the above-mentioned embodiment 1 of the present invention, and is applied to the various implementation methods for loading software provided in the above-mentioned embodiment, and can be applied to the method for loading software in this embodiment, which will not be repeated here.

[0274] An embodiment of the present invention provides a computer program medium on which a computer program is stored. When the program is executed by a processor, the steps of a method for loading software applied to a server provided in the above-mentioned embodiment 1 are implemented.

[0275] An embodiment of the present invention provides a computer program medium on which a computer program is stored. When the program is executed by a processor, the steps of a method for loading software applied to a client provided in the above-mentioned embodiment 1 are implemented.

[0276] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

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

[0278] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.

[0279] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0280] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.

[0281] The technical solution provided by the present application is introduced in detail above. The principles and implementation methods of the present application are explained by using specific examples in the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0282] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0283] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0284] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0285] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0286] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A method for loading software, characterized in that: Applied to the server, including: In response to a software loading request sent by a client, scanning the software to be loaded, and determining a first software structure table mapping an absolute path of a physical file in the software to be loaded; Add the corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table; Using the second software structure table as an index, searching for entity files in the software to be loaded, reorganizing, and adding the second software structure table to the entity files to obtain the reorganized entity files; Compressing the reorganized entity file to obtain a stream compression package, and sending the stream compression package to the client; The step of searching the entity file in the software to be loaded by using the second software structure table as an index comprises performing at least one of the following steps: According to the second software structure table, determining and deleting directory structure information in the software to be loaded; According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded; Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

2. The method according to claim 1, characterized in that After getting the streaming compressed package, it also includes: The metadata of the software to be loaded is added to the header of the streaming compression package, wherein the metadata includes at least one of the original size, signature information, installation type, and version of the software to be loaded.

3. The method according to claim 1, characterized in that Searching for the entity file in the software to be loaded, reorganizing it, and adding the second software structure table to the entity file to obtain the reorganized entity file, including: The entity files in the software to be loaded are sorted in a queue, and the second software structure table is added to the end of the queue for reorganization, wherein the entity files include file description information and compressed data blocks.

4. The method according to claim 3, characterized in that The file description information includes: the size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

5. The method according to claim 1, characterized in that Scan the software to be loaded to obtain at least one of the following information: configuration files, script files, directory structures, and dependencies between the entity files.

6. A method for loading software, characterized in that: Applied to the client, including: Send a software loading request to the server; Receive the streaming compressed packets sent by the server in blocks and write them into the data receiving window; Decompressing the blocks of the streaming compressed package written into the data receiving window and writing the blocks into a memory, thereby obtaining a reorganized entity file in the memory; According to the second software structure table of the reorganized entity file, restoring the structure of the reorganized entity file in the memory to the structure of the software to be loaded; The decompressing the blocks of the streaming compressed package written into the data receiving window and writing them into a memory, and obtaining the reorganized entity file in the memory, comprises: According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

7. The method according to claim 6, characterized in that The file description information of the reorganized entity file includes: The size of the compressed data block of the entity file, the decompressed size of the compressed data block of the entity file, and the name of the file to which the compressed data block of the entity file belongs.

8. A software loading device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to read the program in the memory and execute the software loading method described in claims 1 to 5 and claim 6 or 7.

9. A software loading device, characterized in that: Applied to the server, including: A first structure table generating unit is used to scan the software to be loaded in response to the software loading request sent by the client, and determine a first software structure table mapping the absolute path of the entity file in the software to be loaded; A second structure table generating unit, used for adding a corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table; a structure reorganization unit, configured to use the second software structure table as an index to search for entity files in the software to be loaded, reorganize the entity files, and add the second software structure table to the entity files to obtain the reorganized entity files; A compression package generating unit, used for compressing the reorganized entity file to obtain a stream compression package, and sending the stream compression package to the client; The step of searching the entity file in the software to be loaded by using the second software structure table as an index comprises performing at least one of the following steps: According to the second software structure table, determining and deleting directory structure information in the software to be loaded; According to the second software structure table, determining and deleting files of non-entity file types in the software to be loaded; Using the second software structure table as an index, the location of the entity file in the software to be loaded is determined, and the corresponding entity file is extracted.

10. A software loading device, characterized in that: Applied to the client, including: A request sending unit, used for sending a software loading request to the server; A data receiving unit, used for receiving the stream compression packets sent by the server in blocks and writing them into a data receiving window; a decompression unit, used for decompressing the blocks of the stream compression package written into the data receiving window, and writing the blocks into a memory, and obtaining a reorganized entity file in the memory; a structure recovery unit, configured to restore the structure of the reorganized entity file in the memory to the structure of the software to be loaded according to the second software structure table of the reorganized entity file; The decompressing the blocks of the streaming compressed package written into the data receiving window and writing them into a memory, and obtaining the reorganized entity file in the memory, comprises: According to the file description information of the reorganized entity file, the blocks of the decompressed streaming compression package are reorganized to obtain the reorganized entity file in the memory.

11. A computer program medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the steps of a method for loading software as claimed in any one of claims 1 to 5 and claim 6 or 7 are implemented.

Citation Information

Patent Citations

  • Compression and decompression method based on hardware accelerator card on distributive-type file system

    CN103020205A

  • Data query method and device

    CN106897280A