CN102497436B - Networked file storing method and system based on HTTP (Hyper Text Transport Protocol) - Google Patents

Networked file storing method and system based on HTTP (Hyper Text Transport Protocol) Download PDF

Info

Publication number
CN102497436B
CN102497436B CN201110424675.5A CN201110424675A CN102497436B CN 102497436 B CN102497436 B CN 102497436B CN 201110424675 A CN201110424675 A CN 201110424675A CN 102497436 B CN102497436 B CN 102497436B
Authority
CN
China
Prior art keywords
file
service
client
configuration
storage
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
CN201110424675.5A
Other languages
Chinese (zh)
Other versions
CN102497436A (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.)
Founder International Co Ltd
Original Assignee
Founder International 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 Founder International Co Ltd filed Critical Founder International Co Ltd
Priority to CN201110424675.5A priority Critical patent/CN102497436B/en
Publication of CN102497436A publication Critical patent/CN102497436A/en
Application granted granted Critical
Publication of CN102497436B publication Critical patent/CN102497436B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to a networked file storing method and system based on an HTTP (Hyper Text Transport Protocol), belonging to the technical field of network storage. The networked file storing method comprises the following steps that: a configuration file is defined according to a business requirement, and the configuration information of file storage in the business requirement is defined in the configuration file; then an entrance for a client to receive the file is packaged through js; the configuration file is parsed; the command of the client is received; and the storing mode and position of the file are judged through the configuration information corresponding to the parsed business type according to the command of the client, so as to carry out storage or download processing. Therefore, the invention provides an efficient, low-cost and cross-platform technical scheme for the storage of the networked file based on the HTTP.

Description

