WO2020224410A1 - 应用版本切换方法及装置、电子设备、存储介质 - Google Patents

应用版本切换方法及装置、电子设备、存储介质 Download PDF

Info

Publication number
WO2020224410A1
WO2020224410A1 PCT/CN2020/085108 CN2020085108W WO2020224410A1 WO 2020224410 A1 WO2020224410 A1 WO 2020224410A1 CN 2020085108 W CN2020085108 W CN 2020085108W WO 2020224410 A1 WO2020224410 A1 WO 2020224410A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
link file
version
storage path
file
Prior art date
Application number
PCT/CN2020/085108
Other languages
English (en)
French (fr)
Inventor
樊林
Original Assignee
京东方科技集团股份有限公司
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 京东方科技集团股份有限公司 filed Critical 京东方科技集团股份有限公司
Priority to US17/040,786 priority Critical patent/US11375002B2/en
Publication of WO2020224410A1 publication Critical patent/WO2020224410A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Definitions

  • the present disclosure relates to an application version switching method and device, electronic equipment, and storage medium.
  • the server file system has a huge input/output (I/O) pressure and is unable to perform a large number of file operations. How to quickly roll back the application system version has become a prominent problem in the prior art one.
  • an application version switching method including:
  • the storage path of the target switch version application exists, delete the first link file, and create a second link file for the target switch version application, and the second link file points to the storage path of the target switch version application.
  • At least one of the first link file and the second link file is a soft link file.
  • the application version switching method further includes:
  • the storage path of each version of the application is created by the application name plus the version identifier.
  • the application version switching method further includes:
  • the application version switching method further includes:
  • the application version switching method further includes:
  • a corresponding relationship between the configuration file and a relative path is established, and the relative path is a storage path of the first link file or the second link file.
  • the storage path of the log generated by the application is the relative path.
  • Some embodiments of the present disclosure provide an application version switching device, including:
  • the application path creation circuit is configured to create storage paths for at least 2 versions of applications
  • the instruction acquisition circuit is configured to acquire an application version switching instruction
  • the link file creation circuit is configured to create a first link file for the currently used version of the application, where the first link file points to the storage path of the currently used version of the application; and, if the storage path of the target switch version application exists, delete The first link file creates a second link file for the target switch version application, and the second link file points to the storage path of the target switch version application.
  • At least one of the first link file and the second link file is a soft link file.
  • the application path creation circuit is configured to separately create the storage path of each version of the application by adding the application name and the version identifier.
  • the link file creation circuit is configured to name the first link file or the second link file with the application name; the first link file or the second link
  • the name of the file is the storage path of the first link file or the second link file.
  • the application version switching device further includes a file storage circuit configured to correspondingly store the runnable programs and running programs related to the application under the storage path of each version of the application. Describe the configuration files required by the application.
  • the application version switching device further includes a path correspondence relationship establishment circuit configured to establish the correspondence relationship between the configuration file and the relative path during the development of the application, and the relative path The path is the storage path of the first link file or the second link file.
  • the storage path of the log generated by the application is the relative path.
  • Some embodiments of the present disclosure provide an electronic device, including:
  • At least one processor and,
  • a memory communicatively connected with the at least one processor; wherein,
  • the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute:
  • the storage path of the target switch version application exists, delete the first link file, and create a second link file for the target switch version application, and the second link file points to the storage path of the target switch version application.
  • Some embodiments of the present disclosure provide a computer-readable storage medium storing a computer program, where the computer program is implemented when executed by a processor:
  • the storage path of the target switch version application exists, delete the first link file, and create a second link file for the target switch version application, and the second link file points to the storage path of the target switch version application.
  • FIG. 1 is a schematic flowchart of an application version switching method provided by an embodiment of the disclosure
  • FIG. 2A is a schematic diagram of the link file pointing in an embodiment of the disclosure.
  • 2B is another schematic diagram of the link file pointing in the embodiment of the disclosure.
  • 2C is another schematic diagram of the link file pointing in the embodiment of the disclosure.
  • FIG. 3 is a schematic structural diagram of an application version switching apparatus provided by an embodiment of the disclosure.
  • FIG. 4 is a schematic structural diagram of an apparatus for implementing the application version switching method provided by an embodiment of the disclosure.
  • One of the objectives of the embodiments of the present disclosure is to provide an application version switching method and device, electronic equipment, and storage medium, which can solve the efficiency problem of application version switching to a certain extent.
  • the application version switching method and device, electronic equipment, and storage medium provided by the embodiments of the present disclosure create a storage path for each version of the application, and only need to create a new link file to point to the storage path of the target switching version application when switching versions , You can quickly switch the application version, even when the server is in a high concurrency state and the I/O pressure is huge, you can also perform a fast millisecond-level application version rollback; it is not limited by the rollback frequency and time point, and can be arbitrarily Go back to any version at any time and do it multiple times.
  • Some embodiments of the present disclosure propose an application version switching method, which can solve the efficiency problem of application version switching to a certain extent.
  • the application version switching method includes:
  • Step 11 Create storage paths for at least 2 versions of the application.
  • a storage path needs to be created for each version of the application.
  • the two versions of the application are version 1.0 and 2.0 respectively, where version 2.0 is the newer version.
  • storage paths are created for the two versions of the application, respectively, for storing the relevant files of the corresponding version of the application.
  • the application version switching method further includes: separately creating a storage path for each version of the application by adding the version identifier to the application name, for example, application name. version number, assuming the application name is ABC, the storage paths of the aforementioned two versions of the application are ABC.1.0 and ABC.2.0 respectively.
  • a storage path creation method can facilitate path identification when switching versions.
  • Step 12 Create a first link file for the currently used version of the application, where the first link file points to the storage path of the currently used version of the application.
  • the storage path pointed to by the first link file is ABC.2.0.
  • the currently used version of the application accesses ABC.2.0 by accessing the first link file.
  • Step 13 Obtain an application version switching instruction.
  • the application version switching instruction here may be to switch the new version to the old version, or to switch the old version to the new version.
  • the new and old here are relative and can be determined according to the launch time of different versions.
  • Step 14 If the storage path of the target switching version application exists, it means that a storage path has been created for the target switching version application and related files required by the target switching version application are stored in the storage path, so delete the first A link file is used to create a second link file for the target switch version application, and the second link file points to a storage path of the target switch version application.
  • the target switching version application is version 1.0 of the ABC application
  • the storage path pointed to by the second link file is ABC.1.0.
  • the target switch version application accesses ABC.1.0 by accessing the second link file when working.
  • the application version switching method further includes: naming the first link file or the second link file with the application name; the first link file or the second link The name of the file is the storage path of the first link file or the second link file. In this way, naming the first link file or the second link file with the application name facilitates the calling of related files of the application.
  • each link file has only one point, which corresponds to the storage path of the currently used version of the application. If you need to switch the version, you need to delete the original link file and then create a new link file, and add the new link file. The point of the link file is modified to the storage path of the target switching version application. In this way, when the application is subsequently used, by accessing the new link file (its actual storage path and name have not changed, only the content (that is, pointing) is changed to the target The storage path of the switched version application) can become the storage path of the access target switched version application instead of the storage path of the previous version application.
  • the method further includes step 15: if the storage path of the target switched version application does not exist, it means that the target switched version application does not exist, and the process ends.
  • the application version switching method creates a storage path for each version of the application, and only needs to create a new link file to point to the storage path of the target switched version application when switching versions. , You can quickly switch the application version, even when the server is in a high concurrency state and the I/O pressure is huge, you can also perform a fast millisecond-level application version rollback; it is not limited by the rollback frequency and time point, and can be arbitrarily Go back to any version at any time and do it multiple times.
  • At least one of the first link file and the second link file is a soft link file, which can be created using the ln-s command.
  • Symbolic Link also known as symbolic link
  • this file contains the path name of another file. This path name can be any file or directory, and can link files of different file systems.
  • the soft link file is just a mark of its source file. When the source file is deleted, the soft link file cannot exist independently. Although the file name of the soft link file is still retained, the content of the soft link file cannot be viewed. Because of the aforementioned characteristics of the soft link file, the soft link file is used to realize the application version pointing. In this way, the establishment of the soft link method can support the daily operation of the application, and at the same time, the application version switch can be completed by changing the pointing path of the soft link file. So as to achieve the effect of quickly switching the application version.
  • the establishment of the link file can also be performed in a hard link manner.
  • the advantage is: from the point of view of the process, the rollback of any version can also be achieved, and the interface is relatively clean; the disadvantage is: the hard link method requires the use of disk I/O, so in the state of high concurrency and high system I/O, it cannot Achieve a quick fallback.
  • Figure 2A shows the storage path corresponding to the version of the application that the link file currently points to.
  • the latest version of the application is online, and the version of the application needs to be switched to the latest version. Therefore, the original link file is deleted, and a new link file is recreated, and the new link file points to the actual path of the latest version, as shown in FIG. 2B.
  • the file system here can refer to the file system of the Unix/Linux operating system; the confirmation here can be to use the system file system commands such as cd, ll, etc. to operate, and then look at the content returned by the system to complete the confirmation.
  • the application version switching method further includes:
  • the organization of applications and configuration files is designed when the application system is deployed, and the preparatory steps required to implement fast switching during the coding and deployment of the application are designed.
  • the application version switching method further includes:
  • a corresponding relationship between the configuration file and a relative path is established, and the relative path is a storage path of the first link file or the second link file.
  • the relative path is used to reference the configuration file, which can ensure that during the application program running process, no matter the application is deployed in any directory, the configuration file required by the application can be correctly requested.
  • the storage path of the log generated by the application is the relative path.
  • the path of the log generated during the running of the application is configured to be the relative path represented by the link file, which ensures that the log data generated by the running of the application is output to the directory of the currently used version of the application.
  • the application version switching method is applied to a Unix/Linux system file system, and specifically, is used for the Unix/Linux operating system to control the entry of a file directory.
  • the application version switching method provided by the embodiments of the present disclosure designs the organization of application programs and configuration files during application system deployment, and designs the preparation steps required to achieve rapid switching during application coding and deployment. Under the premise of fast version switching, use the method of changing the absolute path pointed to by the linked file to achieve the effect of fast switching the application system.
  • the application version switching method aims at the problem of how to quickly roll back the application system version due to the huge I/O pressure of the server file system during the operation of the actual application system and the inability to perform a large number of file operations.
  • the method of system deployment, the application system deployed according to this method even when the server is in a high concurrency state and the I/O pressure is huge, it can also perform a fast millisecond level application version rollback.
  • the application version switching method provided by the embodiment of the present disclosure can realize the millisecond rollback of the application system; it is not limited by the rollback frequency and time point, and can be rolled back to any version at any time, and it is performed multiple times; it is not subject to computer I/O
  • the current state of the system is limited, even in a high concurrency, high I/O state, a fast application version rollback can be performed.
  • Some embodiments of the present disclosure propose an application version switching device, which can solve the efficiency problem of application version switching to a certain extent.
  • the application version switching device includes:
  • the application path creation circuit 21 is configured to create storage paths of at least 2 versions of applications
  • the instruction acquisition circuit 22 is configured to acquire an application version switching instruction
  • the link file creation circuit 23 is configured to create a first link file for the currently used version of the application, where the first link file points to the storage path of the currently used version of the application; and, if the storage path of the target switch version application exists, The first link file is deleted, and a second link file is created for the target switch version application, and the second link file points to the storage path of the target switch version application.
  • the application version switching device provided by the embodiment of the present disclosure creates a storage path for each version of the application, and only needs to create a new link file to point to the storage path of the target switched version application when switching versions. , You can quickly switch the application version, even when the server is in a high concurrency state and the I/O pressure is huge, you can also perform a fast millisecond-level application version rollback; it is not limited by the rollback frequency and time point, and can be arbitrarily Go back to any version at any time and do it multiple times.
  • At least one of the first link file and the second link file is a soft link file.
  • the application path creation circuit 21 is configured to separately create a storage path for each version of the application by adding the application name and the version identifier.
  • the link file creation circuit 23 is configured to name the first link file or the second link file with the application name; the first link file or the second link file The name of the link file is the storage path of the first link file or the second link file.
  • the application version switching device further includes a file storage circuit 24, which is configured to correspondingly store the executable programs and running programs related to the application under the storage path of each version of the application.
  • the configuration file required by the application is configured to correspondingly store the executable programs and running programs related to the application under the storage path of each version of the application.
  • the application version switching device further includes a path correspondence relationship establishment circuit 25 configured to establish the correspondence relationship between the configuration file and the relative path during the development of the application.
  • the relative path is the storage path of the first link file or the second link file.
  • the storage path of the log generated by the application is the relative path.
  • FIG. 4 it is a schematic diagram of the hardware structure of an embodiment of the apparatus for executing the application version switching method provided by the present disclosure.
  • the device includes:
  • One or more processors 31 and memory 32 are taken as an example.
  • the device for executing the application version switching method may further include: an input device 33 and an output device 34.
  • the processor 31, the memory 32, the input device 33, and the output device 34 may be connected by a bus or in other ways.
  • a bus connection is taken as an example.
  • the memory 32 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, as the application version switching method in the embodiment of the present application corresponds to Program instructions/modules (for example, the application path creation circuit 21, the instruction acquisition circuit 22, and the link file creation circuit 23 shown in FIG. 3).
  • the processor 31 executes various functional applications and data processing of the server by running non-volatile software programs, instructions, and modules stored in the memory 32, that is, implements the application version switching method of the foregoing method embodiment.
  • the memory 32 may include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the application version switching device.
  • the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 32 may optionally include a memory remotely provided with respect to the processor 31, and these remote memories may be connected to the member user behavior monitoring device via a network. Examples of the aforementioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 33 can receive inputted number or character information, and generate key signal inputs related to user settings and function control of the application version switching device.
  • the output device 34 may include a display device such as a display screen.
  • the one or more modules are stored in the memory 32, and when executed by the one or more processors 31, the application version switching method in any of the foregoing method embodiments is executed.
  • the technical effect of the embodiment of the apparatus for executing the application version switching method is the same as or similar to any of the foregoing method embodiments.
  • the embodiment of the present application provides a non-transitory computer storage medium, the computer storage medium stores computer-executable instructions, and the computer-executable instructions can execute the processing method in any of the foregoing method embodiments.
  • the technical effect of the embodiment of the non-transitory computer storage medium is the same as or similar to any of the foregoing method embodiments.
  • the programs can be stored in a computer readable storage.
  • the medium when the program is executed, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
  • the embodiment of the computer program has the same or similar technical effect as any of the foregoing method embodiments.
  • the devices, devices, etc. described in the present disclosure may be various electronic terminal devices, such as mobile phones, personal digital assistants (PDA), tablet computers (PAD), smart TVs, etc., or large-scale terminal devices, such as Servers, etc., therefore, the protection scope of the present disclosure should not be limited to a specific type of device or equipment.
  • the client described in the present disclosure may be applied to any of the above electronic terminal devices in the form of electronic hardware, computer software or a combination of both.
  • the method according to the present disclosure may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium.
  • the computer program executes the above-mentioned functions defined in the method of the present disclosure.
  • the above method steps and system units can also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
  • non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory Memory.
  • Volatile memory can include random access memory (RAM), which can act as external cache memory.
  • RAM can be obtained in various forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous link DRAM (SLDRAM) and direct RambusRAM (DRRAM).
  • DRAM synchronous RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM Synchronous link DRAM
  • DRRAM direct Rambus RAM
  • the storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
  • DSP digital signal processors
  • ASIC dedicated Integrated circuit
  • FPGA field programmable gate array
  • a general-purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine.
  • the processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration.
  • the steps of the method or algorithm described in combination with the disclosure herein may be directly included in hardware, a software module executed by a processor, or a combination of the two.
  • the software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to the processor such that the processor can read information from or write information to the storage medium.
  • the storage medium may be integrated with the processor.
  • the processor and the storage medium may reside in the ASIC.
  • the ASIC can reside in the user terminal.
  • the processor and the storage medium may reside as discrete components in the user terminal.
  • the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions can be stored as one or more instructions or codes on a computer-readable medium or transmitted through the computer-readable medium.
  • Computer-readable media include computer storage media and communication media, including any media that facilitates the transfer of a computer program from one location to another.
  • a storage medium may be any available medium that can be accessed by a general-purpose or special-purpose computer.
  • the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or may be used for carrying or storing instructions in the form of Or any other medium that can be accessed by a general-purpose or special-purpose computer or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium.
  • coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave to send software from a website, server, or other remote source
  • coaxial cable Cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are all included in the definition of media.
  • magnetic disks and optical disks include compact disks (CDs), laser disks, optical disks, digital versatile disks (DVD), floppy disks, and Blu-ray disks. Disks generally reproduce data magnetically, while optical disks use lasers to optically reproduce data .
  • the combination of the above content should also be included in the scope of computer-readable media.

