CN105049486B - Method for edition management, the apparatus and system of static file - Google Patents

Method for edition management, the apparatus and system of static file Download PDF

Info

Publication number
CN105049486B
CN105049486B CN201510333621.6A CN201510333621A CN105049486B CN 105049486 B CN105049486 B CN 105049486B CN 201510333621 A CN201510333621 A CN 201510333621A CN 105049486 B CN105049486 B CN 105049486B
Authority
CN
China
Prior art keywords
file
static
version number
module
version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510333621.6A
Other languages
Chinese (zh)
Other versions
CN105049486A (en
Inventor
李晓明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201510333621.6A priority Critical patent/CN105049486B/en
Publication of CN105049486A publication Critical patent/CN105049486A/en
Application granted granted Critical
Publication of CN105049486B publication Critical patent/CN105049486B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Medical Informatics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of method for edition management of static file, apparatus and system.Wherein, the method for edition management of static file includes: that and will be marked with the static file of version number as file to be released for one version number of each static file label at least one static file;Generate the edition configuration file of at least one corresponding file to be released;It include the respective filename of at least one described file to be released and version number information in the edition configuration file;At least one described file distribution to be released is published in Operation Server into content delivery network service device, and by the edition configuration file with gray scale published method.Technical solution in the present invention can be realized clearly managing and controlling to static file version, avoid the confusion of static file version, and can support the rollback of static file, gray scale publication and increment publication.

Description

Method for edition management, the apparatus and system of static file
Technical field
This application involves internet area, in particular to a kind of method for edition management of static file, edition management device, File pulls control device and version control system.
Background technique
Browser is obtaining associated static file, such as the js file of javascript scripting language, cascading style sheets Single (Cascading Style Sheet, css) file and picture file etc., when generating webpage, in order to improve the performance of Web, It would generally be when downloading these static files from content distributing network (Content Delivery Network, CDN) for the first time, it will These static files are cached, and a cache-time is arranged for it, as long as the cache-time does not fail, next time is regenerated When the webpage, it just without pulling these static files again from CDN, and need to only obtain, improve from local cache area Network speed also saves network flow.
But current problem is: when the content update with the presence of static file, as changed portion in certain js file a.js Point code or increase delete partial code etc., at this point, if browser rs cache a.js file and its cache-time does not lose If effect, then browser still can call the a.js file of local cache, updated without pulling again from CDN A.js file will result in the confusion of webpage static file version on this certain procedures.
In order to solve this problem, two kinds of solutions are currently suggested.The first is in uniform resource locator (Uniform Resource Locator, URL) is below plus a query string is to distinguish different versions, such as: http: Www.qq.com/a.js? version=123.Second is direct change filename to realize the differentiation of version, such as: http:www.qq.com/a123.js.Implementation in both schemes is realized by manual change, and behaviour is easy It makes mistakes;In addition, both of which does not support file rollback that can not retract that is, when the new version of publication has mistake to it Preceding version;In addition, both schemes do not support gray scale publication and increment publication yet.
For this purpose, those skilled in the art are also finding other solutions.
Summary of the invention
In view of this, on the one hand providing a kind of method for edition management of static file, another party in the embodiment of the present invention Face provides the edition management device and version control system of a kind of static file, to realize to the clear of static file version It manages and controls, avoids the confusion of static file version, and can support the rollback of static file, gray scale publication and increment publication.
The method for edition management of static file provided by the present invention, comprising:
For one version number of each static file label at least one static file, and the institute that version number will be marked with Static file is stated as file to be released;
Generate the edition configuration file of at least one corresponding file to be released;Described in including in the edition configuration file extremely The respective filename of a few file to be released and version number information;
At least one described file distribution to be released is configured into text into content delivery network service device, and by the version Part is published in Operation Server with gray scale published method, to receive the browsing from a browser in an Operation Server When request, corresponding edition configuration file, the file that will include in the edition configuration file are read according to the browse request Name and version number information are supplied to the browser, so that the browser can be according to the filename and version number information Corresponding static file is pulled from the content delivery network service device, and executes pulled static file;Wherein, described Method further comprises:
Generate the file mergences configuration file comprising file mergences parameter;
According to the file mergences parameter in the file mergences configuration file, by each phase in different types of static subfile The static subfile of same type is merged into a static file respectively, obtains at least one static file.
The edition management device of static file provided by the present invention is used for a version management server, described device packet Include: version number's mark module, edition configuration file generation module, static resource release module, edition configuration file release module, File mergences configuration file generation module and file combination module;Wherein,
Version number's mark module is used for as one version of each static file label at least one static file Number, and the static file of version number will be marked with as file to be released;
The edition configuration file generation module is used to generate the edition configuration file of at least one corresponding file to be released; It include the respective filename of at least one described file to be released and version number information in the edition configuration file;
The static resource release module is used to take at least one described file distribution to be released to content distributing network It is engaged in device;
The edition configuration file release module is used to the edition configuration file being published to fortune with gray scale published method It seeks in server, so as to when an Operation Server is received from the browse request of a browser, according to the browse request Corresponding edition configuration file is read, the filename and version number information that include in the edition configuration file are supplied to described Browser, so that the browser can be according to the filename and version number information from the content delivery network service device In pull corresponding static file, and execute pulled static file;
The file mergences configuration file generation module is used to generate the file mergences configuration text comprising file mergences parameter Part;
The file combination module is used for according to the file mergences parameter in the file mergences configuration file, by inhomogeneity The static subfile of each same type is merged into a static file respectively in the static subfile of type, obtains at least one static state File.
The version control system of static file provided by the present invention, comprising: a version management server, an operating service Device, a content delivery network service device and one include the terminal of browser;Wherein,
The version management server includes the edition management device of above-mentioned browser static file;
The Operation Server includes that file pulls control device, wherein the file pulls control device and includes:
Receiving module, for receiving the browse request from a browser;
Configuration file read module for reading corresponding edition configuration file according to the browse request, and obtains institute State the filename for including in edition configuration file and version number information;
Sending module, for the filename and version number information to be supplied to the browser, so as to the browser Corresponding each filename and version number are pulled from the content delivery network service device according to the filename and version number information The static file of information, and execute pulled static file.
As it can be seen that in the embodiment of the present invention, by for one version number of each static file label, such as can be in static text An additional version number behind the filename of part will be marked with the static file of version number as file to be released, and raw At least one is to be released described in including at the edition configuration file of at least one corresponding file to be released, in the edition configuration file The respective filename of file and version number information;Later by least one described file distribution to be released into CDN server, and The edition configuration file is published in Operation Server with gray scale published method.Later, browser is to Operation Server When sending browse request, Operation Server can read corresponding edition configuration file, and indicate browser from CDN server Corresponding static file is pulled, to realize clearly managing and controlling to static file version, avoids static file version This confusion, and due to multiple Operation Server released version configuration files when can be used gray scale published method and be sent out Cloth, therefore the gray scale of static file can be supported to issue.Due to can only configure in edition configuration file, there are version updatings again Static file, therefore the increment of static file can be supported to issue.Further, since the static file of different editions is to exist simultaneously , and filename having the same, therefore when the new version of publication has mistake, it can retract to the static state text of version before Part, to realize the rollback of static file.
Detailed description of the invention
For the clearer technical solution illustrated in the embodiment of the present invention, will make below to required in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.Wherein,
Fig. 1 is a kind of structural schematic diagram of implementation environment involved in each embodiment of the present invention;
Fig. 2 is a kind of exemplary process diagram of the method for edition management of static file in the embodiment of the present invention;
Fig. 3 is a kind of flow diagram of implementation method of step 201 in process shown in Fig. 2;
Fig. 4 pulls the exemplary process diagram of control method for the file of static file a kind of in the embodiment of the present invention;
Fig. 5 is a kind of exemplary process diagram of the edition control method of static file in the embodiment of the present invention;
Fig. 6 is a kind of exemplary block diagram of the edition management device of static file in the embodiment of the present invention;
Fig. 7 is the structural schematic diagram of version number's mark module in Fig. 6 shown device;
Fig. 8 pulls the exemplary block diagram of control device for the file of static file a kind of in the embodiment of the present invention;
Fig. 9 is a kind of structural schematic diagram of server apparatus in the embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, by the following examples to of the invention further detailed It describes in detail bright.
Fig. 1 is a kind of structural schematic diagram of implementation environment involved in each embodiment of the present invention.As shown in Figure 1, the reality Applying environment includes version management server 110, Operation Server 120, CDN server 130 and terminal 140.
Wherein, version management server 110, Operation Server 120 and CDN server 130 can be a service respectively Device, the server cluster perhaps consisted of several servers respectively or be a cloud computing service center respectively.
Operation has browser in terminal 140, and terminal 140 can be mobile phone, iPad, tablet computer, portable calculating on knee Machine and desktop computer etc..
Between version management server 110 and Operation Server 120, version management server 110 and CDN server 130 Between, between Operation Server 120 and terminal 140 and between CDN server 130 and terminal 140, nothing can be passed through respectively Gauze network or cable network are connected.
Fig. 2 is a kind of exemplary process diagram of the method for edition management of static file in the embodiment of the present invention.This method master To be applied in version management server 110.As shown in Fig. 2, this method may include following steps:
Step 201, it is one version number of each static file label at least one static file, and version will be marked with This number static file is as file to be released.
The mode of version number is marked to be different from present change filename come by way of distinguishing version number for static file. Change filename come in by way of distinguishing version number, filename is not original filename, i.e., system no longer will Possess the file (such as a.js) of old file name and possesses the file (such as a123.js) of the filename after change as same file Different editions, but will treat both as different files.And the application is marked for static file in the mode of version number, and The filename of static file is not changed.For example, there is a kind of being achieved in that on the basis of file name for version number of label to chase after Add a version number, and there are a blank characters, such as " _ " between file name and version number.If version number added Behind filename, then the filename of static file can be obtained by the content before detection symbols " _ ", is accorded with by detection The version number of static file can be obtained in content after number " _ ".So, system can will be marked with the same of different editions number The file of filename, such as a_1001.js and a_1002.js, are considered as the different editions of same file.
Step 202, the edition configuration file of at least one corresponding file to be released is generated;It is wrapped in the edition configuration file Include the respective filename of at least one described file to be released and version number information.
In this step, edition configuration file may include the filename and version of each static file needed for a website Number information.For example, the edition configuration file generated can be version.ini.
Step 203, by least one described file distribution to be released into CDN server 130.
In this step, at least one described file to be released can be packaged into a static resource packet, such as compressed package Release.tar.gz etc., is issued, and CDN server 130 can carry out processing of unpacking, such as decompression later, to obtain Each file to be released.
Step 204, the edition configuration file is published in Operation Server 120 with gray scale published method.
Later, when an Operation Server 120 receives the browse request of the browser from a terminal 140, according to institute It states browse request and reads corresponding edition configuration file, the filename and version number information that will include in the edition configuration file It is supplied to the browser, so that the browser can be according to the filename and version number information from the CDN service Corresponding static file is pulled in device 130, and executes pulled static file.
Successfully cause subsequent to be pulled according to edition configuration file to avoid not issuing due to the static file in step 203 The case where being pulled unsuccessfully when static file there are file, in the other embodiment of the present embodiment, step 203 and step 204 Between can further comprise: resource issue verification step, i.e., it is pending according at least one for including in the edition configuration file The respective filename of cloth file and version number information pull corresponding static file from the CDN server 130, described When the corresponding all static files of edition configuration file pull successfully, determine that static resource is issued successfully.At this point, executing step again Rapid 204.Resource publication verification step can be executed by version management server 110, can also be completed by other calibration equipments.Such as Fruit is that if being completed by other calibration equipments, then can have information between version management server 110 and the calibration equipment Interaction, i.e., first version management server 110 can indicate calibration equipment pull with the filename for including in edition configuration file and The corresponding static file of version number information, static file can be pulled result notice and give version management server by calibration equipment later 110, so that version management server 110 determines whether for edition configuration file to be published in Operation Server according to the result.
In addition, the static file in step 201, can be by different developers and writing to same file The static file being sequentially completed is also possible to the different piece that different developers are respectively completed same static file, i.e., static After subfile, then the static file obtained after each static subfile is merged.It, then, can be into one before step 201 if it is the latter Step includes: to generate a file mergences configuration file, and this document merges in configuration file comprising being used to indicate which file respectively The file mergences parameter merged;According to the file mergences parameter in the file mergences configuration file, by different type Static subfile in the static subfile of each same type be merged into a static file respectively, obtain at least one static text Part.For example, in exploitation file, there may be several css subfiles and several js subfiles, then by executing the merging After operation, can obtain two merge after static file, i.e. a css file and a js file.
In order to which compression processing can also be executed to each static file, for removing file for the volume of low each static file In space, newline and annotation etc., to obtain compressed each static file.
When specific implementation, step 201 is that static file marks the process of version number can be there are many specific implementation form, Fig. 3 In one kind for being shown in which.As shown in figure 3, may include following steps for the method that static file marks version number:
Step 301, to each static file at least one static file, judge whether to be stored with the static file Original, if not provided, execute step 302;Otherwise, step 303 is executed.
Step 302, an initial version number is generated for the static file.
Step 303, judge whether the static file has content update compared to the original of the stored static file, If so, executing step 204;Otherwise, terminate current process.
Step 304, according to the version number of the stored original, a new version is generated for the static file Number.
For example, the version number generated for the static file can be 1001 for above-mentioned a.js file.
Step 305, the original and its version number are carried out more using the static file and version number generated Newly.
Step 306, by version labelled notation generated in the filename of the static file, and version number will be marked with Static file as file to be released.
For example, for above-mentioned a.js file, when for the a.js file mark version number, the version that can will generate for it This number 1001 addition is behind filename, for example, a_1001.js.
Fig. 4 pulls the exemplary process diagram of control method for the file of static file a kind of in the embodiment of the present invention.The party Method is mainly used in Operation Server 120.As shown in figure 4, this method may include following steps:
Step 401, the browse request of the browser from a terminal is received.
In this step, which can be the browse request of a corresponding website.
Step 402, corresponding edition configuration file is read according to the browse request, and extracts the edition configuration file In include filename and version number information.
In this step, Operation Server is requested according to corresponding website browsing, can find corresponding edition configuration file, and Extract the filename and version number information in the edition configuration file.
Step 403, the filename and version number information are supplied to the browser.Later, the browsing of the terminal Device pulls the static state text of corresponding each filename and version number information according to the filename and version number information from CDN server Part, and pulled static file is executed, to obtain the webpage of the website.
Fig. 5 is a kind of exemplary process diagram of the edition control method of static file in the embodiment of the present invention.This method is answered For in implementation environment shown in Fig. 1.As shown in figure 5, this method comprises the following steps:
Step 501, version management server is one version of each static file label at least one static file Number, and the static file of version number will be marked with as file to be released.
Step 502, version management server generates the edition configuration file of at least one corresponding file to be released;The version It include the respective filename of at least one described file to be released and version number information in this configuration file.
Step 503, by least one described file distribution to be released into CDN server.
In this step, at least one described file to be released can be packaged into a static resource packet and be issued.
Step 504, the edition configuration file is published in Operation Server with gray scale published method.
Step 505, Operation Server receives the browse request for carrying out the browser of self terminal.
Step 506, Operation Server reads corresponding edition configuration file according to the browse request.
Step 507, the filename and version number information that include in the edition configuration file are supplied to by Operation Server The browser of the terminal.
Step 508, the browser of terminal sends file acquisition request to the CDN server.The file acquisition request In include the filename and version number information.
Step 509, the static file of the correspondence filename and version number information is sent to the clear of terminal by CDN server Look at device.
Step 510, the browser of terminal executes acquired static file.
Following is apparatus of the present invention embodiment, can be used for executing the corresponding embodiment of the method for the present invention.For the present invention Undisclosed details in Installation practice, please refers to the description in embodiment of the present invention method.
Fig. 6 is a kind of exemplary block diagram of the edition management device of static file in the embodiment of the present invention.The version pipe Reason device can be implemented as the portion of version management server shown in Fig. 1 110 in such a way that software, hardware or both combine Divide or whole.The edition management device can include: version number's mark module 601, edition configuration file generation module 602, quiet State resource release module 603 and edition configuration file release module 604.
Wherein, version number's mark module 601 is used for as each static file label one at least one static file Version number, and the static file of version number will be marked with as file to be released.
Edition configuration file generation module 602 is used to generate the edition configuration file of at least one corresponding file to be released; It include the respective filename of at least one described file to be released and version number information in the edition configuration file.
Static resource release module 603 is used at least one described file distribution to be released to content delivery network service In device.
Edition configuration file release module 604 is used to the edition configuration file being published to operation with gray scale published method In server.Later, it when an Operation Server is received from the browse request of a browser, is read according to the browse request Corresponding edition configuration file is taken, the filename and version number information that include in the edition configuration file are supplied to described clear Device is look at, so that the browser can be according to the filename and version number information from the content delivery network service device Corresponding static file is pulled, and executes pulled static file.
In one embodiment, which can further comprise: file mergences configuration file generation module 605 and file Merging module 606.
Wherein, file mergences configuration file generation module 605 is used to generate the file mergences comprising file mergences parameter and matches Set file;
File combination module 606 is used for according to the file mergences parameter in the file mergences configuration file, by inhomogeneity The static subfile of each same type is merged into a static file respectively in the static subfile of type, obtains at least one static state File.
In one embodiment, which can further comprise: compressing file module 607, for each static text Part carries out space/annotation compression, obtains compressed each static file.
In one embodiment, which can further comprise: resource issues correction verification module 608, for according to described The respective filename of at least one for including in edition configuration file file to be released and version number information, from the content distribution Corresponding static file is pulled in network server, pulls success in the corresponding all static files of the edition configuration file When, determine that static resource is issued successfully.Correspondingly, edition configuration file release module 604 is used to determine static resource publication When success, the edition configuration file is published in Operation Server with gray scale published method.
In one embodiment, version number's mark module 601 can as shown in fig. 7, comprises: memory module 701, text The additional module 705 of part content judgment module 702, version number's generation module 703, original update module 704 and version number.
Wherein, memory module 701 is used to store the original of static file and the version number of the original.
File updates judgment module 702 and is used to judge whether store in the memory module to each static file The original of static file is stated, if it is not, indicating that version number's generation module 703 is that the static file generates at the beginning of one The version number of beginning;Otherwise, judge whether the static file has content update compared to the original, if so, then indicating institute Stating version number's generation module 703 is that the static file generates a new version number.
The static file that is designated as that version number's generation module 703 is used to update judgment module according to the file generates One initial version number, or according to the version number of the original stored in the memory module 701, for the static text Part generates a new version number.
Original update module 704 is used for the version number generated using the static file and version number's generation module The original and its version number of the static file stored in the memory module are updated.
The version labelled notation that the additional module 705 of version number is used to generate version number's generation module is in the static text In the filename of part, and the static file of version number will be marked with as file to be released.
Fig. 8 pulls the exemplary block diagram of control device for the file of static file a kind of in the embodiment of the present invention.This article Part pull control device can software, hardware or both combine by way of be implemented as Operation Server part or All.This document pulls control device can include: receiving module 801, configuration file read module 802 and sending module 803.
Wherein, receiving module 801 is for receiving the browse request from a browser.
Configuration file read module 802 is used to read corresponding edition configuration file according to the browse request, and obtains The filename and version number information for including in the edition configuration file.
Sending module 803 is used to the filename and version number information being supplied to the browser, so as to the browsing Device pulls corresponding each filename and version according to the filename and version number information from the content delivery network service device The static file of number information, and execute pulled static file.
A kind of version control system of static file includes version management server as shown in Figure 1 in the embodiment of the present invention 110, at least one Operation Server 120, CDN server 130 and the terminal 140 including browser.
Wherein, version management server 110 may include the version management of the browser static file as described in Fig. 6 to 7 Device;Operation Server 120 includes that the file of browser static file as shown in Figure 8 pulls control device.
For example, version management server 110 is used for as each static file label one at least one static file Version number, and the static file of version number will be marked with as file to be released;Generate at least one corresponding text to be released The edition configuration file of part;It include the respective filename of at least one described file to be released and version in the edition configuration file This number information;Will at least one described file distribution to be released into CDN server 130, and by the edition configuration file with Gray scale published method is published in each Operation Server 120.
Operation Server 120 is used for when receiving from the browse request of a browser, is read according to the browse request Corresponding edition configuration file is taken, the filename and version number information that include in the edition configuration file are supplied to the end The browser at end 140.
The browser of terminal 140 is used to send text to the CDN server 130 according to the filename and version number information Part pulls request, and receives the static file that the CDN server 130 returns, and execute the static file.Wherein, file Pull includes the filename and version number information in request.
The file that CDN server 130 is used to receive the browser for carrying out self terminal 140 pulls request, and will the corresponding text The static file that part pulls filename and version number information in request is sent to the browser of the terminal 140.
In one embodiment, version management server 110 can be to the static text of each of at least one static file Part judges whether the original for being stored with the static file, if it is not, being that the static file generates one initially Version number;Otherwise, judge whether the static file has content update compared to the original of the stored static file, if Have, then according to the version number of the stored original, generate a new version number for the static file, using described Static file and version number generated are updated the original and its version number;Version labelled notation generated is existed In the filename of the static file.
In one embodiment, version management server 110 can further generate the file comprising file mergences parameter Merge configuration file;According to the file mergences parameter in the file mergences configuration file, by different types of static subfile In the static subfile of each same type be merged into a static file respectively, obtain at least one static file.
In one embodiment, version management server 110 further can carry out space/note to each static file Discharge contracting, obtains compressed each static file.
In one embodiment, version management server 110 can be further according to including in the edition configuration file The respective filename of at least one file to be released and version number information, pulled from the content delivery network service device pair The static file answered determines that static resource is sent out when the corresponding all static files of the edition configuration file pull successfully Cloth success, and when determining that static resource is issued successfully, the edition configuration file is published to each fortune with gray scale published method It seeks in server 120.
Fig. 9 is a kind of structural schematic diagram of server apparatus in the embodiment of the present invention.As shown in figure 9, the server apparatus Can include: processor 901, non-volatile computer readable memory 902, input and output controller 903, network communication interface 904.These components are communicated by bus 905.
In the present embodiment, multiple program modules are stored in memory 902, for example, operating system 906, network communication mould Block 907 and application program 908.
Processor 901 can read the various module (not shown)s in the application program in memory 902 to execute The various function application and data processing of server apparatus.Processor 901 in the present embodiment can be one, or It is multiple, it can be CPU, processing unit/module, ASIC, logic module or programmable gate array etc..
Input and output controller 903 has display and input equipment, for completing the input of related data, output and aobvious Show.
Operating system 906 includes but is not limited to: Android operation system, Symbian operating system, Windows operation system System, (SuSE) Linux OS etc..
Application program 908 may include version management server module, which may include that Fig. 6 extremely schemes The set of computer-executable instructions 909 and corresponding metadata and heuristic calculation that each functional module in 7 shown devices is formed Method 910.These set of computer-executable instructions can be executed as the processor 901 and complete method or figure shown in Fig. 2 to Fig. 3 6 to Fig. 7 shown device function.Alternatively, application program 908 may include that file pulls control server module, this document is pulled Control server module may include the set of computer-executable instructions 909 that each functional module in Fig. 8 shown device is formed and Corresponding metadata and heuritic approach 910.These set of computer-executable instructions can by the processor 901 execute and it is complete At method shown in Fig. 4 or the function of Fig. 8 shown device.
In the present embodiment, network communication interface 904 is matched with network communication module 906 completes the various nets of server apparatus The transmitting-receiving of network signal, including the network data exchange etc. between other servers or terminal.
In addition, each embodiment of the invention can pass through the data processing by data processing equipment such as computer execution Program is realized.Obviously, data processor constitutes the present invention.In addition, being commonly stored data in one storage medium Processing routine is by directly reading out storage medium for program or by installing or copying to data processing equipment for program It stores in equipment (such as hard disk and/or memory) and executes.Therefore, such storage medium also constitutes the present invention.Storage medium can be with Use any kind of recording mode, such as paper storage medium (such as paper tape), magnetic storage medium (such as floppy disk, hard disk, flash memory Deng), optical storage media (such as CD-ROM), magnetic-optical storage medium (such as MO) etc..
Therefore the present invention also provides a kind of storage mediums, wherein it is stored with data processor, the data processor For executing any embodiment of the above method of the present invention.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the present invention.

Claims (9)

1. a kind of method for edition management of static file characterized by comprising
For one version number of each static file label at least one static file, and the described quiet of version number will be marked with State file is as file to be released;
Generate the edition configuration file of at least one corresponding file to be released;It include described at least one in the edition configuration file The respective filename of a file to be released and version number information;
Will at least one described file distribution to be released into content delivery network service device, and by the edition configuration file with Gray scale published method is published in Operation Server, to receive the browse request from a browser in an Operation Server When, corresponding edition configuration file is read according to the browse request, by the filename for including in the edition configuration file and Version number information is supplied to the browser, so that the browser can be according to the filename and version number information from institute It states and pulls corresponding static file in content delivery network service device, and execute pulled static file;Wherein,
The method further includes:
Generate the file mergences configuration file comprising file mergences parameter;
It, will be each mutually similar in different types of static subfile according to the file mergences parameter in the file mergences configuration file The static subfile of type is merged into a static file respectively, obtains at least one static file.
2. the method according to claim 1, wherein described for the static text of each of at least one static file One version number of part label includes:
To each static file at least one static file, judge whether the original for being stored with the static file, such as Fruit does not have, then generates an initial version number for the static file;Otherwise, judge the static file compared to stored Whether the original of the static file has content update, if so, then according to the version number of the stored original, for institute State static file and generate a new version number, using the static file and version number generated to the original and its Version number is updated;By version labelled notation generated in the filename of the static file.
3. the method according to claim 1, wherein this method further comprises: being carried out to each static file Space and/or annotation compression are gone, compressed each static file is obtained.
4. the method according to claim 1, wherein described issue edition configuration file with gray scale published method Before into Operation Server, further comprise:
According to the respective filename of at least one file to be released and version number information for including in the edition configuration file, from Corresponding static file is pulled in the content delivery network service device, in the corresponding all static texts of the edition configuration file When part pulls successfully, determine that static resource is issued successfully.
5. a kind of edition management device of static file, which is characterized in that be used for a version management server, described device packet Include: version number's mark module, edition configuration file generation module, static resource release module, edition configuration file release module, File mergences configuration file generation module and file combination module;Wherein,
Version number's mark module is used to be one version number of each static file label at least one static file, and The static file of version number will be marked with as file to be released;
The edition configuration file generation module is used to generate the edition configuration file of at least one corresponding file to be released;It is described It include the respective filename of at least one described file to be released and version number information in edition configuration file;
The static resource release module is used at least one described file distribution to be released to content delivery network service device In;
The edition configuration file release module is used to the edition configuration file being published to operation clothes with gray scale published method It is engaged in device, to be read according to the browse request when an Operation Server is received from the browse request of a browser The filename and version number information that include in the edition configuration file are supplied to the browsing by corresponding edition configuration file Device, so that the browser can be drawn from the content delivery network service device according to the filename and version number information Corresponding static file is taken, and executes pulled static file;
The file mergences configuration file generation module is for generating the file mergences configuration file comprising file mergences parameter;
The file combination module is used for according to the file mergences parameter in the file mergences configuration file, will be different types of The static subfile of each same type is merged into a static file respectively in static subfile, obtains at least one static text Part.
6. device according to claim 5, which is characterized in that version number's mark module includes: memory module, file The additional module of content judgment module, version number's generation module, original update module and version number;Wherein,
The memory module is used to store the original of static file and the version number of the original;
Whether the file updates judgment module and is used to judge to be stored in the memory module described quiet to each static file The original of state file, if it is not, indicating that version number's generation module is that the static file generates an initial version This number;Otherwise, judge whether the static file has content update compared to the original, if so, then indicating the version Number generation module is that the static file generates a new version number;
The static file that is designated as that version number's generation module is used to update judgment module according to the file generates one Initial version number, or according to the version number of the original stored in the memory module, it is raw for the static file The version number of Cheng Yixin;
The original update module is used for the version number pair generated using the static file and version number's generation module The original of the static file stored in the memory module and its version number are updated;
The version labelled notation that the additional module of the version number is used to generate version number's generation module is in the static file Filename in, and the static file of version number will be marked with as file to be released.
7. device according to claim 5, which is characterized in that the device further comprises:
Compressing file module obtains compressed each static state for carrying out space and/or annotation compression to each static file File.
8. device according to claim 5, which is characterized in that the device further comprises:
Resource issues correction verification module, for respective according at least one file to be released for including in the edition configuration file Filename and version number information pull corresponding static file from the content delivery network service device, match in the version When setting the corresponding all static files of file and pulling successfully, determine that static resource is issued successfully;
The edition configuration file release module be used for when determining that static resource is issued successfully, by the edition configuration file with Gray scale published method is published in Operation Server.
9. a kind of version control system of static file characterized by comprising a version management server, an operating service Device, a content delivery network service device and one include the terminal of browser;Wherein,
The version management server includes the version pipe of the browser static file as described in any one of claim 5 to 8 Manage device;
The Operation Server includes that file pulls control device, wherein the file pulls control device and includes:
Receiving module, for receiving the browse request from a browser;
Configuration file read module for reading corresponding edition configuration file according to the browse request, and obtains the version The filename and version number information for including in this configuration file;
Sending module, for the filename and version number information to be supplied to the browser, so as to the browser according to The filename and version number information pull corresponding each filename and version number information from the content delivery network service device Static file, and execute pulled static file.
CN201510333621.6A 2015-06-16 2015-06-16 Method for edition management, the apparatus and system of static file Active CN105049486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510333621.6A CN105049486B (en) 2015-06-16 2015-06-16 Method for edition management, the apparatus and system of static file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510333621.6A CN105049486B (en) 2015-06-16 2015-06-16 Method for edition management, the apparatus and system of static file

Publications (2)

Publication Number Publication Date
CN105049486A CN105049486A (en) 2015-11-11
CN105049486B true CN105049486B (en) 2019-03-26

Family

ID=54455689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510333621.6A Active CN105049486B (en) 2015-06-16 2015-06-16 Method for edition management, the apparatus and system of static file

Country Status (1)

Country Link
CN (1) CN105049486B (en)

Families Citing this family (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354037B (en) * 2015-11-30 2019-04-16 用友优普信息技术有限公司 Modular software development methodology and software development apparatus
CN107102992A (en) * 2016-02-19 2017-08-29 北大方正集团有限公司 A kind of static dissemination method of new media and device
CN107229655B (en) * 2016-03-25 2021-05-25 北京京东尚科信息技术有限公司 Updating method, device and system of page static file
CN107465707B (en) * 2016-06-03 2021-02-02 阿里巴巴集团控股有限公司 Content refreshing method and device for content distribution network
CN106445488A (en) * 2016-07-01 2017-02-22 厦门易名科技股份有限公司 Code release and backspacing methods
CN107704465B (en) * 2016-08-08 2021-11-16 腾讯科技(深圳)有限公司 Static resource updating method and static resource management system
CN108153663B (en) * 2016-12-02 2022-02-18 阿里巴巴集团控股有限公司 Page data processing method and device
CN106713460B (en) * 2016-12-26 2019-12-10 武汉斗鱼网络科技有限公司 Version control method and system for flash application
CN106843935A (en) * 2016-12-29 2017-06-13 广州华多网络科技有限公司 A kind of method and system for automatically updating static file version number
CN106959872A (en) * 2017-03-16 2017-07-18 微梦创科网络科技(中国)有限公司 Using loading method and device
CN107343031A (en) * 2017-06-21 2017-11-10 福建中金在线信息科技有限公司 A kind of method, apparatus for automatically updating file, electronic equipment and storage medium
CN107370791A (en) * 2017-06-23 2017-11-21 微梦创科网络科技(中国)有限公司 The method and system of filename in automatic synchronization renewal content distributing network
CN107678936B (en) * 2017-06-25 2021-02-09 平安科技(深圳)有限公司 Business system pre-inspection method, server and computer readable storage medium
CN107357890B (en) * 2017-07-12 2023-03-24 腾讯科技(深圳)有限公司 Webpage file processing method, device and system and storage equipment
CN107241451B (en) * 2017-08-04 2019-07-16 网宿科技股份有限公司 Interference method, apparatus and system are distorted based on content distributing network
CN108052334B (en) * 2017-12-22 2020-11-06 平安养老保险股份有限公司 Page jump method, device, computer equipment and storage medium
CN109358895A (en) * 2017-12-28 2019-02-19 广州Tcl智能家居科技有限公司 A kind of dispositions method of HXML, storage medium and application server
CN109002557B (en) * 2018-08-15 2020-12-04 深圳点猫科技有限公司 Method and electronic equipment for optimizing webpage loading speed based on browser caching mechanism
CN109542988A (en) * 2018-10-19 2019-03-29 深圳点猫科技有限公司 A kind of update method and electronic equipment of big data
CN110399341B (en) * 2019-07-06 2022-12-06 深圳市山水原创动漫文化有限公司 Method and system for storing and calling animation reference file
CN112541147A (en) * 2019-09-23 2021-03-23 北京轻享科技有限公司 Content publishing management method and system
CN110809036B (en) * 2019-10-25 2022-05-10 无线生活(北京)信息技术有限公司 Resource updating method and device
CN111338824B (en) * 2020-02-27 2023-08-15 中国联合网络通信集团有限公司 Gray release method and device, electronic equipment and storage medium
TWI757733B (en) * 2020-05-05 2022-03-11 華碩電腦股份有限公司 Network data collection method
CN113377400A (en) * 2021-06-16 2021-09-10 广州博冠信息科技有限公司 Software upgrading method and device, storage medium and electronic equipment

Citations (4)

* 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
CN102480397A (en) * 2010-11-26 2012-05-30 金蝶软件(中国)有限公司 Method and equipment for accessing internet pages
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN104462469A (en) * 2014-12-17 2015-03-25 小米科技有限责任公司 Updating method and updating device for website static files

Patent Citations (4)

* 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
CN102480397A (en) * 2010-11-26 2012-05-30 金蝶软件(中国)有限公司 Method and equipment for accessing internet pages
CN104038520A (en) * 2013-03-05 2014-09-10 北京畅游天下网络技术有限公司 Multi-version distributed resource management method and multi-version distributed resource management system
CN104462469A (en) * 2014-12-17 2015-03-25 小米科技有限责任公司 Updating method and updating device for website static files

Also Published As

Publication number Publication date
CN105049486A (en) 2015-11-11

Similar Documents

Publication Publication Date Title
CN105049486B (en) Method for edition management, the apparatus and system of static file
US11740891B2 (en) Providing access to a hybrid application offline
US9846649B1 (en) Providing files with cacheable portions
JP6623291B2 (en) Apparent cloud access to hosted content items
US9122657B2 (en) Webpage display system leveraging OSGI
CN108846753B (en) Method and apparatus for processing data
KR20140001172A (en) Methods for updating applications
JP5106643B2 (en) Web page alteration detection device and program
MX2010011403A (en) Techniques to modify a document using a latent transfer surface.
JP5963991B1 (en) User interface execution device and user interface design device
TW201409273A (en) Method and Apparatus of Responding to Webpage Access Request
US20100257413A1 (en) Verification service for dynamic content update
CN113343312A (en) Page tamper-proofing method and system based on front-end point burying technology
US9588975B2 (en) Processing large XML files by splitting and hierarchical ordering
JP2019511060A5 (en)
CN110941401A (en) Printing method and device
US20140189044A1 (en) Preemptive caching of data
CN106569841B (en) File loading method and device
CN107918552B (en) Light application calling method and device, client device and electronic equipment
EP2680135A1 (en) Methods for updating applications
CN110727889A (en) Static webpage resource loading method, device, medium and electronic equipment
WO2016165468A1 (en) Method, apparatus and system for managing application systems
US20170091253A1 (en) Interrupted synchronization detection and recovery
CN117131295A (en) Resource management method, system, device, electronic equipment and storage medium
CN112860268A (en) Template hot deployment method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant