CN114579154A - Method, device and equipment for loading software - Google Patents

Method, device and equipment for loading software Download PDF

Info

Publication number
CN114579154A
CN114579154A CN202011379597.7A CN202011379597A CN114579154A CN 114579154 A CN114579154 A CN 114579154A CN 202011379597 A CN202011379597 A CN 202011379597A CN 114579154 A CN114579154 A CN 114579154A
Authority
CN
China
Prior art keywords
software
entity file
file
loaded
entity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011379597.7A
Other languages
Chinese (zh)
Inventor
王全财
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202011379597.7A priority Critical patent/CN114579154A/en
Publication of CN114579154A publication Critical patent/CN114579154A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Library & Information Science (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method, a device and equipment for loading software, wherein the method comprises the following steps: responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an absolute path of an entity file in the software to be loaded; adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table; searching the entity file in the software to be loaded by taking the second software structure table as an index, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file; and compressing the recombined entity file to obtain a streaming type compression packet, and sending the streaming type compression packet to a client. When the method of the invention is used, when the temporary resource is smaller than the size of the upgrade package, only the smaller temporary resource needs to be used for receiving in blocks, the dependency of each block is eliminated, the streaming block decompression is realized, and the loading efficiency is improved.

Description

Method, device and equipment for loading software
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for loading software.
Background
With the development and popularization of wireless communication technology, more and more software is put into use, and software can upgrade the software version at intervals so as to repair the defects of the existing version and upgrade the functions of the software. The general software upgrade/installation process is: the device receives the software package, decompresses the data in the received software package, and writes the data into the storage area where the software is installed. In the above process, a temporary block of resources is required to store the software package. The upgrade/installation limitations become even more pronounced if the software package exceeds temporary resource limitations, such as too large a software package or too small a temporary resource, which may cause the upgrade/installation process to be inoperable, especially on resource-limited embedded devices.
In order to solve the above problems, the first solution is that when the size of an upgrade image file exceeds the maximum allocable memory size of an OLT (Optical Line Terminal), a network management server negotiates with the OLT to determine the size of an image fragment downloaded by the OLT each time, the image fragment is obtained by the network management server by dividing the upgrade image file, and the size of each image fragment does not exceed the maximum allocable memory size; the Network management server issues a mirror image fragment to the OLT each time, the OLT stores the received mirror image fragment in a pre-allocated download space and then issues the mirror image fragment to an ONU (Optical Network Unit), and then the download space is emptied until all the mirror image fragments are issued. However, the above scheme has a certain problem, and if there is dependency between fragments, for example, some post-processing operations such as decompression in the upgrade process, the above scheme cannot handle such dependency, resulting in upgrade/installation failure.
The second solution is to divide the source version file and the target version file into a plurality of blocks according to the length of the temporary resource; comparing the blocks of the source version file with the blocks of the target version file to obtain difference information and copy dependency relationship between the blocks of the source version file and the blocks of the target version file; and generating a differential upgrade package according to the differential information and the copy dependency relationship. However, the process of making the differential upgrade package depends on the original version file, and the problem cannot be solved under the condition that the original version file does not exist, such as when new software is installed; in addition, in some scenarios, the generated differential upgrade package still exceeds the limit of temporary resources, and the upgrade operation cannot be completed.
Disclosure of Invention
The invention provides a method, a device and equipment for loading software, which solve the problem of how to use smaller temporary resources and load the software when the temporary resources are smaller than the size of an upgrade package during the loading of the software.
In a first aspect, the present invention provides a method for loading software, which is applied to a server, and includes:
responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an absolute path of an entity file in the software to be loaded;
adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
searching the entity file in the software to be loaded by taking the second software structure table as an index, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
and compressing the recombined entity file to obtain a streaming type compression packet, and sending the streaming type compression packet to a client.
Optionally, after obtaining the streaming compression packet, the method further includes:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
Optionally, the searching the entity file in the software to be loaded by using the second software structure table as an index includes performing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
Optionally, searching for an entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file, including:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
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 file name to which the compressed data block of the entity file belongs.
Optionally, the software to be loaded is scanned, and at least one of the following information is obtained: configuration files, script files, directory structures, and the dependency relationships among the entity files.
In a second aspect, the present invention provides a method for loading software, which is applied to a client, and includes:
sending a software loading request to a server;
receiving the streaming compression packet sent by the server in a blocking manner, and writing the streaming compression packet into a data receiving window;
decompressing the blocks of the streaming compression packet written in by the data receiving window, and writing the blocks into a memory to obtain a recombined entity file in the memory;
and restoring the structure of the recombined entity file in the memory to the structure of the software to be loaded according to the second software structure table of the recombined entity file.
Optionally, decompressing the blocks of the streaming compressed packet written in by the data receiving window, and writing the blocks into a memory, where the memory obtains a reassembled entity file, including:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming compressed packet to obtain the recombined entity file in the memory.
Optionally, the file description information of the reassembled 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 file name to which the compressed data block of the entity file belongs.
In a third aspect, the present invention provides a software loading device, which is applied to a server and includes a memory and a processor, where:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an absolute path of an entity file in the software to be loaded;
adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
searching the entity file in the software to be loaded by taking the second software structure table as an index, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
and compressing the recombined entity file to obtain a streaming type compression packet, and sending the streaming type compression packet to a client.
Optionally, after obtaining the streaming compression packet, the processor is further configured to:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
Optionally, the processor searches for the entity file in the software to be loaded by using the second software structure table as an index, and includes executing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
Optionally, the searching, by the processor, for the entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file, including:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
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 file name to which the compressed data block of the entity file belongs.
Optionally, the processor scans the software to be loaded, and obtains at least one of the following information: configuration files, script files, directory structures, and the dependency relationships among the entity files.
In a fourth aspect, the present invention provides a device for loading software, which is applied to a client and includes a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
sending a software loading request to a server;
receiving the streaming compression packet sent by the server in a blocking manner, and writing the streaming compression packet into a data receiving window;
decompressing the blocks of the streaming compression packet written in by the data receiving window, and writing the blocks into a memory to obtain a recombined entity file in the memory;
and restoring the structure of the recombined entity file in the memory to the structure of the software to be loaded according to the second software structure table of the recombined entity file.
Optionally, the decompressing, by the processor, the blocks of the streaming compressed packet written in by the data receiving window, and writing the blocks into a memory, where the memory obtains a reassembled entity file, where the decompressing includes:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming compressed packet to obtain the recombined entity file in the memory.
Optionally, the file description information of the reassembled 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 file name to which the compressed data block of the entity file belongs.
In a fifth aspect, the present invention provides a software loading apparatus, applied to a server, including:
the system comprises a first structure table generating unit, a first mapping unit and a second mapping unit, wherein the first structure table generating unit is used for responding to a software loading request sent by a client, scanning software to be loaded and determining a first software structure table mapping an entity file absolute path in the software to be loaded;
a second structure table generating unit, configured to add a corresponding entity file name to the absolute path in the first software structure table to obtain a second software structure table;
the structure reorganization unit is used for searching the entity file in the software to be loaded by taking the second software structure table as an index, reorganizing and adding the second software structure table to the entity file to obtain the reorganized entity file;
and the compression package generation unit is used for compressing the recombined entity file to obtain a streaming compression package and sending the streaming compression package to the client.
Optionally, after obtaining the streaming compressed packet, the compressed packet generating unit is further configured to:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
Optionally, the structure reorganizing unit searches for the entity file in the software to be loaded by using the second software structure table as an index, and includes executing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
Optionally, the structure restructuring unit searches for the entity file in the software to be loaded, restructures the entity file, and adds the second software structure table to the entity file to obtain a restructured entity file, including:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
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 file name to which the compressed data block of the entity file belongs.
Optionally, the first structure table generating unit scans software to be loaded, and obtains at least one of the following information: configuration files, script files, directory structures, and the dependency relationships among the entity files.
In a sixth aspect, the present invention provides a software loading apparatus, applied to a client, including:
the request sending unit is used for sending a software loading request to the server;
the data receiving unit is used for receiving the streaming compressed packet sent by the server in a blocking manner and writing the streaming compressed packet into a data receiving window;
the decompression unit is used for decompressing the blocks of the streaming compression packet written in by the data receiving window, writing the blocks into a memory and obtaining the recombined entity file in the memory;
and the structure recovery unit is used for recovering the structure of the recombined entity file in the memory into the structure of the software to be loaded according to the second software structure table of the recombined entity file.
Optionally, the decompressing unit decompresses the blocks of the streaming compressed packet written in by the data receiving window, and writes the blocks into a memory, and obtains the reassembled entity file in the memory, where the decompressing includes:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming type compressed packet, and obtaining the recombined entity file in the memory.
Optionally, the file description information of the reassembled 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 file name to which the compressed data block of the entity file belongs.
In a seventh aspect, the present invention provides a computer program medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method for loading software applied to a server as provided in the first aspect above.
In an eighth aspect, the present invention provides a computer program medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of software loading as provided above in the second aspect, applied to a client.
The method, the device and the equipment for loading the software have the following beneficial effects that:
when the software is loaded, when the temporary resource is smaller than the size of the upgrade package, the upgrade package is received in blocks only by using the smaller temporary resource, the dependency among the blocks is eliminated, the streaming block decompression is realized, the loading is realized while receiving, and the loading efficiency is improved.
Drawings
FIG. 1 is a diagram illustrating a general software loading process;
FIG. 2 is a schematic diagram of a slice loading scheme in the prior art;
FIG. 3 is a schematic diagram of a prior art scheme for upgrading using a differential upgrade package;
fig. 4 is a schematic view of an application scenario of a method for loading software according to an embodiment of the present invention.
Fig. 5 is a flowchart of a method for loading server software according to an embodiment of the present invention;
fig. 6 is a flowchart of a streaming compression package according to an embodiment of the present invention;
fig. 7 is a schematic diagram of a first software structure table generating process according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating a structure of a compressed file stream according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a process of restructuring according to an embodiment of the present invention;
fig. 10 is a schematic diagram of a process for generating a streaming compression packet according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating a process for filling metadata into a streaming compressed packet according to an embodiment of the present invention;
fig. 12 is a flowchart of a method for loading client software according to an embodiment of the present invention;
FIG. 13 is a diagram illustrating information contained in a description header according to an embodiment of the present invention;
FIG. 14 is a diagram illustrating a process of recovering an original structure of software according to an embodiment of the present invention;
fig. 15 is a schematic diagram illustrating a client software loading process according to an embodiment of the present invention;
fig. 16 is a flow chart of a streaming block decompression process according to an embodiment of the present invention;
fig. 17 is a schematic diagram of a device for loading server software according to an embodiment of the present invention;
fig. 18 is a schematic diagram of a device for loading client software according to an embodiment of the present invention;
fig. 19 is a schematic diagram of an apparatus for loading server software according to an embodiment of the present invention;
fig. 20 is a schematic diagram of an apparatus for loading client software according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
It should be noted that the embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
Hereinafter, some terms in the embodiments of the present disclosure are explained to facilitate understanding by those skilled in the art.
(1) The term "loading" in the embodiment of the present disclosure includes both cases of upgrading and installing, wherein the installing is a process from 0 to 1, and the upgrading is an update operation from 1 to n.
(2) The term "streaming compression package" in the embodiments of the present disclosure is a fixed compression form, and can support loading and decompressing, and it is not necessary to perform decompression after all compression packages are completely downloaded.
(3) The term "Optical Line Terminal" in the embodiments of the present disclosure refers to (Optical Line Terminal, OLT). The functions realized by the device are as follows: the optical fiber is connected with a front-end (convergence layer) switch by a network cable, converted into an optical signal and interconnected with an optical splitter of a user end by a single optical fiber; the functions of controlling, managing, ranging and the like of user side equipment ONU are realized; the network side interface of the optical access network is provided and is connected with one or more optical distribution networks.
(4) The term "Optical Network Unit" in the embodiments of the present disclosure refers to a general name of an Optical Network Unit (ONU) and an Optical Network Terminal (ONT). The ONU is a terminal device for optical fiber access, which provides a plurality of service interfaces for users, and the ONT is directly located at a user end, and the ONU and the ONT are collectively called the ONU.
(5) The term "Flash memory" in the embodiments of the present disclosure refers to a solid-state memory and an animation editor, and performs the function of the memory in the embodiments of the present invention.
(6) The term "temporary resource" in the embodiments of the present disclosure refers to a resource that is generated by one process, used by another process, and useless after a short time, and is also referred to as a consumable resource, such as a hardware interrupt, a signal, a message in a buffer, and the like. In embodiments of the invention it is specified a block of resources that is temporarily used for receiving fragments of streaming compressed packets.
To make the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
Fig. 1 is a schematic diagram illustrating a general software loading process.
The device receives the software package, stores the software package by using the temporary resource, decompresses the data in the received software package, and writes the data into the storage area where the software is installed. In the above process, a temporary block of resources is required to store the software package. The upgrade/installation limitations become even more pronounced if the software package exceeds temporary resource limitations, such as too large a software package or too small a temporary resource, which may cause the upgrade/installation process to be inoperable, especially on resource-limited embedded devices.
In view of the above problems, there are two solutions in the prior art, the first is a slice upgrading method. When the size of the upgrade image file exceeds the maximum allocable memory size of an OLT (Optical Line Terminal), the network management server and the OLT negotiate to determine the size of an image fragment downloaded by the OLT each time, the image fragment is obtained by the network management server after the upgrade image file is divided, and the size of each image fragment does not exceed the maximum allocable memory size; the Network management server issues a mirror image fragment to the OLT each time, the OLT stores the received mirror image fragment in a pre-allocated download space and then issues the mirror image fragment to an ONU (Optical Network Unit), and then the download space is emptied until all the mirror image fragments are issued.
Fig. 2 is a schematic diagram of a split loading scheme in the prior art, in which an upgrade image file is split into image splits S1, S2, S3, S4, … …, and Sn. The upgraded segment sends a fragment request to the upgrade image file, and as shown in fig. 2, the upgraded segment sends a fragment request to the image fragment S1 of the upgrade image file; the upgrade image file receives the fragment request and then issues fragment data to the upgrade memory, as shown in fig. 2, the upgrade image file issues a image fragment S1 and a image fragment S2 … …, respectively, a image fragment Sn; the upgrade memory stores the received fragment data into a storage Flash and then empties the upgrade memory, as shown in fig. 2, the upgrade memory stores the received data of the mirror image fragment S1 into the storage Flash and then empties the upgrade memory, and then stores the received data of the mirror image fragment S2 into the storage Flash and then empties the upgrade memory; and repeating the operation until all the mirror image fragments are distributed.
However, the above-mentioned solutions have a certain problem, when the network management server fragments the upgrade package, it fragments according to the size requested by the upgraded end, if there are two fragments with correlation or dependency, for example, some post-processing operations such as decompression in the upgrade process, the upgraded end is deleted after receiving the single fragment, so that the upgrade/installation failure is caused because the dependency cannot be processed. For example, in fig. 2, when there is dependency between S2 and Sn, the upgrade process cannot proceed because when the upgraded terminal receives Sn, the S2 chip has been deleted and no dependency recovery information is recorded, resulting in that Sn cannot be processed.
A second solution is to upgrade using a differential upgrade package.
As shown in fig. 3, which is a schematic diagram of a scheme for upgrading by using a differential upgrade package in the prior art, a source version file and a target version file are respectively divided into a plurality of blocks according to the length of temporary resources; comparing the blocks of the source version file with the blocks of the target version file to obtain difference information and copy dependency relationship between the blocks of the source version file and the blocks of the target version file; and generating a differential upgrade package according to the differential information and the copy dependency relationship.
However, in the above process of making the differential upgrade package, the difference item needs to be generated by comparing the old upgrade package, and the upgrade package of the difference item is made; and the scheme of upgrading by using the differential upgrade package cannot perform installation operation from 0 to 1 and only can perform updating operation from 1 to n. In addition, the scheme for upgrading the differential upgrade package still has upgrading limitation, and cannot solve the problem of upgrading strategy in resource shortage from the root: although the above scheme uses a difference method to reduce the size of the upgrade package as much as possible, there still exists a situation that the difference upgrade package is too large in some scenarios, and in such scenarios, when upgrade resources are in short supply, the upgrade operation may not be completed.
Based on the above problems, embodiments of the present disclosure provide a method, an apparatus, and a device for loading software, which can implement that when loading software, when a temporary resource is smaller than an upgrade package, only a smaller temporary resource needs to be used, the upgrade package is received in blocks, dependencies between blocks are eliminated, streaming block decompression is performed, loading is performed while receiving, and loading efficiency is improved. Embodiments of a method, an apparatus, and a device for loading software provided in the embodiments of the present disclosure are given below.
Various embodiments of the present application will be described in detail below with reference to the drawings. It should be noted that the display sequence of the embodiment of the present application only represents the sequence of the embodiment, and does not represent the merits of the technical solutions provided by the embodiments.
Example 1
Fig. 4 is a schematic diagram of an application scenario of a method for loading software according to an embodiment of the present invention.
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, the server 402 generates a streaming compression packet after receiving the software loading request sent by the client 401, and sends the streaming compression packet to the client 401, and the client 401 carries out loading operation after receiving the streaming compression packet.
As shown in fig. 5, a flowchart of a method for loading server software according to an embodiment of the present invention includes:
step S501, responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an entity file absolute path in the software to be loaded;
as an optional implementation, the software to be loaded is scanned, and the software structure information is obtained, where the software structure information includes at least one of the following information: configuration files, script files, directory structures, and the dependency relationships among the entity files. And determining a first software structure table for mapping the absolute path of the entity file in the software to be loaded according to the software structure information.
Step S502, adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
step S503, using the second software structure table as an index, searching for an entity file in the software to be loaded, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
as an optional implementation manner, the searching for the entity file in the software to be loaded by using the second software structure table as an index includes performing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
As an optional implementation manner, searching for an entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file includes:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
As an optional implementation manner, 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 file name to which the compressed data block of the entity file belongs.
Step S504, compressing the reconstructed entity file to obtain a stream type compression packet, and sending the stream type compression packet to the client.
As an optional implementation manner, after obtaining the streaming compression packet, the method further includes:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
As shown in fig. 6, a flow chart for making a streaming compression packet according to an embodiment of the present invention includes:
step S601, responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table mapping an entity file absolute path in the software to be loaded;
fig. 7 is a schematic diagram of a first software structure table generation process according to an embodiment of the present invention.
It should be noted that the above operation is a preprocessing operation, and is to pre-check and scan the software to be loaded, and record the structure information of the software to be loaded, so as to recover the software structure;
as an optional implementation manner, the structure of the software to be loaded, i.e. the runtime environment of the program, includes information such as configuration files, script files, directory structures, and dependencies between the entity files of the program.
It should be noted that the structural information of the software to be loaded needs to be organized locally in advance.
As an optional implementation manner, in the preprocessing process, the structural information that is organized locally in advance by the user is scanned, and the first software structural table is generated.
Step S602, adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
step S603, with the second software structure table as an index, searching for an entity file in the software to be loaded, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
it should be noted that, the second software structure table may map the entity file dependency relationship in the software to be loaded, and describe the software structures before and after software reorganization. By means of the structure table, the original structure of the software to be loaded can be restored when the client loads the software.
The structure recombination recombines a complex software structure into a simple software structure, and mainly solves the problem of dependence among compression blocks.
For example, if the software structure is not reassembled, the compression operation is directly performed, when the software program structure is complex, for example, when a directory exists in software, in the compressed file stream, a file block may generate dependency on the directory block, and the directory block must be parsed first to parse the file block.
As shown in fig. 8, which is a schematic structural diagram of a compressed file stream according to an embodiment of the present invention, in the compressed file stream shown in fig. 8, a dependency relationship exists between a file block 2 and a directory block 4, and processing on the file block 2 depends on file information of the directory block 4, but the file block 2 cannot be processed even if the directory block 4 has not been received yet.
As an optional implementation manner, the searching for the entity file in the software to be loaded by using the second software structure table as an index includes performing at least one of the following steps:
(1) determining and deleting directory structure information in the software to be loaded according to the second software structure table;
(2) determining and deleting files of non-entity file types in the software to be loaded according to the second software structure table;
(3) and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
The execution step includes two embodiments, and the entity file in the software to be loaded can be obtained through the following two embodiments.
Embodiment 1: and obtaining the entity file in the software to be loaded by deleting the related information in the software to be loaded.
(1) Determining and deleting directory structure information in the software to be loaded according to the second software structure table;
(2) determining and deleting files of non-entity file types in the software to be loaded according to the second software structure table;
the file of the non-entity file type can be a special file in software, such as a symbolic link and the like.
Embodiment 2: and taking the second software structure table as an index to extract the corresponding entity file.
And determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
As an alternative implementation, as shown in fig. 9, a schematic process diagram of a structural reorganization provided in an embodiment of the present invention is shown.
The original structure of the software has multi-level directories and multi-entity files and some files of non-entity file types, for example, the subordinate directories of the software are configuration, script, running file and executable file, and the configured subordinate directories are configuration 1 and configuration 2. And searching entity files in the software to be loaded by taking the software structure table as an index, wherein the entity files comprise configuration 1, configuration 2, script 1, library file 1 and executable files, recombining to obtain a recombined software structure which is a structure of a single-directory multi-entity file, and generating a software structure package by using a subordinate directory of the software as configuration 1_ abstract, configuration 2_ abstract, script 1_ abstract, library file 1_ abstract, executable file _ abstract and structure table 2_ abstract.
After the software is recombined according to the mode, the software structure of the software is ensured to be a simple structure of a single-directory multi-entity file.
As an optional implementation manner, the structure reorganization is performed in the above manner to generate a temporary intermediate product software structure package, so that it is ensured that the compressed blocks in the compressed stream are not cross-block dependent, and can be independently processed and analyzed.
And step S604, compressing the reconstructed entity file to obtain a streaming compression package.
It should be noted that, in the above compression operation, the software structure packet is compressed into a streaming compression packet by using a standard zip compression format.
As an alternative implementation manner, as shown in fig. 10, a schematic diagram of a process for generating a streaming compression packet is provided for the embodiment of the present invention.
The software structure package is compressed without a directory to obtain a stream type compressed package, wherein the stream type compressed package is composed of entity files which are arranged in sequence, and a queue tail is a central directory and a directory ending identifier.
It should be noted that the entity file includes sequentially arranged file description information LocalFileHeader (or called ZipFileBlockHeader) and compressed data block (FileData).
As an optional implementation manner, searching for an entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file, includes:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
As an optional implementation manner, 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 file name to which the compressed data block of the entity file belongs.
Step S605, adding the metadata of the software to be loaded to the header of the streaming compression packet.
As an optional implementation, the metadata includes at least one of an original size, signature information, installation type, and version of the software to be loaded.
Fig. 11 is a schematic diagram of a process for filling metadata into a streaming compression packet according to an embodiment of the present invention.
The streaming compression packet and the metadata are subjected to post-processing, and the metadata is added to the header of the streaming compression packet to become a description header of the streaming compression packet.
It should be noted that the Header of the compressed packet exists as a description Header of a complete compressed packet of the software, and the description Header is used to describe some basic information of the whole software, such as version, type, signature check, and the like, and is not the same as a block Header in the compression process, and will not affect block decompression.
As shown in fig. 12, a flowchart of a method for loading client software according to an embodiment of the present invention includes:
step S1201, sending a software loading request to a server;
as an optional implementation manner, the client may send a software loading request to the server; or responding to the instruction for loading the software, and directly receiving the streaming compression packet sent by the server.
Step 1202, receiving the streaming compression packet sent by the server in blocks, and writing the streaming compression packet into a data receiving window;
step S1203, decompressing the blocks of the streaming compression packet written in by the data receiving window, and writing the blocks into a memory, so as to obtain an entity file after reassembly in the memory;
step S1204, restoring the structure of the reassembled entity file in the memory to the structure of the software to be loaded according to the second software structure table of the reassembled entity file.
The method for performing software loading by the server provided in the embodiment of the present invention is the same as the server in embodiment 1 of the present invention, and may be applied to various implementation manners for performing software loading provided in the embodiment, and will not be repeated here.
The method for software loading by the client provided in the embodiment of the present invention is the same as the client in embodiment 1 of the present invention, and may be applied to various implementation manners for software loading provided in the embodiment, and will not be repeated here.
As an optional implementation manner, decompressing the blocks of the streaming compressed packet written by the data receiving window, and writing the blocks into the memory, where the reconstructed entity file is obtained in the memory, including:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming type compressed packet, and obtaining the recombined entity file in the memory.
As an optional implementation manner, the file description information of the reassembled 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 file name to which the compressed data block of the entity file belongs.
As an alternative implementation, as shown in fig. 13, a schematic diagram describing information contained in a header is provided in an embodiment of the present invention.
Since the streaming compressed packet is streaming data with a fixed format, and there is enough description headers in the streaming compressed packet to describe the actual valid data.
It should be noted that the above description header is file description information LocalFileHeader (or called zipfile blockheader).
The description header describes information of the compressed data blocks following the description header, including information such as the size of the compressed data blocks of the entity file, the decompressed size of the compressed data blocks of the entity file, and the file name to which the compressed data blocks of the entity file belong. The above information is sufficient to determine the above processing strategy for the compressed data block following the description header.
Therefore, in the process of loading the software, a huge resource (namely, a memory) is not required to be opened up to receive the complete streaming compression packet, only a small resource is required to be used as a receiving window to receive the streaming compression packet in a blocking mode, and the streaming compression packet is decompressed in a blocking mode according to the description of the file description information and written into an idle standby memory flash.
As an optional implementation manner, after all data in the streaming compression packet is written into the spare memory flash, the data recovery reduction module reads the original structure information of the software and recovers the original structure information of the software.
Fig. 14 is a schematic diagram illustrating a process of recovering an original structure of software according to an embodiment of the present invention.
And the data recovery reduction module reads the recombined software structure and recovers the structure of the recombined entity file in the memory into the structure of the software to be loaded according to the second software structure table of the recombined entity file.
In the process, the client only opens up a small window area, such as 32kb, as a receiving and resolving buffer area to complete the action of receiving and loading the software.
As an alternative implementation manner, as shown in fig. 15, a schematic diagram of a process of loading client software according to an embodiment of the present invention is provided.
The stream type compressed packet with the description head is continuously written into a data receiving window (windows) of a client, when the data receiving window is full, the blocks of the stream type compressed packet written into the data receiving window are decompressed, and the action of writing into a flash memory is executed.
And repeating the steps, and continuously receiving the data by the data receiving window until the streaming compressed packet with the description header is received completely, and obtaining the recombined entity file in the memory.
As an alternative implementation, as shown in fig. 16, a flow chart of a streaming block decompression processing provided in an embodiment of the present invention is shown.
Step S1601, receiving data to a data receiving window;
step S1602, determining whether the received data contains file description information, if yes, executing step S1603, and if no, executing step S1601;
step S1603, analyzing the file description information;
step S1604, writing the sliced data into a memory;
step S1605, judging whether the entity file is completely received, if so, executing step S1606, and if not, executing step S1601;
step S1606, determining that all the entity files are completely received, if yes, ending the operation, and if not, executing step S1601.
After the streaming compression packet with the description header is received, the data on the flash memory is still a recombined structure at this time, and a data recovery and restoration module (reduce) of the client executes an action of restoring the structure based on original information, so that the structure of the recombined entity file in the memory is restored to the structure of the software to be loaded.
Example 2
The embodiment of the present invention provides a software loading apparatus 1700, applied to a server, including a memory 1701 and a processor 1702, as shown in fig. 17, where:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an absolute path of an entity file in the software to be loaded;
adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
searching the entity file in the software to be loaded by taking the second software structure table as an index, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
and compressing the recombined entity file to obtain a streaming type compression packet, and sending the streaming type compression packet to a client.
Optionally, after obtaining the streaming compression packet, the processor is further configured to:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
Optionally, the processor searches for the entity file in the software to be loaded by using the second software structure table as an index, and includes executing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
Optionally, the searching, by the processor, for the entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file, including:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
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 file name to which the compressed data block of the entity file belongs.
Optionally, the processor scans the software to be loaded, and obtains at least one of the following information: configuration files, script files, directory structures, and the dependency relationships among the entity files.
An embodiment of the present invention provides a software loading device 1800 applied to a client, including a memory 1801 and a processor 1802, as shown in fig. 18, where:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing the following steps:
sending a software loading request to a server;
receiving the streaming compression packet sent by the server in a blocking manner, and writing the streaming compression packet into a data receiving window;
decompressing the blocks of the streaming compression packet written in by the data receiving window, and writing the blocks into a memory to obtain a recombined entity file in the memory;
and restoring the structure of the recombined entity file in the memory to the structure of the software to be loaded according to the second software structure table of the recombined entity file.
Optionally, the decompressing, by the processor, the blocks of the streaming compressed packet written in by the data receiving window, and writing the blocks into a memory, where the memory obtains a reassembled entity file, where the decompressing includes:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming type compressed packet, and obtaining the recombined entity file in the memory.
Optionally, the file description information of the reassembled 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 file name of the compressed data block of the entity file.
The device for performing software loading by the server provided in the embodiment of the present invention is the same as the server in embodiment 1 of the present invention, and may be applied to various implementation manners for performing software loading provided in the embodiment, and a method for performing software loading in the embodiment is not repeated here.
The device for software loading by the client provided in the embodiment of the present invention is the same as the client in embodiment 1 of the present invention, and is applied to various implementation manners for software loading provided in the embodiments, and may be applied to a method for software loading in the embodiment, and will not be described again here.
An embodiment of the present invention provides a software loading apparatus, which is applied to a server, and as shown in fig. 19, includes:
a first structure table generating unit 1901, configured to scan software to be loaded in response to a software loading request sent by a client, and determine a first software structure table mapping an absolute path of an entity file in the software to be loaded;
a second structure table generating unit 1902, configured to add a corresponding entity file name under the absolute path in the first software structure table to obtain a second software structure table;
a structure restructuring unit 1903, configured to look up the entity file in the software to be loaded by using the second software structure table as an index, restructure the entity file, and add the second software structure table to the entity file to obtain a restructured entity file;
a compression package generating unit 1904, configured to compress the reassembled entity file to obtain a streaming compression package, and send the streaming compression package to the client.
Optionally, after obtaining the streaming compressed packet, the compressed packet generating unit is further configured to:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
Optionally, the structure reorganizing unit searches for the entity file in the software to be loaded by using the second software structure table as an index, and includes executing at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
Optionally, the structure restructuring unit searches for the entity file in the software to be loaded, restructures the entity file, and adds the second software structure table to the entity file to obtain a restructured entity file, including:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
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 file name to which the compressed data block of the entity file belongs.
Optionally, the first structure table generating unit scans software to be loaded, and obtains at least one of the following information: configuration files, script files, directory structures, and the dependency relationships among the entity files.
An embodiment of the present invention provides a software loading apparatus, which is applied to a client, and as shown in fig. 20, includes:
a request sending unit 2001, configured to send a software loading request to a server;
a data receiving unit 2002, configured to receive, in blocks, the streaming compression packet sent by the server, and write the streaming compression packet into a data receiving window;
a decompressing unit 2003, configured to decompress the blocks of the streaming compressed packet written in by the data receiving window, and write the blocks into a memory, so as to obtain a reconstructed entity file in the memory;
a structure recovering unit 2004, configured to recover the structure of the reassembled entity file in the memory to the structure of the software to be loaded according to the second software structure table of the reassembled entity file.
Optionally, the decompressing unit decompresses the blocks of the streaming compressed packet written in by the data receiving window, and writes the blocks into a memory, and obtains the reassembled entity file in the memory, where the decompressing includes:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming compressed packet to obtain the recombined entity file in the memory.
Optionally, the file description information of the reassembled 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 file name to which the compressed data block of the entity file belongs.
The device for performing software loading by the server provided in the embodiment of the present invention is the same as the server in embodiment 1 of the present invention, and may be applied to various implementation manners for performing software loading provided in the embodiment, and a method for performing software loading in the embodiment is not repeated here.
The device for software loading by the client terminal provided in the embodiment of the present invention is the same as the client terminal in embodiment 1 of the present invention, and is applied to various implementation manners for software loading provided in the embodiments, and may be applied to a method for software loading in the embodiment, and will not be described again here.
An embodiment of the present invention provides a computer program medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method for loading software applied to a server, provided in embodiment 1 above.
Embodiments of the present invention provide 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 embodiment 1 above.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of 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.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer-readable storage medium.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
The technical solutions provided by the present application are introduced in detail, and the present application applies specific examples to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understand the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such 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 intended to include such modifications and variations as well.

Claims (13)

1. A method for loading software is applied to a server and comprises the following steps:
responding to a software loading request sent by a client, scanning software to be loaded, and determining a first software structure table for mapping an absolute path of an entity file in the software to be loaded;
adding corresponding entity file names under the absolute path in the first software structure table to obtain a second software structure table;
searching the entity file in the software to be loaded by taking the second software structure table as an index, recombining the entity file, and adding the second software structure table to the entity file to obtain a recombined entity file;
and compressing the recombined entity file to obtain a streaming type compression packet, and sending the streaming type compression packet to a client.
2. The method of claim 1, wherein after obtaining the streaming compressed packet, further comprising:
adding metadata of the software to be loaded in a header of the streaming compression package, wherein the metadata comprises at least one of original size, signature information, installation type and version of the software to be loaded.
3. The method according to claim 1, wherein the step of searching for the entity file in the software to be loaded by using the second software structure table as an index comprises at least one of the following steps:
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 according to the second software structure table;
and determining the position of the entity file in the software to be loaded by taking the second software structure table as an index, and extracting the corresponding entity file.
4. The method according to claim 1, wherein searching for an entity file in the software to be loaded, performing reassembly, and adding the second software structure table to the entity file to obtain an reassembled entity file, comprises:
and sequencing the searched entity files in the software to be loaded in a queue, adding the second software structure table to the tail of the queue for recombination, wherein the entity files comprise file description information and compressed data blocks.
5. The method of claim 4, wherein the file description information comprises: 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 file name to which the compressed data block of the entity file belongs.
6. The method of claim 1, wherein the software to be loaded is scanned for at least one of: configuration files, script files, directory structures, and the dependency relationships among the entity files.
7. A method for loading software is applied to a client and comprises the following steps:
sending a software loading request to a server;
receiving the streaming compression packet sent by the server in a blocking manner, and writing the streaming compression packet into a data receiving window;
decompressing the blocks of the streaming compression packet written in by the data receiving window, and writing the blocks into a memory to obtain a recombined entity file in the memory;
and restoring the structure of the recombined entity file in the memory to the structure of the software to be loaded according to the second software structure table of the recombined entity file.
8. The method according to claim 7, wherein decompressing the blocks of the streaming compressed packet written by the data receiving window, and writing the blocks into a memory, and obtaining the reassembled entity file in the memory comprises:
and according to the file description information of the recombined entity file, recombining the blocks of the decompressed streaming type compressed packet, and obtaining the recombined entity file in the memory.
9. The method according to claim 8, wherein the file description information of the reassembled entity file comprises:
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 file name to which the compressed data block of the entity file belongs.
10. A software loading apparatus comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is used for reading the program in the memory and executing a software loading method of any one of claims 1-6 and 7-9.
11. A device for loading software is applied to a server and comprises:
the system comprises a first structure table generating unit, a first mapping unit and a second mapping unit, wherein the first structure table generating unit is used for responding to a software loading request sent by a client, scanning software to be loaded and determining a first software structure table mapping an entity file absolute path in the software to be loaded;
a second structure table generating unit, configured to add a corresponding entity file name to the absolute path in the first software structure table to obtain a second software structure table;
the structure restructuring unit is used for searching the entity file in the software to be loaded by taking the second software structure table as an index, restructuring the entity file, and adding the second software structure table to the entity file to obtain a restructured entity file;
and the compression package generation unit is used for compressing the recombined entity file to obtain a streaming compression package and sending the streaming compression package to the client.
12. The device for loading software is applied to a client and comprises the following components:
the request sending unit is used for sending a software loading request to the server;
the data receiving unit is used for receiving the streaming compressed packet sent by the server in a blocking manner and writing the streaming compressed packet into a data receiving window;
the decompression unit is used for decompressing the blocks of the streaming compression packet written in by the data receiving window, writing the blocks into a memory and obtaining the recombined entity file in the memory;
and the structure recovery unit is used for recovering the structure of the recombined entity file in the memory into the structure of the software to be loaded according to the second software structure table of the recombined entity file.
13. A computer program medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of a method of software loading according to any one of claims 1 to 6 and 7 to 9.
CN202011379597.7A 2020-11-30 2020-11-30 Method, device and equipment for loading software Pending CN114579154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011379597.7A CN114579154A (en) 2020-11-30 2020-11-30 Method, device and equipment for loading software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011379597.7A CN114579154A (en) 2020-11-30 2020-11-30 Method, device and equipment for loading software

Publications (1)

Publication Number Publication Date
CN114579154A true CN114579154A (en) 2022-06-03

Family

ID=81766861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011379597.7A Pending CN114579154A (en) 2020-11-30 2020-11-30 Method, device and equipment for loading software

Country Status (1)

Country Link
CN (1) CN114579154A (en)

Similar Documents

Publication Publication Date Title
CN109034993B (en) Account checking method, account checking equipment, account checking system and computer readable storage medium
US20210124573A1 (en) Firmware upgrade method and apparatus, and terminal
US11397538B2 (en) Data migration method and apparatus
CN107423436A (en) A kind of method migrated for online data between distinct type data-base
CN103875229A (en) Asynchronous replication method, device and system
JP2008513891A (en) System and method for retrieving and storing data
JP2008513891A6 (en) System and method for retrieving and storing data
CN112925676B (en) WAL-based method for realizing recovery of distributed database cluster at any time point
KR102275240B1 (en) Managing operations on stored data units
WO2019043481A1 (en) Context aware delta algorithm for genomic files
CN114020840A (en) Data processing method, device, server, storage medium and product
US20190220441A1 (en) Method, device and computer program product for data migration
CN112612850A (en) Data synchronization method and device
CN115061630A (en) Data migration method, device, equipment and medium
CN110532236A (en) Increment updating method, system and the medium of compressed file
CN113590161A (en) Memory-controllable NB-IOT module differential upgrading method and system
CN112069152B (en) Database cluster upgrading method, device, equipment and storage medium
CN103065096A (en) Data protection method, device and system
CN114579154A (en) Method, device and equipment for loading software
CN113535482B (en) Cloud backup chain data backup method and device, equipment and readable medium
EP4160951A1 (en) Data transmission method, system, apparatus, device, and medium
CN111970161A (en) Internet of things application differential upgrading method based on address prediction
CN113515502B (en) Data migration method, device, equipment and storage medium
CN113608904B (en) Fault management method based on INI configuration file
US12079194B1 (en) Encoding table schema and storage metadata in a file store

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination