A multi-version application running method, computing device and storage medium

By compatibly installing different versions of libraries in computing devices and building a virtual operating environment, the problem of multiple versions of applications being unable to run simultaneously is solved, and safe and efficient multi-version application operation is achieved, improving user experience and resource utilization efficiency.

CN114217904BActive Publication Date: 2025-09-23UNIONTECH SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111551937.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2025-09-23
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

The existing technology cannot realize running multiple different versions of application programs at the same time because of the compatibility problem of the version library, which results in only one version of the function library being installed and the corresponding application program being run.

Method used

By compatibly installing different versions of libraries in computing devices and building a virtual operating environment, using virtual environment applications to create a virtual operating environment, different versions of applications can run in isolated spaces, and sandbox technology is used to provide a safe and efficient virtual operating environment.

Benefits of technology

It enables the simultaneous running of multiple versions of applications, improves user experience, reduces the consumption of computing resources, and improves security and operational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114217904B_ABST
    Figure CN114217904B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for running a multi-version application, a computing device, and a storage medium. The computing device includes a first version library, and a first version application runs based on the first version library. The multi-version application running method includes the following steps: compatibly installing a second version library in the computing device; installing the second version application based on the second version library to obtain installation information of the second version application; constructing a virtual environment application based on the installation information; creating a virtual running space through the virtual environment application; and running the second version application based on the second version library in the virtual running space. The present invention isolates the running spaces of different versions of application programs and runs based on different version libraries by compatibly installing different versions of version libraries, constructing a virtual environment application, and then creating a virtual running space through the virtual environment application. The programs are then run based on different version libraries, thereby achieving the simultaneous running of different versions of the same application program.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operating systems, and in particular to a multi-version application running method, computing device, and storage medium. Background Art

[0002] With the development of computer technology, more and more applications have been developed. When using applications, it is sometimes necessary to run multiple versions simultaneously due to differences in compatibility and functionality between the old and new versions. Different versions of applications rely on different libraries, which are the function libraries that the applications rely on to run.

[0003] In the prior art, when a first version of an application needs to be run, the first version of the function library is installed, allowing the first version of the application to run. When a second version of the application needs to be run, the second version of the function library is installed, overwriting the first version of the function library in order for the second version of the application to run properly. This installation method results in only one version of the function library being installed at a time and running the corresponding version of the application, making it impossible to run multiple versions of the application simultaneously.

[0004] To this end, a new method for running multi-version applications is needed. Summary of the Invention

[0005] To this end, the present invention provides a multi-version application running method to try to solve or at least alleviate the above problems.

[0006] According to one aspect of the present invention, a method for running a multi-version application is provided, which is suitable for execution in a computing device, wherein the computing device includes a first version library and runs a first version application based on the first version library. The method includes the steps of: compatibly installing a second version library in the computing device; installing the second version application based on the second version library to obtain installation information of the second version application; constructing a virtual environment application based on the installation information; creating a virtual operating environment through the virtual environment application; and running the second version application based on the second version library in the virtual operating environment.

[0007] Optionally, in the method according to the present invention, compatible installation of the second version library in the computing device includes the steps of: detecting the version library in the computing device; if it is detected that the first version library is included, retaining the first version library and installing the second version library to a different storage path so that the second version library coexists with the first version library.

[0008] Optionally, in the method according to the present invention, the computing device includes an installation package of the second version application, and installing the second version application according to the second version library includes the steps of: loading the application file in the installation package of the second version application; setting the configuration information of the second version application according to the second version library; generating the installation information of the second version application according to the application file, configuration information and the storage path of the second version library to install the second version application.

[0009] Optionally, the method according to the present invention further includes the steps of: constructing a virtual environment application according to the installation information, including the steps of: setting a parsing module according to the installation information, the parsing module obtaining application files, configuration information and version libraries according to the installation information; setting a construction module, the construction module constructing a virtual operating environment according to the storage path of the application files, configuration information and version libraries; and constructing a virtual environment application according to the parsing module and the construction module.

[0010] Optionally, in the method according to the present invention, the computing device also includes a basic operating file suitable for running the first version application or the second version application, and creating a virtual operating environment through the virtual environment application includes the following steps: obtaining application files, configuration information and a second version library according to the installation information of the second version application through the parsing module of the virtual environment application; building a basic operating environment according to the basic operating files through the construction module of the virtual environment application; building a dedicated operating environment according to the application files and configuration information through the construction module; building a compatible operating environment according to the second version library through the construction module; building a virtual operating environment according to the basic operating environment, the dedicated operating environment and the compatible operating environment through the construction module.

[0011] Optionally, in the method according to the present invention, running the second version application according to the second version library in the virtual execution environment includes the step of running the second version application according to the second version library and the application file in the virtual execution environment.

[0012] Optionally, in the method according to the present invention, creating a virtual operating environment by using a virtual environment application further comprises the step of generating and storing construction information of the constructed virtual operating environment.

[0013] Optionally, the method according to the present invention further includes the steps of: when running the second version application again, determining whether the computing device stores construction information of a virtual operating environment for running the second version application; if the construction information of the virtual operating environment for running the second version application is stored, constructing a virtual operating environment according to the construction information of the virtual operating environment so as to run the second version application.

[0014] According to another aspect of the present invention, a computing device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing the multi-version application running method according to the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium storing one or more programs is provided. The one or more programs include instructions that, when executed by a computing device, cause the computing device to execute the multi-version application running method according to the present invention.

[0016] The present invention discloses a method for running a multi-version application, which is suitable for execution in a computing device. The computing device includes a first version library, and runs a first version application based on the first version library, comprising the steps of: first, compatibly installing a second version library in the computing device so that the first version library and the second version library coexist. Subsequently, the second version application is installed according to the second version library, and the installation information of the second version application is obtained. In order to run the second version application at the same time, a virtual environment application is constructed according to the installation information, and then a virtual operating environment is created through the virtual environment application, and the second version application is run according to the second version library in the virtual operating environment. The present invention isolates the running spaces of different versions of application programs by compatibly installing different versions of version libraries, and constructing a virtual environment application, and then creating a virtual operating environment through the virtual environment application, and runs based on different version libraries, thereby realizing the simultaneous running of different versions of the same application program. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein may be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other objects, features, and advantages of the present invention will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout this disclosure, the same reference numerals generally refer to the same parts or elements.

[0018] Figure 1 A schematic diagram illustrating running a multi-version application in a computing device according to an exemplary embodiment of the present invention is shown;

[0019] Figure 2 FIG2 shows a block diagram of a computing device 200 according to an exemplary embodiment of the present invention;

[0020] Figure 3 FIG. 3 is a flow chart showing a method 300 for running a multi-version application according to an exemplary embodiment of the present invention;

[0021] Figure 4 A schematic diagram of a process for installing a second version of an application according to an exemplary embodiment of the present invention is shown;

[0022] Figure 5 A schematic diagram of a process for constructing a virtual operating environment according to an exemplary embodiment of the present invention is shown;

[0023] Figure 6 A schematic diagram of a first version application running environment according to an exemplary embodiment of the present invention is shown;

[0024] Figure 7 A schematic diagram showing a second version application running environment according to an exemplary embodiment of the present invention is shown;

[0025] Figure 8 A schematic diagram showing an execution flow of a virtual execution application executing a second version application according to an exemplary embodiment of the present invention is shown;

[0026] Figure 9 A schematic diagram of a process for running a second version application according to the prior art is shown; and

[0027] Figure 10 A schematic diagram of a process of running a second version application according to an exemplary embodiment of the present invention is shown. DETAILED DESCRIPTION

[0028] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. The same reference numerals generally refer to the same components or elements.

