WO2018120436A1 - Version control method and system for flash application - Google Patents

Version control method and system for flash application Download PDF

Info

Publication number
WO2018120436A1
WO2018120436A1 PCT/CN2017/076602 CN2017076602W WO2018120436A1 WO 2018120436 A1 WO2018120436 A1 WO 2018120436A1 CN 2017076602 W CN2017076602 W CN 2017076602W WO 2018120436 A1 WO2018120436 A1 WO 2018120436A1
Authority
WO
WIPO (PCT)
Prior art keywords
application
name
flash application
file
flash
Prior art date
Application number
PCT/CN2017/076602
Other languages
French (fr)
Chinese (zh)
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 武汉斗鱼网络科技有限公司
Publication of WO2018120436A1 publication Critical patent/WO2018120436A1/en

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/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources

Definitions

  • the present invention relates to the field of web page caching, and more particularly to a version control method and system for a flash application.
  • the version control method of the flash application in the prior art has the following disadvantages:
  • the current version mode will cause problems for the CDN environment. Users may need to clear the cache to see the latest content, which will cause inconvenience to the user and may result in user loss.
  • the problem avoids the need for the user to clear the cache in the prior art to see the updated flash application and the update of each node on the CDN is not timely, resulting in the updated flash application not being successfully activated.
  • an embodiment of the present invention provides a version control method for a flash application, where the flash application includes a plurality of resource files, and the method includes:
  • the configuration file includes a version number of all resource files in the flash application.
  • the application name includes a source application name, an application version number, and a format name of the flash application.
  • the method further includes:
  • the retrieving the updated application name of the flash application further includes:
  • the file name of the configuration file includes a source configuration file name, a version number corresponding to the flash application, and a format name.
  • the step S1 further includes:
  • the file name of the modified configuration file includes the source configuration file name, the format name, and the version number of the corresponding flash application.
  • the step S1 further includes:
  • step S2 further comprises:
  • the file name of the resource file includes a source resource file name, a version number of the resource file, and a format name.
  • the step S2.2 further includes: adding a timestamp after the file name of the resource file when the updated flash application is in the test environment.
  • the version number of each file in the updated flash application is stored in a configuration file corresponding to the version of the flash application based on the loadversion method in the versionmanaget class.
  • the version control method of the flash application further includes:
  • an embodiment of the present invention further provides a version control system for a flash application, including:
  • a configuration file module that obtains a configuration file corresponding to the application name based on an application name of the updated flash application
  • the configuration file includes a file version number of all files in the flash application.
  • the application name includes a source application name, an application version number, and a format name of the flash application.
  • an embodiment of the present invention further provides a version control device for a flash application, including:
  • At least one processor At least one processor
  • At least one memory communicatively coupled to the processor, wherein:
  • the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the following methods:
  • the configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
  • an embodiment of the present invention further provides a computer program, including program code, for performing the following operations:
  • the configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
  • an embodiment of the present application further provides a storage medium for storing a computer program as described above.
  • the present application proposes a version control method for a flash application.
  • modifying the flash application and the file naming manner of each file, and collecting the version numbers of the resource files in the updated flash application the user needs to clear the cache to see.
  • the update to the flash application and the update of each node on the CDN does not cause the updated flash application to be successfully activated.
  • the version of the flash application can be updated quickly and accurately, without updating each file to prevent additional waste. The necessary bandwidth.
  • FIG. 1 is a schematic flowchart of a version control method of a flash application according to an embodiment of the present invention
  • FIG. 2 is a structural block diagram of a version control device of a flash application according to an embodiment of the present invention.
  • the present invention provides a new version control method for the flash application.
  • the web browser has a caching function. When opening various websites, it will first find the corresponding address in the cache. If it is not found, it will go to the network to find it, for example, visit http://www.douyu. Com/player.swf, if player.swf (.swf is a file format in a flash application) has a size of 100M, then if you have visited before, there is a cache in the browser, then the speed will be very high fast. If the browser does not have a cache of this address, then you need to load the 100M file, then there will be a process, which is a role of the browser cache.
  • the CDN Content Delivery Network
  • the basic idea of the content distribution network is to avoid the bottlenecks and links on the Internet that may affect the speed and stability of data transmission, and make the content transmission faster and more stable.
  • the CDN system can real-time based on network traffic and connection, load status, and distance and response time to users.
  • the integrated information redirects the user's request to the service node closest to the user.
  • the purpose is to enable users to obtain the required content in the vicinity, solve the congestion of the Internet network, and improve the response speed of users visiting the website.
  • the resources of the same name accessed by everyone in the CDN environment may not be on one node, so when uploading resources to the CDN, the time for each node to take effect is also different.
  • the time for each node to take effect is also different. For example, to update the player.swf file mentioned above, then visit http://www.douyu.com/player.swf because the node that everyone visits is not It must be the same, so it is possible that some people visit the latest ones, and some people still access the old files. This is a problem with the version caused by the CDN environment, so the above says bypassing the browser cache. The way is not working, for example, changing the version of the file to 2.0 is also the case: http://www.douyu.com/player.swf?
  • v 2.0, although it does bypass the browser cache, but the file may not take effect, it may still be an old file, which is equivalent to using a new version number to load an old resource, which is wasted The bandwidth has not been able to successfully load new resources. Then the way of handling version control for CDN is about to change.
  • the method adopted by the present invention is a method of combining a version number and a file name, for example, http://www.douyu.com/player_2.swf, and it can be seen that the previous player.swf is changed to player_2.swf. After doing this, if the CDN does not take effect, the file cannot be accessed until the file is valid. The user does not need to care about what is cached, and the latest content can be seen when it is valid.
  • FIG. 1 shows a version control method of a flash application in an embodiment of the present invention.
  • the flash application includes a plurality of resource files, and the method includes:
  • the configuration file includes a version number of all resource files in the flash application.
  • the application name includes a source application name, an application version number, and a format name of the flash application.
  • the "updated flash application” in step S1 refers to replacing the flash application of the old version, for example, the original flash application is version 1.0, the updated flash application is version 2.0, and the source application name is the flash application without the application version number. name.
  • Flash_2 represents the 2.0 version of the flash application
  • xx represents the format of the flash application. This setting bypasses the browser cache on the one hand, and avoids the absence of updates in the CDN on the other hand.
  • the user By modifying the flash application and the file naming method of each file, and collecting the file version number of each file in the updated flash application, the user needs to clear the cache to see the updated flash application and the update of each node on the CDN is not timely.
  • the method before the step S1, the method further includes:
  • step S1 retrieve the application name of the updated flash application.
  • the application name of the updated flash application is retrieved before step S1 can be performed.
  • the retrieving the updated application name of the flash application further includes:
  • the file name of the configuration file includes a source configuration file name, a version number corresponding to the flash application, and a format name.
  • the file name of the configuration file includes the version number of the configuration file.
  • the configuration file of the flash application corresponding to version 2.0 includes the version number of all resource files in the flash application of version 2.0.
  • the versions of the resource files are not necessarily consistent, thus avoiding the browser reloading all resource files when loading an updated flash application.
  • the information of the configuration file corresponding to a certain version is:
  • the above information shows three resource files, config, xml, ui/assetta.awf, and webdouyurecord.swf. ver indicates the version number.
  • the version numbers of the three resource files are not the same, because each time When the flash application is updated, the version of each resource file is not necessarily updated synchronously.
  • the version information of all the resource files in the updated version of the flash application in the present invention is saved in the corresponding configuration file.
  • the configuration file corresponding to the version A flash application is called version_A.cfg, and the corresponding version configuration of the flash version of the B version is applied.
  • File called Version_B.cfg when A version is required, it will load the configuration file corresponding to A.
  • B version when B version is required, the configuration file corresponding to B will be loaded.
  • the version number of each resource file in the updated flash application is stored in a configuration file corresponding to the version of the flash application based on the loadversion method in the versionmanaget class.
  • the code corresponding to the method is:
  • step S1 further includes:
  • the file name of the modified configuration file includes the source configuration file name, the format name, and the version number of the corresponding flash application.
  • the real environment in the present invention is the environment of the user, and the test environment is an environment opposite to the real environment, meaning the environment of the developer.
  • step S1 further includes:
  • step S2 further includes:
  • the file name of the resource file includes a source resource file name, a version number of the resource file, and a format name.
  • Step S2 needs to use the getVersionUrl method in the versionmanaget class, which is a class responsible for version number management. It saves information about a version of all files, and uses this class to handle version number management. This method can obtain updated versions. Specify the name of the file with the version number.
  • the execution flow is as follows:
  • the configuration file is converted to a format recognizable by the flash application based on the setversion method in the versionmanaget class.
  • the setversion method is a method in the versionManager class, which is used to set the configuration information of a file version number.
  • Each file here contains the file path, file size, file name, version number, etc.
  • the main version used here is the version number. Field, then use the file name to make a unique index.
  • the step S2.2 further includes: adding a timestamp after the file name of the resource file when the flash application is in the test environment.
  • the version rollback means that the updated version of the flash application is rolled back to the old version, which is related to the version number. You must know that the version number can be rolled back. For example, if a product needs to release a new version to the online, then the current online version is the A version. The new version to be sent is the B version, and then the B version is released to the online, but it is found to be serious after being sent. The problem caused the user to be unable to use, this time you need to fall back to the previous version of the stable version A, which is the role of the version fallback.
  • the version control method of the flash application further includes:
  • the method of rollback is the same as the idea of updating.
  • the version control is based on the configuration file and will not be described again.
  • An embodiment of the present invention provides a version control system for a flash application, where the flash application includes a plurality of resource files, including:
  • a configuration file module that obtains a configuration file corresponding to the application name based on an application name of the updated flash application
  • the configuration file includes a version number of all resource files in the flash application.
  • the application name includes a source application name, an application version number, and a format name of the flash application.
  • FIG. 2 is a structural block diagram showing a version control device of a flash application according to Embodiment 3 of the present application.
  • the version control device of the flash application includes: a processor 201, a memory 202, and a bus 203;
  • the processor 201 and the memory 202 complete communication with each other through the bus 203;
  • the processor 201 is configured to invoke the program instructions in the memory 202 to perform the method provided by the foregoing method embodiments, for example, including: obtaining a configuration corresponding to the application name based on an application name of the updated flash application. And updating the corresponding flash application based on the configuration file; wherein the configuration file includes a version number of all resource files in the flash application; and the application name includes a source application name and an application version number of the flash application. And the format name.
  • the embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer
  • the method provided by each of the foregoing method embodiments is performed, for example, comprising: obtaining a configuration file corresponding to the application name based on an application name of the updated flash application; and based on the configuration file, a new corresponding flash application; wherein the configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
  • the embodiment provides a non-transitory computer readable storage medium, the non-transitory computer readable storage medium storing computer instructions, the computer instructions causing the computer to perform the methods provided by the foregoing method embodiments, including, for example, Retrieving a configuration file corresponding to the application name based on an application name of the updated flash application; and updating a corresponding flash application based on the configuration file; wherein the configuration file includes all resource files in the flash application
  • the version number; the application name includes the source application name, the application version number, and the format name of the flash application.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A version control method and system for a flash application, the flash application comprising several files. The method comprises: obtaining, based on an application name of a flash application to be updated or fallen back to, a configuration file corresponding to the application name; and updating or falling back to the corresponding flash application based on the configuration file. The system comprises: a configuration file module for obtaining, based on an application name of a flash application to be updated, a configuration file corresponding to the application name; and an update module connected to the configuration file module and updating the corresponding flash application based on the configuration file. The method and system avoid the problems that a user needs to clear the cache so as to see an updated flash application and that the updated flash application fails to be activated due to the untimely updating of various nodes on a CDN.

Description

一种flash应用的版本控制方法和系统Version control method and system for flash application
交叉引用cross reference
本申请引用于2016年12月9日提交的专利名称为“一种flash应用的版本控制方法和系统”的第201611218387.3号中国专利申请,其通过引用被全部并入本申请。The present application is hereby incorporated by reference in its entirety in its entirety in its entirety in its entirety in the the the the the the the the the the
技术领域Technical field
本发明涉及网页缓存领域,更具体地,涉及一种flash应用的版本控制方法和系统。The present invention relates to the field of web page caching, and more particularly to a version control method and system for a flash application.
背景技术Background technique
随着通过互联网观看视频的人数越来越多,flash应用的场景越来越广,因此对于Flash应用的版本管理也越来越重要,所以拥有一个好的版本控制方式是非常有必要的,它不仅能够很好的区分的版本,还能更快更准确的回到指定的版本,同时也能更好的增强的用户体验。现有技术中flash应用的版本控制方法存在以下缺点:With the increasing number of people watching videos over the Internet, the scenes of flash applications are becoming more and more extensive, so the version management of Flash applications is becoming more and more important, so it is very necessary to have a good version control method. Not only can a well-differentiated version, but also a faster and more accurate return to the specified version, but also a better enhanced user experience. The version control method of the flash application in the prior art has the following disadvantages:
1、无法快速准确的让线上版本回退到指定的版本,一旦线上出现问题只能通过人工的去对比CDN上的资源目录做回退操作,耗时长,还不能保证准确性。1. It is not possible to quickly and accurately return the online version to the specified version. Once there is a problem on the line, you can only manually reverse the resource directory on the CDN to do the rollback operation, which takes a long time and cannot guarantee accuracy.
2、无法准确的知道哪些文件有改动过,刷版本的时候所有资源一起刷,造成大量的资源浪费,使得用户额外的浪费不必要的带宽。2, can not accurately know which files have been changed, all resources are brushed together when the version is swiped, resulting in a lot of waste of resources, making users extra waste of unnecessary bandwidth.
3、目前的版本方式针对CDN环境会出现问题,用户可能需要清理缓存才能看到最新的内容,这样就造成用户的不方便,可能会造成用户流失的情况。3. The current version mode will cause problems for the CDN environment. Users may need to clear the cache to see the latest content, which will cause inconvenience to the user and may result in user loss.
发明内容 Summary of the invention
本发明的目的在于,提供一种flash应用的版本控制方法和系统,避免现有技术中用户需要清理缓存才能看到更新的flash应用以及CDN上各节点更新不及时导致更新的flash应用未成功激活的问题。It is an object of the present invention to provide a version control method and system for a flash application, which avoids the need for the user to clear the cache in the prior art to see the updated flash application and the update of each node on the CDN is not timely, resulting in the updated flash application not being successfully activated. The problem.
一方面,本发明的实施例提供一种flash应用的版本控制方法,所述flash应用包含若干个资源文件,所述方法包括:In one aspect, an embodiment of the present invention provides a version control method for a flash application, where the flash application includes a plurality of resource files, and the method includes:
S1、基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及S1. Obtain a configuration file corresponding to the application name based on an application name of the updated flash application;
S2、基于所述配置文件,更新对应的flash应用;S2. Update the corresponding flash application based on the configuration file.
其中,所述配置文件包含该flash应用中的所有资源文件的版本号;The configuration file includes a version number of all resource files in the flash application.
所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
优选地,所述步骤S1之前还包括:Preferably, before the step S1, the method further includes:
检索更新的flash应用的应用名。Retrieve the application name of the updated flash application.
优选地,所述检索更新的flash应用的应用名之前还包括:Preferably, the retrieving the updated application name of the flash application further includes:
创建所述更新的flash应用的应用名;以及Creating an application name of the updated flash application;
将所述更新的flash应用中每个资源文件的版本号存储至对应所述版本的flash应用的配置文件中;Saving a version number of each resource file in the updated flash application to a configuration file of a flash application corresponding to the version;
其中,所述配置文件的文件名依次包括源配置文件名、对应于所述flash应用的版本号以及格式名。The file name of the configuration file includes a source configuration file name, a version number corresponding to the flash application, and a format name.
优选地,所述步骤S1还包括:Preferably, the step S1 further includes:
当更新的flash应用处于真实环境时,匹配对应所述应用名的配置文件;或 Matching a configuration file corresponding to the application name when the updated flash application is in a real environment; or
当更新的flash应用处于测试环境时,修改对应所述应用名的配置文件的文件名;When the updated flash application is in the test environment, modify the file name of the configuration file corresponding to the application name;
其中,修改后的配置文件的文件名依次包括源配置文件名、格式名以及对应的flash应用的版本号。The file name of the modified configuration file includes the source configuration file name, the format name, and the version number of the corresponding flash application.
优选地,所述步骤S1还包括:Preferably, the step S1 further includes:
将所述配置文件转换为flash应用可识别的格式。Convert the configuration file to a format recognizable by the flash application.
优选地,所述步骤S2进一步包括:Preferably, the step S2 further comprises:
S2.1、对于待更新的资源文件,基于所述配置文件,检索更新的flash应用中与所述资源文件的源资源文件名相同的文件;以及S2.1. Search, for the resource file to be updated, a file in the updated flash application that is the same as the source resource file name of the resource file, according to the configuration file;
S2.2、当更新的flash应用处于真实环境时,将所述资源文件更新为更新的flash应用中与所述资源文件的源资源文件名相同的资源文件;S2.2. When the updated flash application is in a real environment, update the resource file to a resource file in the updated flash application that is the same as the source resource file name of the resource file.
其中,所述资源文件的文件名依次包括源资源文件名、资源文件的版本号以及格式名。The file name of the resource file includes a source resource file name, a version number of the resource file, and a format name.
优选地,所述步骤S2.2还包括:当更新的flash应用处于测试环境时,在所述资源文件的文件名后加上时间戳。Preferably, the step S2.2 further includes: adding a timestamp after the file name of the resource file when the updated flash application is in the test environment.
优选地,基于versionmanaget类中的loadversion方法,将所述更新的flash应用中每个文件的版本号存储至对应所述版本的flash应用的配置文件中。Preferably, the version number of each file in the updated flash application is stored in a configuration file corresponding to the version of the flash application based on the loadversion method in the versionmanaget class.
优选地,flash应用的版本控制方法还包括:Preferably, the version control method of the flash application further includes:
S3、基于回退的flash应用的应用名,获得对应于所述应用名的配置文件;以及S3. Obtain a configuration file corresponding to the application name based on an application name of the rollback flash application;
S4、基于所述配置文件,回退对应的flash应用。 S4. Roll back the corresponding flash application based on the configuration file.
第二方面,本发明的实施例还提供一种flash应用的版本控制系统,包括:In a second aspect, an embodiment of the present invention further provides a version control system for a flash application, including:
配置文件模块,基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及a configuration file module that obtains a configuration file corresponding to the application name based on an application name of the updated flash application;
更新模块,与所述配置文件模块连接,基于所述配置文件,更新对应的flash应用;Updating a module, connecting with the configuration file module, and updating a corresponding flash application based on the configuration file;
其中,所述配置文件包含该flash应用中的所有文件的文件版本号;The configuration file includes a file version number of all files in the flash application.
所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
第三方面,本发明的实施例还提供一种flash应用的版本控制设备,包括:In a third aspect, an embodiment of the present invention further provides a version control device for a flash application, including:
至少一个处理器;以及At least one processor;
与所述处理器通信连接的至少一个存储器,其中:At least one memory communicatively coupled to the processor, wherein:
所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如下方法:The memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the following methods:
基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及基于所述配置文件,更新对应的flash应用;Updating a configuration file corresponding to the application name based on an application name of the updated flash application; and updating the corresponding flash application based on the configuration file;
其中,所述配置文件包含该flash应用中的所有资源文件的版本号;所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
第四方面,本发明的实施例还提供了一种计算机程序,包括程序代码,所述程序代码用于执行如下操作:In a fourth aspect, an embodiment of the present invention further provides a computer program, including program code, for performing the following operations:
基于更新的flash应用的应用名,获得对应于所述应用名的配置文 件;以及基于所述配置文件,更新对应的flash应用;Obtaining a configuration file corresponding to the application name based on an application name of the updated flash application And updating the corresponding flash application based on the configuration file;
其中,所述配置文件包含该flash应用中的所有资源文件的版本号;所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
第五方面,本申请的实施例还提供了一种存储介质,用于存储如前所述的计算机程序。In a fifth aspect, an embodiment of the present application further provides a storage medium for storing a computer program as described above.
本申请提出了一种flash应用的版本控制方法,通过修改flash应用以及各文件的文件命名方式,并对更新的flash应用中的各资源文件的版本号进行采集,避免了用户需要清理缓存才能看到更新的flash应用以及CDN上各节点更新不及时导致更新的flash应用未成功激活的问题,同时能够快速准确地更新flash应用的版本,不需要对每个文件都进行更新,防止用户额外浪费不必要的带宽。The present application proposes a version control method for a flash application. By modifying the flash application and the file naming manner of each file, and collecting the version numbers of the resource files in the updated flash application, the user needs to clear the cache to see. The update to the flash application and the update of each node on the CDN does not cause the updated flash application to be successfully activated. At the same time, the version of the flash application can be updated quickly and accurately, without updating each file to prevent additional waste. The necessary bandwidth.
附图说明DRAWINGS
图1为本发明一个实施例中一种flash应用的版本控制方法的流程示意图;1 is a schematic flowchart of a version control method of a flash application according to an embodiment of the present invention;
图2为本发明一个实施例中一种flash应用的版本控制设备的结构框图。FIG. 2 is a structural block diagram of a version control device of a flash application according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
为了克服现有技术中无法快速准确的让线上版本回退到指定的版 本,一旦线上出现问题只能通过人工的去对比CDN上的资源目录做回退操作,耗时长,还不能保证准确性的问题,本发明提供了一种新的flash应用的版本控制方法。In order to overcome the prior art, it is impossible to quickly and accurately return the online version to the specified version. In this case, once the problem occurs on the line, the user can only perform the rollback operation by comparing the resource directory on the CDN, which takes a long time and cannot guarantee the accuracy. The present invention provides a new version control method for the flash application.
实施例一Embodiment 1
众所周知,Web浏览器是有缓存功能的,打开各种网站的时候是会先在缓存中找对应的地址的,如果没有找到才会去网络上找的,例如访问http://www.douyu.com/player.swf,假如player.swf(.swf是flash应用中的一种文件的格式)有100M的大小,那么如果之前访问过,浏览器中就有缓存,那么再去访问的话速度会很快。如果浏览器没有这个地址的缓存,那么就需要去加载这个100M大小的文件了,那就会有一个过程,这就是浏览器缓存的一个作用。那么如果对文件进行修改了怎么让用户使用的最新的文件了,那么一般的做法就是在地址后面加版本号,例如http://www.douyu.com/player.swf?v=1.0,v=1.0表示更新版本1.0,这样就绕过了浏览器的缓存,要重新去加载最新的文件,这样就做到了的文件更新的操作。As we all know, the web browser has a caching function. When opening various websites, it will first find the corresponding address in the cache. If it is not found, it will go to the network to find it, for example, visit http://www.douyu. Com/player.swf, if player.swf (.swf is a file format in a flash application) has a size of 100M, then if you have visited before, there is a cache in the browser, then the speed will be very high fast. If the browser does not have a cache of this address, then you need to load the 100M file, then there will be a process, which is a role of the browser cache. So if you modify the file and let the user use the latest file, then the general practice is to add the version number after the address, for example http://www.douyu.com/player.swf? v=1.0, v=1.0 means update version 1.0, which bypasses the browser's cache, and has to reload the latest file, thus doing the file update operation.
之前提到的CDN(Content Delivery Network),即内容分发网络,其基本思路是尽可能避开互联网上有可能影响数据传输速度和稳定性的瓶颈和环节,使内容传输的更快、更稳定。通过在网络各处放置节点服务器所构成的在现有的互联网基础之上的一层智能虚拟网络,CDN系统能够实时地根据网络流量和各节点的连接、负载状况以及到用户的距离和响应时间等综合信息将用户的请求重新导向离用户最近的服务节点上。其目的是使用户可就近取得所需内容,解决Internet网络拥挤的状况,提高用户访问网站的响应速度。The CDN (Content Delivery Network) mentioned above, the basic idea of the content distribution network, is to avoid the bottlenecks and links on the Internet that may affect the speed and stability of data transmission, and make the content transmission faster and more stable. By placing a layer of intelligent virtual network based on the existing Internet on the network, the CDN system can real-time based on network traffic and connection, load status, and distance and response time to users. The integrated information redirects the user's request to the service node closest to the user. The purpose is to enable users to obtain the required content in the vicinity, solve the congestion of the Internet network, and improve the response speed of users visiting the website.
这里需要注意的是,在CDN环境每个人访问的同一个名字的资源可能并不在一个节点上,所以当上传资源到CDN上的时候,每个节点生效的时间也是不一样的。比如说更新了上面说的player.swf文件,那么访问http://www.douyu.com/player.swf,因为每个人访问的节点并不 一定一样,所以有可能有的人访问到的是最新的,而有的人访问到的还是旧的文件,这就是CDN环境会引起的版本的一个问题,那么上面说的绕过浏览器缓存的方式就不奏效了,例如将文件的版本修改成了2.0也就是这样:http://www.douyu.com/player.swf?v=2.0,虽然的确是绕过了浏览器缓存,但是的文件可能并没有生效,可能还是老的文件,这就相当于用了一个新的版本号去加载了一个老的资源,这样既浪费了的带宽,结果还没有能够成功的加载新的资源。那么针对CDN的版本控制的处理方式就要转变了。It should be noted here that the resources of the same name accessed by everyone in the CDN environment may not be on one node, so when uploading resources to the CDN, the time for each node to take effect is also different. For example, to update the player.swf file mentioned above, then visit http://www.douyu.com/player.swf because the node that everyone visits is not It must be the same, so it is possible that some people visit the latest ones, and some people still access the old files. This is a problem with the version caused by the CDN environment, so the above says bypassing the browser cache. The way is not working, for example, changing the version of the file to 2.0 is also the case: http://www.douyu.com/player.swf? v=2.0, although it does bypass the browser cache, but the file may not take effect, it may still be an old file, which is equivalent to using a new version number to load an old resource, which is wasted The bandwidth has not been able to successfully load new resources. Then the way of handling version control for CDN is about to change.
因此,本发明采用的方式是将版本号和文件名组合的方式,例如:http://www.douyu.com/player_2.swf,可以看到将之前的player.swf改成了player_2.swf,这样做之后,CDN上如果没有生效是访问不到这个文件的,直到生效才能访问到这个文件,那么用户不用关心缓存什么的,等到生效就能看到最新的内容了。Therefore, the method adopted by the present invention is a method of combining a version number and a file name, for example, http://www.douyu.com/player_2.swf, and it can be seen that the previous player.swf is changed to player_2.swf. After doing this, if the CDN does not take effect, the file cannot be accessed until the file is valid. The user does not need to care about what is cached, and the latest content can be seen when it is valid.
图1示出了本发明实施例中的一种flash应用的版本控制方法,所述flash应用包含若干个资源文件,所述方法包括:FIG. 1 shows a version control method of a flash application in an embodiment of the present invention. The flash application includes a plurality of resource files, and the method includes:
S1、基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及S1. Obtain a configuration file corresponding to the application name based on an application name of the updated flash application;
S2、基于所述配置文件,更新对应的flash应用;S2. Update the corresponding flash application based on the configuration file.
其中,所述配置文件包含该flash应用中的所有资源文件的版本号;The configuration file includes a version number of all resource files in the flash application.
所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
步骤S1中的“更新的flash应用”指的是替换旧版本的flash应用,例如原flash应用为1.0版本,更新的flash应用即为2.0版本,源应用名即为flash应用不带应用版本号的名称。现有技术中更新的flash应用的命名方式为flash?v=2.0,而本发明中采用flash_2.xx的命名方式, 其中flash_2表示2.0版本的flash应用,xx表示flash应用的格式,这样设置,一方面绕过了浏览器缓存,另一方面可以避免CDN中没有更新生效。The "updated flash application" in step S1 refers to replacing the flash application of the old version, for example, the original flash application is version 1.0, the updated flash application is version 2.0, and the source application name is the flash application without the application version number. name. The naming method of the flash application updated in the prior art is flash? v=2.0, and the flash _2.xx naming method is adopted in the present invention. Flash_2 represents the 2.0 version of the flash application, and xx represents the format of the flash application. This setting bypasses the browser cache on the one hand, and avoids the absence of updates in the CDN on the other hand.
通过修改flash应用以及各文件的文件命名方式,并对更新的flash应用中的各文件的文件版本号进行采集,避免了用户需要清理缓存才能看到更新的flash应用以及CDN上各节点更新不及时导致更新的flash应用未成功激活的问题,同时能够快速准确地更新flash应用的版本,不需要对每个文件都进行更新,防止用户额外浪费不必要的带宽。By modifying the flash application and the file naming method of each file, and collecting the file version number of each file in the updated flash application, the user needs to clear the cache to see the updated flash application and the update of each node on the CDN is not timely. The problem that the updated flash application is not successfully activated, and the version of the flash application can be updated quickly and accurately, without updating each file, preventing the user from wasting unnecessary bandwidth.
在一个实施例中,所述步骤S1之前还包括:In an embodiment, before the step S1, the method further includes:
检索更新的flash应用的应用名。先检索更新的flash应用的应用名,才能够进行步骤S1。Retrieve the application name of the updated flash application. The application name of the updated flash application is retrieved before step S1 can be performed.
在一个实施例中,所述检索更新的flash应用的应用名之前还包括:In an embodiment, the retrieving the updated application name of the flash application further includes:
创建所述更新的flash应用的应用名;以及Creating an application name of the updated flash application;
将所述更新的flash应用中每个资源文件的版本号存储至对应所述版本的flash应用的配置文件中;Saving a version number of each resource file in the updated flash application to a configuration file of a flash application corresponding to the version;
其中,所述配置文件的文件名依次包括源配置文件名、对应于所述flash应用的版本号以及格式名。The file name of the configuration file includes a source configuration file name, a version number corresponding to the flash application, and a format name.
配置文件的文件名中包括了配置文件的版本号,对应2.0版本的flash应用的配置文件即包括了2.0版本的flash应用中所有资源文件的版本号。在本发明中,各资源文件的版本并不一定是一致的,这样就避免了浏览器在加载一个更新的flash应用时,对全部资源文件进行重新加载。The file name of the configuration file includes the version number of the configuration file. The configuration file of the flash application corresponding to version 2.0 includes the version number of all resource files in the flash application of version 2.0. In the present invention, the versions of the resource files are not necessarily consistent, thus avoiding the browser reloading all resource files when loading an updated flash application.
例如某一个版本对应的配置文件的信息为:For example, the information of the configuration file corresponding to a certain version is:
Figure PCTCN2017076602-appb-000001
Figure PCTCN2017076602-appb-000001
Figure PCTCN2017076602-appb-000002
Figure PCTCN2017076602-appb-000002
上述信息中展示了三种资源文件,分别是config,xml、ui/assetta.awf、以及webdouyurecord.swf,ver表示版本号,显然,三种资源文件的版本号并不相同,这是因为每一次更新flash应用时,不一定同步更新了各资源文件的版本。The above information shows three resource files, config, xml, ui/assetta.awf, and webdouyurecord.swf. ver indicates the version number. Obviously, the version numbers of the three resource files are not the same, because each time When the flash application is updated, the version of each resource file is not necessarily updated synchronously.
本发明中一个flash应用的更新版本中的所有资源文件的版本信息都会保存在对应的配置文件中,例如的A版本flash应用对应的配置文件叫version_A.cfg,B版本flash应用的对应的版本配置文件叫 version_B.cfg,当需要A版本的时候就去加载A对应的配置文件,需要B版本的时候就加载B对应的配置文件。The version information of all the resource files in the updated version of the flash application in the present invention is saved in the corresponding configuration file. For example, the configuration file corresponding to the version A flash application is called version_A.cfg, and the corresponding version configuration of the flash version of the B version is applied. File called Version_B.cfg, when A version is required, it will load the configuration file corresponding to A. When B version is required, the configuration file corresponding to B will be loaded.
在一个实施例中,基于versionmanaget类中的loadversion方法,将所述更新的flash应用中每个资源文件的版本号存储至对应所述版本的flash应用的配置文件中,本方法对应的代码为:In one embodiment, the version number of each resource file in the updated flash application is stored in a configuration file corresponding to the version of the flash application based on the loadversion method in the versionmanaget class. The code corresponding to the method is:
Figure PCTCN2017076602-appb-000003
Figure PCTCN2017076602-appb-000003
现在发布版本的时候一旦有问题只能通过SVN的方式去还原文件,这样做比较耗时,还容易出错。用这种配置的方式去处理的话,一旦有问题可以立马在后台操作回到指定的版本,用户也不会重复的 加载不必要的一些资源造成资源浪费。Now when there is a problem with the release version, you can only restore the file through SVN. This is time consuming and error-prone. If you use this configuration to deal with it, once there is a problem, you can immediately return to the specified version in the background, and the user will not repeat it. Loading unnecessary resources causes a waste of resources.
在一个实施例中,所述步骤S1还包括:In an embodiment, the step S1 further includes:
当更新的flash应用处于真实环境时,匹配对应所述应用名的配置文件;或Matching a configuration file corresponding to the application name when the updated flash application is in a real environment; or
当更新的flash应用处于测试环境时,修改对应所述应用名的配置文件的文件名;When the updated flash application is in the test environment, modify the file name of the configuration file corresponding to the application name;
其中,修改后的配置文件的文件名依次包括源配置文件名、格式名以及对应的flash应用的版本号。The file name of the modified configuration file includes the source configuration file name, the format name, and the version number of the corresponding flash application.
本发明中的真实环境,即为用户的环境,而测试环境是与真实环境相对的环境,意为开发者的环境。The real environment in the present invention is the environment of the user, and the test environment is an environment opposite to the real environment, meaning the environment of the developer.
在一个实施例中,所述步骤S1还包括:In an embodiment, the step S1 further includes:
将所述配置文件转换为flash应用可识别的格式。Convert the configuration file to a format recognizable by the flash application.
在一个实施例中,所述步骤S2进一步包括:In an embodiment, the step S2 further includes:
S2.1、对于待更新的资源文件,基于所述配置文件,检索更新的flash应用中与所述资源文件的源资源文件名相同的文件;以及S2.1. Search, for the resource file to be updated, a file in the updated flash application that is the same as the source resource file name of the resource file, according to the configuration file;
S2.2、当flash应用处于真实环境时,将所述资源文件更新为更新的flash应用中与所述资源文件的源资源文件名相同的资源文件;S2.2. When the flash application is in a real environment, update the resource file to a resource file in the updated flash application that is the same as the source resource file name of the resource file.
其中,所述资源文件的文件名依次包括源资源文件名、资源文件的版本号以及格式名。The file name of the resource file includes a source resource file name, a version number of the resource file, and a format name.
步骤S2需要采用versionmanaget类中的getVersionUrl方法,这个类是专门负责版本号管理的类,它保存了所有文件的一个版本的信息,使用这个类来处理的版本号管理,该方法能够获取更新版本中指定文件对应的带版本号的名字,执行流程如下:Step S2 needs to use the getVersionUrl method in the versionmanaget class, which is a class responsible for version number management. It saves information about a version of all files, and uses this class to handle version number management. This method can obtain updated versions. Specify the name of the file with the version number. The execution flow is as follows:
1.要取player.swf这个文件加上版本号后的名字,就将player.swf 传至getVersionUrl方法。1. To take the player.swf file with the name after the version number, you will play.swf Pass to the getVersionUrl method.
2.判断是否是真实环境,如果不是真实环境就用player.swf这个名字,然后加上时间戳来避免浏览器缓存。2. Determine whether it is a real environment, if it is not the real environment, use the name player.swf, and then add a timestamp to avoid browser cache.
3.如果是真实环境,那么就从之前基于loadVersion方法加载的配置文件中,找player.swf这个名字对应的属性(配置文件转换成flash应用可识别的格式后的文件大小、版本号信息都称之为属性),那么就拿到对应的版本号了,然后组装成player_版本号.swf就可以了。3. If it is a real environment, then from the configuration file loaded based on the loadVersion method, find the attribute corresponding to the name player.swf (the file size and version number information after the configuration file is converted into the format recognizable by the flash application are called For the attribute), then get the corresponding version number, and then assemble into the player_ version number. swf.
在一个实施例中,基于versionmanaget类中的setversion方法,将所述配置文件转换为flash应用可识别的格式。setversion方法是versionManager类中的一个方法,用来设置一份文件版本号的配置信息的,这里每个文件包含文件路径,文件大小,文件名,版本号等信息,这里主要用到的就是版本号字段,然后用文件名来做唯一索引。In one embodiment, the configuration file is converted to a format recognizable by the flash application based on the setversion method in the versionmanaget class. The setversion method is a method in the versionManager class, which is used to set the configuration information of a file version number. Each file here contains the file path, file size, file name, version number, etc. The main version used here is the version number. Field, then use the file name to make a unique index.
setversion方法对应的代码如下:The code corresponding to the setversion method is as follows:
Figure PCTCN2017076602-appb-000004
Figure PCTCN2017076602-appb-000004
Figure PCTCN2017076602-appb-000005
Figure PCTCN2017076602-appb-000005
在一个实施例中,所述步骤S2.2还包括:当flash应用处于测试环境时,在所述资源文件的文件名后加上时间戳。In an embodiment, the step S2.2 further includes: adding a timestamp after the file name of the resource file when the flash application is in the test environment.
版本回退就是说把flash应用的更新后的版本回退到旧的版本,它跟版本号是有关系的,要知道版本号才能回退。例如某产品需要发布一个新的版本到线上,那么说当前线上的版本是A版本,要发上去的新版本是B版本,然后用B版本发布到线上,但是发上去之后发现有严重的问题导致用户无法使用,这个时候就需要回退到之前的稳定版本A这个版本,这就是版本回退的作用。The version rollback means that the updated version of the flash application is rolled back to the old version, which is related to the version number. You must know that the version number can be rolled back. For example, if a product needs to release a new version to the online, then the current online version is the A version. The new version to be sent is the B version, and then the B version is released to the online, but it is found to be serious after being sent. The problem caused the user to be unable to use, this time you need to fall back to the previous version of the stable version A, which is the role of the version fallback.
在一个实施例中,所述flash应用的版本控制方法还包括:In an embodiment, the version control method of the flash application further includes:
S3、基于回退的flash应用的应用名,获得对应于所述应用名的配置文件;以及S3. Obtain a configuration file corresponding to the application name based on an application name of the rollback flash application;
S4、基于所述配置文件,回退对应的flash应用;S4. Roll back the corresponding flash application based on the configuration file.
回退的方法和更新的思路是一样的,都是根据配置文件进行版本控制,不再赘述。The method of rollback is the same as the idea of updating. The version control is based on the configuration file and will not be described again.
实施例二Embodiment 2
本发明实施例提供一种flash应用的版本控制系统,所述flash应用包含若干个资源文件,包括:An embodiment of the present invention provides a version control system for a flash application, where the flash application includes a plurality of resource files, including:
配置文件模块,基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及 a configuration file module that obtains a configuration file corresponding to the application name based on an application name of the updated flash application;
更新模块,与所述配置文件模块连接,基于所述配置文件,更新对应的flash应用;Updating a module, connecting with the configuration file module, and updating a corresponding flash application based on the configuration file;
其中,所述配置文件包含该flash应用中的所有资源文件的版本号;The configuration file includes a version number of all resource files in the flash application.
所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
实施例三Embodiment 3
图2是示出本申请实施例三的一种flash应用的版本控制设备的结构框图。FIG. 2 is a structural block diagram showing a version control device of a flash application according to Embodiment 3 of the present application.
参照图2,所述一种flash应用的版本控制设备,包括:处理器(processor)201、存储器(memory)202和总线203;Referring to FIG. 2, the version control device of the flash application includes: a processor 201, a memory 202, and a bus 203;
其中,处理器201及存储器202通过所述总线203完成相互间的通信;The processor 201 and the memory 202 complete communication with each other through the bus 203;
所述处理器201用于调用所述存储器202中的程序指令,以执行上述各方法实施例所提供的方法,例如包括:基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及基于所述配置文件,更新对应的flash应用;其中,所述配置文件包含该flash应用中的所有资源文件的版本号;所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The processor 201 is configured to invoke the program instructions in the memory 202 to perform the method provided by the foregoing method embodiments, for example, including: obtaining a configuration corresponding to the application name based on an application name of the updated flash application. And updating the corresponding flash application based on the configuration file; wherein the configuration file includes a version number of all resource files in the flash application; and the application name includes a source application name and an application version number of the flash application. And the format name.
实施例四Embodiment 4
本实施例公开一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的方法,例如包括:基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及基于所述配置文件,更 新对应的flash应用;其中,所述配置文件包含该flash应用中的所有资源文件的版本号;所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer The method provided by each of the foregoing method embodiments is performed, for example, comprising: obtaining a configuration file corresponding to the application name based on an application name of the updated flash application; and based on the configuration file, a new corresponding flash application; wherein the configuration file includes a version number of all resource files in the flash application; the application name includes a source application name, an application version number, and a format name of the flash application.
实施例五Embodiment 5
本实施例提供一种非暂态计算机可读存储介质,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行上述各方法实施例所提供的方法,例如包括:基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及基于所述配置文件,更新对应的flash应用;其中,所述配置文件包含该flash应用中的所有资源文件的版本号;所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The embodiment provides a non-transitory computer readable storage medium, the non-transitory computer readable storage medium storing computer instructions, the computer instructions causing the computer to perform the methods provided by the foregoing method embodiments, including, for example, Retrieving a configuration file corresponding to the application name based on an application name of the updated flash application; and updating a corresponding flash application based on the configuration file; wherein the configuration file includes all resource files in the flash application The version number; the application name includes the source application name, the application version number, and the format name of the flash application.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
以上所描述的一种操作数据库的设备等实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The above described embodiments of an apparatus for operating a database are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be Physical units can be located in one place or distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软 件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or in the form of software products. The product may be stored in a computer readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform various embodiments. Or the method described in some parts of the examples.
最后,本申请的方法仅为较佳的实施方案,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 Finally, the method of the present application is only a preferred embodiment and is not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.

Claims (13)

  1. 一种flash应用的版本控制方法,所述flash应用包含若干个资源文件,其特征在于,所述方法包括:A version control method for a flash application, the flash application includes a plurality of resource files, wherein the method includes:
    S1、基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及S1. Obtain a configuration file corresponding to the application name based on an application name of the updated flash application;
    S2、基于所述配置文件,更新对应的flash应用;S2. Update the corresponding flash application based on the configuration file.
    其中,所述配置文件包含该flash应用中的所有资源文件的版本号;The configuration file includes a version number of all resource files in the flash application.
    所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
  2. 如权利要求1所述的flash应用的版本控制方法,其特征在于,所述步骤S1之前还包括:The version control method of the flash application according to claim 1, wherein the step S1 further comprises:
    检索更新的flash应用的应用名。Retrieve the application name of the updated flash application.
  3. 如权利要求2所述的flash应用的版本控制方法,其特征在于,所述检索更新的flash应用的应用名之前还包括:The version control method of the flash application according to claim 2, wherein the retrieving the application name of the updated flash application further comprises:
    创建所述更新的flash应用的应用名;以及Creating an application name of the updated flash application;
    将所述更新的flash应用中每个资源文件的版本号存储至对应所述版本的flash应用的配置文件中;Saving a version number of each resource file in the updated flash application to a configuration file of a flash application corresponding to the version;
    其中,所述配置文件的文件名依次包括源配置文件名、对应于所述flash应用的版本号以及格式名。The file name of the configuration file includes a source configuration file name, a version number corresponding to the flash application, and a format name.
  4. 如权利要求3所述的flash应用的版本控制方法,其特征在于,所述步骤S1还包括:The version control method of the flash application according to claim 3, wherein the step S1 further comprises:
    当更新的flash应用处于真实环境时,匹配对应所述应用名的配置 文件;或Matching the configuration corresponding to the application name when the updated flash application is in the real environment File; or
    当更新的flash应用处于测试环境时,修改对应所述应用名的配置文件的文件名;When the updated flash application is in the test environment, modify the file name of the configuration file corresponding to the application name;
    其中,修改后的配置文件的文件名依次包括源配置文件名、格式名以及对应的flash应用的版本号。The file name of the modified configuration file includes the source configuration file name, the format name, and the version number of the corresponding flash application.
  5. 如权利要求4所述的flash应用的版本控制方法,其特征在于,所述步骤S1还包括:The version control method of the flash application according to claim 4, wherein the step S1 further comprises:
    将所述配置文件转换为flash应用可识别的格式。Convert the configuration file to a format recognizable by the flash application.
  6. 如权利要求1所述的flash应用的版本控制方法,其特征在于,所述步骤S2进一步包括:The version control method of the flash application according to claim 1, wherein the step S2 further comprises:
    S2.1、对于待更新的资源文件,基于所述配置文件,检索更新的flash应用中与所述资源文件的源资源文件名相同的文件;以及S2.1. Search, for the resource file to be updated, a file in the updated flash application that is the same as the source resource file name of the resource file, according to the configuration file;
    S2.2、当更新的flash应用处于真实环境时,将所述资源文件更新为更新的flash应用中与所述资源文件的源资源文件名相同的资源文件;S2.2. When the updated flash application is in a real environment, update the resource file to a resource file in the updated flash application that is the same as the source resource file name of the resource file.
    其中,所述资源文件的文件名依次包括源资源文件名、资源文件的版本号以及格式名。The file name of the resource file includes a source resource file name, a version number of the resource file, and a format name.
  7. 如权利要求6所述的flash应用的版本控制方法,其特征在于,所述步骤S2.2还包括:当更新的flash应用处于测试环境时,在所述资源文件的文件名后加上时间戳。The version control method of the flash application of claim 6, wherein the step S2.2 further comprises: adding a timestamp after the file name of the resource file when the updated flash application is in the test environment .
  8. 如权利要求7所述的flash应用的版本控制方法,其特征在于,基于versionmanaget类中的loadversion方法,将所述更新的flash应用中每个文件的版本号存储至对应所述版本的flash应用的配置文件中。The version control method of the flash application according to claim 7, wherein the version number of each file in the updated flash application is stored to a flash application corresponding to the version based on the loadversion method in the versionmanaget class. In the configuration file.
  9. 如权利要求1所述的flash应用的版本控制方法,其特征在于, 还包括:A version control method for a flash application according to claim 1, wherein Also includes:
    S3、基于回退的flash应用的应用名,获得对应于所述应用名的配置文件;以及S3. Obtain a configuration file corresponding to the application name based on an application name of the rollback flash application;
    S4、基于所述配置文件,回退对应的flash应用。S4. Roll back the corresponding flash application based on the configuration file.
  10. 一种flash应用的版本控制系统,所述flash应用包含若干个资源文件,其特征在于,包括:A version control system for a flash application, the flash application comprising a plurality of resource files, comprising:
    配置文件模块,基于更新的flash应用的应用名,获得对应于所述应用名的配置文件;以及a configuration file module that obtains a configuration file corresponding to the application name based on an application name of the updated flash application;
    更新模块,与所述配置文件模块连接,基于所述配置文件,更新对应的flash应用;Updating a module, connecting with the configuration file module, and updating a corresponding flash application based on the configuration file;
    其中,所述配置文件包含该flash应用中的所有资源文件的版本号;The configuration file includes a version number of all resource files in the flash application.
    所述应用名依次包括flash应用的源应用名、应用版本号以及格式名。The application name includes a source application name, an application version number, and a format name of the flash application.
  11. 一种flash应用的版本控制设备,其特征在于,包括:A version control device for a flash application, comprising:
    至少一个处理器;以及At least one processor;
    与所述处理器通信连接的至少一个存储器,其中:At least one memory communicatively coupled to the processor, wherein:
    所述存储器存储有可被所述处理器执行的程序指令,所述处理器调用所述程序指令能够执行如权利要求1至9任一所述的方法。The memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1-9.
  12. 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行如权利要求1至9任一所述的方法。A computer program product, comprising: a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer performs the method of any one of claims 1 to 9.
  13. 一种非暂态计算机可读存储介质,其特征在于,所述非暂态 计算机可读存储介质存储计算机指令,所述计算机指令使所述计算机执行如权利要求1至9任一所述的方法。 Non-transitory computer readable storage medium, characterized in that the non-transient state The computer readable storage medium stores computer instructions that cause the computer to perform the method of any of claims 1-9.
PCT/CN2017/076602 2016-12-26 2017-03-14 Version control method and system for flash application WO2018120436A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611218387.3A CN106713460B (en) 2016-12-26 2016-12-26 Version control method and system for flash application
CN201611218387.3 2016-12-26

Publications (1)

Publication Number Publication Date
WO2018120436A1 true WO2018120436A1 (en) 2018-07-05

Family

ID=58902425

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/076602 WO2018120436A1 (en) 2016-12-26 2017-03-14 Version control method and system for flash application

Country Status (2)

Country Link
CN (1) CN106713460B (en)
WO (1) WO2018120436A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783533A (en) * 2021-02-03 2021-05-11 北京达佳互联信息技术有限公司 Version information updating method, version information updating device, terminal and storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958827B (en) * 2017-05-25 2021-11-02 贵州白山云科技股份有限公司 Method and system for processing program upgrading fault
CN111046311A (en) * 2019-12-17 2020-04-21 深圳前海环融联易信息科技服务有限公司 Method and device for realizing traceless iteration version of PC (personal computer) end, computer equipment and storage medium
US20230131643A1 (en) * 2021-10-26 2023-04-27 Druva Inc. System and method for reference-aware application identification in container deployment environments

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102109989A (en) * 2009-12-29 2011-06-29 阿里巴巴集团控股有限公司 Method, device and system for controlling browser cache
CN102118260A (en) * 2009-12-30 2011-07-06 中兴通讯股份有限公司 Method for automatically managing net element version and network system
CN103139279A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 File access method and system
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN105049486A (en) * 2015-06-16 2015-11-11 腾讯科技(北京)有限公司 Version management and file pulling control methods for static files, version management and file pulling control devices, and version control system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102520948B (en) * 2011-12-09 2015-08-12 福建联迪商用设备有限公司 Application maintenance update method and device
CN102736937A (en) * 2012-06-04 2012-10-17 珠海市魅族科技有限公司 Method for acquiring and providing information of application program, terminal and network server
CN104809011B (en) * 2015-04-13 2018-04-27 中国科学院声学研究所 A kind of management method of application program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102109989A (en) * 2009-12-29 2011-06-29 阿里巴巴集团控股有限公司 Method, device and system for controlling browser cache
CN102118260A (en) * 2009-12-30 2011-07-06 中兴通讯股份有限公司 Method for automatically managing net element version and network system
CN103139279A (en) * 2011-12-05 2013-06-05 阿里巴巴集团控股有限公司 File access method and system
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN105049486A (en) * 2015-06-16 2015-11-11 腾讯科技(北京)有限公司 Version management and file pulling control methods for static files, version management and file pulling control devices, and version control system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112783533A (en) * 2021-02-03 2021-05-11 北京达佳互联信息技术有限公司 Version information updating method, version information updating device, terminal and storage medium