A kind of network file storage method based on http protocol and system
Technical field
The invention belongs to technical field of network storage, be specifically related to a kind of network file storage method based on http protocol and system.
Background technology
At present in the process doing each web project, capital more or less runs into some business demands of the store and management of file, when running into such technical problem, the method that each project team deals with problems is different, some be have employed simple technology achieve simply client requirement, some is the requirement that the technology that have employed more complicated achieves client, no matter be simple realization or complicated realization, the human and material resources of considerable part to be spent in each project, considerably increase the cost of project.
In prior art, a lot of method only relates to single to File Upload and Download, but does not propose corresponding solution to this technical problem of storage administration of network file.Therefore, need for a kind of method and system about network file store and management of the problems referred to above exploitation.
Summary of the invention
For the defect existed in prior art, the object of this invention is to provide a kind of efficient, low cost, the cross-platform network file storage method based on http protocol and system.
For reaching above object, the technical solution used in the present invention is: a kind of network file storage method based on http protocol, comprises the following steps:
(1) according to business demand definition configuration file, in configuration file, the configuration information that business demand file stores is defined;
(2) entrance of the reception file of client is encapsulated out by javascript;
(3) configuration file is resolved;
(4) receive client instructions, described instruction comprises the instruction of client upload file or the instruction of client-requested download file;
(5) according to the instruction of client, by the configuration information that the type of service of parsing is corresponding, judge the mode that file stores and position, carry out storing or download process.
Further, the configuration information described in step (1) comprises type of service and the storage mode of file storage;
The numbering that described type of service correspondence one is unique and traffic ID, traffic ID is unique, and different types of service has different traffic ID.
The storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file.
Further, the entrance of the reception file of client is encapsulated out by javascript in step (2) corresponding with the type of service defined in corresponding configuration file.
Further, in step (3), the method for resolving configuration file is:
1) configuration file is read, by the content object instantiation of configuration file;
2) according to the parameter-type of service transmitted, search the attribute of this type of service, judge memory location and the mode of file.
Further, step 2) in, the attribute of described type of service comprises the ID of type of service, storage mode, if storage mode is file server, the attribute of type of service also comprises the IP address of FTP, logs in the username and password of FTP.
Further, in step (5), file is stored or download process time, upload and download closely links together with the storage administration of file, two pieces thing is completed in an action of uploading, both uploaded file also to manage file, during download, web server directly obtains the file wanted to web server from file server, then downloads to client.
Further, in step (5), described down operation downloads to client by byte stream mode.
Based on a network file storage system for http protocol, comprise with lower device:
Client, with the web server of client's side link, the file server be connected with web server and disk array;
Wherein, configuration file definition device and connected data analysis device is provided with in described web server, described configuration file definition device is used for defining business demand, in configuration file, define the configuration information that business demand file stores, described configuration information comprises type of service and the storage mode of file storage;
The configuration information data that described data analysis device is used for the file defined in configuration file stores are resolved, according to the configuration information that file stores, the mode that file stores is controlled, the storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file.
Further, javascript packaging system is provided with in described web server, for being encapsulated out the entrance of the reception file of client by javascript, and corresponding with the type of service in corresponding configuration definition, described javascript packaging system is connected with configuration file definition device and data analysis device.
Effect of the present invention is, the invention provides the technical solution that a kind of efficient, low cost, the cross-platform network file based on http protocol store, adopts method and system of the present invention, have following technique effect:
1, developer without the need to the technology of the upload and download to file involved energy, only need configure according to technical manual, the store and management that can realize service end file only need define in configuration, without the need to exploitation, has quantized exploitation.
2, in the difference of operating system, only supported windows operating system in the past, the present invention supports windows and linux environmental level simultaneously.
3, developer without the need to be concerned about upload or the position of download file at which, the allocation engine in invention solves the whereabouts of file.
4, from administrative staff, to a control of whole project, the efficiency in exploitation and risk is greatly reduced.
Accompanying drawing explanation
Fig. 1 is the structure chart of a kind of network file storage system based on http protocol of the present invention;
Fig. 2 is the flow chart of a kind of network file storage method based on http protocol of the present invention.
Embodiment
Below in conjunction with the drawings and specific embodiments, the invention will be further described.
As shown in Figure 1, a kind of network file storage system based on http protocol, comprises with lower device:
Client 11, the web server 12 be connected with client 11, the file server 13 be connected with web server 12 and disk array 14.
Wherein, configuration file definition device 15 and connected data analysis device 16 is provided with in described web server 12, described configuration file definition device 15 is for defining business demand, in configuration file, define the configuration information that business demand file stores, described configuration information comprises type of service and the storage mode of file storage.
Described data analysis device 16 is resolved for the configuration information data stored by the file defined in configuration file, according to the configuration information that file stores, the mode that file stores is controlled, the storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file.
In the present embodiment, in described web server 12, be provided with js (javascript) packaging system 17, for being encapsulated out the entrance of the reception file of client by js, and corresponding with the type of service in corresponding configuration definition.Described js packaging system 17 is connected with configuration file definition device 15 and data analysis device 16.
As shown in Figure 2, a kind of network file storage method based on http protocol, comprises the following steps:
Step 21:(1) according to business demand definition configuration file, in configuration file, define the configuration information that business demand file stores, described configuration information comprises type of service and the storage mode of file storage; The corresponding unique numbering of described type of service, the storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file.The key of configuration is numbering and the traffic ID of type of service, and traffic ID is unique, and different types of service has different traffic ID.
In the present embodiment, the form of described configuration definition file is as follows:
Wherein, modelid label main definitions be numbering and the traffic ID of business demand, this traffic ID must be unique in configuration file, can not repeat, Localhost represent web server path, if file needs to be stored on file server, then can upload on this file server by the mode of ftp, if without the need to depositing, this content of FtpServerIp can not be configured.
Step 22:(2) entrance of reception (upload or the download) file of client is encapsulated out by js (javascript), and corresponding with the type of service defined in corresponding configuration file;
Js encapsulation has done the public of certain methods to uploading to download, and developer introduces this js file, just can call public method and attribute.
Step 23:(3) resolve configuration file;
In this implementation column, the method for resolving configuration file is:
1) configuration file is read, by the content object instantiation of configuration file;
2) according to the parameter-type of service transmitted, search the attribute of this type of service, judge memory location and the mode of file, the attribute of described type of service comprises ID, the storage mode of type of service, if storage mode is file server, the attribute of type of service also comprises the IP address of FTP, logs in the username and password of FTP.
Step 24:(4) file server or web server receive instruction or the instruction of client-requested download file of client upload file;
Step 25,26,27:(5) according to the instruction of client, by the configuration information that the type of service of resolving is corresponding, judge the mode that file stores and position, carry out storing or download process.
In the present embodiment, when storing file or downloading in web server, upload and download closely links together with the storage administration of file, two pieces thing is completed in an action of uploading, both uploaded file also to manage file, during download, web server directly can obtain the file wanted to web server from file server, then downloads to client.Described down operation downloads to client by byte stream mode.
According to above-mentioned implementation column, can find out that remarkable result of the present invention is:
1) effectively combined by network file store and management, the upload and download of file is well combined with the storage of file, and web application and file management combine very well;
2) file upload download, developer only need using upload file number, type, size when calling js method as corresponding Parameter transfer, number, type, the size of control upload file that can be unique, exploitation configuration is simple and convenient understandable;
3) because method and system of the present invention, by java language development, are inherently supported cross-platform, the needs of platform can being adapted to by amendment configuration file, therefore without the need to considering the difference of operating system, supporting the deployment of several operation systems.
Method and system of the present invention make user be uploaded the management just completed between download file by network in client, this method reduce a large amount of manual operations, and when management document, reach conveniently object.Such as, after adopting the execution mode in above-described embodiment, the page can be opened by IE client, only need input file catalogue and file name, just can obtain the file needed fast.
Method and system of the present invention are not limited to the embodiment described in embodiment, and those skilled in the art's technical scheme according to the present invention draws and other execution mode belongs to technological innovation scope of the present invention equally.