[0029] Figure 1 FIG. 1 shows a schematic diagram of running a multi-version application in a computing device according to an exemplary embodiment of the present invention. Figure 1 As shown, computing device 200 runs an operating system 110, and also runs a first version application 110 based on operating system 110. The present invention does not limit the type of operating system 110. In order to run second version application 140 simultaneously in operating system 110, a virtual environment application 130 is required to build a virtual execution environment, and run second version application 140 in the virtual execution environment. First version application 110 and second version application 140 are different versions of the same application. The present invention does not limit the application types of the first version application and the second version application.

[0030] Figure 2FIG. 2 shows a block diagram of a computing device 200 according to an exemplary embodiment of the present invention. Figure 2 As shown, in a basic configuration 202, computing device 200 typically includes system memory 206 and one or more processors 204. A memory bus 208 may be used for communication between processor 204 and system memory 206.

[0031] Depending on the desired configuration, the processor 204 can be any type of processor, including, but not limited to, a microprocessor (μP), a microcontroller (μC), a digital signal processing unit (DSP), or any combination thereof. The processor 204 can include one or more levels of cache, such as a level 1 cache 210 and a level 2 cache 212, a processor core 214, and registers 216. An example processor core 214 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 218 can be used with the processor 204, or in some implementations, the memory controller 218 can be an internal part of the processor 204.

[0032] Depending on the desired configuration, system memory 206 can be any type of memory, including but not limited to volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. System memory 206 can include an operating system 220, one or more programs 222, and program data 228. In some embodiments, program 222 can be arranged to execute instructions 223 according to method 300 of the present invention on the operating system by one or more processors 204 using program data 228.

[0033] The computing device 200 may also include a storage interface bus 234. The storage interface bus 234 enables communication from storage devices 232 (e.g., removable storage 236 and non-removable storage 238) to the basic configuration 202 via the bus / interface controller 230. At least a portion of the operating system 220, programs 222, and data 224 may be stored on the removable storage 236 and / or the non-removable storage 238 and loaded into the system memory 206 via the storage interface bus 234 when the computing device 200 is powered on or when the program 222 is to be executed, and executed by the one or more processors 204.

[0034] The computing device 200 may also include an interface bus 240 that facilitates communication from various interface devices (e.g., output devices 242, peripheral interfaces 244, and communication devices 246) to the basic configuration 202 via the bus / interface controller 230. Example output devices 242 include a graphics processing unit 248 and an audio processing unit 250. These can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 252. Example peripheral interfaces 244 may include a serial interface controller 254 and a parallel interface controller 256, which can be configured to facilitate communication with external devices such as input devices (e.g., a keyboard, mouse, pen, voice input device, touch input device) or other peripherals (e.g., a printer, scanner, etc.) via one or more I / O ports 258. Example communication devices 246 may include a network controller 260, which can be arranged to communicate with one or more other computing devices 200 via a network communication link via one or more communication ports 264.

[0035] A network communication link can be an example of a communication medium. Communication media can generally be embodied as computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or changes thereto can be performed in a manner that encodes information in the signal. As non-limiting examples, communication media can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium as used herein can include both storage media and communication media.

[0036] In the computing device 200 according to the present invention, the program 222 includes multiple program instructions of the multi-version application running method 300, which can instruct the processor 204 to execute some steps of the multi-version application running method 300 running in the computing device 200 of the present invention, so that each part in the computing device 200 can realize the simultaneous running of multiple versions of applications by executing the multi-version application running method 300 of the present invention.

[0037] The computing device 200 can be implemented as a server, such as a file server, a database server, an application server, etc. These electronic devices can be personal digital assistants (PDAs), wireless network browsing devices, application-specific devices, or hybrid devices that can include any of the above functions. It can be implemented as a personal computer including desktop and notebook computer configurations. In some embodiments, the computing device 200 is configured to execute the multi-version application execution method 300.

[0038] Figure 3 The following is a flow chart illustrating a method 300 for running a multi-version application according to an exemplary embodiment of the present invention. The multi-version application running method 300 is suitable for running on a computing device that includes a first version library and runs a first version application based on the first version library. The first version library is a function library of a specific version based on which the first version application runs. The present invention does not restrict the method for installing the first version library and the first version application. If no other versions of the library or application exist on the computing device, the library and corresponding application can be installed normally.

[0039] First, execute step S310 to compatibly install the second version library in the computing device. Compatible installation means that the installed new version library must coexist with the version library included before the computing device installed the new version library. When the second version library is compatibly installed, the version library in the computing device is detected. If it is detected that the first version library is included, the first version library is the version library included before the computing device installed the second version library. It is necessary to retain the first version library and install the second version library to a different storage path so that the second version library and the first version library can coexist. The second version library and the first version library are stored in different storage paths. The version library includes the first version library, etc. If other versions of the version library are detected, the other versions of the version library are also retained, and the second version library is installed to a different storage path so that the second version library and the other versions of the version library can coexist.

[0040] Subsequently, step S320 is executed to install the second version application according to the second version library, obtaining installation information for the second version application. The computing device also includes an installation package for the second version application. This installation package is pre-built by the developer and is used to install the second version application. Specifically, when installing the second version application, the application files in the installation package are first loaded, and then the configuration information for the second version application is set according to the second version library. The configuration information specifies various configuration items for the application file during execution. The present invention does not limit the types of configuration items, which may include application-specific configurations and user-defined configurations. Setting the configuration information for the second version application according to the second version library facilitates calling functions in the second version library during application execution, completing various configurations of the second version application according to the configuration information, and performing corresponding operations. Next, the second version application installation information is generated based on the application files, the configuration information, and the storage path of the second version library to install the second version application. The installation information includes the application files, the configuration information, and the storage path of the second version library.

[0041] According to one embodiment of the present invention, the second version application is appA_v2, and the second version library it depends on is libqt5.so; the first version application is appA_v1, and the first version library it depends on is libqt4.so. Figure 4 FIG. 1 shows a flow chart of installing a second version of an application according to an exemplary embodiment of the present invention. Figure 4 As shown, when installing the second version library libqt5.so, first check whether the version library is already installed in the computing device; if the version library is not installed in the computing device, the second version library libqt5.so can be installed normally, and the second version application appA_v2 is installed based on the second version library libqt5.so. If the first version library libqt4.so is installed in the computing device, the first version library libqt4.so is retained, and the second version library libqt5.so is installed to a different storage path, so that the second version library libqt5.so and the first version library libqt4.so coexist. Then, the second version application appA_v2 is installed based on the second version library libqt5.so, and the installation information of the second version application appA_v2 is generated and saved.

[0042] Subsequently, step S330 is executed to build a virtual environment application based on the installation information. When building a virtual environment application, a parsing module is first configured based on the installation information. The parsing module obtains application files, configuration information, and a version library based on the installation information. The parsing module parses the installation information to obtain the storage paths of the application files, configuration information, and version library. The application files, configuration information, and version library are then retrieved based on their storage paths.

[0043] When constructing a virtual environment application, a construction module is also provided, and the virtual environment application is constructed based on the parsing module and the construction module. The construction module constructs a virtual operating environment based on the storage path of the application files, configuration information, and version library. It should be noted that the present invention does not limit the types and versions of applications that can be executed by the constructed virtual environment application. The virtual environment application can be used to construct the virtual operating environment required for the operation of a first version application, a second version application, and other versions of applications. It can also construct virtual operating environments required for the operation of multiple versions of other applications.

[0044] When you need to run another version of an application simultaneously, such as the virtual runtime environment required for the third version of the application, you do not need to build the virtual environment application again. You can directly create a virtual runtime environment based on the already built virtual environment application. The third version application, the first version application, and the second version application are all different versions of the same application.