Also Published As

Publication number Publication date
CN106713460B (en) 2019-12-10
CN106713460A (en) 2017-05-24

Similar Documents

Publication Publication Date Title
US9477598B2 (en) System and method for implementing cache consistent regional clusters
US10437795B2 (en) Upgrading systems with changing constraints
US10120924B2 (en) Quarantine and repair of replicas in a quorum-based data storage system
US9641468B2 (en) Method, server, client, and system for releasing instant messaging key-value data
WO2018120436A1 (en) Version control method and system for flash application
US9077681B2 (en) Page loading optimization using page-maintained cache
US8788760B2 (en) Adaptive caching of data
WO2017113060A1 (en) Website access method and device, and website system
US20120096043A1 (en) Data graph cloud system and method
US20140282370A1 (en) Methods for managing applications using semantic modeling and tagging and devices thereof
US8494888B2 (en) Offline modification of business data
CN104281468A (en) Method and system for distributed virtual machine image management
US20140280493A1 (en) Application Architecture Supporting Multiple Services and Caching
US9723052B2 (en) Utilizing content via personal clouds
KR101962301B1 (en) Caching pagelets of structured documents
JP6386089B2 (en) Optimized browser rendering process
JP2015528611A (en) Dynamic data acquisition method and system
US20200153889A1 (en) Method for uploading and downloading file, and server for executing the same
US11811851B2 (en) Method and system for enforcing governance across multiple content repositories using a content broker
CN111200634A (en) Cache resource linkage updating method, system and server
JP2024507055A (en) Application deployment within a computing environment
US20160182673A1 (en) Dynamic cache injector
US9286055B1 (en) System, method, and computer program for aggregating fragments of data objects from a plurality of devices
US10827035B2 (en) Data uniqued by canonical URL for rest application
CN107103001B (en) Method, device and system for acquiring target front-end resource file based on browser

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: 17887179

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: 17887179

Country of ref document: EP

Kind code of ref document: A1