WO2015154683A1 - 一种文件发布系统、文件发布方法和网络服务器 - Google Patents

一种文件发布系统、文件发布方法和网络服务器 Download PDF

Info

Publication number
WO2015154683A1
WO2015154683A1 PCT/CN2015/076115 CN2015076115W WO2015154683A1 WO 2015154683 A1 WO2015154683 A1 WO 2015154683A1 CN 2015076115 W CN2015076115 W CN 2015076115W WO 2015154683 A1 WO2015154683 A1 WO 2015154683A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
files
server
multimedia
package
Prior art date
Application number
PCT/CN2015/076115
Other languages
English (en)
French (fr)
Inventor
黄欢
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2015154683A1 publication Critical patent/WO2015154683A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Definitions

  • the present invention relates to the field of computers and the Internet, and more particularly to a network content providing technology in a network.
  • Internet information is generally stored on servers linked to the network. Users can access these servers to get information.
  • network technology the information acquired by users is becoming more and more abundant.
  • Network applications that provide network information to users on servers are also becoming more complex.
  • the network application Since the network environment and the Internet environment in the internal network are different, sometimes the network application is released and found to have errors and/or performance problems, and it is hoped that the network application can be quickly updated and re-released locally. In addition, it is also desirable that the publishing process can automatically optimize the published application to improve the performance of the published application.
  • the present invention has been made in order to provide a document distribution system, a file distribution method, and a web server that overcome the above problems or at least partially solve or alleviate the above problems.
  • a file distribution system which is adapted to publish one or more files in a source server to a file server, the file distribution system comprising: a version calculator adapted to be based on the one or a file version of a plurality of files to calculate a release version; a file optimization device adapted to optimize file content of one or more files; and a publishing device adapted to package the optimized one or more files into one A file package, and the file package identifier is calculated by using the calculated release version, so that the packaged package carrying the file package identifier is published to the file server.
  • a file publishing method adapted to publish one or more files in a source server to a file server, the method comprising the steps of: calculating according to file contents of one or more files a release version; optimizing the file content of one or more files; and encapsulating the optimized one or more files into a file package, and calculating the file package identifier using the calculated release version so as to be packaged, carried
  • the file package identified by the file package is published to the file server.
  • a network system comprising: a file server; and a source server communicatively coupled to the file server and including the file distribution system according to any of the present invention to source One or more files on the server are published to the file server.
  • a computer program comprising computer readable code causing the computing device to perform performing in accordance with another aspect of the present invention when the computer readable code is run on a computing device File publishing method.
  • a computer readable medium wherein a computer program according to still another aspect of the present invention is stored.
  • a unified file distribution method is provided, and a unique release version is automatically calculated each time it is published, so that whenever any file content in the web application changes, it is automatically generated.
  • the content of the file is optimized, for example, the content of the file is compressed, or the multimedia files in the web application are separately stored, thereby facilitating the user to access the web application and obtain the content therein.
  • FIG. 1 shows a schematic diagram of a network system in accordance with one embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of a file distribution system according to another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart diagram of a file publishing method according to another embodiment of the present invention.
  • Figure 4 is a schematic block diagram showing a computing device for performing a file publishing method in accordance with the present invention
  • Fig. 5 schematically shows a storage unit for holding or carrying program code implementing the file issuing method according to the present invention.
  • FIG. 1 shows a schematic diagram of a network system 100 in accordance with one embodiment of the present invention.
  • the network system 100 includes a source server 110, a file server 120, and a multimedia server 130.
  • the file server 120 stores one or more files in the published web application. These files may be stored in the file server 120 in the form of a file package so that when the user accesses, for example, a web application residing on other network servers, the web server retrieves the relevant files from the file server 120.
  • the multimedia files may be stored in the multimedia server. 130, so that the user can obtain the multimedia file referenced in the webpage from the multimedia server 130 after acquiring the file such as the webpage from the file server 120.
  • the source server 110 stores one or more files in the unpublished network application.
  • the source server may use the file publishing system 200 resident therein to publish one or a file in the source server 110 to the file.
  • the file publishing system 200 can also publish corresponding multimedia files in the web application to the multimedia server 130.
  • FIG. 2 shows a schematic structural diagram of a file distribution system 200 according to another embodiment of the present invention.
  • the file distribution system 200 resides in the source server 110 and is adapted to place one or more files in the source server 110, particularly one or more belonging to a certain web application.
  • the file is published to the file server 120.
  • the file distribution system 200 includes a version calculator 210, a file optimization device 220, and a distribution device 230.
  • the source server 110 provides the corresponding file and/or application information to the file distribution system 200, which then provides the information to the version calculator 210.
  • the version calculator 210 acquires information of files to be published, and then calculates a release version based on the file contents of these files.
  • the version calculator 210 may combine the file contents of these files and calculate a hash value of the combined file contents, such as an MD5 value, and use the value as an identifier of the released version.
  • a hash value of the combined file contents such as an MD5 value
  • Some files to be published may be large, and combining and calculating the contents of these files may cause the version calculator 210 to execute at a slower speed. Therefore, optionally, some of the text files, such as js files, html files, may be selected. And the css file to calculate the hash value.
  • the file optimization device 220 can optimize the files to be published.
  • There are several ways to optimize a file the main purpose of which is to make the file more accessible to the user from the web server.
  • the file optimization device 220 can delete unnecessary spaces in the file content, thereby making the file smaller.
  • the file optimization device 220 can also compress the image accordingly in consideration of the resolution of the user client screen, so that the user's client screen can be adapted.
  • the present invention is not limited to the specific manner of the file optimization device 220, so it is within the scope of the present invention to optimize the file content so that the user can obtain it more quickly and/or more easily on the server side.
  • the publishing device 230 encapsulates the optimized file into a file package, and determines the identification of the file package according to the release version calculated by the version calculator 210, and publishes the file package to In the file server 120.
  • the publishing device 230 can package files using various file encapsulation methods. In this manner, the file package stored in the file server 120 has the release version as the identification.
  • the file identifier can be provided to the file server 120, and the file server 120 returns the corresponding file package, thereby solving the file version problem.
  • the publishing device 230 determines the identifier of the file package, in addition to the release version, To consider the network identity of the network application.
  • the release version and network identifier can be combined to determine the identity of the package.
  • the file server 120 can determine the storage location of the file package according to the network identifier, thereby facilitating the acquisition of the file package.
  • web applications include multiple types of files, such as some text files and multimedia files.
  • the web page itself is written in a text file such as HTML, and the web page also contains references to other text files (such as js files, CSS files) and other multimedia files (for example, video, audio, and images). References to files), and js files and CSS files will also include references to other multimedia files.
  • the multimedia file is usually larger than the text file and is less modified when the version is updated, in practice, it is considered to store the multimedia file in the multimedia server 130 that exclusively processes the multimedia file.
  • file optimization device 220 may also include a multimedia file processor 222, in accordance with an embodiment of the present invention.
  • the multimedia file processor 222 analyzes the files in the web application, obtains the text files therein, and then checks the content of each text file to obtain a reference to the multimedia file in each text file, which will be referenced.
  • the multimedia file is stored in the multimedia server 130 communicatively coupled to the source server 110, and the reference to the multimedia file in the text file is replaced with a reference to the corresponding multimedia file in the multimedia server.
  • the multimedia server 130 when the text file includes a reference to the multimedia file in the source server 110, after uploading the multimedia file in the source server 110 into the multimedia server 130, the multimedia server 130 provides a link address to the multimedia file.
  • the multimedia file processor 222 modifies the reference to the multimedia file in the text file to the link address to the multimedia file.
  • file optimization device 220 can include file compressor 224.
  • the file compressor 224 compresses each file to be published, thereby reducing the size of the file.
  • File compressor 224 may also be disposed in publishing device 230.
  • the publishing device 230 can compress and package the files to be released before publishing the files. With the file compressor 224, the size of the file package can be reduced, thereby saving storage space on the file server 120.
  • each network application can be automatically assigned a version number each time a web application is released, thereby facilitating version control.
  • the file distribution system 200 according to the present invention when the application is published, will have the text in the application.
  • the content is optimized, and the multimedia files are stored in different servers, so that when the users obtain the files in the applications and process them, the resolution of the files on the client can be provided, so that the users can obtain the network applications more quickly. Content and increase satisfaction with web applications.
  • FIG. 3 shows a flow diagram of a file publishing method 300 in accordance with one embodiment of the present invention.
  • the file publishing method is adapted to run in the source server 110, and in particular the file publishing system 200, to publish the files to be published to the file server 120.
  • step S310 information of files to be distributed is acquired, and then the release version is calculated based on the file contents of the files. For example, the file contents of these files can be combined, and a hash value of the combined file contents, such as an MD5 value, can be calculated and used as an identifier of the released version.
  • a hash value of the combined file contents such as an MD5 value
  • Some of the files to be published may be large, and combining and calculating the contents of these files may result in slow execution of step S310. Therefore, optionally, some of the text files, such as js files, html files, and css files, can be selected to calculate the hash value.
  • step S320 the file to be published is optimized.
  • a file is a text file
  • unnecessary spaces in the contents of the file can be deleted, making the file smaller.
  • the file is an image file
  • the image may be compressed correspondingly according to the resolution of the user client screen, so that the user's client screen can be adapted.
  • step S320 is not limited to the specific implementation of step S320, so that the manner in which the contents of the file can be optimized so that the user can acquire it more quickly and/or the way of storing it on the server side is within the scope of the present invention.
  • step S330 the optimized files are encapsulated into file packages, and the identification of the file package is determined according to the release version calculated in step S310, and the file package is posted to the file server 120.
  • the files may be packaged using various file encapsulation methods. In this manner, the file package stored in the file server 120 has the release version as the identification.
  • the file identifier can be provided to the file server 120, and the file server 120 The file version issue was resolved by returning the corresponding package.
  • the network identifier of the network application may also be considered.
  • the release version and network identifier can be combined to determine the identity of the package.
  • the file server 120 can determine the storage location of the file package according to the network identifier, thereby facilitating the acquisition of the file package.
  • web applications include multiple types of files, such as some text files and multimedia files.
  • the web page itself is written in a text file such as HTML, and the web page also contains references to other text files (such as JS files, CSS files) and other multimedia files (for example, video, audio, and images). References to files), and JS files and CSS files will also include references to other multimedia files.
  • the multimedia file is usually larger than the text file and is less modified when the version is updated, in practice, it is considered to store the multimedia file in the multimedia server 130 that exclusively processes the multimedia file.
  • step S320 when processing the web application, the files in the web application are analyzed, the text files therein are obtained, and then the content of each text file is checked to obtain each text.
  • the reference to the multimedia file in the file stores the referenced multimedia file into the multimedia server 130 communicatively coupled to the source server 110, and replaces the reference to the multimedia file in the text file with a reference to the corresponding multimedia file in the multimedia server.
  • the multimedia server 130 when the text file includes a reference to the multimedia file in the source server 110, after uploading the multimedia file in the source server 110 into the multimedia server 130, the multimedia server 130 provides a link address to the multimedia file.
  • the reference to the multimedia file in the text file is modified to the link address to the multimedia file.
  • the file compression process is further included in step S320, that is, each file to be released is compressed, thereby reducing the size of the file.
  • the file compression process can also be implemented in step S330.
  • step S330 the files to be released may be compressed and packaged together before the file is published. With file compression processing, the size of the file package can be reduced, thereby saving storage space on the file server 120.
  • each network application can be automatically assigned a version number each time the web application is released, thereby facilitating version control.
  • the file content in the application is optimized while the application is being distributed, and the multimedia file is stored in a different server, so that when the user acquires and processes the files in the applications, It can provide the parsing efficiency of files on the client, so that users can get the content of the web application more quickly and improve the satisfaction of the web application.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • Various component embodiments of the present invention may be implemented in hardware or in one or more processes Implemented by software modules running on the device, or in combinations of them.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components in a file distribution system in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
  • Figure 4 illustrates a computing device that can implement a file publishing method in accordance with the present invention.
  • the computing device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a memory 420.
  • the memory 420 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks. Such computer program products are typically portable or fixed storage units as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 420 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 431', ie, code readable by a processor, such as 410, that when executed by a computing device causes the computing device to perform each of the methods described above step.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种文件发布系统(200)、文件发布方法和网络服务器。文件发布系统(200)适于将源服务器(110)中的一个或者多个文件发布到文件服务器(120)中,该文件发布系统(200)包括:版本计算器(210),适于根据所述一个或者多个文件的文件内容来计算发布版本;文件优化设备(220),适于对一个或者多个文件的文件内容进行优化;以及发布设备(230),适于将经过优化的一个或者多个文件封装为一个文件包,并且利用所计算的发布版本计算文件包标识,以便将所封装的、携带有所述文件包标识的文件包发布到文件服务器(120)中。

Description

一种文件发布系统、文件发布方法和网络服务器 技术领域
本发明涉及计算机和互联网领域,尤其涉及在网络中的网络内容提供技术。
背景技术
随着互联网络和计算机的普及,越来越多的用户通过互联网来获取信息,互联网的信息一般存储在链接到网络中的服务器上。用户可以访问这些服务器来获取信息。随着网络技术的发展,用户获取的信息也越来越丰富。架构在服务器上为用户提供网络信息的网络应用也越来越复杂。
为了维护和更新网络应用,现在的应用提供商都会先在某个内部网络中事先完成网络应用的测试和开发,并随后发布到网络服务器上由互联网用户公开使用。
由于内部网络中的网络环境和互联网环境会有所不同,有时候在网络应用发布出去之后,发现存在错误和/或性能等问题,并希望可以快速在本地更新网络应用并重新发布。另外,也希望发布过程可以自动地对所发布的应用进行优化,以提高所发布应用的性能。
因此,需要一种能够便于将发布网络应用并优化网络应用的性能的文件发布方案。
发明内容
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决或者减缓上述问题的文件发布系统、文件发布方法和网络服务器。
根据本发明的一个方面,提供了一种文件发布系统,适于将源服务器中的一个或者多个文件发布到文件服务器中,该文件发布系统包括:版本计算器,适于根据所述一个或者多个文件的文件内容来计算发布版本;文件优化设备,适于对一个或者多个文件的文件内容进行优化;以及发布设备,适于将经过优化的一个或者多个文件封装为一 个文件包,并且利用所计算的发布版本计算文件包标识,以便将所封装的、携带有所述文件包标识的文件包发布到文件服务器中。
根据本发明的另一个方面,提供了一种文件发布方法,适于将源服务器中的一个或者多个文件发布到文件服务器中,该方法包括步骤:根据一个或者多个文件的文件内容来计算发布版本;对一个或者多个文件的文件内容进行优化;以及将经过优化的一个或者多个文件封装为一个文件包,并且利用所计算的发布版本计算文件包标识以便将所封装的、携带有所述文件包标识的文件包发布到文件服务器中。
根据本发明的另一个方面,提供了一种网络系统,该网络系统包括:文件服务器;以及源服务器,与文件服务器通信连接,并且包括根据本发明任一个所述的文件发布系统,以便将源服务器上的一个或者多个文件发布到文件服务器中。
根据本发明的又一个方面,提供了一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据本发明的另一个方面提供的文件发布方法。
根据本发明的再一个方面,提供了一种计算机可读介质,其中存储了根据本发明的又一个方面所述的计算机程序。
根据本发明的文件发布方案,提供了一个统一的文件发布方式,并且每次在发布时会自动计算一个唯一的发布版本,这样每当网络应用中的任何文件内容发生变动时,就会自动生成一个版本,从而极大方便了版本管理。另外,在发布时,会对文件内容进行优化,例如对文件内容进行压缩,或者将网络应用中的多媒体文件分开存储,从而更有利于用户访问网络应用并获取其中的内容。
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用 相同的参考符号表示相同的部件。在附图中:
图1示出了根据本发明一个实施例的网络系统的示意图;
图2示出了根据本发明另一个实施例的文件发布系统的结构示意图;
图3示出了根据本发明另一个实施例的文件发布方法的流程示意图;
图4示意性地示出了用于执行根据本发明的文件发布方法的计算设备的框图;以及
图5示意性地示出了用于保持或者携带实现根据本发明的文件发布方法的程序代码的存储单元。
具体实施方式
下面结合附图和具体的实施方式对本发明作进一步的描述。
图1示出了根据本发明一个实施例的网络系统100的示意图。如图1所示,网络系统100包括源服务器110、文件服务器120和多媒体服务器130。文件服务器120中存储有已经发布的网络应用中的一个或者多个文件。这些文件可以文件包的方式存储在文件服务器120中,以便当用户访问例如驻留在其它网络服务器上的网络应用时,网络服务器会从文件服务器120获取相关的文件。另外,可选地,当文件服务器120上的一个或者多个文件还引用有多媒体文件(例如视频、音频和图像等),或者网络应用还包括多媒体文件时,可以将这些多媒体文件存储到多媒体服务器130中,以便用户在从文件服务器120获取网页等文件之后,可以从多媒体服务器130获取网页中引用的多媒体文件。
源服务器110中存储有未发布的网络应用中的一个或者多个文件,当要发布网络应用时,源服务器可以利用驻留其中的文件发布系统200将源服务器110中的一个或者文件发布到文件服务器120上。同时,可选地,文件发布系统200还可以将网络应用中的相应多媒体文件发布到多媒体服务器130上。
图2示出了根据本发明另一个实施例的文件发布系统200的结构示意图。文件发布系统200驻留在源服务器110中,适于将源服务器110中的一个或者多个文件,尤其是属于某个网络应用的一个或者多个 文件发布到文件服务器120中。如图2所示,文件发布系统200包括版本计算器210、文件优化设备220和发布设备230。
一般而言,当需要发布文件或者网络应用时,源服务器110会将相应的文件和/或应用信息提供给文件发布系统200,文件发布系统200随后将这些信息提供给版本计算器210。版本计算器210获取要发布的文件的信息,随后根据这些文件的文件内容来计算发布版本。
例如,版本计算器210可以组合这些文件的文件内容,并计算组合后的文件内容的哈希值,例如MD5值,并将该值作为发布版本的标识。
一些要发布的文件可能较大,利用这些文件的内容进行组合并计算会导致版本计算器210的执行速度较慢,因此,可选地,可以选择其中的一些文本文件,例如js文件,html文件和css文件来计算哈希值。
随后,文件优化设备220可以对要发布的文件进行优化。对文件优化包括多种方式,其主要目的是使文件更容易由用户从网络服务器获取。例如,当文件为文本文件时,文件优化设备220可以删除文件内容中不必要的空格,从而使文件变小。又例如,当文件为图像文件时,文件优化设备220还可以考虑到用户客户端屏幕的分辨率而相应地将图像进行压缩,从而可以适配用户的客户端屏幕。
本发明不受限于文件优化设备的220的具体方式,所以可以对文件内容进行优化以便用户更快速获取的方式和/或更容易在服务器端存储的方式都在本发明的保护范围之内。
在文件优化设备220对文件进行优化之后,发布设备230将这些经过优化的文件封装为文件包,并且根据版本计算器210计算的发布版本来确定该文件包的标识,并将该文件包发布到文件服务器120中。发布设备230可以利用各种文件封装方式来打包文件。利用这种方式,存储在文件服务器120中的文件包具有发布版本作为标识。当用户访问其他网络服务器,从而从文件服务器120获取文件时,可以向文件服务器120提供文件标识,文件服务器120返回相应的文件包,从而解决了文件版本问题。
可选地,由于源服务器110中要发布的文件属于一个网络应用,在发布设备230确定文件包的标识时,除了根据发布版本之外,还可 以考虑网络应用的网络标识。例如可以组合发布版本和网络标识来确定文件包的标识。这样,文件服务器120可以根据网络标识来确定文件包的存储位置,从而更方便文件包的获取。
另外,一般而言,网络应用包括多种类型的文件,例如一些文本文件和多媒体文件。就网页而言,网页本身以HTML之类的文本文件编写,而在网页中还包含了对其它文本文件(例如js文件,CSS文件)的引用以及对其他多媒体文件(例如,视频、音频和图像文件)的引用,而js文件和CSS文件同样会包括对其他多媒体文件的引用。
由于与文本文件相比,多媒体文件通常较大,并且在版本更新时修改也较少,在实践中,可以考虑将多媒体文件存储到专门处理多媒体文件的多媒体服务器130中。
因此,根据本发明的一个实施方式,文件优化设备220还可以包括多媒体文件处理器222。在发布网络应用时,多媒体文件处理器222对该网络应用中的文件进行分析,获取其中的文本文件,随后检查每个文本文件的内容,获取各个文本文件中对多媒体文件的引用,将所引用的多媒体文件存储到与源服务器110通信连接的多媒体服务器130中,并且将文本文件中对多媒体文件的引用替换为对多媒体服务器中相应多媒体文件的引用。
例如,在当文本文件包括对源服务器110中的多媒体文件的引用时,在将源服务器110中的多媒体文件上传到多媒体服务器130中之后,多媒体服务器130会提供到该多媒体文件的链接地址。多媒体文件处理器222将文本文件中对多媒体文件的引用修改为到该多媒体文件的链接地址。
另外,可选地,文件优化设备220可以包括文件压缩器224。文件压缩器224对每个要发布的文件进行压缩,从而减少文件的大小。文件压缩器224也可以布置在发布设备230中。发布设备230在发布文件之前,可以将要发布的文件一并进行压缩并打包。利用文件压缩器224,可以减少文件包的大小,从而节省了在文件服务器120上的存储空间。
根据本发明的文件发布系统200,可以每次在发布网络应用时,自动为每个网络应用分配一个版本号,从而便于进行版本控制。另外,根据本发明的文件发布系统200,在发布应用的同时,会对应用中的文 件内容进行优化,并且将多媒体文件存储到不同的服务器中,这样,当用户获取这些应用中的文件并进行处理时,可以提供文件在客户端的解析效率,从而使得用户可以更快速地获取网络应用的内容,并提高对网络应用的满意度。
图3示出了根据本发明一个实施例的文件发布方法300的流程示意图。该文件发布方法适于在源服务器110,尤其是文件发布系统200中运行,以便将要发布的文件发布到文件服务器120中。
一般而言,当需要发布文件或者网络应用时,源服务器110会提供相应的文件和/或应用信息,随后利用文件发布方法300将来处理这些信息。具体而言,方法300始于步骤S310。在步骤S310中,获取要发布的文件的信息,随后根据这些文件的文件内容来计算发布版本。例如,可以组合这些文件的文件内容,并计算组合后的文件内容的哈希值,例如MD5值,并将该值作为发布版本的标识。一些要发布的文件可能较大,利用这些文件的内容进行组合并计算会导致步骤S310的执行速度较慢。因此,可选地,可以选择其中的一些文本文件,例如js文件,html文件和css文件来计算哈希值。
随后,在步骤S320中,对要发布的文件进行优化。对文件优化包括多种方式,其主要目的是使文件更容易由用户从网络服务器获取。例如,当文件为文本文件时,可以删除文件内容中不必要的空格,从而使文件变小。又例如,当文件为图像文件时,还可以考虑到用户客户端屏幕的分辨率而相应地将图像进行压缩,从而可以适配用户的客户端屏幕。
本发明不受限于步骤S320的具体实现方式,所以可以对文件内容进行优化以便用户更快速获取的方式和/或更容易在服务器端存储的方式都在本发明的保护范围之内。
在步骤S320对文件进行优化之后,方法300的处理进入步骤S330。在步骤S330中,将这些经过优化的文件封装为文件包,并且根据在步骤S310中计算的发布版本来确定该文件包的标识,并将该文件包发布到文件服务器120中。在步骤S330中,可以利用各种文件封装方式来打包文件。利用这种方式,存储在文件服务器120中的文件包具有发布版本作为标识。当用户访问其他网络服务器,从而从文件服务器120获取文件时,可以向文件服务器120提供文件标识,文件服务器120 返回相应的文件包,从而解决了文件版本问题。
可选地,由于源服务器110中要发布的文件属于一个网络应用,在步骤S330中确定文件包的标识时,除了根据发布版本之外,还可以考虑网络应用的网络标识。例如可以组合发布版本和网络标识来确定文件包的标识。这样,文件服务器120可以根据网络标识来确定文件包的存储位置,从而更方便文件包的获取。
另外,一般而言,网络应用包括多种类型的文件,例如一些文本文件和多媒体文件。就网页而言,网页本身以HTML之类的文本文件编写,而在网页中还包含了对其它文本文件(例如JS文件,CSS文件)的引用以及对其他多媒体文件(例如,视频、音频和图像文件)的引用,而JS文件和CSS文件同样会包括对其他多媒体文件的引用。
由于与文本文件相比,多媒体文件通常较大,并且在版本更新时修改也较少,在实践中,可以考虑将多媒体文件存储到专门处理多媒体文件的多媒体服务器130中。
因此,根据本发明的一个实施方式,在步骤S320中,在处理网络应用时,会对该网络应用中的文件进行分析,获取其中的文本文件,随后检查每个文本文件的内容,获取各个文本文件中对多媒体文件的引用,将所引用的多媒体文件存储到与源服务器110通信连接的多媒体服务器130中,并且将文本文件中对多媒体文件的引用替换为对多媒体服务器中相应多媒体文件的引用。
例如,在当文本文件包括对源服务器110中的多媒体文件的引用时,在将源服务器110中的多媒体文件上传到多媒体服务器130中之后,多媒体服务器130会提供到该多媒体文件的链接地址。在步骤S320中,将文本文件中对多媒体文件的引用修改为到该多媒体文件的链接地址。
另外,可选地,步骤S320中还包括文件压缩处理,即对每个要发布的文件进行压缩,从而减少文件的大小。文件压缩处理也可以在步骤S330中实现。在步骤S330中,在发布文件之前,可以将要发布的文件一并进行压缩并打包。利用文件压缩处理,可以减少文件包的大小,从而节省了在文件服务器120上的存储空间。
根据本发明的文件发布方法300,可以每次在发布网络应用时,自动为每个网络应用分配一个版本号,从而便于进行版本控制。另外, 根据本发明的文件发布方法300,在发布应用的同时,会对应用中的文件内容进行优化,并且将多媒体文件存储到不同的服务器中,这样,当用户获取这些应用中的文件并进行处理时,可以提供文件在客户端的解析效率,从而使得用户可以更快速地获取网络应用的内容,并提高对网络应用的满意度。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理 器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的文件发布系统中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。
例如,图4示出了可以实现根据本发明的文件发布方法的计算设备。该计算设备传统上包括处理器410和以存储器420形式的计算机程序产品或者计算机可读介质。存储器420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器420具有用于执行上述方法中的任何方法步骤的程序代码431的存储空间430。例如,用于程序代码的存储空间430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码431。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图5所述的便携式或者固定存储单元。该存储单元可以具有与图4的计算设备中的存储器420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码431’,即可以由例如诸如410之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本文中所称的“一个实施例”、“实施例”或者“一个或者多个实施例”意味着,结合实施例描述的特定特征、结构或者特性包括在本发明的至少一个实施例中。此外,请注意,这里“在一个实施例中”的词语例子不一定全指同一个实施例。
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位 于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。
此外,还应当注意,本说明书中使用的语言主要是为了可读性和教导的目的而选择的,而不是为了解释或者限定本发明的主题而选择的。因此,在不偏离所附权利要求书的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。对于本发明的范围,对本发明所做的公开是说明性的,而非限制性的,本发明的范围由所附权利要求书限定。

Claims (13)

  1. 一种文件发布系统,适于将源服务器中的一个或者多个文件发布到文件服务器中,该文件发布系统包括:
    版本计算器,适于根据所述一个或者多个文件的文件内容来计算发布版本;
    文件优化设备,适于对所述一个或者多个文件的文件内容进行优化;以及
    发布设备,适于将经过优化的一个或者多个文件封装为一个文件包,并且利用所计算的发布版本计算文件包标识,以便将所封装的、携带有所述文件包标识的文件包发布到文件服务器中。
  2. 如权利要求1所述的文件发布系统,其中所述一个或者多个文件属于一个应用,而且所述发布设备利用所述应用的标识和所计算的发布版本来计算文件包标识。
  3. 如权利要求2所述的文件发布系统,其中所述一个或者多个文件为文本文件,所述应用还包括多媒体文件,所述一个或者多个文件包括对所述多媒体文件的引用。
  4. 如权利要求3所述的文件发布系统,其中所述文件优化设备包括多媒体文件处理器,适于获取所述一个或者多个文件中对所述多媒体文件的引用,将所引用的多媒体文件存储到与源服务器通信连接的多媒体服务器中,并且将所述文件中对多媒体文件的引用替换为对多媒体服务器中相应多媒体文件的引用。
  5. 如权利要求4所述的文件发布系统,其中所述文件优化设备还包括文件压缩器,适于对所述一个或者多个文件的文件内容进行压缩。
  6. 一种文件发布方法,适于将源服务器中的一个或者多个文件发布到文件服务器中,该方法包括步骤:
    根据所述一个或者多个文件的文件内容来计算发布版本;
    对所述一个或者多个文件的文件内容进行优化;以及
    将经过优化的一个或者多个文件封装为一个文件包,并且利用所计算的发布版本计算文件包标识以便将所封装的、携带有所述文件包标识的文件包发布到文件服务器中。
  7. 如权利要求6所述的文件发布方法,其中所述一个或者多个文 件属于一个应用,而且所述将文件包发布到文件服务器的步骤包括:利用所述应用的标识和所计算的发布版本来计算文件包标识。
  8. 如权利要求7所述的文件发布方法,其中所述一个或者多个文件为文本文件,所述应用还包括多媒体文件,所述一个或者多个文件包括对所述多媒体文件的引用。
  9. 如权利要求8所述的文件发布方法,其中所述对一个或者多个文本的文件内容进行优化的步骤包括:
    获取所述一个或者多个文件中对所述多媒体文件的引用;
    将所引用的多媒体文件存储到与源服务器通信连接的多媒体服务器中;以及将所述文件中对多媒体文件的引用替换为对多媒体服务器中相应多媒体文件的引用。
  10. 如权利要求9所述的文件发布方法,其中所述对一个或者多个文本的文件内容进行优化的步骤包括:
    对所述一个或者多个文件的文件内容进行压缩。
  11. 一种网络系统,包括:
    文件服务器;以及
    源服务器,与所述文件服务器通信连接,并且包括如权利要求1-5中任一个所述的文件发布系统,以便将所述源服务器上的一个或者多个文件发布到所述文件服务器中。
  12. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求6-10中的任一个所述的文件发布方法。
  13. 一种计算机可读介质,其中存储了如权利要求12所述的计算机程序。