[0045] According to one embodiment of the present invention, when creating a virtual operating environment through the virtual environment application, the virtual environment application also generates and stores build information for the constructed virtual operating environment. When running the second version of the application again, the virtual environment application determines whether the build information for the virtual operating environment for running the second version of the application is stored on the computing device. If the build information for the virtual operating environment for running the second version of the application is stored, the virtual operating environment is constructed based on the build information to run the second version of the application. The build information includes information about the target folder and the files mounted therein.

[0046] The computing device also includes basic operating files suitable for running the first version application or the second version application, and the basic operating files include general libraries, general tools, etc. The basic operating environment required for running the first version application and the second version application is the same.

[0047] According to one embodiment of the present invention, the virtual operating environment can be implemented as a sandbox (Sandboxie, or sandbox), which is an operating environment that restricts the access of applications to system resources. The essence of a sandbox is a virtual system program. The virtual operating environment provided by the sandbox is independent of the applications running therein and will not affect the existing operating system. In the present invention, after the corresponding version of the application is run in the virtual operating environment, the data generated can be stored in a preset storage location in the operating system, and the user can still obtain the running results of the application from the preset storage location to obtain the running data of the application. The user has no perception of the construction of the virtual operating environment and can compatibly open and run multiple different versions of applications, which improves the user experience of using different versions of applications. The present invention does not limit the implementation method of the virtual operating environment.

[0048] In the existing technology, applications can be run using container technology or virtual machines. The sandbox in this invention is different from a container (Docker). Running a corresponding version of an application in a container requires pre-installing various programs required by the container, such as the Docker engine. Furthermore, the container provides external services and a relatively open operating environment, enabling unrestricted data exchange with the outside world, which reduces the security of the application's operation. This invention uses a sandbox to provide a virtual operating environment, making application execution not only simpler but also more secure.

[0049] When running applications using virtual machines, computer resources must be allocated to them. This not only complicates the process of creating virtual machines but also results in significant performance loss. Given limited computer resources, it's impossible to create a large number of virtual machines to run multiple versions of an application. Therefore, the present invention simplifies the process of running applications using virtual machines, significantly reduces computer resource consumption, and achieves high resource efficiency.

[0050] Figure 5FIG. 1 shows a flow chart of constructing a virtual operating environment according to an exemplary embodiment of the present invention. Figure 5 As shown, when the virtual running application builds a virtual running environment, the installation information is parsed by the parsing module to obtain the storage path of the application files, configuration information and version library, and then the application files, configuration information and version library are obtained according to the storage path of the application files, configuration information and version library; a target folder is set, and the target folder is a folder under the file system of the operating system. The target folder is set as the scope of the virtual running environment, and the entire running process of the corresponding version application is carried out under the target folder.

[0051] Then, the basic operating environment is constructed by building modules. Specifically, basic operating files, including general libraries and general tools, are mounted to the target folder, and general environment variables required for the operation of the corresponding version of the application are generated based on the general libraries and general tools. Mounting refers to associating a file to the target folder of the file system, so that the corresponding version of the application can access the file in the target folder. The target folder is the mount point. The mount operation can be implemented through the mount mechanism, and the present invention does not limit the specific implementation method of the mount operation.

[0052] Then, determine whether a dedicated operating environment has been built. When a virtual environment application builds a virtual operating environment for the first time, the dedicated operating environment will be saved to facilitate the subsequent rapid construction of the virtual operating environment. When this is not the first time that a virtual environment application has built a virtual operating environment, if it is determined that there is a saved dedicated operating environment, a compatible operating environment will be directly built. When a virtual environment application builds a virtual operating environment for the first time, a dedicated operating environment needs to be built. Specifically: mount the application files and configuration information to the target folder, and generate the dedicated environment variables required by the corresponding version of the application based on the application files and configuration information.

[0053] Then, a compatible runtime environment is built by building modules. Specifically, the corresponding version library is mounted to the target folder.

