[go: up one dir, main page]

CN113946550A - Method, device, processor and computer-readable storage medium for realizing file sharing based on local area network decentralization - Google Patents

Method, device, processor and computer-readable storage medium for realizing file sharing based on local area network decentralization Download PDF

Info

Publication number
CN113946550A
CN113946550A CN202111242203.8A CN202111242203A CN113946550A CN 113946550 A CN113946550 A CN 113946550A CN 202111242203 A CN202111242203 A CN 202111242203A CN 113946550 A CN113946550 A CN 113946550A
Authority
CN
China
Prior art keywords
file
computer
shared
area network
local area
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.)
Granted
Application number
CN202111242203.8A
Other languages
Chinese (zh)
Other versions
CN113946550B (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.)
Taicang T&W Electronics Co Ltd
Original Assignee
Taicang T&W Electronics 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 Taicang T&W Electronics Co Ltd filed Critical Taicang T&W Electronics Co Ltd
Priority to CN202111242203.8A priority Critical patent/CN113946550B/en
Publication of CN113946550A publication Critical patent/CN113946550A/en
Application granted granted Critical
Publication of CN113946550B publication Critical patent/CN113946550B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/176Support for shared access to files; File sharing support

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to a method for realizing file sharing based on local area network decentralization, wherein the method comprises the following steps: (1) when the computer is on-line, firstly judging whether the sent request file broadcast can be responded; (2) and executing the sharing operation of the corresponding file list content according to the judgment result. The invention also relates to a corresponding device, a processor and a computer readable storage medium thereof. By adopting the method, the device, the processor and the computer readable storage medium thereof, a user can see the shared files on all computers in the whole network only by the same operation mode of opening the common folder on the computer. The mutual transmission between the files can be easily realized without knowing which computer the file is specifically located on and knowing the host name or the ip address of the computer, and the use experience of a user is improved.

Description