Abstract

本公开涉及一种应用版本切换方法,包括:创建至少2个版本的应用的存储路径;为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;获取应用版本切换指令;若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。本公开还涉及一种应用版本切换装置、电子设备及存储介质。

Description

应用版本切换方法及装置、电子设备、存储介质
交叉引用
本公开要求于2019年5月9日提交的中国专利申请第201910384935.7号的优先权,其全部内容通过引用合并于此。
技术领域
本公开涉及一种应用版本切换方法及装置、电子设备、存储介质。
背景技术
在现有技术的实际应用系统运行过程中,服务器文件系统输入/输出(I/O)压力巨大,无力做大量文件操作,如何快速的进行应用系统版本回退则成为了现有技术的突出问题之一。
发明内容
基于上述目的,本公开的一些实施例,提供了一种应用版本切换方法,包括:
创建至少2个版本的应用的存储路径;
为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;
获取应用版本切换指令;
若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
根据本公开的一些实施例,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
本公开的一些实施例,提供了一种应用版本切换装置,包括:
应用路径创建电路,被配置成创建至少2个版本的应用的存储路径;
指令获取电路,被配置成获取应用版本切换指令;
链接文件创建电路,被配置成为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;以及,若目标切换版本应用的存储路径存在,删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
根据本公开的一些实施例,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件。
根据本公开的一些实施例,所述应用路径创建电路,被配置成以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径。
根据本公开的一些实施例,所述链接文件创建电路,被配置成以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,所述应用版本切换装置,还包括文件存储电路,被配置成在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
根据本公开的一些实施例,所述应用版本切换装置,还包括路径对应关系建立电路,被配置成在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
本公开的一些实施例,提供了一种电子设备,包括:
至少一个处理器;以及,
与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行:
创建至少2个版本的应用的存储路径;
为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;
获取应用版本切换指令;
若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
本公开的一些实施例,提供了一种存储有计算机程序的计算机可读存储介质,其中,所述计算机程序在由处理器执行时实现:
创建至少2个版本的应用的存储路径;
为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版 本的应用的存储路径;
获取应用版本切换指令;
若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
附图说明
为了更清楚地说明本公开实施例的技术方案,下面将对实施例的附图作简单地介绍,明显地,下面描述中的附图仅仅涉及本公开的一些实施例,而非对本公开的限制。
图1为本公开实施例提供的应用版本切换方法的流程示意图;
图2A为本公开实施例中链接文件指向的一种示意图;
图2B为本公开实施例中链接文件指向的另一种示意图;
图2C为本公开实施例中链接文件指向的又一种示意图;
图3为本公开实施例提供的应用版本切换装置的结构示意图;
图4为本公开实施例提供的实现所述应用版本切换方法的装置的结构示意图。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例的附图,对本公开实施例的技术方案进行清楚、完整地描述。显然,所描述的实施例是本公开的一部分实施例,而不是全部的实施例。基于所描述的本公开的实施例,本领域普通技术人员在无需创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。
除非另外定义,本公开使用的技术术语或者科学术语应当为本公开所属领域内具有一般技能的人士所理解的通常意义。本公开中使用的“第一”、“第二”以及类似的词语并不表示任何顺序、数量或者重要性,而只是用来区分不同的组成部分。同样,“一个”、“一”或者“该”等类似词语也不表示数量限制,而是表示存在至少一个。“包括”或者“包含”等类似的词语意指出现该词前面的元件或者物件涵盖出现在该词后面列举的元件或者物件及其等同,而不排除其他元件或者物件。“连接”或者“相连”等类似的词语并非限定于物理的或者机械的连接,而是可以包括电性的连接,不管是直接的还是间接的。“上”、“下”、“左”、“右”等仅用于表示相对位置关系,当被描述对象的绝对位置改变后,则该相对位置关系也可能相应地改变。
本公开实施例的目的之一在于,提出一种应用版本切换方法及装置、电子设备、存储介质,能够在一定程度上解决应用版本切换的效率问题。
本公开实施例提供的应用版本切换方法及装置、电子设备、存储介质,通过为每个版本的应用创建存储路径,在切换版本时只需创建新的链接文件指向该目标切换版本应用的存储路径,即可实现应用版本快速切换,即使在服务器高并发状态,I/O压力巨大的时候,也可以进行快速的毫秒级的应用版本回退;不受回退频次与时间点的限制,可以任意时刻回退到任意版本,多次进行。
本公开的一些实施例,提出了一种应用版本切换方法,能够在一定程度上解决应用版本切换的效率问题。
如图1所示,所述应用版本切换方法,包括:
步骤11:创建至少2个版本的应用的存储路径。
在部署应用的时候需要做好应用版本切换的前提准备;例如,应用的历史版本文件及其存储路径,在部署应用的过程中不删除、不修改,原样保留(参考图2A所示)。
对所述应用的每个版本需分别创建存储路径。例如,两个版本的应用分别是版本1.0和2.0,其中2.0版本为较新版本,此时,为这两个版本的应用分别创建存储路径,分别用于存储对应版本的应用的相关文件。
根据本公开的一些实施例,所述应用版本切换方法,还包括:以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径,例如,应用名称.版本号,假设应用名称为ABC,前述的两个版本的应用的存储路径则分别为ABC.1.0和ABC.2.0。采用这样的存储路径创建方式,可以方便切换版本时的路径识别。
步骤12:为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径。
假设当前使用版本的应用为ABC应用的2.0版本,则所述第一链接文件指向的存储路径即为ABC.2.0。此时,所述当前使用版本的应用在工作时则通过访问第一链接文件来访问ABC.2.0。
步骤13:获取应用版本切换指令。根据本公开的一些实施例,这里的应用版本切换指令可以是将新版本切换为旧版本,也可以是将旧版本切换为新版本。这里的新、旧是相对的,可以根据不同版本的上线时间而确定。
步骤14:若目标切换版本应用的存储路径存在,说明针对该目标切换版本应用曾经创建过存储路径且该存储路径中存储有该目标切换版本应用所需的相关文件,于是,删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
这里,假设目标切换版本应用为ABC应用的1.0版本,则所述第二链接文件指向的存储路径即为ABC.1.0。此时,所述目标切换版本应用在工作时则通过访问第二链接文件来访问ABC.1.0。
需要说明的是,针对同一应用,在某一时刻,仅存在一个链接文件,亦即,当使用该应用时,通过访问所述链接文件就可访问相应版本的应用的存储路径中的相关文件;根据本公开的一些实施例,所述应用版本切换方法,还包括:以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。这样,以所述应用名称命名所述第一链接文件或所述第二链接文件,方便所述应用的相关文件的调用。
进一步地,每个链接文件的指向仅有一个,其与当前使用版本的应用的存储路径相对应,若需要切换版本,就需要删除原来的链接文件然后创建新的链接文件,并将该新的链接文件的指向修改为目标切换版本应用的存储路径,这样,在后续使用该应用时, 通过访问新的链接文件(其实际的存储路径和名称都没变,只是内容(即指向)改变为了目标切换版本应用的存储路径)就能变为访问目标切换版本应用的存储路径而不是在先版本的应用的存储路径。
根据本公开的一些实施例,还包括步骤15:若目标切换版本应用的存储路径不存在,说明目标切换版本应用不存在,则结束流程。
从上述实施例可以看出,本公开实施例提供的应用版本切换方法,通过为每个版本的应用创建存储路径,在切换版本时只需创建新的链接文件指向该目标切换版本应用的存储路径,即可实现应用版本快速切换,即使在服务器高并发状态,I/O压力巨大的时候,也可以进行快速的毫秒级的应用版本回退;不受回退频次与时间点的限制,可以任意时刻回退到任意版本,多次进行。
根据本公开的一些实施例,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件,可使用ln–s命令建立。软链接(Symbolic Link),又叫符号链接,这个文件包含了另一个文件的路径名,这个路径名可以是任意文件或目录,可以链接不同文件系统的文件。软链接文件只是其源文件的一个标记,当删除了源文件后,软链接文件不能独立存在,虽然仍保留软链接文件的文件名,但却不能查看软链接文件的内容了。因为软链接文件的前述特性,利用软链接文件实现应用版本的指向,这样,使用建立软链接方式,能够支撑应用的日常运行,同时通过改变软链接文件的指向路径的方式完成应用版本的切换,从而达到对应用版本进行快速切换的效果。
需要说明的是,所述链接文件的建立也可以使用硬链接的方式进行。优点在于:从过程上看,同样可以实现任意版本的回退,接口比较整洁;缺点在于:硬链接的方式需要使用磁盘I/O,所以在高并发,系统高I/O的状态下,无法做到快速的回退。
下面介绍所述应用版本切换方法的具体示例。
图2A示出了链接文件当前指向的应用的版本所对应的存储路径。此时,最新版本的应用上线,需要将应用的版本切换为最新版本。于是,删除原有的链接文件,并重新创建新的链接文件,该新链接文件指向最新版本的实际路径,如图2B所示。
当需要将当前使用版本的应用切换为更旧版本应用时,同理,删除原有的链接文件,并重新创建新的链接文件,该新链接文件指向目标版本的实际路径,如图2C所示。
根据本公开的一些实施例,在完成版本切换后,还可从文件系统上确认当前的链接文件实际路径指向为目标版本路径。这里的文件系统可以是指Unix/Linux操作系统的文件系统;这里的确认,可以是使用cd,ll等系统文件系统命令进行操作后,再看系统返回的内容从而完成确认。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
通过上述实施例,在应用系统部署时设计了应用与配置文件的组织方式,设计了应用在编码与部署过程中为了实现快速切换所需要做的准备步骤。
根据本公开的一些实施例,所述应用版本切换方法,还包括:
在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二连接文件的存储路径。
通过上述实施例,在应用开发过程中,使用相对路径来引用配置文件,可以保障在应用程序运行过程中,无论该应用部署在任意目录,应用所需的配置文件都可以正确请求。
根据本公开的一些实施例,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
通过上述实施例,应用运行过程中所产生的日志的路径,配置成链接文件所代表的相对路径下,这样可以确保应用运行所产生的日志数据,输出到当前使用版本的应用的目录下。
根据本公开的一些实施例,所述应用版本切换方法应用于Unix/Linux系统文件系统,具体地,用于Unix/Linux操作系统对于文件目录的入口的控制。
本公开实施例提供的应用版本切换方法,设计了应用系统部署时的应用程序与配置文件的组织方式,设计了应用在编码与部署过程中为了实现快速切换所需要做的准备步骤,在满足了快速版本切换的前提下,使用改变链接文件指向的绝对路径的方式,达到对应用系统进行快速切换的效果。
本公开实施例提供的应用版本切换方法,针对实际应用系统在运行过程中,服务器文件系统I/O压力巨大,无力做大量文件操作,如何快速的进行应用系统版本回退的问题,设计了应用系统部署的方法,按照此方法进行部署的应用系统,即使在服务器高并发状态,I/O压力巨大的时候,也可以进行快速的毫秒级的应用版本回退。本公开实施例提供的应用版本切换方法,可以实现应用系统毫秒级回退;不受回退频次与时间点的限制,可以任意时刻回退到任意版本,多次进行;不受计算机I/O系统当前状态限制,即使在高并发、高I/O状态也可以进行快速的应用版本回退。
本公开的一些实施例,提出了一种应用版本切换装置,能够在一定程度上解决应用版本切换的效率问题。
如图3所示,所述应用版本切换装置,包括:
应用路径创建电路21,被配置成创建至少2个版本的应用的存储路径;
指令获取电路22,被配置成获取应用版本切换指令;
链接文件创建电路23,被配置成为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;以及,若目标切换版本应用的存储路径存在,删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
从上述实施例可以看出,本公开实施例提供的应用版本切换装置,通过为每个版本的应用创建存储路径,在切换版本时只需创建新的链接文件指向该目标切换版本应用的存储路径,即可实现应用版本快速切换,即使在服务器高并发状态,I/O压力巨大的时候,也可以进行快速的毫秒级的应用版本回退;不受回退频次与时间点的限制,可以任意时 刻回退到任意版本,多次进行。
根据本公开的一些实施例,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件。
根据本公开的一些实施例,所述应用路径创建电路21,被配置成以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径。
根据本公开的一些实施例,所述链接文件创建电路23,被配置成以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,所述应用版本切换装置,还包括文件存储电路24,被配置成在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
根据本公开的一些实施例,所述应用版本切换装置,还包括路径对应关系建立电路25,被配置成在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二链接文件的存储路径。
根据本公开的一些实施例,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
需要说明的是,上述应用版本切换装置的各实施例,与前述的应用版本切换方法的各实施例为对应关系,相应的技术效果与应用版本切换方法的各实施例的技术效果基本相同,在此不再赘述。
基于上述目的,本公开的一些实施例,提出了一种执行所述应用版本切换方法的装置的一个实施例。如图4所示,为本公开提供的执行所述应用版本切换方法的装置的一个实施例的硬件结构示意图。
如图4所示,所述装置包括:
一个或多个处理器31以及存储器32,图4中以一个处理器31为例。
所述执行所述应用版本切换方法的装置还可以包括:输入装置33和输出装置34。
处理器31、存储器32、输入装置33和输出装置34可以通过总线或者其他方式连接,图4中以通过总线连接为例。
存储器32作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的所述应用版本切换方法对应的程序指令/模块(例如,附图3所示的应用路径创建电路21、指令获取电路22和链接文件创建电路23)。处理器31通过运行存储在存储器32中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的应用版本切换方法。
存储器32可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据应用版本切换装置的使用所创建的数据等。此外,存储器32可以包括高速随机存取存储器,还可以包括非易失性存储 器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器32可选包括相对于处理器31远程设置的存储器,这些远程存储器可以通过网络连接至会员用户行为监控装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置33可接收输入的数字或字符信息,以及产生与应用版本切换装置的用户设置以及功能控制有关的键信号输入。输出装置34可包括显示屏等显示设备。
所述一个或者多个模块存储在所述存储器32中,当被所述一个或者多个处理器31执行时,执行上述任意方法实施例中的应用版本切换方法。所述执行所述应用版本切换方法的装置的实施例,其技术效果与前述任意方法实施例相同或者类似。
本申请实施例提供了一种非暂态计算机存储介质,所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行上述任意方法实施例中的处理方法。所述非暂态计算机存储介质的实施例,其技术效果与前述任意方法实施例相同或者类似。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。所述计算机程序的实施例,其技术效果与前述任意方法实施例相同或者类似。
此外,典型地,本公开所述的装置、设备等可为各种电子终端设备,例如手机、个人数字助理(PDA)、平板电脑(PAD)、智能电视等,也可以是大型终端设备,如服务器等,因此本公开的保护范围不应限定为某种特定类型的装置、设备。本公开所述的客户端可以是以电子硬件、计算机软件或两者的组合形式应用于上述任意一种电子终端设备中。
此外,根据本公开的方法还可以被实现为由CPU执行的计算机程序,该计算机程序可以存储在计算机可读存储介质中。在该计算机程序被CPU执行时,执行本公开的方法中限定的上述功能。
此外,上述方法步骤以及系统单元也可以利用控制器以及用于存储使得控制器实现上述步骤或单元功能的计算机程序的计算机可读存储介质实现。
此外,应该明白的是,本文所述的计算机可读存储介质(例如,存储器)可以是易失性存储器或非易失性存储器,或者可以包括易失性存储器和非易失性存储器两者。作为例子而非限制性的,非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)或快闪存储器。易失性存储器可以包括随机存取存储器(RAM),该RAM可以充当外部高速缓存存储器。作为例子而非限制性的,RAM可以以多种形式获得,比如同步RAM(DRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据速率SDRAM(DDR SDRAM)、增强SDRAM(ESDRAM)、同步链路DRAM(SLDRAM)以及直 接RambusRAM(DRRAM)。所公开的方面的存储设备意在包括但不限于这些和其它合适类型的存储器。
本领域技术人员还将明白的是,结合这里的公开所描述的各种示例性逻辑块、模块、电路和算法步骤可以被实现为电子硬件、计算机软件或两者的组合。为了清楚地说明硬件和软件的这种可互换性,已经就各种示意性组件、方块、模块、电路和步骤的功能对其进行了一般性的描述。这种功能是被实现为软件还是被实现为硬件取决于具体应用以及施加给整个系统的设计约束。本领域技术人员可以针对每种具体应用以各种方式来实现所述的功能,但是这种实现决定不应被解释为导致脱离本公开的范围。
结合这里的公开所描述的各种示例性逻辑块、模块和电路可以利用被设计成用于执行这里所述功能的下列部件来实现或执行:通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现场可编程门阵列(FPGA)或其它可编程逻辑器件、分立门或晶体管逻辑、分立的硬件组件或者这些部件的任何组合。通用处理器可以是微处理器,但是可替换地,处理器可以是任何传统处理器、控制器、微控制器或状态机。处理器也可以被实现为计算设备的组合,例如,DSP和微处理器的组合、多个微处理器、一个或多个微处理器结合DSP核、或任何其它这种配置。
结合这里的公开所描述的方法或算法的步骤可以直接包含在硬件中、由处理器执行的软件模块中或这两者的组合中。软件模块可以驻留在RAM存储器、快闪存储器、ROM存储器、EPROM存储器、EEPROM存储器、寄存器、硬盘、可移动盘、CD-ROM、或本领域已知的任何其它形式的存储介质中。示例性的存储介质被耦合到处理器,使得处理器能够从该存储介质中读取信息或向该存储介质写入信息。在一个替换方案中,所述存储介质可以与处理器集成在一起。处理器和存储介质可以驻留在ASIC中。ASIC可以驻留在用户终端中。在一个替换方案中,处理器和存储介质可以作为分立组件驻留在用户终端中。
在一个或多个示例性设计中,所述功能可以在硬件、软件、固件或其任意组合中实现。如果在软件中实现,则可以将所述功能作为一个或多个指令或代码存储在计算机可读介质上或通过计算机可读介质来传送。计算机可读介质包括计算机存储介质和通信介质,该通信介质包括有助于将计算机程序从一个位置传送到另一个位置的任何介质。存储介质可以是能够被通用或专用计算机访问的任何可用介质。作为例子而非限制性的,该计算机可读介质可以包括RAM、ROM、EEPROM、CD-ROM或其它光盘存储设备、磁盘存储设备或其它磁性存储设备,或者是可以用于携带或存储形式为指令或数据结构的所需程序代码并且能够被通用或专用计算机或者通用或专用处理器访问的任何其它介质。此外,任何连接都可以适当地称为计算机可读介质。例如,如果使用同轴线缆、光纤线缆、双绞线、数字用户线路(DSL)或诸如红外线、无线电和微波的无线技术来从网站、服务器或其它远程源发送软件,则上述同轴线缆、光纤线缆、双绞线、DSL或诸如红外先、无线电和微波的无线技术均包括在介质的定义。如这里所使用的,磁盘和光盘包括压缩盘(CD)、激光盘、光盘、数字多功能盘(DVD)、软盘、蓝光盘,其中磁盘通常磁性地再现数据,而光盘利用激光光学地再现数据。上述内容的组合也应当包括在 计算机可读介质的范围内。
公开的示例性实施例,但是应当注公开的示例性实施例,但是应当注意,在不背离权利要求限定的本公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本公开的元素可以以个体形式描述或要求,但是也可以设想多个,除非明确限制为单数。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”(“a”、“an”、“the”)旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本公开的范围(包括权利要求)被限于这些例子;在本公开实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上所述的本公开实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本公开实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本公开实施例的保护范围之内。

Claims (16)

  1. 一种应用版本切换方法,包括:
    创建至少2个版本的应用的存储路径;
    为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;
    获取应用版本切换指令;
    若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
  2. 根据权利要求1所述的方法,其中,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件。
  3. 根据权利要求1所述的方法,还包括:
    以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径。
  4. 根据权利要求1所述的方法,还包括:
    以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。
  5. 根据权利要求1所述的方法,还包括:
    在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
  6. 根据权利要求5所述的方法,还包括:
    在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二链接文件的存储路径。
  7. 根据权利要求6所述的方法,其中,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
  8. 一种应用版本切换装置,包括:
    应用路径创建电路,被配置成创建至少2个版本的应用的存储路径;
    指令获取电路,被配置成获取应用版本切换指令;
    链接文件创建电路,被配置成为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;以及,若目标切换版本应用的存储路径存在,删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
  9. 根据权利要求8所述的装置,其中,所述第一链接文件和所述第二链接文件中的至少一个为软链接文件。
  10. 根据权利要求8所述的装置,其中,所述应用路径创建电路,被配置成以应用名称加上版本标识的方式分别创建每个版本的应用的存储路径。
  11. 根据权利要求8所述的装置,其中,所述链接文件创建电路,被配置成以所述应用名称命名所述第一链接文件或所述第二链接文件;所述第一链接文件或所述第二链接 文件的名称即为所述第一链接文件或所述第二链接文件的存储路径。
  12. 根据权利要求8所述的装置,还包括文件存储电路,被配置成在每个版本的应用的存储路径下,对应地存储所述应用所涉及的可运行程序以及运行所述应用所需的配置文件。
  13. 根据权利要求12所述的装置,还包括路径对应关系建立电路,被配置成在开发所述应用的过程中,建立所述配置文件与相对路径的对应关系,所述相对路径为所述第一链接文件或所述第二链接文件的存储路径。
  14. 根据权利要求13所述的装置,其中,在运行所述应用的过程中,所述应用所产生的日志的存储路径为所述相对路径。
  15. 一种电子设备,包括:
    至少一个处理器;以及,
    与所述至少一个处理器通信连接的存储器;其中,
    所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行:
    创建至少2个版本的应用的存储路径;
    为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;
    获取应用版本切换指令;
    若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
  16. 一种存储有计算机程序的计算机可读存储介质,其中,所述计算机程序在由处理器执行时实现:
    创建至少2个版本的应用的存储路径;
    为当前使用版本的应用创建第一链接文件,所述第一链接文件指向所述当前使用版本的应用的存储路径;
    获取应用版本切换指令;
    若目标切换版本应用的存储路径存在,则删除所述第一链接文件,为所述目标切换版本应用创建第二链接文件,所述第二链接文件指向所述目标切换版本应用的存储路径。
PCT/CN2020/085108 2019-05-09 2020-04-16 应用版本切换方法及装置、电子设备、存储介质 WO2020224410A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/040,786 US11375002B2 (en) 2019-05-09 2020-04-16 Application version switching method and apparatus, electronic device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910384935.7A CN110096306B (zh) 2019-05-09 2019-05-09 应用版本切换方法及装置、电子设备、存储介质
CN201910384935.7 2019-05-09

Publications (1)

Publication Number Publication Date
WO2020224410A1 true WO2020224410A1 (zh) 2020-11-12

Family

ID=67447494

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/085108 WO2020224410A1 (zh) 2019-05-09 2020-04-16 应用版本切换方法及装置、电子设备、存储介质

Country Status (3)

Country Link
US (1) US11375002B2 (zh)
CN (1) CN110096306B (zh)
WO (1) WO2020224410A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129333A (zh) * 2022-09-02 2022-09-30 城云科技(中国)有限公司 适用于微前端框架的npm资源包管理方法、装置及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096306B (zh) 2019-05-09 2021-10-15 京东方科技集团股份有限公司 应用版本切换方法及装置、电子设备、存储介质
CN112114905B (zh) * 2020-09-29 2023-09-26 中国银行股份有限公司 软件版本切换方法及装置
CN114519034A (zh) * 2020-11-20 2022-05-20 华为技术有限公司 文件操作方法及相关设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679544A (zh) * 2013-11-29 2015-06-03 中兴通讯股份有限公司 应用程序管理方法及装置
CN107656740A (zh) * 2016-07-25 2018-02-02 中兴通讯股份有限公司 一种定制版本切换方法、装置和移动终端
CN108536490A (zh) * 2018-04-27 2018-09-14 努比亚技术有限公司 一种应用程序启动方法、移动终端以及计算机存储介质
CN109508198A (zh) * 2018-11-09 2019-03-22 Oppo广东移动通信有限公司 应用程序安装方法、装置、存储介质及终端
CN110096306A (zh) * 2019-05-09 2019-08-06 京东方科技集团股份有限公司 应用版本切换方法及装置、电子设备、存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7266817B1 (en) * 2000-12-21 2007-09-04 Emc Corporation Method and system for creating packages for multiple platforms
US8024712B1 (en) * 2006-09-29 2011-09-20 Emc Corporation Collecting application logs
US20080104081A1 (en) * 2006-10-30 2008-05-01 Yasuyuki Mimatsu Tiered storage system with single instance function
US8315996B2 (en) * 2008-08-13 2012-11-20 International Business Machines Corporation Efficient management of customized functionality within shared data objects
US8782632B1 (en) * 2012-06-18 2014-07-15 Tellabs Operations, Inc. Methods and apparatus for performing in-service software upgrade for a network device using system virtualization
US9904533B2 (en) * 2013-03-15 2018-02-27 Oracle International Corporation Circular buffer of software versions
CN103647986B (zh) * 2013-12-04 2017-01-25 乐视致新电子科技(天津)有限公司 一种版本升级方法和装置
CN104778099B (zh) * 2015-04-16 2017-09-22 北京工业大学 一种基于历史版本的yaffs2破损文件重构方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679544A (zh) * 2013-11-29 2015-06-03 中兴通讯股份有限公司 应用程序管理方法及装置
CN107656740A (zh) * 2016-07-25 2018-02-02 中兴通讯股份有限公司 一种定制版本切换方法、装置和移动终端
CN108536490A (zh) * 2018-04-27 2018-09-14 努比亚技术有限公司 一种应用程序启动方法、移动终端以及计算机存储介质
CN109508198A (zh) * 2018-11-09 2019-03-22 Oppo广东移动通信有限公司 应用程序安装方法、装置、存储介质及终端
CN110096306A (zh) * 2019-05-09 2019-08-06 京东方科技集团股份有限公司 应用版本切换方法及装置、电子设备、存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115129333A (zh) * 2022-09-02 2022-09-30 城云科技(中国)有限公司 适用于微前端框架的npm资源包管理方法、装置及系统
CN115129333B (zh) * 2022-09-02 2022-11-25 城云科技(中国)有限公司 适用于微前端框架的npm资源包管理方法、装置及系统

Also Published As

Publication number Publication date
CN110096306B (zh) 2021-10-15
CN110096306A (zh) 2019-08-06
US20210160305A1 (en) 2021-05-27
US11375002B2 (en) 2022-06-28

Similar Documents

Publication Publication Date Title
WO2020224410A1 (zh) 应用版本切换方法及装置、电子设备、存储介质
JP6345211B2 (ja) 仮想マシンシステムディスクのスナップショットの作成方法および装置
US8782604B2 (en) Sandbox support for metadata in running applications
US20160070431A1 (en) Sync based on navigation history
CN108628874B (zh) 迁移数据的方法、装置、电子设备和可读存储介质
KR20190095066A (ko) 정보 처리 방법, 장치, 서버 및 컴퓨터 판독 가능 매체
EP3273363B1 (en) Zero downtime database updates with database configuration changes
CN112948340A (zh) 数据同步方法、装置、电子设备及可读存储介质
CN110968477B (zh) 一种获取备用bmc版本信息的方法、设备及介质
CN111291023A (zh) 一种数据迁移的方法、系统、设备以及介质
WO2019148955A1 (zh) 一种控制用户登录方法、智能电视及存储装置
US8612799B2 (en) Method and apparatus of backing up subversion repository
CN110990069A (zh) 一种服务器bmc配置自动更新方法和装置
CN112748991A (zh) 用于备份数据的方法、设备和计算机程序产品
CN113612702A (zh) 一种实现裸金属检查流程的方法、系统、设备和存储介质
CN111770153A (zh) 一种对象下载方法、装置及电子设备和存储介质
US10394482B2 (en) Snap tree arbitrary replication
CN110879760B (zh) 一种统一存储系统及方法、电子设备
KR102226379B1 (ko) 일종의 시스템 펌웨어의 버닝 스피드 향상 방법
CN110019059B (zh) 一种定时同步的方法和装置
CN113987089B (zh) 一种系统级联方法、数据处理方法及装置
WO2016054886A1 (zh) 一种软件升级方法、装置和电子设备、存储介质
CN110780905B (zh) 一种基于usb接口的bmc软件更新方法和装置
CN114564211A (zh) 集群部署方法、集群部署装置、设备及介质
US11403093B1 (en) Application modification with proxy service process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20801735

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20801735

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20801735

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 070622)

122 Ep: pct application non-entry in european phase

Ref document number: 20801735

Country of ref document: EP

Kind code of ref document: A1