Claims (8)

1., based on a network file storage method for http protocol, comprise the following steps:
(1) according to business demand definition configuration file, in configuration file, the configuration information that business demand file stores is defined; Described configuration information comprises type of service and the storage mode of file storage, the numbering that described type of service correspondence one is unique and traffic ID, and different types of service has different traffic ID; The storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file;
(2) entrance of the reception file of client is encapsulated out by javascript;
(3) configuration file is resolved;
(4) receive client instructions, described instruction comprises the instruction of client upload file or the instruction of client-requested download file;
(5) according to the instruction of client, by the configuration information that the type of service of parsing is corresponding, judge the mode that file stores and position, carry out storing or download process.
2. a kind of network file storage method based on http protocol as claimed in claim 1, is characterized in that: the entrance being encapsulated out the reception file of client in step (2) by javascript is corresponding with the type of service defined in corresponding configuration file.
3. a kind of network file storage method based on http protocol as claimed in claim 1, is characterized in that, in step (3), the method for resolving configuration file is:
1) configuration file is read, by the content object instantiation of configuration file;
2) according to the parameter-type of service transmitted, search the attribute of this type of service, judge memory location and the mode of file.
4. a kind of network file storage method based on http protocol as claimed in claim 3, it is characterized in that: step 2) in, the attribute of described type of service comprises ID, the storage mode of type of service, if storage mode is file server, the attribute of type of service also comprises the IP address of FTP, logs in the username and password of FTP.
5. a kind of network file storage method based on http protocol as described in as arbitrary in claim 1 to 4, it is characterized in that: in step (5), file is stored or download process time, upload and download closely links together with the storage administration of file, two pieces thing is completed in an action of uploading, both uploaded file also to manage file, during download, web server directly obtains the file wanted to web server from file server, then downloads to client.
6. a kind of network file storage method based on http protocol as claimed in claim 5, is characterized in that: in step (5), described down operation downloads to client by byte stream mode.
7., based on a network file storage system for http protocol, comprise with lower device:
Client, with the web server of client's side link, the file server be connected with web server and disk array;
Wherein, configuration file definition device and connected data analysis device is provided with in described web server, described configuration file definition device is used for defining business demand, in configuration file, define the configuration information that business demand file stores, described configuration information comprises type of service and the storage mode of file storage; The numbering that described type of service correspondence one is unique and traffic ID, different types of service has different traffic ID; The storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file;
The configuration information data that described data analysis device is used for the file defined in configuration file stores are resolved, according to the configuration information that file stores, the mode that file stores is controlled, the storage mode of described file comprises and being stored in file server by file, or is stored in disk array by file.
8. a kind of network file storage system based on http protocol as claimed in claim 7, it is characterized in that: in described web server, be provided with javascript packaging system, for being encapsulated out the entrance of the reception file of client by javascript, and corresponding with the type of service in corresponding configuration definition, described javascript packaging system is connected with configuration file definition device and data analysis device.
CN201110424675.5A 2011-12-16 2011-12-16 Networked file storing method and system based on HTTP (Hyper Text Transport Protocol) Active CN102497436B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110424675.5A CN102497436B (en) 2011-12-16 2011-12-16 Networked file storing method and system based on HTTP (Hyper Text Transport Protocol)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110424675.5A CN102497436B (en) 2011-12-16 2011-12-16 Networked file storing method and system based on HTTP (Hyper Text Transport Protocol)

Publications (2)

Publication Number Publication Date
CN102497436A CN102497436A (en) 2012-06-13
CN102497436B true CN102497436B (en) 2015-03-18

Family

ID=46189221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110424675.5A Active CN102497436B (en) 2011-12-16 2011-12-16 Networked file storing method and system based on HTTP (Hyper Text Transport Protocol)

Country Status (1)

Country Link
CN (1) CN102497436B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103248701A (en) * 2013-05-16 2013-08-14 北京京东尚科信息技术有限公司 Method, device and system for storing files
CN104426880A (en) * 2013-09-03 2015-03-18 中国银联股份有限公司 Network-based centralized automatic file collection and distribution device
CN106357683B (en) * 2016-10-27 2020-04-21 浙江广播电视集团 Media file safe uploading system and method
CN107633069A (en) * 2017-09-22 2018-01-26 北京康爱营养科技股份有限公司 A kind of method of data synchronization of quickness and high efficiency
CN108614959A (en) * 2018-05-02 2018-10-02 山东浪潮通软信息科技有限公司 A kind of method of configurable software systems authorization control
CN110071857A (en) * 2019-04-18 2019-07-30 合肥泛米智能科技有限公司 A kind of method of smart home server and multiple terminals progress data exchange
CN112001157B (en) * 2020-08-26 2021-07-27 湖北盈帆数据技术有限公司 Online design method and device for webpage data form

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6240060B1 (en) * 1998-09-14 2001-05-29 Kabushiki Kaisha Toshiba Phase change optical recording medium
CN101072163A (en) * 2007-03-31 2007-11-14 腾讯科技(深圳)有限公司 Network file automatic dump method and system
CN101335763A (en) * 2007-06-28 2008-12-31 中兴通讯股份有限公司 Data educing and transmitting method in intelligent network system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101729602B (en) * 2009-12-11 2012-10-24 北京工业大学 Method for acquiring P2P (peer-to-peer) video system program information

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6240060B1 (en) * 1998-09-14 2001-05-29 Kabushiki Kaisha Toshiba Phase change optical recording medium
CN101072163A (en) * 2007-03-31 2007-11-14 腾讯科技(深圳)有限公司 Network file automatic dump method and system
CN101335763A (en) * 2007-06-28 2008-12-31 中兴通讯股份有限公司 Data educing and transmitting method in intelligent network system

Also Published As

Publication number Publication date
CN102497436A (en) 2012-06-13

Similar Documents

Publication Publication Date Title
CN102497436B (en) Networked file storing method and system based on HTTP (Hyper Text Transport Protocol)
CN108769165B (en) Data processing method in Internet of things and Internet of things access system
CN104111944B (en) Page processing method and device and page generation method and device
CN101695032B (en) Unified web client, service configuration method and system thereof
CN105511889B (en) Universal game version increment updating system and method
US8910132B2 (en) Client-side script bundle management system
CN109634657A (en) A kind of micro services are packaged dispositions method and system
CN105491039B (en) A kind of distributed software shared system
CN109597604B (en) iOS platform based APP modularization development method, device and equipment
US9871848B1 (en) Integration engine for communications between source and target applications
CN108073402A (en) Kafka clusters automatic deployment method and device based on linux system
CN106713423B (en) The processing method and processing device of distributed data in a kind of cloud access base site controller
CN105007309A (en) System and method for separately controlling dynamic data and static interface
CN101795392A (en) Application data-downloading method, digital television receiving terminal and system
CN103176809B (en) Application upgrade method and system
CN104852971B (en) Plug-in protocol device and data communication method based on plug-in protocol
CN109213498A (en) A kind of configuration method and server of internet web front-end
CN108008971A (en) A kind of offline compressed package based on HTML5 downloads the method for realizing mobile APP module upgrades
CN106339273A (en) Application program restoration method, terminal and server
CN104009994A (en) Method and device for achieving communication of server side and client side
CN104424317A (en) Method and system for providing application for user terminal
CN103561082B (en) Compressing request processing method and server
CN101770511B (en) Browse system for accelerating backspace operation of mobile communication equipment terminal and application method thereof
CN111367685A (en) Interface calling method and device, computer equipment and storage medium
CN105740298A (en) File processing method and apparatus, and server-side equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant