CN110058867B - Application program mirror image packaging and installing method, computer device and storage medium - Google Patents

Application program mirror image packaging and installing method, computer device and storage medium Download PDF

Info

Publication number
CN110058867B
CN110058867B CN201910357606.3A CN201910357606A CN110058867B CN 110058867 B CN110058867 B CN 110058867B CN 201910357606 A CN201910357606 A CN 201910357606A CN 110058867 B CN110058867 B CN 110058867B
Authority
CN
China
Prior art keywords
application program
image file
installation
application
terminal
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.)
Active
Application number
CN201910357606.3A
Other languages
Chinese (zh)
Other versions
CN110058867A (en
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201910357606.3A priority Critical patent/CN110058867B/en
Publication of CN110058867A publication Critical patent/CN110058867A/en
Application granted granted Critical
Publication of CN110058867B publication Critical patent/CN110058867B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an application program mirror image packaging method, which comprises the following steps: generating an application program installation package root directory according to the application program installation directory structure; generating an application program image file according to the application program installation package root directory; calculating a check value of the application program mirror image file; and packaging and encrypting the application program image file and the check value to obtain an application program installation package image file. The invention also discloses an application program mirror image installation method, a computer device and a storage medium. According to the invention, the application program is packaged into the application program installation package image file through the server, so that the terminal obtains the application program installation package image file and installs the application program installation package image file to the installation catalog, and the installation of the application program can be completed, the process of decompressing the application program installation package by the terminal can be omitted, and the efficiency of application program installation can be improved; the correctness and the integrity of the mirror image file of the application program installation package are effectively ensured.

Description

Application program mirror image packaging and installing method, computer device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an application image packaging and installation method, a computer device, and a storage medium.
Background
The application program installation package refers to a package file generated by packing and compressing all files of the application program. When a user wants to install an application program in a terminal, the user needs to download an application program installation package through the terminal, carry out integrity check on the downloaded application program installation package, decompress the application program installation package which is checked successfully, copy the application program installation package to a local installation catalog and then complete the installation of the application program.
However, when there are many files in the application installation package, the terminal may cause great stress on the disk when decompressing the application installation package, especially in the embedded device, where a situation of mispressing is easy to occur, resulting in incomplete or inoperable installed application. In addition, after the application program installation package is decompressed, as the files are more, all the files are checked one by one, which is a very time-consuming and labor-consuming matter.
Therefore, it is necessary to provide a new strategy to solve the technical problem that the number of files is large and the verification of files is difficult when the application program is installed and decompressed.
Disclosure of Invention
The invention mainly aims to provide an application program mirror image packaging and installing method, a computer device and a storage medium, and aims to solve the technical problems that the number of files is large and the file inspection is difficult when the application program is decompressed, so that the installation success rate of the application program can be improved when the application program with multiple files is installed, and the validity and the integrity of the application program mirror image files can be conveniently and rapidly checked.
In order to achieve the above object, a first aspect of the present invention provides an application image packaging method, applied to a server, where the server is connected to a terminal, the method includes:
generating an application program installation package root directory according to the application program installation directory structure;
generating an application program image file according to the application program installation package root directory;
calculating a check value of the application program mirror image file;
and packaging and encrypting the application program image file and the check value to obtain an application program installation package image file.
According to a preferred embodiment of the present invention, after the obtaining the application installation package image file, the method further includes:
and setting an application program mounting identifier according to the content correspondence of the application program.
According to a preferred embodiment of the invention, the method further comprises:
when receiving the installation request of the terminal, issuing the application program installation package image file and the application program installation identifier to the terminal according to the installation request.
According to a preferred embodiment of the present invention, after said issuing said application installation package image file and said application installation identifier to said terminal according to said installation request, said method further comprises:
Receiving an application program installation result notice reported by the terminal;
and when the application program installation result is notified as the application program installation failure information, repackaging and encrypting to obtain the application program installation package image file.
In order to achieve the above object, a second aspect of the present invention provides an application image installation method, applied to a terminal, where the terminal is connected to a server, the method including:
acquiring an application program installation package image file issued by the server;
decrypting the application program installation package image file to obtain an application program image file and a first check value;
calculating a second check value of the application program mirror image file;
judging whether the first check value is the same as the second check value;
when the first check value is the same as the second check value, the application program mirror image file is mounted to an application program installation catalog;
and installing the application program according to the application program image file.
According to a preferred embodiment of the invention, the method further comprises:
acquiring an application program mounting identifier;
the mounting the application image file to the application installation catalog comprises the following steps: setting an application program mounting mode according to the application program mounting identification; and mounting the application image file to an application installation catalog according to the application program mounting mode.
According to a preferred embodiment of the present invention, when the first check value is different from the second check value, the method further comprises:
after a preset time period, acquiring the application program installation package image file issued by the server again; or alternatively
And reporting the application program installation failure notification to the server.
According to a preferred embodiment of the present invention, the calculating the second check value of the application image file includes:
and calculating the MD5 code of the application program image file according to a preset information-abstract algorithm, and determining the MD5 code as the second check value.
In order to achieve the above object, a third aspect of the present invention provides a computer apparatus, including a memory and a processor, where the memory stores a download program for application image packaging or a download program for application image installation that can run on the processor, the application image packaging method is implemented when the download program for application image packaging is executed by the processor, and the application image installation method is implemented when the download program for application image installation is executed by the processor.
In order to achieve the above object, a fourth aspect of the present invention provides a computer-readable storage medium having stored thereon an application image packaged download program executable by one or more processors to implement the application image packaging method or an application image installed download program executable by one or more processors to implement the application image installation method.
According to the application program mirror image packaging and installing method, the computer device and the storage medium, the application program can be installed by acquiring the application program installation package mirror image file and installing the application program installation package mirror image file to the installation catalog, and because the application program installation package mirror image file rather than the application program installation package is downloaded, the process of decompressing the application program installation package by the terminal can be omitted, and the application program installation efficiency is improved; in addition, the integrity of the application program image file is checked through the check value of the application program image file, so that the check of all the decompressed files one by one is quicker and quicker, and the correctness and the integrity of the application program installation package image file are effectively ensured.
Drawings
FIG. 1 is a flowchart of an application image packaging method according to a first embodiment of the present invention;
FIG. 2 is a flowchart illustrating an application image installation method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a third embodiment of an application image packaging apparatus according to the present invention;
FIG. 4 is a schematic diagram of an installation apparatus for installing an application image according to a fourth embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an internal structure of a computer device according to a fifth embodiment of the invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first and second in the description and claims of the present application and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
Example 1
Fig. 1 is a flowchart of an application image packaging method according to a first embodiment of the present invention.
The application program mirror image packaging method is applied to a server and specifically comprises the following steps, the sequence of the steps in the flow chart can be changed according to different requirements, and certain steps can be omitted.
S11, generating an application program installation package root directory according to the application program installation directory structure.
After the application program is developed, the application program developer packages the application program to be an application program installation package so as to provide professional and uniform application program installation experience for the terminal user.
In this embodiment, the application developer may set a timing task through the server, and periodically start the application root directory generation tool to generate the application installation package root directory. Specifically, an application installation package root directory may be generated from an application installation directory structure.
The application installation directory structure may be a tree directory structure.
And S12, generating an application program image file according to the application program installation package root directory.
In this embodiment, an application image file in the format of ext/fat/squarhfs and the like may be generated according to a terminal environment and the root directory of the application installation package.
The image file may be a ghost image file or an ISO image file.
S13, calculating the check value of the application program image file.
After the application program image file is generated, a check value of the generated application program image file is calculated, so that when the subsequent server issues the application program installation package image file to the terminal, the terminal can check whether the application program image file is legal and effective according to the check value.
In this embodiment, a Message-Digest Algorithm (md5 code) may be used to calculate the check value of the application image file. MD5 codes are capable of converting a string of bytes of arbitrary length into a string of hexadecimal digits of a length that allows large amounts of information to be "compressed" into a secure format prior to signing a private key with a digital signature application, any file having an MD5 information value that is unique and that will change if the file is modified.
And S14, packaging and encrypting the application program image file and the check value to obtain an application program installation package image file.
In this embodiment, the application program image file and the check value are packaged together, and then the packaged file is encrypted to obtain the application program installation package image file.
The application installation package image file may be a system image file generated by encrypting the packaged file on a server through an encryption special card, such as a USB-KEY.
In a preferred embodiment, after the obtaining the application installation package image file, the method further comprises:
and setting an application program mounting identifier according to the content correspondence of the application program.
After the application program developer finishes developing the application program, the server can determine whether the files in the application program are allowed to be modified when the terminal runs according to the content of the application program.
If the files in the application program are allowed to be modified when the terminal runs, the application program mounting identifier can be correspondingly set as a first mounting identifier; if the files in the application program are not allowed to be modified in the running process, the application program mounting identifier can be correspondingly set as a second mounting identifier.
The application program mounting identifier is used for indicating a mounting mode of the terminal to mount the application program image file. Specifically, if the application program mounting identifier is a first mounting identifier, the terminal is indicated to be capable of mounting the application program mounting package image file in a first mounting mode; and if the application program mounting identifier is the second mounting identifier, indicating that the terminal can mount the application program mounting package image file in a second mounting mode.
The first mounting identifier may be a read-only identifier, and the corresponding first mounting mode may be a read-only mode; the second mounting identifier may be a read-write identifier, and the corresponding second mounting mode may be a read-write mode.
Preferably, the server sets the application program mounting identifier as a first mounting identifier. The application program mounting identifier is set as a first mounting identifier, so that illegal tampering of the application program can be effectively prevented when the terminal runs the application program, and the running stability of the application program is ensured.
According to a preferred embodiment of the invention, the method further comprises:
when receiving the installation request of the terminal, issuing the application program installation package image file and the application program installation identifier to the terminal according to the installation request.
In this embodiment, if the user needs to install the application program or update the application program, the user may send an installation request to the server through the terminal, and when the server receives the installation request of the terminal, the server may issue the application program installation package image file corresponding to the application program name and the application program installation identifier to the terminal according to the application program name carried in the installation request.
It should be understood that if the server does not set the application program installation identifier according to the content of the application program, the server only needs to issue an application program installation package image file corresponding to the application program name to the terminal when receiving the installation request sent by the terminal.
According to a preferred embodiment of the present invention, after said issuing said application installation package image file and said application installation identifier to said terminal according to said installation request, said method further comprises:
receiving an application program installation result notice reported by the terminal;
and when the application program installation result is notified as the application program installation failure information, repackaging and encrypting to obtain the application program installation package image file.
In this embodiment, after the terminal installs the application according to the application installation package image file, the notification of the installation result of the application may be reported to the server.
If the terminal successfully installs the application program, reporting an application program installation success notification to a server; and if the terminal does not successfully install the application program, reporting an application program installation failure notification to a server.
If the server receives a notice of successful installation of the application program, indicating that the image file of the installation package of the application program is correct, storing the image file of the installation package of the application program and a check value in a correlated mode; if the server receives the application program installation failure notification, which indicates that the obtained application program installation package image file is wrong, the steps S11 to S14 are re-executed so as to repackage and encrypt the obtained application program installation package image file.
In summary, according to the application program mirror image packaging method provided by the invention, an application program installation package root directory is generated according to an application program installation directory structure; then generating an application program image file according to the application program installation package root directory; calculating a check value of the application program mirror image file; and finally, packaging and encrypting the application program image file and the check value together to obtain the application program installation package image file. The application program is packaged into the application program installation package image file, so that the application program installation package image file is conveniently issued to the terminal instead of the application program installation package, the terminal is helped to install the application program according to the application program installation package image file, the application program does not need to be decompressed, the efficiency of installing the application program by the terminal can be improved in an auxiliary mode, and the time for installing the application program by the terminal is saved. In addition, when the application program mirror image file is packaged, the verification values of the application program mirror image file are packaged together, namely the generated application program installation package mirror image file comprises the application program mirror image file verification values, so that the terminal can be assisted in verifying the integrity and the validity of the application program installation package mirror image file.
Example two
Fig. 2 is a flowchart of an application image installation method according to a second embodiment of the present invention.
The application program mirror image installation method is applied to the terminal, and specifically comprises the following steps, the sequence of the steps in the flow chart can be changed according to different requirements, and certain steps can be omitted.
S21, acquiring an application program installation package image file issued by the server.
In this embodiment, when the terminal needs to install or update the application program, an installation request may be sent to the server, and the server is requested to send an application program installation package image file corresponding to the installation request.
And the server responds to the installation request, transmits an application program installation package image file to the terminal, and the terminal receives the application program installation package image file.
S22, decrypting the application program installation package image file to obtain the application program image file and the first check value.
After receiving the application program installation package image file, the terminal can decrypt the application program installation package image file (for example, input a decryption password) according to an encryption and decryption protocol which is negotiated with the server in advance, and after decrypting, the application program image file and the first check value can be obtained.
S23, calculating a second check value of the application program image file.
In this embodiment, a Message-Digest Algorithm (md5 code) may be stored in advance, and the MD5 code of the application image file is calculated according to the preset Message-Digest Algorithm, and the calculated MD5 code is used as the second check value of the application image file.
S24, judging whether the first check value is the same as the second check value.
In this embodiment, the terminal compares the first check value with the second check value, and determines whether the first check value is the same as the second check value, so as to determine whether the application program image file issued by the server is correct.
When the first check value is the same as the second check value, the application program issued by the server is indicated to be correct in frequent files, and S25 is executed; otherwise, when the first check value is different from the second check value, the fact that the files of the application programs issued by the server are wrong is indicated.
And S25, when the first check value is the same as the second check value, the application program mirror image file is mounted to an application program installation catalog.
In this embodiment, if the terminal determines that the first check value is the same as the second check value, the application image file is mounted to the application installation directory.
Mount (mount) refers to a process by which a computer file and directory on a storage device (such as a hard disk, CD-ROM, or shared resource) is made available to a user for access through the computer's file system by the operating system. The terminal directly accesses the application image file through the application installation catalog by mounting the application image file in the application installation catalog without decompression processing.
S26, installing the application program according to the application program image file.
The terminal accesses the application image file in the application program installation catalog, starts the installation process and installs the application program.
After the terminal installs the application program, a notification of successful application program installation can be reported to the server.
In a preferred embodiment, the method further comprises:
acquiring an application program mounting identifier;
the mounting the application image file to the application installation catalog comprises the following steps: setting an application program mounting mode according to the application program mounting identification; and mounting the application image file to an application installation catalog according to the application program mounting mode.
The terminal can acquire the application program mounting identifier while acquiring the application program mounting package image file, and can acquire the application program mounting identifier after or before acquiring the application program mounting package image file.
It should be understood that if the terminal does not acquire the application program mounting identifier, the application program image file may be directly mounted to the application program installation directory; and if the terminal acquires the application program mounting identification, the terminal needs to mount the application program image file according to the set application program mounting mode.
Specifically, when the terminal obtains the application program mounting identifier as the first mounting identifier, the mounting mode is correspondingly set to be the first mounting mode, and the first mounting mode can be a read-only mode, namely, after the application program image file is mounted to the application program mounting catalog, only the file of the application program can be read and the file of the application program can not be modified at all when the application program is operated later. When the terminal obtains the application program mounting identifier as a second mounting identifier, the mounting mode is correspondingly set to be the second mounting mode, and the second mounting mode can be a read-write mode, namely, after the application program image file is mounted to the application program mounting catalog, the file of the application program can be read and modified in the follow-up running of the application program.
Preferably, when the terminal obtains the application program installation identifier as the second installation identifier, and after the application program image file is installed in the application program installation directory, the method further includes:
And backing up the application program image file and storing the application program image file in a read-only mode.
When the terminal detects that the user modifies the file of the application program, the modified file is stored as a read-write mode. Therefore, the application program image file can not be truly modified, and when the application program runs in error, the application program can be reinstalled according to the backed-up application program image file.
In a preferred embodiment, when the first check value is different from the second check value, the method further comprises:
after a preset time period, acquiring the application program installation package image file issued by the server again; or alternatively
And reporting the application program installation failure notification to the server.
In some practical applications, because the signal quality of the communication link may be poor when the terminal and the server communicate, the acquired image file of the application program installation package may be in error, and therefore, when the terminal determines that the first check value is different from the second check value, the terminal may acquire the image file of the application program installation package from the server again at intervals.
In other embodiments, if the terminal determines that the first check value is different from the second check value, the terminal may directly report an application installation failure notification to the server, so as to notify the server that the application installation package image file is in error.
In summary, according to the application program installation method provided by the invention, the application program installation package image file issued by the server is obtained, the application program image file and the first check value are obtained after decryption, the second check value of the application program image file is calculated, when the first check value is the same as the second check value, the application program image file is installed in the application program installation catalog, and finally the application program is installed according to the application program image file. The installation of the application program can be completed by acquiring the image file of the application program installation package and installing the image file to the installation catalog, and the process of decompressing the application program installation package by the terminal can be omitted because the image file of the application program installation package rather than the application program installation package is downloaded, so that the efficiency of installing the application program is improved; in addition, the integrity of the application program image file is checked through the check value of the application program image file, so that the check of all the decompressed files one by one is quicker and quicker, and the correctness and the integrity of the application program installation package image file are effectively ensured.
Example III
Fig. 3 is a schematic functional block diagram of an application image packaging device according to an embodiment of the invention.
In some embodiments, the application image packaging device 30 runs in a terminal. The application image packaging means 30 may comprise a plurality of functional modules consisting of program code segments. Program code of each program segment in the application program image packaging device 30 may be stored in a memory of the terminal and executed by the at least one processor to perform (see fig. 1 for details) image packaging of the application program to obtain an application program installation package image file.
In this embodiment, the application image packaging device 30 may be divided into a plurality of functional modules according to the functions performed by the application image packaging device. The functional module may include: the system comprises a first generating module 301, a second generating module 302, a calculating module 303, a packaging module 304, a setting module 305, a transmitting module 306, a receiving module 307 and a repackaging module 308. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The first generating module 301 is configured to generate an application installation package root directory according to the application installation directory structure.
After the application program is developed, the application program developer packages the application program to be an application program installation package so as to provide professional and uniform application program installation experience for the terminal user.
In this embodiment, the application developer may set a timing task through the server, and periodically start the application root directory generation tool to generate the application installation package root directory. Specifically, an application installation package root directory may be generated from an application installation directory structure.
The application installation directory structure may be a tree directory structure.
A second generating module 302, configured to generate an application image file according to the root directory of the application installation package.
In this embodiment, an application image file in the format of ext/fat/squarhfs and the like may be generated according to a terminal environment and the root directory of the application installation package.
The image file may be a ghost image file or an ISO image file.
And the calculating module 303 is used for calculating the check value of the application program image file.
After the application program image file is generated, a check value of the generated application program image file is calculated, so that when the subsequent server issues the application program installation package image file to the terminal, the terminal can check whether the application program image file is legal and effective according to the check value.
In this embodiment, a Message-Digest Algorithm (md5 code) may be used to calculate the check value of the application image file. MD5 codes are capable of converting a string of bytes of arbitrary length into a string of hexadecimal digits of a length that allows large amounts of information to be "compressed" into a secure format prior to signing a private key with a digital signature application, any file having an MD5 information value that is unique and that will change if the file is modified.
And the packaging module 304 is configured to package and encrypt the application program image file and the check value to obtain an application program installation package image file.
In this embodiment, the application program image file and the check value are packaged together, and then the packaged file is encrypted to obtain the application program installation package image file.
The application installation package image file may be a system image file generated by encrypting the packaged file on a server through an encryption special card, such as a USB-KEY.
And the setting module 305 is configured to correspondingly set an application program installation identifier according to the content of the application program after the application program installation package image file is obtained.
After the application program developer finishes developing the application program, the server can determine whether the files in the application program are allowed to be modified when the terminal runs according to the content of the application program.
If the files in the application program are allowed to be modified when the terminal runs, the application program mounting identifier can be correspondingly set as a first mounting identifier; if the files in the application program are not allowed to be modified in the running process, the application program mounting identifier can be correspondingly set as a second mounting identifier.
The application program mounting identifier is used for indicating a mounting mode of the terminal to mount the application program image file. Specifically, if the application program mounting identifier is a first mounting identifier, the terminal is indicated to be capable of mounting the application program mounting package image file in a first mounting mode; and if the application program mounting identifier is the second mounting identifier, indicating that the terminal can mount the application program mounting package image file in a second mounting mode.
The first mounting identifier may be a read-only identifier, and the corresponding first mounting mode may be a read-only mode; the second mounting identifier may be a read-write identifier, and the corresponding second mounting mode may be a read-write mode.
Preferably, the server sets the application program mounting identifier as a first mounting identifier. The application program mounting identifier is set as a first mounting identifier, so that illegal tampering of the application program can be effectively prevented when the terminal runs the application program, and the running stability of the application program is ensured.
And the issuing module 306 is configured to issue the application installation package image file and the application installation identifier to the terminal according to the installation request when the installation request of the terminal is received.
In this embodiment, if the user needs to install the application program or update the application program, the user may send an installation request to the server through the terminal, and when the server receives the installation request of the terminal, the server may issue the application program installation package image file corresponding to the application program name and the application program installation identifier to the terminal according to the application program name carried in the installation request.
It should be understood that if the server does not set the application program installation identifier according to the content of the application program, the server only needs to issue an application program installation package image file corresponding to the application program name to the terminal when receiving the installation request sent by the terminal.
According to a preferred embodiment of the present invention, after said issuing said application installation package image file and said application installation identifier to said terminal according to said installation request, said apparatus further comprises:
a receiving module 307, configured to receive an application installation result notification reported by the terminal;
and the repackaging module 308 is configured to repackage and encrypt the application installation package image file when the application installation result is notified as the application installation failure information.
In this embodiment, after the terminal installs the application according to the application installation package image file, the notification of the installation result of the application may be reported to the server.
If the terminal successfully installs the application program, reporting an application program installation success notification to a server; and if the terminal does not successfully install the application program, reporting an application program installation failure notification to a server.
If the server receives a notice of successful installation of the application program, indicating that the image file of the installation package of the application program is correct, storing the image file of the installation package of the application program and a check value in a correlated mode; if the server receives the application installation failure notification, which indicates that the obtained application installation package image file is wrong, the server re-executes the first generating module 301 to the packaging module 304, so that the re-packaging module 308 re-packages and encrypts the application installation package image file to obtain the application installation package image file.
In summary, the application program mirror image packaging device provided by the invention firstly generates an application program installation package root directory according to an application program installation directory structure; then generating an application program image file according to the application program installation package root directory; calculating a check value of the application program mirror image file; and finally, packaging and encrypting the application program image file and the check value together to obtain the application program installation package image file. The application program is packaged into the application program installation package image file, so that the application program installation package image file is conveniently issued to the terminal instead of the application program installation package, the terminal is helped to install the application program according to the application program installation package image file, the application program does not need to be decompressed, the efficiency of installing the application program by the terminal can be improved in an auxiliary mode, and the time for installing the application program by the terminal is saved. In addition, when the application program mirror image file is packaged, the verification values of the application program mirror image file are packaged together, namely the generated application program installation package mirror image file comprises the application program mirror image file verification values, so that the terminal can be assisted in verifying the integrity and the validity of the application program installation package mirror image file.
Example IV
Fig. 4 is a schematic functional block diagram of an application mirror image installation device according to an embodiment of the invention.
In some embodiments, the application image installation device 40 runs in a terminal. The application image installation means 40 may comprise a plurality of functional modules consisting of program code segments. Program code for each program segment in the application program mirror image installation device 40 may be stored in a memory of the terminal and executed by the at least one processor to perform (see fig. 2 for details) mirror image installation of the application program.
In this embodiment, the application image installation apparatus 40 may be divided into a plurality of functional modules according to the functions performed by the application image installation apparatus. The functional module may include: the system comprises an acquisition module 401, a decryption module 402, a calculation module 403, a judgment module 404, a mounting module 405, an installation module 406, a backup module 407 and a reporting module 408. The module referred to in the present invention refers to a series of computer program segments capable of being executed by at least one processor and of performing a fixed function, stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
And the obtaining module 401 is configured to obtain an image file of the application program installation package issued by the server.
In this embodiment, when the terminal needs to install or update the application program, an installation request may be sent to the server, and the server is requested to send an application program installation package image file corresponding to the installation request.
And the server responds to the installation request, transmits an application program installation package image file to the terminal, and the terminal receives the application program installation package image file.
And the decryption module 402 is configured to decrypt the application installation package image file to obtain an application image file and a first check value.
After receiving the application program installation package image file, the terminal can decrypt the application program installation package image file (for example, input a decryption password) according to an encryption and decryption protocol which is negotiated with the server in advance, and after decrypting, the application program image file and the first check value can be obtained.
A calculation module 403, configured to calculate a second check value of the application image file.
In this embodiment, a Message-Digest Algorithm (md5 code) may be stored in advance, and the MD5 code of the application image file is calculated according to the preset Message-Digest Algorithm, and the calculated MD5 code is used as the second check value of the application image file.
A determining module 404, configured to determine whether the first check value is the same as the second check value.
In this embodiment, the terminal compares the first check value with the second check value, and determines whether the first check value is the same as the second check value, so as to determine whether the application program image file issued by the server is correct.
And the mounting module 405 is configured to mount the application image file to an application installation directory when the first check value is the same as the second check value.
In this embodiment, the terminal determines that the first check value is the same as the second check value, which indicates that the frequent file of the application program issued by the server is correct, and then mounts the image file of the application program to the application program installation directory.
Mount (mount) refers to a process by which a computer file and directory on a storage device (such as a hard disk, CD-ROM, or shared resource) is made available to a user for access through the computer's file system by the operating system. The terminal directly accesses the application image file through the application installation catalog by mounting the application image file in the application installation catalog without decompression processing.
And the installation module 406 is used for installing the application program according to the application program image file.
The terminal accesses the application image file in the application program installation catalog, starts the installation process and installs the application program.
In a preferred embodiment, the obtaining module 401 is further configured to obtain an application mount identifier.
The mounting module 405 is further configured to set an application mounting mode according to the application mounting identifier; and mounting the application image file to an application installation catalog according to the application program mounting mode.
The terminal can acquire the application program mounting identifier while acquiring the application program mounting package image file, and can acquire the application program mounting identifier after or before acquiring the application program mounting package image file.
It should be understood that if the terminal does not acquire the application program mounting identifier, the application program image file may be directly mounted to the application program installation directory; and if the terminal acquires the application program mounting identification, the terminal needs to mount the application program image file according to the set application program mounting mode.
Specifically, when the terminal obtains the application program mounting identifier as the first mounting identifier, the mounting mode is correspondingly set to be the first mounting mode, and the first mounting mode can be a read-only mode, namely, after the application program image file is mounted to the application program mounting catalog, only the file of the application program can be read and the file of the application program can not be modified at all when the application program is operated later. When the terminal obtains the application program mounting identifier as a second mounting identifier, the mounting mode is correspondingly set to be the second mounting mode, and the second mounting mode can be a read-write mode, namely, after the application program image file is mounted to the application program mounting catalog, the file of the application program can be read and modified in the follow-up running of the application program.
The backup module 407 is configured to backup and store the application image file in a read-only mode when the terminal obtains the application mounting identifier as the second mounting identifier and after the application image file is mounted in the application installation directory.
When the terminal detects that the user modifies the file of the application program, the modified file is stored as a read-write mode. Therefore, the application program image file can not be truly modified, and when the application program runs in error, the application program can be reinstalled according to the backed-up application program image file.
In a preferred embodiment, the obtaining module 401 is further configured to obtain, when the first check value is different from the second check value, the application installation package image file issued by the server again after a preset period of time.
A reporting module 408, configured to report an application program installation success notification to the server when the first check value is the same as the second check value; or the server is used for reporting the application program installation failure notice when the first check value is different from the second check value.
In some practical applications, because the signal quality of the communication link may be poor when the terminal and the server communicate, the acquired image file of the application program installation package may be in error, and therefore, when the terminal determines that the first check value is different from the second check value, the terminal may acquire the image file of the application program installation package from the server again at intervals.
In other embodiments, if the terminal determines that the first check value is different from the second check value, the terminal may directly report an application installation failure notification to the server, so as to notify the server that the application installation package image file is in error.
In summary, according to the application program installation device provided by the invention, the application program installation package image file issued by the server is obtained, the application program image file and the first check value are obtained after decryption, the second check value of the application program image file is calculated, when the first check value is the same as the second check value, the application program image file is installed to the application program installation catalog, and finally the application program is installed according to the application program image file. The installation of the application program can be completed by acquiring the image file of the application program installation package and installing the image file to the installation catalog, and the process of decompressing the application program installation package by the terminal can be omitted because the image file of the application program installation package rather than the application program installation package is downloaded, so that the efficiency of installing the application program is improved; in addition, the integrity of the application program image file is checked through the check value of the application program image file, so that the check of all the decompressed files one by one is quicker and quicker, and the correctness and the integrity of the application program installation package image file are effectively ensured.
Example five
Fig. 5 is a schematic diagram illustrating an internal structure of a computer device according to an embodiment of the invention.
In this embodiment, the computer device 5 may be a fixed terminal or a mobile terminal.
The computer device 5 may include a memory 51, a processor 52, and a bus 53.
The memory 51 includes at least one type of readable storage medium including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 51 may in some embodiments be an internal storage unit of the computer device 5, such as a hard disk of the computer device 5. The memory 51 may in other embodiments also be an external storage device of the computer apparatus 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer apparatus 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the computer apparatus 5. The memory 51 may be used to store not only the application program and various types of data installed in the computer device 5, for example, the code and the like of the application program image packaging device 30 and the respective modules, or the code and the like of the application program image installing device 40 and the respective modules, but also temporarily store data that has been output or is to be output.
Processor 52 may be, in some embodiments, a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for executing program code or processing data stored in memory 51.
The bus 53 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, or the like. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 5, but not only one bus or one type of bus.
Further, the computer device 5 may also comprise a network interface, which may optionally comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the computer device 5 and other terminals.
Optionally, the computer device 5 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying messages processed in the computer device 5 and for displaying a visual user interface.
Fig. 5 shows only the computer device 5 with components 51-53, it being understood by those skilled in the art that the configuration shown in fig. 5 is not limiting of the computer device 5, either as a bus-type configuration or as a star-type configuration, and that the computer device 5 may include fewer or more components than shown, or a combination of certain components, or a different arrangement of components. Other electronic products that may be present in the present invention or may later come into existence, as applicable, are also within the scope of the present invention and are incorporated herein by reference.
In the above embodiments, it may be implemented in whole or in part by an application, hardware, firmware, or any combination thereof. When implemented using an application, 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. 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 one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server, data center, etc. that contains an integration of 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)), etc.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in application program functional units.
The integrated units, if implemented in the form of application functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution that contributes to the prior art, or in the form of an application program product, which is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media in which program codes can be stored.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (7)

