CN108664290B - Application program configuration method and device, electronic equipment and storage medium - Google Patents

Application program configuration method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN108664290B
CN108664290B CN201810477045.6A CN201810477045A CN108664290B CN 108664290 B CN108664290 B CN 108664290B CN 201810477045 A CN201810477045 A CN 201810477045A CN 108664290 B CN108664290 B CN 108664290B
Authority
CN
China
Prior art keywords
application program
application
image file
container
program
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
CN201810477045.6A
Other languages
Chinese (zh)
Other versions
CN108664290A (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201810477045.6A priority Critical patent/CN108664290B/en
Publication of CN108664290A publication Critical patent/CN108664290A/en
Application granted granted Critical
Publication of CN108664290B publication Critical patent/CN108664290B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • 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

Abstract

The invention relates to the technical field of network information, in particular to an application program configuration method, an application program configuration device, electronic equipment and a storage medium, wherein the method comprises the following steps: creating an application container and loading an application program into the application container; packaging the application container loaded with the application program, generating a corresponding image file, and storing the image file; judging whether the application program is needed to be used, and if so, calling an image file corresponding to the application program; and instantiating the called image file to obtain the application program. The invention can effectively save physical resources in the physical machine or the cloud host, and brings convenience to the lateral expansion of the distributed service.

Description

Application program configuration method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network information technology, and in particular, to an application program configuration method, an application program configuration device, an electronic apparatus for executing the application program configuration method, and a computer readable storage medium storing the application program configuration method.
Background
With the rapid development of mobile phone software programs (APP), the number of mobile phone software programs on the market is increasing, so that the number of applications needed on the software platform is correspondingly increasing.
In existing software platforms, all applications are deployed directly on physical machines or cloud hosts; with the increase of the number of mobile phone software programs, the mobile phone software programs occupy a large amount of physical resources in a physical machine or a cloud host, and cause great difficulty for the lateral expansion of distributed services.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks, an object of the present invention is to provide an application configuration method, an apparatus, an electronic device, and a storage medium that reduce the occupation of physical resources of a physical machine or a cloud host.
The aim of the invention is realized by the following technical scheme:
the invention relates to an application program configuration method, which comprises the following steps:
creating an application container and loading an application program into the application container;
packaging the application container loaded with the application program, generating a corresponding image file, and storing the image file;
judging whether the application program is needed to be used, and if so, calling an image file corresponding to the application program;
and instantiating the called image file to obtain the application program.
In the invention, after the image file is stored, the method comprises the following steps:
and deleting the application container loaded with the application program.
In the present invention, the obtaining the application program includes:
and judging whether the application program is used completely, and if so, deleting the application program.
In the present invention, the loading of the application program in the application container includes:
and adding an identification tag corresponding to the application program in the application container according to the name of the application program.
In the present invention, the invoking the image file corresponding to the application program includes:
and identifying the name of the application program to be used, and calling the image file corresponding to the name of the application program according to the identification tag in the image file.
In the present invention, the creating an application container includes:
setting the starting parameters, and creating an application container on the software platform according to the set starting parameters.
In the present invention, loading an application program in the application container includes:
and obtaining address information in the starting parameters of the application container, and loading an application program in the application container according to the address information.
The invention is an application program configuration device, comprising:
the system comprises a container creation module, a storage module and a storage module, wherein the container creation module is used for creating an application container;
the program loading module is connected with the container creation module and is used for loading an application program into the application container;
the image generation module is connected with the program loading module and is used for packaging an application container loaded with the application program to generate a corresponding image file;
the mirror image database is connected with the mirror image generation module and is used for storing the generated mirror image file;
the mirror image calling module is connected with the mirror image database and is used for judging whether the application program needs to be used or not, and if so, the mirror image file corresponding to the application program is called;
and the instantiation module is connected with the mirror image calling module and is used for instantiating the called mirror image file to obtain the application program.
In the present invention, the application program configuration device further includes:
and the file deleting module is respectively connected with the program loading module and the instantiation module and is used for deleting the application container loaded with the application program or deleting the instantiated application program.
The present invention is an electronic device characterized by comprising:
a processor;
and a memory having stored thereon computer readable instructions which, when executed by the processor, implement an application configuration method as described above.
The present invention is a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an application configuration method as described above.
After the application program is placed in the container, the corresponding mirror image file is generated; therefore, the application program does not need to be deployed on the physical machine or the cloud host, and when the application program needs to be used, the image file is instantiated; the method effectively saves physical resources in the physical machine or the cloud host, and brings convenience to the lateral expansion of the distributed service.
Drawings
For ease of illustration, the invention is described in detail by the following preferred embodiments and the accompanying drawings.
FIG. 1 is a schematic workflow diagram of one embodiment of an application configuration method of the present invention;
FIG. 2 is a schematic workflow diagram of another embodiment of the application configuration method of the present invention;
FIG. 3 is a schematic diagram of a logic structure of an embodiment of an application configuration device according to the present invention.
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.
In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the description of the present invention, it should be noted that the terms "mounted," "connected," and "coupled" are to be construed broadly, as well as, for example, fixedly coupled, detachably coupled, or integrally coupled, unless otherwise specifically indicated and defined. Either mechanically or electrically. Can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
An application configuration method of the present invention is described in detail below with reference to fig. 1, which includes:
s101, creating an application container
Creating an application container according to the memory size of the target application program, wherein the memory size of the application container is larger than the size of the target application program; the target application program is an application program which needs to be loaded into an application container; if the memory of the application program A required to be loaded into the application container A at this time is 100M, setting the memory size of the application container A to be larger than 100M;
in this embodiment, the application container may also be created according to a default memory size, where the default memory size is greater than the memory size of most applications; for example, the maximum memory of most application programs on the market is 200M, and the default memory size can be set to be more than 200M, and then an application container is created according to the default memory size each time.
S102, loading application programs
And loading the application program into the application container, and loading the application program into the application container according to the information of the application container.
S103, generating an image file
Packaging the application container loaded with the application program to generate a corresponding mirror image file; the memory of the mirror image file is greatly smaller than the memory of the application program, and all the mirror image files are stored in a mirror image file database; thus, physical resources of a local physical machine or a cloud host are greatly saved.
S104, judging whether application programs need to be used or not
Judging whether the application program needs to be used or not by monitoring a control input signal of a user; if the user clicks the icon of the application a on the software platform, the user determines that the user needs to use the application a.
S105, calling mirror image file
If the application program is needed to be used, calling an image file corresponding to the application program; if the user needs to use the application a, the image file a corresponding to the application a is called.
S106, instantiating an image file
Instantiating the called image file to obtain a temporary application program; the user may operate at the temporary application.
For a better illustration of the present invention, an application configuration method of the present invention is described in detail below with reference to fig. 2, which includes:
s201, creating an application container
Setting the starting parameters, and creating an application container on the software platform according to the set starting parameters. The starting parameters include: memory of the application container, address of the application container, etc.; the memory of the application container can be set according to the memory size of the application program to be loaded; the method comprises the following steps: creating an application container according to the memory size of the target application program, wherein the memory size of the application container is larger than the size of the target application program; the target application program is an application program which needs to be loaded into an application container; if the memory of the application program A required to be loaded into the application container A at this time is 100M, setting the memory size of the application container A to be larger than 100M;
in this embodiment, the application container may also be created according to a default memory size, where the default memory size is greater than the memory size of most applications; for example, the maximum memory of most application programs on the market is 200M, and the default memory size can be set to be more than 200M, and then an application container is created according to the default memory size each time.
S202, loading application programs
And obtaining address information in the starting parameters of the application container, and loading an application program in the application container according to the address information. According to the address information of the application container, the application program is loaded into the application container under the address.
S203, adding identification tags
And adding an identification tag corresponding to the application program in the application container according to the name of the application program. Such as: if the name of the application program loaded in the application container is A, adding a label A in the application container; if the name of the application program loaded in the application container is B, adding a label B in the application container; by adding different labels in the application container, the names of the application programs in the application container are identified, and accurate retrieval of the image files in subsequent steps is facilitated.
S204, generating an image file
Packaging the application container loaded with the application program to generate a corresponding mirror image file; the memory of the mirror image file is greatly smaller than the memory of the application program, and all the mirror image files are stored in a mirror image file database; thus, physical resources of a local physical machine or a cloud host are greatly saved.
S205, deleting application container
After the image file is generated, deleting the application container which is cached in the local physical machine or the cloud host and is loaded with the application program, and only reserving the corresponding image file, wherein the memory size of the image file is smaller than that of the application program, so that the occupation of physical resources of the local physical machine or the cloud host is further reduced.
S206, judging whether application program needs to be used
Judging whether the application program needs to be used or not by monitoring a control input signal of a user; if the user clicks the icon of the application a on the software platform, the user determines that the user needs to use the application a.
S207, calling mirror image file
If the application program is needed to be used, the name of the application program to be used is identified, and an image file corresponding to the name of the application program is called according to the identification tag in the image file; if the user needs to use the application a, the image file a corresponding to the application a is called.
S208, instantiating an image file
Instantiating the called image file to obtain a temporary application program; the user may operate at the temporary application.
S209, judging whether the application program is used up
Judging whether the application program is used completely or not, judging whether the current application program is used completely or not by monitoring the operation state of the application program, and defining the application program as the application program is used completely if the user does not operate the application program within a preset time length.
S210, deleting the application program
And if the temporary application program is used, deleting the temporary application program.
An application configuration device of the present invention will be described in detail with reference to fig. 3, wherein the application configuration device may be: the local physical machine or cloud host specifically comprises:
a container creation module 301, wherein the container creation module 301 is configured to create an application container; the method comprises the following steps: creating an application container according to the memory size of the target application program, wherein the memory size of the application container is larger than the size of the target application program; the target application program is an application program which needs to be loaded into an application container; if the memory of the application program A required to be loaded into the application container A at this time is 100M, setting the memory size of the application container A to be larger than 100M;
in this embodiment, the application container may also be created according to a default memory size, where the default memory size is greater than the memory size of most applications; if the maximum memory of most application programs in the market is 200M, the default memory size can be set to be more than 200M, and then an application container is created according to the default memory size every time;
a program loading module 302, wherein the program loading module 302 is connected with the container creating module 301, and is used for loading an application program into the application container; the method comprises the steps of obtaining address information in starting parameters of an application container, and loading an application program into the application container according to the address information; according to the name of the application program, adding an identification tag corresponding to the application program into the application container;
the image generating module 303 is connected with the program loading module 302, and is used for packaging an application container loaded with the application program to generate a corresponding image file; the memory of the mirror image file is greatly smaller than the memory of the application program, and all the mirror image files are stored in a mirror image file database; thus, the physical resources of the local physical machine or the cloud host are greatly saved;
the mirror image database 304 is connected with the mirror image generating module 303, and is used for storing the generated mirror image file; mirror image database 304 stores mirror image files corresponding to all application programs;
the mirror image calling module 305 is connected with the mirror image database 304, and is used for judging whether the application program needs to be used, and if so, calling a mirror image file corresponding to the application program; the method specifically comprises the following steps: identifying an application program to be used, and calling an image file corresponding to the identified application program; the method comprises the steps of identifying the name of an application program to be used, and calling an image file corresponding to the name of the application program according to an identification tag in the image file;
and the instantiation module 306, where the instantiation module 306 is connected to the image calling module 305, and is configured to instantiate the called image file to obtain the application program.
In the present invention, the application program configuration device further includes:
and the file deleting module 307 is respectively connected with the program loading module 302 and the instantiation module 306, and is used for deleting the application container loaded with the application program or deleting the instantiated application program. The method specifically comprises the following steps: after the mirror image file is generated, deleting the application container which is cached in the local physical machine or the cloud host and is loaded with the application program, and only reserving the corresponding mirror image file, wherein the memory size of the mirror image file is smaller than that of the application program, so that the occupation of physical resources of the local physical machine or the cloud host is further reduced; and deleting the application program after the current application program is used or not. By deleting the application container and the application program respectively in front and back twice, the method ensures that the physical machine or the cloud host only needs to store the image file under most conditions, and effectively reduces the occupation of physical resources of the physical machine or the cloud host.
The modules involved in the present embodiment may be implemented by software or hardware, and the described modules may also be provided in a processor. Wherein the names of the modules do not constitute a limitation of the unit itself in some cases.
The present invention may be an electronic device including:
a processor;
and a memory having stored thereon computer readable instructions which, when executed by the processor, implement an application configuration method as described above.
As another aspect, the present application also provides a computer-readable medium that may be contained in the electronic device described in the above embodiment; or may exist alone without being incorporated into the electronic device. The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the application configuration method as described in the above embodiments.
The present invention may also be a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements an application configuration method as described above. For example, the present embodiment includes a computer program product comprising a computer program loaded on a computer readable medium, the computer program comprising program code for performing the method shown in the above-described method flow.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
In the description of the present specification, reference to the terms "one embodiment," "some embodiments," "illustrative embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (3)

1. An application configuration method, comprising:
setting starting parameters, and creating an application container according to the starting parameters, wherein the starting parameters comprise the memory size and address information of the application container, and the memory size of the application container is adapted to the size of an application program for adjustment;
loading the application program into the application container according to the address information of the application container;
packaging the application container loaded with the application program, adding an identification tag according to the name of the application program, generating a corresponding image file, storing the image file, and deleting the application container loaded with the application program;
judging whether the application program needs to be used or not through monitoring an input signal, and calling an image file corresponding to the name of the application program according to an identification tag in the image file if the application program needs to be used;
instantiating the called image file to obtain the application program;
and judging whether the application program is used completely, and if so, deleting the application program.
2. An electronic device, the electronic device comprising:
a processor;
a memory having stored thereon computer readable instructions which, when executed by the processor, implement the application configuration method of claim 1.
3. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the application configuration method of claim 1.
CN201810477045.6A 2018-05-17 2018-05-17 Application program configuration method and device, electronic equipment and storage medium Active CN108664290B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810477045.6A CN108664290B (en) 2018-05-17 2018-05-17 Application program configuration method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810477045.6A CN108664290B (en) 2018-05-17 2018-05-17 Application program configuration method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108664290A CN108664290A (en) 2018-10-16
CN108664290B true CN108664290B (en) 2024-02-02

Family

ID=63776872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810477045.6A Active CN108664290B (en) 2018-05-17 2018-05-17 Application program configuration method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108664290B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296868B (en) * 2021-07-27 2021-11-23 杭州筋斗腾云科技有限公司 Application platform and application management method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750157A (en) * 2011-04-20 2012-10-24 中兴通讯股份有限公司 Application program loading method and device
CN105511943A (en) * 2015-12-03 2016-04-20 华为技术有限公司 Docker container running method and device
CN105677356A (en) * 2016-01-11 2016-06-15 上海雷腾软件股份有限公司 Operation and maintenance method and device
CN105847045A (en) * 2016-01-04 2016-08-10 中国电子科技网络信息安全有限公司 Application packaging system and management method based on Docker container
CN107515783A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 Application container management-control method and device based on application container cluster tool
CN107766126A (en) * 2017-11-15 2018-03-06 腾讯科技(深圳)有限公司 Construction method, system, device and the storage medium of container mirror image

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10901966B2 (en) * 2016-08-29 2021-01-26 Vmware, Inc. Synchronizing configurations for container hosted applications

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750157A (en) * 2011-04-20 2012-10-24 中兴通讯股份有限公司 Application program loading method and device
CN105511943A (en) * 2015-12-03 2016-04-20 华为技术有限公司 Docker container running method and device
CN105847045A (en) * 2016-01-04 2016-08-10 中国电子科技网络信息安全有限公司 Application packaging system and management method based on Docker container
CN105677356A (en) * 2016-01-11 2016-06-15 上海雷腾软件股份有限公司 Operation and maintenance method and device
CN107515783A (en) * 2016-06-16 2017-12-26 阿里巴巴集团控股有限公司 Application container management-control method and device based on application container cluster tool
CN107766126A (en) * 2017-11-15 2018-03-06 腾讯科技(深圳)有限公司 Construction method, system, device and the storage medium of container mirror image

Also Published As

Publication number Publication date
CN108664290A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
US10924917B2 (en) Profile download method and system, and related device
CN112214329B (en) Memory management method, device, equipment and computer readable storage medium
CN109062563B (en) Method and device for generating page
CN105760199B (en) A kind of application resource loading method and its equipment
CN104461504A (en) Managing method of terminal application program
CN109857508B (en) Method, system, equipment and storage medium for dynamically replacing interface skin
CN104601683A (en) File download management method, mobile terminal and communication system
CN107832148A (en) Performance optimization method and equipment
CN105323309B (en) A kind of method and device of bubble resource supplying
CN113076153A (en) Interface calling method and device
CN108664290B (en) Application program configuration method and device, electronic equipment and storage medium
CN115344315B (en) Skin switching method and device of applet page and electronic equipment
CN111861298A (en) Order canceling method and device
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN109829526B (en) Bar code management method and device and electronic equipment
CN111240850A (en) Function calling method and device, electronic equipment and storage medium
CN110134416A (en) Oftware updating method, device and computer readable storage medium
CN109582487A (en) Method and apparatus for sending information
CN114090083B (en) Visual component configuration method, device, equipment and storage medium
CN108845845B (en) Shortcut key creation method and device, electronic equipment and storage medium
CN109840156B (en) Data caching method and equipment, storage medium and terminal thereof
CN112100553A (en) Webpage configuration method and device, electronic equipment and storage medium
CN110750742B (en) Page optimization method, system, medium and electronic equipment
CN111583351B (en) Picture generation method and device
CN113568708B (en) Platform creation method, device and equipment

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