CN105227661B - Sharing files method and system, server - Google Patents

Sharing files method and system, server Download PDF

Info

Publication number
CN105227661B
CN105227661B CN201510642377.1A CN201510642377A CN105227661B CN 105227661 B CN105227661 B CN 105227661B CN 201510642377 A CN201510642377 A CN 201510642377A CN 105227661 B CN105227661 B CN 105227661B
Authority
CN
China
Prior art keywords
client
virtual
file
server
sharing
Prior art date
Application number
CN201510642377.1A
Other languages
Chinese (zh)
Other versions
CN105227661A (en
Inventor
陈红波
Original Assignee
深圳天珑无线科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳天珑无线科技有限公司 filed Critical 深圳天珑无线科技有限公司
Priority to CN201510642377.1A priority Critical patent/CN105227661B/en
Publication of CN105227661A publication Critical patent/CN105227661A/en
Application granted granted Critical
Publication of CN105227661B publication Critical patent/CN105227661B/en

Links

Abstract

The present invention provides a kind of sharing files method and system, server.Sharing files method of the invention, comprising: receive the sharing file request that client is sent;The virtual route for the file that the client request is shared is carried in the sharing file request;The virtual route is obtained from the sharing file request;The virtual route is converted to local true path according to virtual directory;Obtain the file under the true path;The file is sent to the client.Technical solution of the present invention realizes server once and can share the file on multiple memories, it is no longer necessary to which root is shared in switching, and it is simple to share mode, shares high-efficient.

Description

Sharing files method and system, server

Technical field

The present invention relates to communication of mobile terminal technical field more particularly to a kind of sharing files method and system, server.

Background technique

As the technologies such as computer and networks communication reach its maturity, network is almost at indispensable in for people's lives Obtain the source of information.Such as user can use the network communication between client and server, realize client and service Information sharing between device end.

Between client and server when shared file, File Transfer Protocol is used between client and server (File Transfer Protocol;FTP it) is communicated, realizes the transmission of file.In the prior art, server is by visitor The sharing catalogue on a memory is shared at family end, and realizes the file shared in the memory to client.

But if server wants will share the file in other memories, need to change server share to client Sharing catalogue, and need client to re-establish with server and connect, repeat sharing operation, lead to sharing files efficiency It is lower.

Summary of the invention

The present invention provides a kind of sharing files method and system, server, with overcome in the prior art server wants to divide The file in other memories is enjoyed, sharing operation is repeated, causes sharing files efficiency lower.

The present invention provides a kind of sharing files method, which comprises

Receive the sharing file request that client is sent;The client request is carried in the sharing file request to share File virtual route;

The virtual route is obtained from the sharing file request;

The virtual route is converted to local true path according to virtual directory;

Obtain the file under the true path;

The file is sent to the client.

Further, in sharing files method described above, it is described receive client send sharing file request it Before, the method also includes:

Receive the catalog request that the client is sent;

All memories according to included by local, generate local catalogue;

Virtual root is set in the catalogue, generates the virtual directory;

The virtual directory is sent to the client.

Further, described to share the virtual road carried in file request in sharing files method described above Diameter is what the client was generated according to the virtual root.

Further, in sharing files method described above, the communication between the client is transmitted using file Agreement is communicated.

Also a kind of server of the present invention, the server include:

Receiving module, for receiving the sharing file request of client transmission;Described in being carried in the sharing file request The virtual route for the file that client request is shared;

Module is obtained, for obtaining the virtual route from the sharing file request;

Conversion module, for the virtual route to be converted to local true path according to virtual directory;

The acquisition module is also used to obtain the file under the true path;

Sending module, for sending the file to the client.

Further, in server described above, the server further includes generation module;

The receiving module is also used to receive the catalog request that the client is sent;

The generation module generates local catalogue for all memories according to included by local;

The generation module is also used to that virtual root is arranged in the catalogue, generates the virtual directory;

The sending module is also used to send the virtual directory to the client.

Further, in server described above, the virtual route carried in file request of sharing is institute State what client was generated according to the virtual root.

Further, in server described above, the communication between the server and the client uses file Transport protocol is communicated.

The present invention also provides a kind of file sharing system, including server and at least one client, each clients The communication connection between the server, the server is using any server of claim 5-8 as above.The present invention Sharing files method and system, server, by receiving the sharing file for carrying client request and sharing file virtual route Virtual route, the true path of server end local is converted to according to virtual directory, and obtain under the true path by request File is sent to client, solves in the prior art if server wants will share other except the memory currently shared File in memory needs to change the sharing catalogue for being shared with client, and needs to re-establish between client and server Connection, repeats sharing operation, leads to the problem of sharing low efficiency, multiple memories can once be shared by realizing server On file, it is no longer necessary to switching share root, share mode it is simple, share it is high-efficient.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without any creative labor, can be with It obtains other drawings based on these drawings.

Fig. 1 is the flow chart of sharing files embodiment of the method one of the present invention;

Fig. 2 is the flow chart of sharing files embodiment of the method two of the present invention;

Fig. 3 is the structural schematic diagram of server example one of the present invention;

Fig. 4 is the structural schematic diagram of server example two of the present invention;

Fig. 5 is the structural schematic diagram of file sharing system embodiment of the present invention.

Specific embodiment

In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.

Fig. 1 is the flow chart of sharing files embodiment of the method one of the present invention, as shown in Figure 1, the sharing files of the present embodiment Method can specifically include following steps:

101, the sharing file request that client is sent is received;

Specifically, share the virtual route that the file that client request is shared is carried in file request.The user of client When wanting some or the multiple files in the memory on sharing service device, user end to server sends corresponding share File request, and the Study document request in carry requirement analysis file virtual route;For client, not Know whether the virtual route is true or virtual.And the virtual route is that client according to server is sent to client What the virtual directory at end generated.

102, virtual route is obtained from sharing file request;

Specifically, it after server receives the sharing file request that client is sent, need to be obtained from sharing in file request The virtual route that the sharing file request carries.

103, virtual route is converted to according to virtual directory by local true path;

Specifically, after server gets virtual route, it is converted into the true path of server local;For example, objective The virtual route that carries is "/A/file " in the sharings file request that family end is sent, wherein A is memory name, in true path The corresponding path A is "/storage/C ", then virtual route "/A/file " is converted to true path "/storage/C/ file”。

104, the file under true path is obtained;

Specifically, it after the virtual route shared in file request is converted to true path by server, obtains under the path File, for example, in the present embodiment, the file of acquisition is corresponding file in "/storage/C/file " file.

105, file is sent to client.

Specifically, the file that server will acquire is sent to the client that file is shared in corresponding request, that is, incite somebody to action "/ Corresponding file is sent to the client of request this document in storage/C/file " file.At this point, completing file point It enjoys.

The sharing files method of the present embodiment, by receiving the sharing for carrying client request and sharing file virtual route Virtual route, the true path of server end local is converted to according to virtual directory by file request, and obtains the true path Under file be sent to client, solve in the prior art if server wants will be shared except the memory currently shared File in other memories is needed to change the sharing catalogue for being shared with client, and is needed again between client and server Connection is established, sharing operation is repeated, leads to the problem of sharing low efficiency, multiple deposit can once be shared by realizing server File on reservoir, it is no longer necessary to which root is shared in switching, and sharing mode is simple, shares high-efficient.

Fig. 2 is the flow chart of sharing files embodiment of the method two of the present invention, as shown in Fig. 2, the sharing files of the present embodiment On the basis of method is embodiment shown in Fig. 1, technical solution of the present invention is further introduced in further detail, the present embodiment Sharing files method, can specifically include following steps:

201, the catalog request that client is sent is received;

Specifically, when the user of client is when using internet, it is desirable in some webpage or some text When downloading file in part folder, need to send a downloading file request to server, as the catalogue of downloading file is asked accordingly It asks, at this point, server receives the catalog request of client transmission.

202, all memories according to included by local, generate local catalogue;

Specifically, after server receives the catalog request of client transmission, the mesh of server local will be automatically generated It records, includes all servers in content.

203, virtual root is set in catalogue, generates virtual directory;

Specifically, when generating the catalogue of server local, virtual root is set on the basis of local directory, virtually Include all memory names in root, generates corresponding virtual directory.

204, virtual directory is sent to client;

Specifically, the virtual directory of generation is sent to the client that file is shared in request.

205, the sharing file request that client is sent is received;

206, virtual route is obtained from sharing file request;

207, virtual route is converted to according to virtual directory by local true path;

208, the file under true path is obtained;

209, file is sent to client.

The sharing files method of the present embodiment generates corresponding virtual mesh by the catalog request sent according to client Record, and virtual directory is sent to the client that file is shared in request, reception carries client request and shares the virtual road of file Virtual route is converted to the true path of server end local according to virtual directory by the sharing file request of diameter, and obtaining should File under true path is sent to client, solves in the prior art if server wants will share the storage currently shared The file in other memories except device, needs to change and is shared with the sharing catalogue of client, and client and server it Between need to re-establish connection, repeat sharing operation, cause share low efficiency the problem of, realize and taken in virtual root Business device can once share the file on multiple memories, it is no longer necessary to which root is shared in switching, and sharing mode is simple, shares effect Rate is high.

Further, the virtual route carried in the sharing file request that client is sent is client according to fake root mesh Content in record carries out after selecting accordingly, the virtual route of generation.

Further, in above-described embodiment, the communication between server and client uses File Transfer Protocol (File Transfer Protocol;FTP it) is communicated.

Fig. 3 is the structural schematic diagram of server example one of the present invention, as shown in figure 3, the service implement body of the present embodiment It may include: receiving module 11, obtain module 12, conversion module 13, sending module 14;Wherein, receiving module 11 and client Using communication connection, which is used to receive the sharing file request of client transmission, shares and carries in file request The virtual route for the file that client request is shared;Obtain module 12 connect with receiving module 11, the acquisition module 12 for from Virtual route is obtained in the sharing file request that the client received in receiving module 11 is sent;Conversion module 13 and acquisition mould Block 12 connects, which is used to be converted to virtual route according to the virtual directory obtained in acquisition module 12 local True path;In addition, obtaining module 12, it is also used to obtain the file under true path;Sending module 14 and acquisition module 12 connect It connects, which is used to send the file obtained under the true path that module 12 obtains to client.

The server of the present embodiment, can be used for executing the technical solution of embodiment of the method shown in Fig. 1, realization principle and Technical effect is similar, and details are not described herein again.

Fig. 4 is the structural schematic diagram of server example two of the present invention, as shown in figure 4, the device of the present embodiment is in Fig. 3 institute On the basis of showing device structure, technical solution of the present invention is further introduced in further detail.

In the server of the present embodiment, receiving module 11 is also used to receive the catalog request of client transmission.

As shown in figure 4, can also include: generation module 15 in the server of the present embodiment;The generation module 15 and reception Module 11 connects, after generation module 15 receives the catalog request that client is sent for receiving module 11, by receiving module 11 triggering generates local catalogue for all memories according to included by local;Generation module 15 is also used to described Virtual root is set in catalogue, generates virtual directory;Also, sending module 14 is connect with generation module 15, the sending module 14 are also used to the virtual directory that generation module 15 generates being sent to client.

Further, the server in above-described embodiment and the communication between client are communicated using FTP.

Further, the virtual route carried in the sharing file request that the receiving module 11 in above-described embodiment receives It is generated for client according to virtual root.

The server of the present embodiment, can be used for executing the technical solution of embodiment of the method shown in Fig. 2, realization principle and Technical effect is similar, and details are not described herein again.

Fig. 5 is the structural schematic diagram of file sharing system embodiment of the present invention, as shown in figure 5, the file of the present embodiment point The system of enjoying includes: server 20 and at least one client 21;Communication connection is used between server 20 and client 21;Its In, server 20 can accordingly be executed any in Fig. 1 and Fig. 2 using the server of Fig. 3 and Fig. 4 any embodiment The technical solution of embodiment of the method, it is similar that the realization principle and technical effect are similar, and details are not described herein again.

Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or The various media that can store program code such as person's CD.

The apparatus embodiments described above are merely exemplary, wherein unit can be as illustrated by the separation member Or may not be and be physically separated, component shown as a unit may or may not be physical unit, i.e., It can be located in one place, or may be distributed at least two network units.It can be selected according to the actual needs In some or all of the modules achieve the purpose of the solution of this embodiment.Those of ordinary skill in the art are not paying creativeness Labour in the case where, it can understand and implement.

Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (5)

1. a kind of sharing files method, which is characterized in that the described method includes:
Receive the sharing file request that client is sent;The text that the client request is shared is carried in the sharing file request The virtual route of part;
The virtual route is obtained from the sharing file request;
The virtual route is converted to local true path according to virtual directory;
Obtain the file under the true path;
The file is sent to the client;
Wherein, before the sharing file request for receiving client transmission, the method also includes:
Receive the catalog request that the client is sent;
All memories according to included by local, generate local catalogue;
Virtual root is set in the local catalogue, generates the virtual directory;
The virtual directory is sent to the client;
Wherein, described that virtual root is set in the local catalogue, generate the virtual directory, comprising: generating institute When stating local catalogue, virtual root is set on the basis of the local catalogue, includes institute in the virtual root Some memory names, generate corresponding virtual directory;
Wherein, the virtual route carried in the sharing file request that the client is sent is client according to described virtual Content in root carries out after selecting accordingly, the virtual route of generation.
2. the method according to claim 1, wherein the communication between the client is using file transmission association View is communicated.
3. a kind of server, which is characterized in that the server includes:
Receiving module, for receiving the sharing file request of client transmission;The client is carried in the sharing file request The virtual route for the file that end request is shared;
Module is obtained, for obtaining the virtual route from the sharing file request;
Conversion module, for the virtual route to be converted to local true path according to virtual directory;
The acquisition module is also used to obtain the file under the true path;
Sending module, for sending the file to the client;
Wherein, the server further includes generation module;
The receiving module is also used to receive the catalog request that the client is sent;
The generation module generates local catalogue for all memories according to included by local;
The generation module is also used to that virtual root is arranged in the local catalogue, generates the virtual directory;
The sending module is also used to send the virtual directory to the client;
The generation module is arranged specifically for when generating the local catalogue on the basis of the local catalogue Virtual root includes all memory names in the virtual root, generates corresponding virtual directory;
Wherein, the virtual route carried in the sharing file request that the client is sent is client according to described virtual Content in root carries out after selecting accordingly, the virtual route of generation.
4. server according to claim 3, which is characterized in that the communication between the server and the client is adopted It is communicated with File Transfer Protocol.
5. a kind of file sharing system, which is characterized in that including server and at least one client, each client and institute Communication connection between server is stated, the server is using server as described in claim 3 or 4.
CN201510642377.1A 2015-09-30 2015-09-30 Sharing files method and system, server CN105227661B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510642377.1A CN105227661B (en) 2015-09-30 2015-09-30 Sharing files method and system, server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510642377.1A CN105227661B (en) 2015-09-30 2015-09-30 Sharing files method and system, server

Publications (2)

Publication Number Publication Date
CN105227661A CN105227661A (en) 2016-01-06
CN105227661B true CN105227661B (en) 2019-04-02

Family

ID=54996331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510642377.1A CN105227661B (en) 2015-09-30 2015-09-30 Sharing files method and system, server

Country Status (1)

Country Link
CN (1) CN105227661B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893422A (en) * 2005-07-01 2007-01-10 俞盛 Distribution type data transmission method based on internetwork standard
CN1949213A (en) * 2005-10-12 2007-04-18 富士施乐株式会社 File server, file providing method and recording medium
CN102148839A (en) * 2010-02-09 2011-08-10 蓝盾信息安全技术股份有限公司 Method, device and system for managing FTP (file transfer protocol) server
CN102984228A (en) * 2012-11-16 2013-03-20 Tcl集团股份有限公司 File sharing method and server and client terminal and file sharing system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI492086B (en) * 2011-04-11 2015-07-11 D Link Corp Hide the file's real path for cloud processing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1893422A (en) * 2005-07-01 2007-01-10 俞盛 Distribution type data transmission method based on internetwork standard
CN1949213A (en) * 2005-10-12 2007-04-18 富士施乐株式会社 File server, file providing method and recording medium
CN102148839A (en) * 2010-02-09 2011-08-10 蓝盾信息安全技术股份有限公司 Method, device and system for managing FTP (file transfer protocol) server
CN102984228A (en) * 2012-11-16 2013-03-20 Tcl集团股份有限公司 File sharing method and server and client terminal and file sharing system

Also Published As

Publication number Publication date
CN105227661A (en) 2016-01-06

Similar Documents

Publication Publication Date Title
US10411956B2 (en) Enabling planned upgrade/downgrade of network devices without impacting network sessions
EP1631024A3 (en) Method for streaming data between a server and a client
EP2538634A1 (en) Method for realizing peer-to-peer (p2p) communication on webpage
US7949704B2 (en) Administration of a broker-based publish/subscribe messaging system
US20090006529A1 (en) Client side based data synchronization and storage
CN103002010B (en) A kind of data-updating method based on incremental data, device and system
CN104079630A (en) Business server side load balancing method, client side, server side and system
US9246819B1 (en) System and method for performing message-based load balancing
CN103731487A (en) Download method, device, system and router for resource file
CN104009938B (en) The long method and system connected based on route aspect
EP2723024A1 (en) Method, device and system for sharing microblog message
Soni et al. A survey on mqtt: a protocol of internet of things (iot)
CN103873505B (en) Method, system and the device uploaded offline to cloud storage service device
CN104734946A (en) Multi-tenant high-concurrency instant messaging cloud platform
CN102763373B (en) The method and apparatus using the service of local network devices based on remote access
CN102201958B (en) Internet of things data transmission method and equipment
CN102831170B (en) The method for pushing of activity information and device
CN104639363B (en) For managing the management servomechanism and its management method of high in the clouds device in virtual region network
CN103501486B (en) A kind of information push method and push server
Johnson et al. VillageShare: Facilitating content generation and sharing in rural networks
EP2421226A1 (en) Method of p2p video communication implemented on web page
CN103095684B (en) Obtain and pay close attention to the method for user's aggregation information, Apparatus and system
KR101383905B1 (en) method and apparatus for processing server load balancing with the result of hash function
CN103647726B (en) Message dispatching method and device thereof
US8489695B2 (en) Proxy communications on a social network

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
GR01 Patent grant
TR01 Transfer of patent right