1. An application program mirror image packaging method is applied to a server, wherein the server is connected with a terminal, and the method is characterized by comprising the following steps:
Generating an application program installation package root directory according to the application program installation directory structure;
generating an application program image file according to the application program installation package root directory;
setting an application program mounting identifier according to the content correspondence of an application program, wherein the application program mounting identifier is used for determining whether a file of the application program is allowed to be modified when the terminal runs;
calculating a check value of the application program mirror image file;
packaging and encrypting the application program image file and the check value to obtain an application program installation package image file;
when receiving the installation request of the terminal, issuing the application program installation package image file and the application program installation identifier to the terminal according to the installation request, so that the application installation package image file is installed in the terminal in an installation mode corresponding to the application program installation identifier.
2. The method of claim 1, wherein after said issuing said application installation package image file and said application installation identification to said terminal in accordance with said installation request, said method further comprises:
receiving an application program installation result notice reported by the terminal;
And when the application program installation result is notified as the application program installation failure information, repackaging and encrypting to obtain the application program installation package image file.
3. An application program mirror image installation method is applied to a terminal, and the terminal is connected with a server, and is characterized in that the method comprises the following steps:
acquiring an application program installation package image file and an application program installation identifier, which are issued by the server, wherein the application program installation identifier is an identifier which is correspondingly set by the server according to the content of an application program, and the application program installation identifier is used for determining whether the file of the application program is allowed to be modified when the terminal runs;
decrypting the application program installation package image file to obtain an application program image file and a first check value;
calculating a second check value of the application program mirror image file;
judging whether the first check value is the same as the second check value;
when the first check value is the same as the second check value, mounting the application image file to an application installation directory, including: setting an application program mounting mode according to the application program mounting identification, and mounting the application program image file to an application program mounting catalog according to the application program mounting mode;
And installing the application program according to the application program image file.
4. The method of claim 3, wherein when the first check value is not the same as the second check value, the method further comprises:
after a preset time period, acquiring the application program installation package image file issued by the server again; or alternatively
And reporting the application program installation failure notification to the server.
5. The method of claim 3, wherein said calculating a second check value for the application image file comprises:
and calculating the MD5 code of the application program image file according to a preset information-abstract algorithm, and determining the MD5 code as the second check value.
6. A computer apparatus, characterized in that the computer apparatus includes a memory and a processor, the memory storing thereon a download program of an application image package executable on the processor or a download program of an application image installation, the application image package download program implementing the application image package method according to any one of claims 1 to 2 when executed by the processor, the application image installation download program implementing the application image installation method according to any one of claims 3 to 5 when executed by the processor.
7. A computer-readable storage medium, wherein the computer-readable storage medium has stored thereon an application image packaged download program executable by one or more processors to implement the application image packaging method of any of claims 1 to 2 or an application image installed download program executable by one or more processors to implement the application image installation method of any of claims 3 to 5.
CN201910357606.3A 2019-04-29 2019-04-29 Application program mirror image packaging and installing method, computer device and storage medium Active CN110058867B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910357606.3A CN110058867B (en) 2019-04-29 2019-04-29 Application program mirror image packaging and installing method, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910357606.3A CN110058867B (en) 2019-04-29 2019-04-29 Application program mirror image packaging and installing method, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN110058867A CN110058867A (en) 2019-07-26
CN110058867B true CN110058867B (en) 2023-07-18

Family

ID=67321599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910357606.3A Active CN110058867B (en) 2019-04-29 2019-04-29 Application program mirror image packaging and installing method, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN110058867B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110704852B (en) * 2019-09-26 2021-06-08 江苏方天电力技术有限公司 Encryption system for RTOS system program image file
CN113434244B (en) * 2020-03-18 2022-08-30 阿里巴巴集团控股有限公司 Instance creating method, instance creating apparatus, data processing method, data processing system, and storage medium
CN111443925B (en) * 2020-04-15 2024-03-01 北京易点淘网络技术有限公司 Mirror image installation method, primary and secondary servers, system, electronic equipment and storage medium
CN111596932B (en) * 2020-06-22 2021-03-02 腾讯科技(深圳)有限公司 Mirror image file generation method and device and computer readable storage medium
CN112733092B (en) * 2020-12-30 2022-12-23 五八有限公司 Information processing method and device
CN114461271B (en) * 2022-04-12 2022-06-21 梯度云科技(北京)有限公司 Container mirror image packaging method and device capable of saving storage space

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273146A (en) * 2016-04-08 2017-10-20 中兴通讯股份有限公司 Virtual machine upgrade method and device
CN107438102A (en) * 2017-07-31 2017-12-05 国云科技股份有限公司 A kind of cloud platform mirror image manufacturing system and its method
CN107766747A (en) * 2017-10-31 2018-03-06 维沃移动通信有限公司 Method, mobile terminal and the server of verification Application program installation kit integrality

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7711622B2 (en) * 2008-03-05 2010-05-04 Stephen M Marceau Financial statement and transaction image delivery and access system
CN104182257B (en) * 2011-11-22 2017-09-05 华为数字技术(成都)有限公司 The installation method of application software and the erecting device of application software
CN103457919A (en) * 2012-06-04 2013-12-18 中兴通讯股份有限公司 Safety verification method and device for virtual machine mirror images
CN106776347A (en) * 2017-01-24 2017-05-31 郑州云海信息技术有限公司 A kind of virtualization system mirror image mounting test system and method
CN108664313A (en) * 2018-05-18 2018-10-16 广州杰赛科技股份有限公司 The online production method of image file, device, server, system and storage medium
CN109144519B (en) * 2018-08-23 2022-03-22 广州视源电子科技股份有限公司 Generation method and device of upgrade package, computer equipment and storage medium
CN109240717A (en) * 2018-09-18 2019-01-18 郑州云海信息技术有限公司 A kind of installation method and server of virtual image file

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107273146A (en) * 2016-04-08 2017-10-20 中兴通讯股份有限公司 Virtual machine upgrade method and device
CN107438102A (en) * 2017-07-31 2017-12-05 国云科技股份有限公司 A kind of cloud platform mirror image manufacturing system and its method
CN107766747A (en) * 2017-10-31 2018-03-06 维沃移动通信有限公司 Method, mobile terminal and the server of verification Application program installation kit integrality

Also Published As

Publication number Publication date
CN110058867A (en) 2019-07-26

Similar Documents

Publication Publication Date Title
CN110058867B (en) Application program mirror image packaging and installing method, computer device and storage medium
US10127057B2 (en) Method and apparatus for dynamically implementing application function
CN107346252B (en) Application updating method and device
CN109639661B (en) Server certificate updating method, device, equipment and computer readable storage medium
CN104866336B (en) Silent in-vehicle software update
CN106940651B (en) POS terminal software upgrading method and device
CN109862099B (en) Upgrade checking method, device, terminal and system
CN104346167A (en) Method and device for generating application channel package
US11138295B2 (en) Method for securely updating firmware components and docking station using the same
CN111654522B (en) File synchronization method, file synchronization server and storage medium
CN111666564B (en) Application program safe starting method and device, computer equipment and storage medium
CN112970020A (en) Monitoring device components using distributed ledger
CN111694591A (en) Certificate updating method, device, system, server and computer storage medium
CN109814889B (en) Method and apparatus for updating source code base
CN107038353B (en) Software program checking protection method and system
CN111158719A (en) Application software upgrading method and device
CN113434254B (en) Client deployment method, client deployment apparatus, computer device, and storage medium
CN111176685A (en) Upgrading method and device
CN114880011A (en) OTA (over the air) upgrading method and device, electronic equipment and readable storage medium
CN111224826B (en) Configuration updating method, device, system and medium based on distributed system
CN109871715B (en) Access method and device of distributed storage file and storage medium
CN113056739A (en) Verification and installation of file systems into transient, non-persistent storage circuits
CN112866195B (en) Agile data transmission method and device, computer equipment and storage medium
CN111046389A (en) Method for securely updating firmware components and portable computer station for implementation
CN109358875B (en) Ubuntu system-based hardware wallet offline upgrading device and method

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
GR01 Patent grant
GR01 Patent grant