Method, device, processor and computer readable storage medium for realizing file sharing based on local area network decentralization
Technical Field
The invention relates to the technical field of computer networks, in particular to the technical field of computer network communication, and specifically relates to a method, a device, a processor and a computer readable storage medium for realizing file sharing based on local area network decentralization.
Background
Generally, when a user needs to copy a file from another computer in a home or office network system or copy a file in a mobile phone to a PC, tablet or other terminal, the user mainly passes samba, tftp or a small software for file transfer. Most of these methods are performed in a client, server mode. For security, the server configuration is troublesome, and the server IP address needs to be manually input for each access. Although the apple devices may be delivered over the air, it is also necessary for the user to first operate on the file that owns the shared device before the file can be found on another device. Based on this, in view of the defects in the prior art, a method capable of effectively avoiding tedious operations and quickly implementing resource sharing is urgently needed.
Disclosure of Invention
The present invention overcomes the above-mentioned shortcomings in the prior art, and provides a simple and easy-to-operate method, device, processor and computer readable storage medium for implementing file sharing based on lan decentralized.
In order to achieve the above object, the method, apparatus, processor and computer readable storage medium for implementing file sharing based on lan decentralized of the present invention are as follows:
the method for realizing file sharing based on the decentralization of the local area network is mainly characterized by comprising the following steps of:
(1) when the computer is on-line, firstly judging whether the sent request file broadcast can be responded;
(2) and executing the sharing operation of the corresponding file list content according to the judgment result.
Preferably, the step (2) specifically comprises the following steps:
(2.1) if the request file broadcast is not responded, namely other computers do not exist in the current local area network, only displaying the shared file on the local computer in the shared folder of the current computer; otherwise, entering the step (2.2);
and (2.2) when other computers in the current local area network receive the request file message, sending the local shared file list of the current computer to the computer sending the file list request to finish the subsequent file reading and writing operation.
Preferably, the step (2.2) specifically comprises the following steps:
(2.2.1) when the computer sending the request file message receives the shared file list sent by other computers, sending the shared file list to other computers, and updating the file list content in the shared folder;
(2.2.2) after each computer receives the shared file list sent by other computers, calculating the hostname or IP address of the computer corresponding to the current shared file list;
(2.2.3) the current computer sends a file reading and writing request for reading and writing the hostname or the IP address to the accessed computer where the request file message is sent;
(2.2.4) after receiving the corresponding file reading and writing request, the accessed computer sends the content of the file list of the accessed computer to the current computer which requests the file message to access;
(2.2.5) the current computer can enter the file read-write operation after receiving the file list content sent by the accessed computer.
Preferably, the step (2.2.3) further comprises:
when a user operates a file in a shared folder of a current computer, the current computer firstly takes out a hostname or an IP address of the computer corresponding to the file to be shared according to a shared file list in the shared folder.
Preferably, each computer provides shared files that need to be shared with other computers, and also has access to shared files of other computers.
Preferably, the shared folder of each computer is capable of displaying the shared files provided by the computers of all nodes in the local area network.
Preferably, if shared files with the same file name are contained in shared file lists of different computers in the local area network, respectively calculating a hash value of the shared file of each computer, and if the hash values are the same, only one file name is displayed in the shared folder; and if the hash values are different, displaying the filename added with the hostname suffix in the shared folder.
The device for realizing the file sharing based on the decentralization of the local area network is mainly characterized by comprising the following steps:
a processor configured to execute computer-executable instructions;
a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the method for implementing file sharing based on LAN decentralized.
The processor for realizing the file sharing based on the local area network decentralization is mainly characterized in that the processor is configured to execute computer executable instructions, and when the computer executable instructions are executed by the processor, the steps of the method for realizing the file sharing based on the local area network decentralization are realized.
The computer-readable storage medium is characterized in that a computer program is stored thereon, and the computer program can be executed by a processor to implement the steps of the method for realizing the file sharing based on the LAN decentralization.
By adopting the method, the device, the processor and the computer readable storage medium for realizing the file sharing based on the decentralization of the local area network, each computer can broadcast a file list request instruction to the local area network when the computer is on line, and simultaneously sends the own shared file list to other computers in the whole network. Other computers receive the file list request and then send own shared file list to the requester. And the new online computer updates the shared folder after receiving the shared file list returned by other computers. After receiving the new online file sharing file list, other computers update their own sharing file folders, so that the contents in the sharing file folders of all the computers in the whole network are consistent. The user can see the shared files on all computers in the whole network only by operating the same way as opening a common folder on the computers, and does not need to know which computer the files are on and the host names or ip addresses of the computers. The method can effectively reduce the complicated configuration brought by the user when in use, and greatly improves the experience of the user.
Drawings
Fig. 1 is a schematic diagram of a framework of a method for implementing file sharing based on lan decentralized.
Detailed Description
In order to more clearly describe the technical contents of the present invention, the following further description is given in conjunction with specific embodiments.
Before describing in detail embodiments that are in accordance with the present invention, it should be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The method for realizing file sharing based on the decentralization of the local area network comprises the following steps:
(1) when the computer is on-line, firstly judging whether the sent request file broadcast can be responded;
(2) and executing the sharing operation of the corresponding file list content according to the judgment result.
As a preferred embodiment of the present invention, the step (2) specifically comprises the following steps:
(2.1) if the request file broadcast is not responded, namely other computers do not exist in the current local area network, only displaying the shared file on the local computer in the shared folder of the current computer; otherwise, entering the step (2.2);
and (2.2) when other computers in the current local area network receive the request file message, sending the local shared file list of the current computer to the computer sending the file list request to finish the subsequent file reading and writing operation.
As a preferred embodiment of the present invention, the step (2.2) specifically comprises the following steps:
(2.2.1) when the computer sending the request file message receives the shared file list sent by other computers, sending the shared file list to other computers, and updating the file list content in the shared folder;
(2.2.2) after each computer receives the shared file list sent by other computers, calculating the hostname or IP address of the computer corresponding to the current shared file list;
(2.2.3) the current computer sends a file reading and writing request for reading and writing the hostname or the IP address to the accessed computer where the request file message is sent;
(2.2.4) after receiving the corresponding file reading and writing request, the accessed computer sends the content of the file list of the accessed computer to the current computer which requests the file message to access;
(2.2.5) the current computer can enter the file read-write operation after receiving the file list content sent by the accessed computer.
As a preferred embodiment of the present invention, the step (2.2.3) further comprises:
when a user operates a file in a shared folder of a current computer, the current computer firstly takes out a hostname or an IP address of the computer corresponding to the file to be shared according to a shared file list in the shared folder.
As a preferred embodiment of the present invention, each computer provides shared files that need to be shared to other computers, as well as shared files that can in turn access other computers.
As a preferred embodiment of the present invention, the shared folder of each computer can display the shared files provided by the computers of all nodes in the local area network.
As a preferred embodiment of the present invention, if shared file lists of different computers in a local area network contain shared files with the same file name, respectively calculating a hash value of the shared file of each computer, and if the hash values are the same, only one file name is displayed in a shared folder; and if the hash values are different, displaying the filename added with the hostname suffix in the shared folder.
The device for realizing the file sharing based on the decentralization of the local area network comprises the following steps:
a processor configured to execute computer-executable instructions;
a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the method for implementing file sharing based on LAN decentralized.
The processor for realizing the file sharing based on the local area network decentralization is configured to execute computer executable instructions, and when the computer executable instructions are executed by the processor, the steps of the method for realizing the file sharing based on the local area network decentralization are realized.
The computer-readable storage medium has a computer program stored thereon, where the computer program is executable by a processor to perform the steps of the method for implementing file sharing based on local area network decentralized.
In practical applications, each computer is not only a server but also a client. According to the technical scheme, the shared files of the global area network can be checked and used by directly opening the shared folder on each computer through starting calculation on the premise that a user does not need to configure other computer IP, equipment name, samba account number and password. And, the security problem involved therein can also be solved by RSA certificates.
In one embodiment of the present invention, computing the hash value of the shared file for each computer also includes computing the sha1 and md5 values.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, and the program may be stored in a computer readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of terms "an embodiment," "some embodiments," "an example," "a specific example," or "an embodiment," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
By adopting the method, the device, the processor and the computer readable storage medium for realizing the file sharing based on the decentralization of the local area network, each computer can broadcast a file list request instruction to the local area network when the computer is on line, and simultaneously sends the own shared file list to other computers in the whole network. Other computers receive the file list request and then send own shared file list to the requester. And the new online computer updates the shared folder after receiving the shared file list returned by other computers. After receiving the new online file sharing file list, other computers update their own sharing file folders, so that the contents in the sharing file folders of all the computers in the whole network are consistent. The user can see the shared files on all computers in the whole network only by operating the same way as opening a common folder on the computers, and does not need to know which computer the files are on and the host names or ip addresses of the computers. The method can effectively reduce the complicated configuration brought by the user when in use, and greatly improves the experience of the user.
In this specification, the invention has been described with reference to specific embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