PCT/CN2015/076115 2014-04-08 2015-04-08 一种文件发布系统、文件发布方法和网络服务器 WO2015154683A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410139198.1 2014-04-08
CN201410139198.1A CN104980465B (zh) 2014-04-08 2014-04-08 一种文件发布系统、文件发布方法和网络服务器

Publications (1)

Publication Number Publication Date
WO2015154683A1 true WO2015154683A1 (zh) 2015-10-15

Family

ID=54276565

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/076115 WO2015154683A1 (zh) 2014-04-08 2015-04-08 一种文件发布系统、文件发布方法和网络服务器

Country Status (2)

Country Link
CN (1) CN104980465B (zh)
WO (1) WO2015154683A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105721591A (zh) * 2016-02-26 2016-06-29 浪潮通用软件有限公司 一种电子公文传送方法
CN108965464B (zh) * 2018-08-09 2021-10-29 深圳乐信软件技术有限公司 前端文件一致性方法、装置、服务器和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998014869A1 (en) * 1996-10-02 1998-04-09 Alcatel Usa Sourcing, L.P. Software release control system and method
CN101635640A (zh) * 2009-09-04 2010-01-27 江苏天智互联科技有限公司 Web网站系统服务器终端程序的版本自动发布方法
CN101719073A (zh) * 2009-11-20 2010-06-02 浪潮集团山东通用软件有限公司 一种基于智能客户端的按需下载实现方法
CN102075569A (zh) * 2010-12-15 2011-05-25 北京京东世纪贸易有限公司 上传用于内容发布的多个图片的方法和装置
CN102520952A (zh) * 2011-12-14 2012-06-27 北京佳讯飞鸿电气股份有限公司 软件代码版本自动构建及发布方法

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677765B (zh) * 2012-08-31 2018-07-06 腾讯科技(深圳)有限公司 版本自动发布方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998014869A1 (en) * 1996-10-02 1998-04-09 Alcatel Usa Sourcing, L.P. Software release control system and method
CN101635640A (zh) * 2009-09-04 2010-01-27 江苏天智互联科技有限公司 Web网站系统服务器终端程序的版本自动发布方法
CN101719073A (zh) * 2009-11-20 2010-06-02 浪潮集团山东通用软件有限公司 一种基于智能客户端的按需下载实现方法
CN102075569A (zh) * 2010-12-15 2011-05-25 北京京东世纪贸易有限公司 上传用于内容发布的多个图片的方法和装置
CN102520952A (zh) * 2011-12-14 2012-06-27 北京佳讯飞鸿电气股份有限公司 软件代码版本自动构建及发布方法

Also Published As

Publication number Publication date
CN104980465A (zh) 2015-10-14
CN104980465B (zh) 2020-02-07

Similar Documents

Publication Publication Date Title
JP6416374B2 (ja) 動的コンテンツと古いコンテンツとを含んでいるウェブサイトの高速レンダリング
US8615499B2 (en) Estimating data reduction in storage systems
US8977653B1 (en) Modifying web pages to reduce retrieval latency
US9479519B1 (en) Web content fingerprint analysis to detect web page issues
US8838678B1 (en) Dynamic cascading for network sites
US9716770B2 (en) Cache control for web application resources
WO2017190580A1 (zh) 访问数据库的方法及装置
WO2017107620A1 (zh) 一种页面数据的加载方法和系统
US8943275B1 (en) Differential storage and eviction for information resources from a browser cache
CN103488732A (zh) 一种静态页面生成方法及装置
WO2012010583A1 (en) On-demand translation of application text
CN107491334B (zh) 一种预加载文件的组织和加载方法
JP6080866B2 (ja) ネットワーク文書の1つまたは複数の動的視覚オブジェクトをマッピングするコンピュータ化された方法、システム、およびコンピュータ・プログラム
US10120855B2 (en) Consolidation of web contents between web content management systems and digital asset management systems
US20180132012A1 (en) Method and apparatus for playing video in application program
CN103618947A (zh) 电视外部设备文件展示方法及其装置
WO2017000613A1 (zh) 在搜索结果页中生成提示信息的方法及装置
WO2015154682A1 (zh) 一种网络请求处理方法、网络服务器和网络系统
CN107015986B (zh) 一种爬虫爬取网页的方法及装置
CN107577943B (zh) 基于机器学习的样本预测方法、装置及服务器
WO2015154683A1 (zh) 一种文件发布系统、文件发布方法和网络服务器
US8984028B2 (en) Systems and methods for storing data and eliminating redundancy
WO2015154678A1 (zh) 一种文件处理方法、设备和网络系统
WO2015154681A1 (zh) 一种链接地址生成方法、设备和服务器
US20170286195A1 (en) Information object system

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

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

Country of ref document: EP

Kind code of ref document: A1