[0054] After completing the construction of the basic operating environment, dedicated operating environment and compatible operating environment, a virtual operating environment is constructed based on the basic operating environment, dedicated operating environment and compatible operating environment. Specifically: the target folder is used as the virtual file system of the virtual operating environment so that the corresponding version of the application can use the files and variables and other parameters in the virtual file system to run.

[0055] Subsequently, step S340 is executed to create a virtual operating environment through the virtual environment application. First, the application files, configuration information, and second version library are obtained based on the installation information of the second version application through the parsing module of the virtual environment application. Specifically, the installation information of the second version application is parsed by the parsing module to obtain the storage path of the application files, configuration information, and second version library. Then, the application files, configuration information, and second version library are obtained based on the storage path of the application files, configuration information, and second version library; a target folder is set, which is a folder under the file system of the operating system. The target folder is set as the scope of the virtual operating environment, and the entire operation process of the second version application is carried out under the target folder.

[0056] Then, through the construction module of the virtual environment application, the basic operating environment is built according to the basic operating files; specifically: the basic operating files, including general libraries and general tools, are mounted to the target folder, and the general environment variables required for the operation of the second version of the application are generated based on the general libraries and general tools.

[0057] Then, a dedicated operating environment is built based on the application files and configuration information through the construction module; specifically: the application files and configuration information are mounted to the target folder, and the dedicated environment variables required by the corresponding version of the application are generated based on the application files and configuration information.

[0058] Then, a compatible operating environment is built based on the second version library by building the module; specifically, the second version library is mounted to the target folder.

[0059] Finally, through the construction module, a virtual operating environment is constructed based on the basic operating environment, dedicated operating environment and compatible operating environment. Specifically: the target folder is used as the virtual file system of the virtual operating environment, so that the second version of the application can use the files and variables and other parameters in the virtual file system to run.

[0060] Figure 6 A schematic diagram of a first version application running environment according to an exemplary embodiment of the present invention is shown. Figure 7 A schematic diagram of a second-version application runtime environment according to an exemplary embodiment of the present invention is shown. The first-version application runtime environment and the second-version application runtime environment have the same structure, but the first-version application runtime environment is directly provided by the operating system, while the second-version application runtime environment is a virtual runtime environment created by a virtual runtime application.

[0061] Subsequently, step S350 is executed to run the second version application according to the second version library in the virtual operating environment. Specifically, the second version application is run according to the second version library and application files in the virtual operating environment. When the second version application is run, files and variables are called from the virtual operating environment to achieve normal operation.

[0062] According to an embodiment of the present invention, after creating the virtual operating environment, the virtual environment application saves the virtual operating environment so that when the corresponding version of the application needs to be run later, the saved virtual operating environment is directly started to run the corresponding version of the application.

[0063] Figure 8 FIG. 1 is a schematic diagram showing the operation process of a virtual operation application running a second version application according to an exemplary embodiment of the present invention. Figure 8 As shown, the virtual environment application determines whether there is a saved virtual operating environment. If there is a saved virtual operating environment, it is not the first time to run the second version application, and the second version application is directly run according to the saved virtual operating environment.

[0064] If there is no saved virtual operating environment, the second version of the application is run for the first time and a virtual operating environment is constructed. The steps of constructing the virtual operating environment include: constructing a basic operating environment, constructing a dedicated operating environment, and constructing a compatible operating environment.

[0065] Then determine whether the virtual operating environment is successfully built. If not, exit the execution and the second version application cannot be run normally. If the virtual operating environment is successfully built, switch to the virtual operating environment.

[0066] Then, the second version application is run in the virtual operating environment according to the second version library and the application file, and the virtual operating environment is saved.

[0067] According to one embodiment of the present invention, when a corresponding version of an application needs to be uninstalled, the virtual runtime environment corresponding to the corresponding version of the application is also deleted. For example, when a second version of an application needs to be uninstalled, the virtual runtime environment corresponding to the second version of the application is deleted. Specifically, the files in the target folder are uninstalled from the target folder, and the association between the files in the target folder and the target folder is cancelled.

[0068] Figure 9 FIG. 1 shows a flow chart of running the second version application according to the prior art. Figure 9 As shown, in the prior art, when running the second version of appA_v2, the first version of appA_v1 is overwritten and installed, and the second version of appA_v2 is directly run according to the system default environment. In the prior art, only one version of the application can be run at a time depending on the operating system: either the first version of appA_v1 is running, or the second version of appA_v2 is installed and run.

[0069] Figure 10 FIG. 1 shows a flow chart of running the second version application according to an exemplary embodiment of the present invention. Figure 10As shown, when installing the second version application appA_v2, if it is detected that the first version application appA_v1 has already been installed, the second version application appA_v2 is installed compatibly, so that the second version application appA_v2 and the first version application appA_v1 coexist. Then the second version application appA_v2 is started. When starting the second version application appA_v2, a virtual operating environment is first constructed based on the virtual operating application, and then the second version application appA_v2 is loaded into the virtual operating environment for compatible operation. The present invention can be compatible with and run multiple versions of applications in the above manner, and the present invention does not limit the number of different versions of applications that can be compatible and run.

[0070] The present invention discloses a method for running a multi-version application, which is suitable for execution in a computing device. The computing device includes a first version library, and runs a first version application based on the first version library, comprising the steps of: first, compatibly installing a second version library in the computing device so that the first version library and the second version library coexist. Subsequently, the second version application is installed according to the second version library, and the installation information of the second version application is obtained. In order to run the second version application at the same time, a virtual environment application is constructed according to the installation information, and then a virtual operating environment is created through the virtual environment application, and the second version application is run according to the second version library in the virtual operating environment. The present invention isolates the running spaces of different versions of application programs by compatibly installing different versions of version libraries, and constructing a virtual environment application, and then creating a virtual operating environment through the virtual environment application, and runs based on different version libraries, thereby realizing the simultaneous running of different versions of the same application program.

[0071] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0072] Similarly, it should be understood that in order to streamline the disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or description thereof.

[0073] Those skilled in the art will appreciate that the modules, units, or groups of devices in the examples disclosed herein may be arranged in the device described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the aforementioned examples may be combined into one module or further divided into multiple submodules.

[0074] Those skilled in the art will appreciate that the modules in the devices of the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or groups in the embodiments may be combined into one module or unit or group, and furthermore they may be divided into a plurality of submodules or subunits or subgroups. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0075] Furthermore, those skilled in the art will appreciate that although some embodiments described herein include certain features and not other features included in other embodiments, the combination of features from different embodiments is intended to be within the scope of the invention and to form different embodiments.

[0076] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions described. Thus, a processor having the necessary instructions for implementing the method or method element forms a device for implementing the method or method element. Furthermore, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.

[0077] The various techniques described herein may be implemented in conjunction with hardware or software, or a combination thereof. Thus, the methods and apparatus of the present invention, or certain aspects or portions of the methods and apparatus of the present invention, may take the form of program code (i.e., instructions) embedded in a tangible medium, such as a floppy disk, CD-ROM, hard drive, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes an apparatus for practicing the present invention.

[0078] When program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the shortcut key implementation method of the present invention according to the instructions in the program code stored in the memory.

[0079] By way of example and not limitation, computer-readable media include computer storage media and communication media. Computer-readable media include computer storage media and communication media. Computer storage media stores information such as computer-readable instructions, data structures, program modules, or other data. Communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and includes any information delivery media. Combinations of any of the above are also included within the scope of computer-readable media.

[0080] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved and are not intended to imply that the objects so described must have a given order in time, space, ranking, or in any other manner.

[0081] Although the present invention has been described with respect to a limited number of embodiments, those skilled in the art, having the benefit of the foregoing description, will appreciate that other embodiments are contemplated within the scope of the invention thus described. Furthermore, it should be noted that the language used in this specification has been selected primarily for readability and instructional purposes, rather than for the purpose of explaining or limiting the subject matter of the present invention. Consequently, numerous modifications and variations will be apparent to those skilled in the art. The disclosure of the present invention is intended to be illustrative, not restrictive, of the scope of the invention.

Claims

1. A method for running a multi-version application, suitable for execution in a computing device, wherein the computing device includes a first version library and runs a first version application based on the first version library, the method comprising the steps of: Compatibly installing a second version library in the computing device; Installing the second version application according to the second version library, and obtaining installation information of the second version application; Building a virtual environment application according to the installation information; Creating a virtual operating environment by using the virtual environment application; Running the second version application according to the second version library in the virtual execution environment; The computing device also includes a basic operating file suitable for running the first version application or the second version application, and the creating of a virtual operating environment by using the virtual environment application includes the steps of: Obtaining application files, configuration information, and a second version library according to the installation information of the second version application through the parsing module of the virtual environment application; Setting a target folder by the parsing module, and setting the target folder as the scope of the virtual operating environment; Building a basic operating environment based on the basic operating files using the construction module of the virtual environment application, including: mounting the basic operating files, including the general library and the general tools, to a target folder, and generating general environment variables required for running the second version of the application based on the general library and the general tools; Building a dedicated operating environment according to the application files and configuration information through the construction module, including: mounting the application files and configuration information to a target folder, and generating dedicated environment variables required by the corresponding version of the application according to the application files and configuration information; Building a compatible operating environment according to the second version library through the building module includes: mounting the second version library to a target folder; By means of the construction module, a virtual operating environment is constructed according to the basic operating environment, the dedicated operating environment and the compatible operating environment, including: using the target folder as a virtual file system of the virtual operating environment.

2. The method according to claim 1, wherein The step of compatibly installing the second version library in the computing device comprises the following steps: Detecting the version library in the computing device; If it is detected that the first version library is included, the first version library is retained and the second version library is installed to a different storage path so that the second version library coexists with the first version library.

3. The method according to claim 2, wherein: The computing device includes an installation package of the second version application, and the installing the second version application according to the second version library includes the following steps: Loading the application file in the installation package of the second version application; Setting configuration information of the second version application according to the second version library; The second version application is installed by generating installation information of the second version application according to the application file, the configuration information and the storage path of the second version library.

4. The method according to claim 3, wherein: The step of constructing a virtual environment application according to the installation information includes the following steps: Setting a parsing module according to the installation information, wherein the parsing module obtains the application file, configuration information and version library according to the installation information; Setting a construction module, wherein the construction module constructs a virtual operating environment according to the storage path of the application file, configuration information and version library; A virtual environment application is constructed according to the parsing module and the construction module.

5. The method according to claim 1, wherein Running the second version application according to the second version library in the virtual operating environment includes the following steps: The second version application is run in the virtual execution environment according to the second version library and the application file.

6. The method according to claim 5, wherein: The step of creating a virtual operating environment by using the virtual environment application further comprises the following steps: Generate and store the construction information of the constructed virtual operating environment.

7. The method according to claim 6, wherein: The method further comprises the steps of: When the second version application is run again, determining whether construction information of a virtual runtime environment for running the second version application is stored in the computing device; If construction information of a virtual operating environment for running the second version application is stored, a virtual operating environment is constructed according to the construction information of the virtual operating environment to run the second version application.

8. A computing device comprising: one or more processors; Memory; as well as One or more devices comprising instructions for performing the method according to any one of claims 1-7.

9. A computer-readable storage medium storing one or more programs, the one or more programs comprising instructions which, when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Application program control method, electronic equipment and server

    CN111124753A

  • Linux general software adaptation method and system based on container and stacked file system

    CN112486512A