Claims (10)

1. A method for realizing file sharing based on local area network decentralization is characterized by comprising the following steps:
(1) when the computer is on-line, firstly judging whether the sent request file broadcast can be responded;
(2) and executing the sharing operation of the corresponding file list content according to the judgment result.
2. The method for realizing file sharing based on local area network decentralized according to claim 1, wherein the step (2) specifically comprises the following steps:
(2.1) if the request file broadcast is not responded, namely other computers do not exist in the current local area network, only displaying the shared file on the local computer in the shared folder of the current computer; otherwise, entering the step (2.2);
and (2.2) when other computers in the current local area network receive the request file message, sending the local shared file list of the current computer to the computer sending the file list request to finish the subsequent file reading and writing operation.
3. The method for realizing file sharing based on local area network decentralized according to claim 2, wherein the step (2.2) specifically comprises the following steps:
(2.2.1) when the computer sending the request file message receives the shared file list sent by other computers, sending the shared file list to other computers, and updating the file list content in the shared folder;
(2.2.2) after each computer receives the shared file list sent by other computers, calculating the hostname or IP address of the computer corresponding to the current shared file list;
(2.2.3) the current computer sends a file reading and writing request for reading and writing the hostname or the IP address to the accessed computer where the request file message is sent;
(2.2.4) after receiving the corresponding file reading and writing request, the accessed computer sends the content of the file list of the accessed computer to the current computer which requests the file message to access;
(2.2.5) the current computer can enter the file read-write operation after receiving the file list content sent by the accessed computer.
4. The method for implementing file sharing based on local area network decentralized according to claim 3, wherein said step (2.2.3) further comprises:
when a user operates a file in a shared folder of a current computer, the current computer firstly takes out a hostname or an IP address of the computer corresponding to the file to be shared according to a shared file list in the shared folder.
5. The method of claim 1, wherein each computer provides shared files to be shared with other computers and has access to shared files from other computers.
6. The method of claim 1, wherein the shared folder of each computer displays the shared files provided by the computers of all nodes in the local area network.
7. The method for realizing file sharing based on local area network decentralized manner according to claim 1, wherein if shared files with the same file name are included in the shared file lists of different computers in the local area network, respectively calculating the hash value of the shared file of each computer, and if the hash values are the same, only one file name is displayed in the shared folder; and if the hash values are different, displaying the filename added with the hostname suffix in the shared folder.
8. An apparatus for implementing local area network based decentralized file sharing, the apparatus comprising:
a processor configured to execute computer-executable instructions;
a memory storing one or more computer-executable instructions that, when executed by the processor, perform the steps of the method for local area network-based decentralized implementation of file sharing according to any one of claims 1 to 7.
9. A processor for implementing file sharing based on lan decentralization, wherein the processor is configured to execute computer-executable instructions which, when executed by the processor, implement the steps of the method for implementing file sharing based on lan decentralization according to any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program, which is executable by a processor to perform the steps of the method for local area network based decentralized sharing of files according to any of claims 1 to 7.
CN202111242203.8A 2021-10-25 2021-10-25 Method, device, processor and computer readable storage medium for realizing file sharing based on local area network decentralization Active CN113946550B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111242203.8A CN113946550B (en) 2021-10-25 2021-10-25 Method, device, processor and computer readable storage medium for realizing file sharing based on local area network decentralization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111242203.8A CN113946550B (en) 2021-10-25 2021-10-25 Method, device, processor and computer readable storage medium for realizing file sharing based on local area network decentralization

Publications (2)

Publication Number Publication Date
CN113946550A true CN113946550A (en) 2022-01-18
CN113946550B CN113946550B (en) 2024-10-11

Family

ID=79332387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111242203.8A Active CN113946550B (en) 2021-10-25 2021-10-25 Method, device, processor and computer readable storage medium for realizing file sharing based on local area network decentralization

Country Status (1)

Country Link
CN (1) CN113946550B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756522A (en) * 2022-03-21 2022-07-15 联想(北京)有限公司 File sharing method, device, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007068147A1 (en) * 2005-12-17 2007-06-21 Intel Corporation Installing and executing shared applications in shared folders
CN102572009A (en) * 2011-12-09 2012-07-11 华为终端有限公司 Method, gateway and system of sharing media files
CN102819614A (en) * 2012-08-29 2012-12-12 深圳市茁壮网络股份有限公司 Method, device and system for classified displaying of shared catalogues in local area network
CN102882985A (en) * 2012-10-23 2013-01-16 上海够快网络科技有限公司 File sharing method based on cloud storage
US20150381672A1 (en) * 2014-06-25 2015-12-31 D-Link Corporation Method of managing and sharing file in home network system
CN106412055A (en) * 2016-09-27 2017-02-15 武汉启目科技有限公司 Method for multiple terminal devices to share file resources mutually
CN112637367A (en) * 2021-03-09 2021-04-09 武汉绿色网络信息服务有限责任公司 File sharing method, device, equipment and storage medium based on home network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007068147A1 (en) * 2005-12-17 2007-06-21 Intel Corporation Installing and executing shared applications in shared folders
CN102572009A (en) * 2011-12-09 2012-07-11 华为终端有限公司 Method, gateway and system of sharing media files
CN102819614A (en) * 2012-08-29 2012-12-12 深圳市茁壮网络股份有限公司 Method, device and system for classified displaying of shared catalogues in local area network
CN102882985A (en) * 2012-10-23 2013-01-16 上海够快网络科技有限公司 File sharing method based on cloud storage
US20150381672A1 (en) * 2014-06-25 2015-12-31 D-Link Corporation Method of managing and sharing file in home network system
CN106412055A (en) * 2016-09-27 2017-02-15 武汉启目科技有限公司 Method for multiple terminal devices to share file resources mutually
CN112637367A (en) * 2021-03-09 2021-04-09 武汉绿色网络信息服务有限责任公司 File sharing method, device, equipment and storage medium based on home network

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756522A (en) * 2022-03-21 2022-07-15 联想(北京)有限公司 File sharing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113946550B (en) 2024-10-11

Similar Documents

Publication Publication Date Title
CN102819461B (en) Desktop synchronous method, device, equipment and system
US8965958B2 (en) File fetch from a remote client device
US10749763B2 (en) Reliable address discovery cache
CN109547570A (en) Service registration method, apparatus, registration center's management equipment and storage medium
CN108510389A (en) Intelligent contract call method, equipment and readable storage medium storing program for executing based on block chain
US8972500B2 (en) Data share system, data process apparatus, and computer-readable recording medium
US11991094B2 (en) Metadata driven static determination of controller availability
CN113301116A (en) Cross-network communication method, device, system and equipment for microservice application
CN110808857B (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
WO2019100266A1 (en) Mobile edge host-machine service notification method and apparatus
CN109756484B (en) Object storage-based gateway control method, control device, gateway and medium
CN107800814B (en) Virtual machine deployment method and device
CN116089090A (en) Virtual resource configuration method, device, equipment and medium of graphic display
US20130238673A1 (en) Information processing apparatus, image file creation method, and storage medium
CN110417741B (en) Method and device for filtering security group
CN114499935B (en) Cloud platform access method, device, equipment and storage medium
CN113946550A (en) Method, device, processor and computer-readable storage medium for realizing file sharing based on local area network decentralization
JP4272105B2 (en) Storage group setting method and apparatus
CN112163125A (en) Device management method and apparatus, storage medium, and electronic device
CN115208671B (en) Firewall configuration method, device, electronic equipment and storage medium
CN111970358A (en) Decentralized cloud computing platform, service deployment method, service access method and components
CN115277408B (en) Agent configuration information updating method, device, equipment and storage medium
CN114461148B (en) Object storage method, device, system, electronic device and storage medium
US20240036958A1 (en) Information processing apparatus, information processing method, program, and information processing system
CN113168323B (en) Resource adding method, management device and computer storage medium

Legal Events

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