WO2019029183A1 - 存储设备的访问方法、装置、存储介质及处理器 - Google Patents

存储设备的访问方法、装置、存储介质及处理器 Download PDF

Info

Publication number
WO2019029183A1
WO2019029183A1 PCT/CN2018/083405 CN2018083405W WO2019029183A1 WO 2019029183 A1 WO2019029183 A1 WO 2019029183A1 CN 2018083405 W CN2018083405 W CN 2018083405W WO 2019029183 A1 WO2019029183 A1 WO 2019029183A1
Authority
WO
WIPO (PCT)
Prior art keywords
predetermined
routing device
access
user
storage device
Prior art date
Application number
PCT/CN2018/083405
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 WO2019029183A1 publication Critical patent/WO2019029183A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0637Permissions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • H04L45/10Routing in connection-oriented networks, e.g. X.25 or ATM
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • 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 disclosure relates to the field of communications, for example, to a method, an apparatus, a storage medium, and a processor for accessing a storage device.
  • the current Customer Premises Equipment (CPE) product supports access to a USB flash drive or storage device through the Server Message Block (SMB).
  • SMB Server Message Block
  • the CPE detects that a USB flash drive is inserted into the Universal Serial Bus (USB) interface
  • Start -> Run the command ⁇ 192.168.0.1 ⁇ admin to log in to the U disk” then read and write the data in the U disk.
  • the linux client cannot access the contents of the U disk after connecting to the CPE.
  • the embodiments of the present invention provide a method, an apparatus, a storage medium, and a processor for accessing a storage device, so as to solve the technical problem of inconvenience of accessing the storage device and poor user experience.
  • a method for accessing a storage device including: mounting a file system in the storage device connected to a routing device to a predetermined directory of the routing device; a file transfer protocol FTP server process in the routing device, and adding information of a predetermined user to the routing device, wherein the FTP server process is used to access the predetermined directory, and the predetermined user is used to pass the The FTP server accesses the predetermined directory.
  • an access device for a storage device comprising: a mount module configured to mount a file system in the storage device connected to a routing device to a predetermined directory of the routing device a processing module configured to: initiate a file transfer protocol FTP server process preset in the routing device, and add information of a predetermined user to the routing device, wherein the FTP server process is configured to access the a predetermined directory for accessing the predetermined directory by the FTP server.
  • a storage medium comprising a stored program, wherein the program is executed to perform the method of any of the above.
  • processor being arranged to run a program, wherein the program is executed to perform the method of any of the above.
  • An embodiment of the present invention provides a method, an apparatus, a storage medium, and a processor for accessing a storage device.
  • the routing device mounts a file system in a storage device connected to the routing device to a predetermined directory of the routing device, and starts a preset.
  • a file transfer protocol FTP server process in the routing device, and adding information of a predetermined user to the routing device, wherein the FTP server process is used to access a predetermined directory, and the predetermined user has access to the predetermined directory through the FTP server.
  • the ability of the user That is, the user can access the storage device on the routing device through the FTP server. Therefore, the technical problems of inconvenient access to the storage device and poor user experience exist in the related art, and the user is convenient to access the storage device and improve the user experience.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal for accessing a storage device according to an embodiment of the present invention
  • FIG. 2 is a flowchart of a method for accessing a storage device according to an embodiment of the present invention
  • FIG. 3 is a block diagram of the module in the embodiment
  • Figure 4 is a working flow chart in the embodiment
  • FIG. 5 is a structural block diagram of an access device of a storage device according to an embodiment of the present invention.
  • FIG. 6 is a structural block diagram of a mounting module 502 of an access device of a storage device according to an embodiment of the present invention
  • FIG. 7 is a block diagram showing a preferred structure of an access device of a storage device according to an embodiment of the present invention.
  • FIG. 1 is a hardware block diagram of a mobile terminal of an access method of a storage device according to an embodiment of the present invention.
  • the mobile terminal 10 may include one or more (one shown in FIG. 1) processor 102, a memory 104 for storing data, and a transmission device 106 for communication functions.
  • the processor 102 may include, but is not limited to, a processing device such as a Micro Controller Unit (MCU) or a Field-Programmable Gate Array (FPGA).
  • MCU Micro Controller Unit
  • FPGA Field-Programmable Gate Array
  • the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of the application software, such as program instructions or modules corresponding to the access method of the storage device in the embodiment of the present invention, and the processor 102 runs the software stored in the memory 104. Programs and modules to perform various functional applications and data processing, that is, to implement the above methods.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 can include memory remotely located relative to processor 102, which can be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmitting device 106 is configured to receive or transmit data via a network.
  • the network instance described above may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 is a flowchart of a method for accessing a storage device according to an embodiment of the present invention. As shown in FIG. 2, the method includes the following steps 202 and 204.
  • the file system in the storage device connected to the routing device is mounted in a predetermined directory of the routing device.
  • step 204 a file transfer protocol FTP server process preset in the above routing device is started, and information of the predetermined user is added to the routing device.
  • the FTP server process is used to access the predetermined directory, and the predetermined user is used to access the predetermined directory through the FTP server.
  • the routing device mounts the file system in the storage device connected to the routing device to a predetermined directory of the routing device; and starts a File Transfer Protocol (FTP) server process preset in the routing device, and schedules
  • FTP File Transfer Protocol
  • the user's information is added to the routing device, wherein the FTP server process is used to access a predetermined directory, and the predetermined user is used to access the predetermined directory through the FTP server. That is, the user can access the storage device on the routing device through the FTP server. Therefore, the technical problem of inconvenient access to the storage device and poor user experience can be solved, and the user can access the storage device and improve the user experience.
  • the execution body of the foregoing steps may be a Customer Premises Equipment (CPE) (such as a router) or the like, but is not limited thereto.
  • CPE Customer Premises Equipment
  • step 204 may be performed first and then 202.
  • FIG. 2 is an example of performing step 202 first and then performing step 204 as an example.
  • the attaching the file system in the foregoing storage device to the predetermined directory of the routing device may include: determining a read/write type of the storage device; The read/write type mounts the file system in the storage device to the read/write area corresponding to the read/write type in the predetermined directory.
  • the read/write type of the storage device in the foregoing is a read-only type
  • the file system of the storage device is mounted in a read-only predetermined directory
  • the read/write type of the storage device in the above is When reading a writable type, mount the file system of the storage device to a readable and writable predetermined directory.
  • the method may further include: setting the permission of the predetermined user, wherein the predetermined The user's rights include at least one of: permission to read and write the predetermined directory, authority to access the predetermined directory, access to the predetermined directory anonymously, and permission to save the file during the operation of the FTP server and the location of the file.
  • the rights of the user in the above are the rights for the user to access the predetermined directory, and other rights may be set as needed.
  • the adding the information of the predetermined user to the routing device may include: setting the information that the predetermined user accesses the predetermined directory, wherein the information of the predetermined user includes: a user name and a user password; The above information is added to the above routing device.
  • the information of the predetermined user in the above is set for the user to access the predetermined directory. The user can access the predetermined directory based on the username and user password.
  • the information of the user in the routing device is accessed through the FTP server process.
  • the method may further include: after determining that the storage device is disconnected from the routing device, deleting the routing device The above-mentioned predetermined user information; stopping the above FTP server process; uninstalling the above file system mounted on the predetermined directory.
  • the storage device in the above is disconnected from the routing device, all related information is deleted, and the security of the information is ensured.
  • the user accesses the storage device set in the routing device through FTP, that is, after connecting to the routing device and obtaining related information and permissions of the predetermined user, the user can access the storage device, which facilitates the user to store
  • the reading and writing of the device overcomes the problem of only reading and writing the storage device in the windows system, and improves the user experience.
  • the routing device is described by taking a router as an example.
  • CPE equipment as a portable mobile terminal can provide access services for one or more users, users access to such devices to access the Internet anytime, anywhere, so these products are widely used.
  • 3GPP 3rd Generation Partnership Project
  • 4GPP 4rd Generation Partnership Project
  • WIFI Wireless Fidelity
  • CPE equipment as a portable mobile terminal can provide access services for one or more users, users access to such devices to access the Internet anytime, anywhere, so these products are widely used.
  • 3GPP 3rd Generation Partnership Project
  • 4GPP 4rd Generation Partnership Project
  • WIFI Wireless Fidelity
  • U disk sharing realizes the purpose of users accessing U disk in the LAN to achieve data sharing, and in the case that the router can access the Internet, the Internet
  • the host in the U disk can also access the contents of the U disk to realize the purpose of data sharing between the local area network and the Internet access U disk.
  • the method for implementing U disk sharing is implemented by SMB technology, for example, an SMB server may be started inside the router. After the router detects that a USB flash drive is plugged into the USB port, the file system of the USB flash drive is mounted to a directory of the CPE, and then connected to the Windows host of the CPE to access the USB flash drive through a specific path.
  • the access path is: at the beginning of the windows system --> run the command ⁇ 192.168.0.1 ⁇ admin to log in to the U disk.
  • the related technology has drawbacks. On the one hand, the related scheme only supports access to the USB flash drive on the windows machine.
  • the SMB Since the related technology realizes access to the U disk through the SMB technology, the SMB itself realizes the data exchange between the windows host and the Linux host. Therefore, after the new client is not started, the Linux client cannot access the U after connecting to the CPE.
  • the access process to the U disk is complicated, and the user needs to know the access path (the access path is: at the beginning of the windows system) --> Run the command ⁇ 192.168.0.1 ⁇ admin to log in to the U disk. For the average user, the process is too complicated and some users may not know the access path. The user experience is not good and the applicable population is not high.
  • the FTP server process may be started inside the router.
  • the file system of the U disk device is mounted to the router.
  • a directory then start the FTP server process and specify the directory accessible to the user to the directory where the U disk's file system is mounted.
  • the client connected to the router runs an FTP client program (such as filezilla, etc.), and logs in to the FTP server inside the router through the gateway address and a preset username and password to access the U disk.
  • FTP client program such as filezilla, etc.
  • other hosts on the Internet can access the U disk by accessing the public network address of the router and accessing the FTP server inside the router through the FTP username and password.
  • This scheme achieves the following objectives a and b.
  • the client While satisfying the original access to the U disk through the SMB mode, the client achieves the purpose of accessing the U disk through FTP, and satisfies the usage habits of more people.
  • the router device as a portable mobile terminal can provide access services for one or more users, and the user accesses such devices to access the Internet anytime and anywhere. These products are widely used.
  • the router device there are more and more homes, individuals and small offices with multiple computers and multiple electronic devices.
  • Devices such as remote access file services, video surveillance services, video viewing and many other features of 4G wireless USB multifunction routers.
  • router products with U disk function are more and more popular among users.
  • U disk sharing realizes the purpose of users accessing U disk in the LAN to achieve data sharing, and in the case that the router can access the Internet, the Internet
  • the host in the U disk can also access the contents of the U disk to realize the purpose of data sharing between the local area network and the Internet access U disk.
  • the method for implementing U disk sharing is implemented by SMB technology
  • an SMB server may be started inside the router. After the router detects that a USB flash drive is plugged into the USB port, it mounts the file system of the USB flash drive to a directory on the router, and then connects to the Windows host of the router to access the USB flash drive through a specific path.
  • the access path is: at the beginning of the windows system --> run the command ⁇ 192.168.0.1 ⁇ admin to log in to the U disk.
  • the related technology has drawbacks.
  • the related scheme only supports access to the USB flash drive on the windows machine.
  • the related technology is to access the U disk through SMB technology.
  • SMB itself is to realize data exchange between the windows host and the Linux host.
  • the Linux client cannot access the U after connecting to the router.
  • the access process to the U disk is complicated, and the user needs to know the access path (the access path is: at the beginning of the windows system) --> Run the command ⁇ 192.168.0.1 ⁇ admin to log in to the U disk.
  • the process is too complicated and some users may not know the access path. The user experience is not good and the applicable population is not high.
  • the present embodiment proposes to access the U disk through the FTP mode.
  • the FTP server process may be started inside the router.
  • the router detects the U disk insertion event
  • the file system of the U disk device is mounted to the file system.
  • a directory of the router then start the FTP server process and specify the directory accessible to the user to the directory where the file system of the USB disk is mounted.
  • the client connected to the router runs an FTP client program (such as filezilla, etc.), and logs in to the FTP server inside the router through the gateway address and a preset username and password to access the U disk.
  • FTP client program such as filezilla, etc.
  • other hosts on the Internet can access the U disk by accessing the public network address of the router and accessing the FTP server inside the router through the FTP username and password.
  • FIG. 3 is a block diagram of the module in the embodiment.
  • the monitoring U disk insertion and removal event module is responsible for monitoring whether there is a U disk inserted and unplugged. If a U disk is inserted, the second module is triggered to start the FTP service module. Start the FTP service module (corresponding to the processing module in the above), after receiving the first module, that is, listening to the U disk insertion event sent by the U disk insertion and removal event module (monitoring U disk insertion and removal), perform related configuration and configuration work.
  • Adding and deleting a user module (corresponding to the above-mentioned adding unit and deleting the module) dynamically adds and deletes the client that can use the FTP service provided by the CPE according to the user's needs, and achieves dynamic adjustment to the user.
  • FIG. 4 is a flowchart of the operation in the embodiment, and the specific workflow includes the following steps 401-406.
  • step 401 after the CPE is powered on, the U disk plugging and unplugging event module monitors whether there is a U disk inserted in real time. If no U disk is inserted, the U disk is inserted for monitoring. If the U disk is inserted, step 402 is performed. .
  • step 402 after the U disk is inserted, the U disk file system needs to be mounted.
  • the mounting process is: first, a mount point needs to be created, and the file partition of the CPE is divided into a read-only partition and a readable and writable partition.
  • the directory where the USB flash drive is located
  • it is determined whether the directory is created on the read-only partition or whether it is created on the readable and writable partition according to whether the current USB flash drive is writable. Assuming that the current requirement is to make the U disk readable and writable, create the directory /tmp/usb_disk as a mount point on the readable and writable partition, and then mount the file system where the USB disk is located to the mount point.
  • the FTP service is started. Before starting the FTP service, you need to complete related configuration tasks, configure the user to read and write directories, access the directory, whether to support read and write operations, whether to support anonymous user access, whether to save the log during the FTP server running, and the log storage location. After completing the relevant configuration, start the FTP service.
  • Example 1 In order to improve the security of the system, the root root account user is configured as a readable and writable user, and other account users are configured as read-only users. At this point, the root account user can download the video, audio and other files and folders in the U disk, or upload the local file or folder to the U disk for readable and writable control. Other account users can only download files and folders in the U disk, but cannot upload local files or folders to the U disk.
  • Example 2 Within a certain security range, some anonymous users are allowed to access the USB flash drive and download the files in the USB flash drive. For the vehicle project, it is necessary to print the status of the vehicle and the like to the U disk in real time. This action can be completed by the root account user by uploading the log. In order to cope with the situation where the vehicle is faulty and requires a third party to analyze the fault log, you can provide an account that can be logged in without entering a username and password. We call such an anonymous user and a third party use an anonymous user. Enter the user name, password) to download the log for analysis. For anonymous users we can only open download permissions.
  • step 404 after the FTP service is started, it is necessary to add a user to be accessed in order to satisfy the client accessing the FTP server, so this step completes the user addition. Once added, the client can access it with an existing username and password.
  • linux system has a corresponding FTP client, so you can use the FTP username and password to log in to the U disk through the FTP client software on the computer or terminal of the two operating systems.
  • table of Contents This effectively solves the problem that the original samba technology can't overcome the content of the U disk can only be accessed on the windows machine.
  • the related problem is that the samba technology itself is to solve the problem of accessing the Linux system resources on the windows system.
  • Our CPE is a small Linux system, so after using samba, it can only meet the contents of the Windows machine to access the U disk, but the Linux machine cannot access the contents of the U disk. Therefore, we introduce FTP technology, so that it can simultaneously satisfy all operating system hosts that support ftp clients, including windows and linux, to access the contents of the USB flash drive.
  • step 405 after the USB flash drive is inserted, the device needs to continuously monitor whether the USB flash drive is pulled out. If not, the monitor state is maintained. If yes, step 406 is performed.
  • step 406 after the U disk pull-out time event is detected, the reverse process of the above process is performed, that is, the step 4061 is executed first, the user who has accessed the FTP server is deleted, and the user name, password, and the like are cleared; and step 4062 is performed. Stop the FTP service. Perform step 4603 to uninstall the U disk file system.
  • the above is the method of accessing the U disk inserted into the CPE through the FTP method.
  • USB flash drive Insert the USB flash drive into the USB port of the CPE product, add the user name and password to the page, and access the USB flash drive through the FTP client software filezilla on the local area network (LAN) side host. You can view the USB flash drive. Content, you can upload and download business.
  • LAN local area network
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention in essence or the contribution to the related art can be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, CD-ROM).
  • the instructions include a number of instructions for causing a terminal device (which may be a cell phone, computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
  • an access device for a storage device is provided, which is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein.
  • the term "module” may implement a combination of at least one of software and hardware for a predetermined function.
  • the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and conceivable.
  • FIG. 5 is a structural block diagram of an access device of a storage device according to an embodiment of the present invention. As shown in FIG. 5, the device includes: a mounting module 502 and a processing module 504. The device will be described in detail below.
  • the mount module 502 is configured to mount a file system in the storage device connected to the routing device to a predetermined directory of the routing device.
  • the processing module 504 is configured to start a file transfer protocol FTP server process preset in the routing device, and add information of the predetermined user to the routing device, where the FTP server process is used to access the predetermined directory, the predetermined The user accesses the above predetermined directory through the above FTP server.
  • FIG. 5 is a diagram showing an embodiment of the execution processing module 504 after the first execution module 502 in the embodiment.
  • FIG. 6 is a structural block diagram of a mounting module 502 of an access device of a storage device according to an embodiment of the present invention.
  • the mounting module 502 includes: a determining unit 602 and a mounting Unit 604, the device will be described in detail below.
  • the determining unit 602 is configured to determine a read/write type of the storage device.
  • the mounting unit 604 is connected to the determining unit 602, and is configured to mount the file system in the storage device to the predetermined directory according to the read/write type of the storage device, and read and write corresponding to the read/write type. On the area.
  • FIG. 7 is a structural block diagram of an access device of a storage device according to an embodiment of the present invention. As shown in FIG. 7, the device includes: a setting module 702, which will be described in detail below.
  • the setting module 702 is configured to connect the above-mentioned mounting module 502, and is configured to set the authority of the predetermined user, wherein the rights of the user include at least one of the following: the right to read and write the predetermined directory, and the permission to access the predetermined directory.
  • the processing module 504 includes: a setting unit configured to set the information that the predetermined user accesses the predetermined directory, wherein the information of the predetermined user includes: a user name, a user password, and an adding unit, configured to Add the above information to the above routing device.
  • the foregoing apparatus further includes: a deleting module, configured to delete the route after adding the information of the predetermined user to the routing device, and determining that the storage device is disconnected from the routing device The information about the predetermined user added in the device; the stopping module is configured to stop the FTP server process; and the uninstalling module is configured to uninstall the file system mounted on the predetermined directory.
  • a storage medium comprising a stored program, wherein the program is executed to perform the method of any of the above.
  • processor being arranged to run a program, wherein the program is executed to perform the method of any of the above.
  • Embodiments of the present invention also provide a storage medium including a stored program, wherein the program described above executes the method of any of the above.
  • the above storage medium may be arranged to store program code for performing the above steps.
  • the foregoing storage medium may include, but is not limited to, a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • mobile hard disk a magnetic disk
  • optical disk a variety of media that can store program code.
  • Embodiments of the present invention also provide a processor configured to execute a program, wherein the program is operative to perform the steps of any of the above methods.
  • the method, the device, the storage medium and the processor of the storage device provided by the present disclosure solve the technical problems of inconvenient access to the storage device and poor user experience, and achieve the effect of facilitating the user to access the storage device and improve the user experience.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种存储设备的访问方法、装置、存储介质及处理器,该方法包括:将连接路由设备的存储设备中的文件系统挂载到路由设备的预定目录中(202);启动预先设置在路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到路由设备中(204),其中,FTP服务器进程用于访问预定目录,预定用户用于通过FTP服务器访问预定目录。

Description

存储设备的访问方法、装置、存储介质及处理器 技术领域
本公开涉及通信领域,例如涉及一种存储设备的访问方法、装置、存储介质及处理器。
背景技术
目前的访问插入用户端设备(Customer Premises Equipment,CPE)产品支持通过服务器消息块协议(Server Message Block,SMB)方式访问U盘或存储设备。工作过程中,当CPE检测到有U盘插入通用串行总线(Universal Serial Bus,USB)接口时,将U盘所在文件系统挂载到CPE对应linux系统的某一个目录,输入访问路径“windows系统的开始-->运行中输入命令\\192.168.0.1\admin登陆到U盘”,然后对U盘中的数据进行读写操作。
但通过SMB方式访问U盘存在以下问题:
在CPE内部不启动新的进程的基础上,linux客户端连接到CPE后无法访问U盘中的内容。
虽然对U盘的检测以及文件系统的挂载由CPE完成,但是U盘的访问过程较为复杂,需要用户知道访问路径,用户体验感差。
发明内容
本发明实施例提供了一种存储设备的访问方法、装置、存储介质及处理器,以解决访问存储设备不方便以及用户体验差的技术问题。
根据本发明的一个实施例,提供了一种存储设备的访问方法,包括:将连接路由设备的所述存储设备中的文件系统挂载到所述路由设备的预定目录中;启动预先设置在所述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到所述路由设备中,其中,所述FTP服务器进程用于访问所述预定目录,所述预定用户用于通过所述FTP服务器访问所述预定目录。
根据本发明的另一个实施例,提供了一种存储设备的访问装置,包括:挂载模块,设置为将连接路由设备的所述存储设备中的文件系统挂载到所述路由设备的预定目录中;处理模块,设置为启动预先设置在所述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到所述路由设备中,其中, 所述FTP服务器进程用于访问所述预定目录,所述预定用户用于通过所述FTP服务器访问所述预定目录。
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述任一项所述的方法。
根据本发明的又一个实施例,还提供了一种处理器,所述处理器设置为运行程序,其中,所述程序运行时执行上述任一项所述的方法。
本发明实施例提供了一种存储设备的访问方法、装置、存储介质及处理器,由于路由设备将连接路由设备的存储设备中的文件系统挂载到路由设备的预定目录中;并启动预先设置在所述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到路由设备中,其中,FTP服务器进程用于访问预定目录,预定用户为具备通过所述FTP服务器访问预定目录的能力的用户。即用户可以通过FTP服务器访问路由设备上的存储设备,因此,可以解决相关技术中存在的访问存储设备不方便以及用户体验差的技术问题,达到方便用户访问存储设备以及提高用户体验的效果。
附图说明
图1是本发明实施例的一种存储设备的访问方法的移动终端的硬件结构框图;
图2是根据本发明实施例的存储设备的访问方法的流程图;
图3为本实施例中的模块结构图;
图4为本实施例中的工作流程图;
图5是根据本发明实施例的存储设备的访问装置的结构框图;
图6是根据本发明实施例的存储设备的访问装置的挂载模块502的结构框图;
图7是根据本发明实施例的存储设备的访问装置的优选的结构框图。
具体实施方式
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。
本申请实施例所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本发明实施例的一种存 储设备的访问方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图1中示出一个)处理器102、用于存储数据的存储器104、以及用于通信功能的传输装置106。处理器102可以包括但不限于微处理器(Microcontroller Unit,MCU)或可编程逻辑器件(Field-Programmable Gate Array,FPGA)等的处理装置。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
在一实施例中,存储器104可用于存储应用软件的软件程序以及模块,如本发明实施例中的存储设备的访问方法对应的程序指令或模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
在一实施例中,传输装置106用于经由一个网络接收或者发送数据。上述的网络实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
本实施例提供了一种存储设备的访问方法,图2是根据本发明实施例的存储设备的访问方法的流程图,如图2所示,该方法包括以下步骤202和204。
在步骤202,将连接路由设备的上述存储设备中的文件系统挂载到上述路由设备的预定目录中。
在步骤204,启动预先设置在上述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到上述路由设备中。
其中,上述FTP服务器进程用于访问上述预定目录,上述预定用户用于通过上述FTP服务器访问上述预定目录。
由于路由设备将连接路由设备的存储设备中的文件系统挂载到路由设备的预定目录中;并启动预先设置在上述路由设备中的文件传输协议(File Transfer  Protocol,FTP)服务器进程,并将预定用户的信息添加到路由设备中,其中,FTP服务器进程用于访问预定目录,预定用户用于通过上述FTP服务器访问预定目录。即用户可以通过FTP服务器访问路由设备上的存储设备,因此,可以解决访问存储设备不方便以及用户体验差的技术问题,达到方便用户访问存储设备以及提高用户体验的效果。
在一个可选的实施例中,上述步骤的执行主体可以为用户端设备(Customer Premises Equipment,CPE)(比如路由器)等,但不限于此。
在一个可选的实施例中,步骤202和步骤204的执行顺序是可以互换的,即可以先执行步骤204,然后再执行202。
在一个可选的实施例中,图2是以先执行步骤202,后执行步骤204为例进行的说明。
在一个可选的实施例中,将连接上述路由设备上述存储设备中的上述文件系统挂载到上述路由设备的上述预定目录中可以包括:确定上述存储设备的读写类型;根据上述存储设备的读写类型,将上述存储设备中的上述文件系统挂载到上述预定目录中与所述读写类型对应的读写区域上。在本实施例中,当上述中的存储设备的读写类型是只读类型时,将存储设备的文件系统挂载到只读的预定目录中;当上述中的存储设备的读写类型是可读可写类型时,将存储设备的文件系统挂载到可读可写的预定目录中。
在一个实施例中,将连接上述路由设备的上述存储设备中的上述文件系统挂载到上述路由设备的上述预定目录中之后,上述方法还可以包括:设置上述预定用户的权限,其中,上述预定用户的权限包括以下至少之一:读写上述预定目录的权限、具名访问上述预定目录的权限、匿名访问上述预定目录的权限、以及保存上述FTP服务器运行期间的文件以及上述文件存放位置的权限。在本实施例中,上述中的用户的权限是针对用户访问预定目录的权限,其他的权限可以根据需要进行设置。
在一个可选的实施例中,将上述预定用户的信息添加到上述路由设备中可以包括:设置上述预定用户访问上述预定目录的信息,其中,上述预定用户的信息包括:用户名和用户密码;将上述信息添加到上述路由设备中。在本实施例中,上述中的预定用户的信息针对用户访问预定目录进行设置。用户可以根据用户名和用户密码访问预定目录。通过FTP服务器进程访问路由设备中的用户的信息。
在一个可选的实施例中,在将上述预定用户的信息添加到上述路由设备中之后,上述方法还可以包括:在确定上述存储设备与上述路由设备断开连接后,删除上述路由设备中添加的上述预定用户的信息;停止上述FTP服务器进程;卸载上述预定目录上挂载的上述文件系统。在本实施例中,上述中的存储设备与路由设备断开连接后,将所有相关的信息进行删除,保证了信息的安全性。
在本实施例中,用户通过FTP访问设置在路由设备中的存储设备,即可以连接到路由设备并获得相关的预定用户的信息以及权限后,都可以进行存储设备的访问,方便了用户对存储设备的读写,克服了仅仅能在windows系统中读写存储设备的问题,提高了用户体验。
实施例1:
下面实施例中,路由设备以路由器为例进行说明。
随着移动互联网的发展,特别是第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)/第四代合作伙伴计划(4rd Generation Partnership Project,4GPP)技术以及无线保真(Wireless Fidelity,WIFI)技术的普及,CPE设备作为便携式移动终端可以为一个或多个用户提供接入服务,用户通过接入此类设备实现随时随地上网,因此这类产品得到广泛应用。同时,当今拥有多台电脑以及多台电子设备的家庭、个人和小型办公室越来越多,就迫切需要一种可以提供通过4G拨号上网,共享上网,高速WIFI连接,网络共享等各类外接办公设备,如:远程访问文件服务、视频监控服务、观看视频等诸多功能的4G无线USB多功能路由器。在这一过程中,带有U盘功能的路由器产品越来越受到用户的青睐,U盘共享实现了局域网内的用户访问U盘实现数据共享的目的,而且在路由器可以上网的情况下,互联网中的主机也可以访问U盘中的内容,实现局域网、互联网访问U盘完成数据共享的目的。
在一实施例中,实现U盘共享的方法是通过SMB技术来实现,例如可以是在路由器内部启动一个SMB服务器。在路由器检测到有U盘设备插入USB口后将U盘设备的文件系统挂载到CPE的某个目录,然后连接到CPE的windows主机,通过特定的路径实现对U盘的访问。访问路径是:在windows系统的开始-->运行中输入命令\\192.168.0.1\admin登陆到U盘。但相关技术存在缺陷,一方面相关方案仅支持在windows机器上对U盘进行访问。由于相关技术通过SMB技术实现访问U盘,SMB本身就是实现windows主机与linux主机之间的数据互访,因此,在不启动新的进程的基础上,当linux客户端连接到CPE后无 法访问U盘中的内容;另一方面,虽然对U盘的检测以及文件系统的挂载由CPE完成,但是对U盘的访问过程较为复杂,需要用户知道访问路径(访问路径就是:在windows系统的开始-->运行中输入命令\\192.168.0.1\admin登陆到U盘),对于普通用户来说该过程过于复杂而且有些用户可能还不知道访问路径,用户体验不好,适用人群也不高。
针对以上问题,本实施例提出通过FTP方式实现访问U盘,例如可以是:在路由器内部启动一个FTP服务器进程,当路由器检测到U盘插入事件后将U盘设备的文件系统挂载到路由器的某个目录,然后启动FTP服务器进程并将可供用户访问的目录指定到U盘的文件系统挂载的目录上。然后连接到路由器的客户端运行FTP客户端程序(如:filezilla等),并通过网关地址以及预先设置好的用户名、密码登录到路由器内部的FTP服务器上实现访问U盘的目的。当路由器拨号成功后,互联网上的其它主机可以通过访问路由器的公网地址并通过FTP用户名、密码访问路由器内部的FTP服务器实现访问U盘的目的。
该方案实现了如下目的a和b。
a.在满足原有通过SMB方式访问U盘的同时,实现了客户端通过FTP方式访问U盘的目的,满足了更多人的使用习惯。
b.实现了linux机器上访问U盘的目的,解决了原有SMB方式下linux机器无法访问U盘的问题,扩大了登陆主机的操作系统范围。
实施例2:
随着移动互联网的发展,特别是3G/4G技术以及WIFI技术的普及,路由器设备作为便携式移动终端可以为一个或多个用户提供接入服务,用户通过接入此类设备实现随时随地上网,因此这类产品得到广泛应用。同时,当今拥有多台电脑以及多台电子设备的家庭、个人和小型办公室越来越多,就迫切需要一种可以提供通过4G拨号上网,共享上网,高速WIFI连接,网络共享等各类外接办公设备,如:远程访问文件服务、视频监控服务、观看视频等诸多功能的4G无线USB多功能路由器。在这一过程中,带有U盘功能的路由器产品越来越受到用户的青睐,U盘共享实现了局域网内的用户访问U盘实现数据共享的目的,而且在路由器可以上网的情况下,互联网中的主机也可以访问U盘中的内容,实现局域网、互联网访问U盘完成数据共享的目的。
在一实施例中,实现U盘共享的方法是通过SMB技术来实现,例如可以是在路由器内部启动一个SMB服务器。在路由器检测到有U盘设备插入USB口 后将U盘设备的文件系统挂载到路由器的某个目录,然后连接到路由器的windows主机,通过特定的路径实现对U盘的访问。访问路径是:在windows系统的开始-->运行中输入命令\\192.168.0.1\admin登陆到U盘。但相关技术存在缺陷,一方面相关方案仅支持在windows机器上对U盘进行访问。相关技术是通过SMB技术实现访问U盘,SMB本身就是实现windows主机与linux主机之间的数据互访,因此,在不启动新的进程的基础上,当linux客户端连接到路由器后无法访问U盘中的内容;另一方面,虽然对U盘的检测以及文件系统的挂载由路由器完成,但是对U盘的访问过程较为复杂,需要用户知道访问路径(访问路径就是:在windows系统的开始-->运行中输入命令\\192.168.0.1\admin登陆到U盘),对于普通用户来说该过程过于复杂而且有些用户可能还不知道访问路径,用户体验不好,适用人群也不高。
在一实施例中,本实施例提出通过FTP方式实现访问U盘,例如可以是:在路由器内部启动一个FTP服务器进程,当路由器检测到U盘插入事件后将U盘设备的文件系统挂载到路由器的某个目录,然后启动FTP服务器进程并将可供用户访问的目录指定到U盘的文件系统挂载的目录上。然后连接到路由器的客户端运行FTP客户端程序(如:filezilla等),并通过网关地址以及预先设置好的用户名、密码登录到路由器内部的FTP服务器上实现访问U盘的目的。当路由器拨号成功后,互联网上的其它主机可以通过访问路由器的公网地址并通过FTP用户名、密码访问路由器内部的FTP服务器实现访问U盘的目的。
下面结合附图对本实施例进行详细说明:
图3为本实施例中的模块结构图,本实施例共有三个模块:监听U盘插拔事件模块、启动FTP服务模块和添加删除用户模块。监听U盘插拔事件模块负责监听当前是否有U盘插入拔出,若有U盘插入则启动触发第二个模块即启动FTP服务模块的工作。启动FTP服务模块(对应上述中的处理模块)在收到第一个模块即监听U盘插拔事件模块(监听U盘插拔)发来的U盘插入事件后,进行相关的配置,配置工作包括但不限于:配置用户可读写目录、可访问目录、是否支持读写操作、是否支持匿名用户访问、是否需要保存FTP服务器运行期间的log以及log存放位置等。完成相关配置工作之后启动FTP服务。添加删除用户模块(对应上述中的添加单元,删除模块)根据用户需要动态添加删除可以使用CPE提供的FTP服务的客户端,达到对用户的动态调整。
图4为本实施例中的工作流程图,具体工作流程包括如下步骤401-406。
在步骤401,CPE开机上电后监听U盘插拔事件模块实时监听当前是否有U盘插入,如果没有U盘插入则保持监听是否有U盘插入,如果监听到有U盘插入则执行步骤402。
在步骤402,监听到有U盘插入后需要挂载U盘文件系统。
在一实施例中,挂载过程是:首先需要创建一个挂载点,将CPE的文件分区,分为只读分区和可读可写分区。在创建U盘所在目录时,根据当前U盘是否可写来确定在只读分区上创建目录,还是在可读可写分区上创建。假设当前需求是要满足U盘可读可写,则在可读可写分区上创建目录/tmp/usb_disk作为挂载点,然后将U盘所在文件系统挂载到该挂载点上。
在步骤403,开始启动FTP服务。在启动FTP服务前需要完成相关的配置工作,配置用户可读写目录、可访问目录、是否支持读写操作、是否支持匿名用户访问、是否需要保存FTP服务器运行期间的log以及log存放位置等,完成相关配置后,启动FTP服务。
以上是可以进行的通用配置工作,在另一个实施例中,还可以进行组合化配置或按照不同场景进行个性化配置,如下述例子1和2所述。
例子1:为了提高系统的安全性,将根root账号用户配置为可读可写用户,将其他账号用户配置为只读用户。此时,root账号用户可以从下载U盘中的视频、音频等文件以及文件夹,也可以将本地的文件或文件夹上传到U盘实现可读可写控制。而其他账号用户只能下载U盘中的文件以及文件夹,而不能将本地的文件或文件夹上传到U盘。
例子2:在一定安全性得到保障的范围内,满足部分匿名用户访问U盘并下载U盘中的文件。对于车载项目来说需要将车辆的状态等信息实时打印到U盘中,这一动作可以由root账号用户通过上传log的形式完成。为了应对车辆出现故障并且需要第三方分析故障log的场景,则可以事先提供一个不需要输入用户名、密码的即可登录的账号,我们称这样的用户是匿名用户,第三方使用匿名用户(无需输入用户名、密码)即可方便下载log进行分析。对匿名用户我们可以仅开放下载权限。
在步骤404,FTP服务启动后,要想满足客户端访问FTP服务器就要添加可供访问的用户,因此该步骤完成用户的添加。添加后,客户端就可以使用已有用户名和密码进行访问了。
在一实施例中,包括但不限于windows系统、linux系统都有对应的FTP客 户端,因此可以在两种操作系统的电脑或终端上使用FTP用户名密码通过FTP客户端软件登录到U盘所在目录。这有效解决了原来samba技术无法克服的只能在windows机器上访问U盘中内容的问题,相关问题产生的原因是:samba技术本身就是为了解决在windows系统上访问linux系统资源的问题,这是samba技术本身特性造成的。我们的CPE是一个小型linux系统,因此使用samba后只能满足windows机器访问U盘的内容,但linux机器无法访问U盘的内容。因此我们引入FTP技术,这样就可以同时满足包括windows、linux在内所有支持ftp客户端的操作系统主机访问U盘的内容。
以上论述的是U盘插入后需要执行的几个步骤,但U盘除了插入事件还存在拔出事件,因此还需要监听U盘拔出事件并且在监听到后完成相关处理,因此下面的步骤405和406论述对U盘拔出事件的处理。
在步骤405,在U盘插入后设备内部还需要不断监听U盘是否被拔出,若没有则保持监听状态,若有则执行步骤406。
在步骤406,监听到U盘拔出时间事件后,执行如上过程的逆过程,即:首先执行步骤4061,删除已经添加的访问FTP服务器的用户,清理用户名、密码等信息;执行步骤4062,停止FTP服务;执行步骤4063卸载U盘文件系统。
到此,U盘卸载工作全部完成。
以上就是通过FTP方法访问插入CPE的U盘的方法。
将U盘插入CPE产品的USB口,在页面上添加用户名、密码后,在当地网络(Local Area Network,LAN)侧主机上通过FTP客户端软件filezilla访问U盘中,可以查看U盘中的内容、可以进行上传下载业务。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
在本实施例中还提供了一种存储设备的访问装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和硬件中至少一个的组合。尽管以下实施例所描 述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图5是根据本发明实施例的存储设备的访问装置的结构框图,如图5所示,该装置包括:挂载模块502和处理模块504,下面对本装置进行详细说明。
挂载模块502,设置为将连接路由设备的上述存储设备中的文件系统挂载到上述路由设备的预定目录中。
处理模块504,设置为启动预先设置在上述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到上述路由设备中,其中,上述FTP服务器进程用于访问上述预定目录,上述预定用户用于通过上述FTP服务器访问上述预定目录。
图5是本实施例中的先执行模块502后执行处理模块504的一个实施例图。
在一个可选的实施例中,图6是根据本发明实施例的存储设备的访问装置的挂载模块502的结构框图,如图6所示,挂载模块502包括:确定单元602和挂载单元604,下面对本装置进行详细说明。
确定单元602,设置为确定上述存储设备的读写类型。挂载单元604,连接至上述中的确定单元602,设置为根据上述存储设备的读写类型将上述存储设备中的上述文件系统挂载到上述预定目录中与所述读写类型对应的读写区域上。
在一个可选的实施例中,图7是根据本发明实施例的存储设备的访问装置的结构框图,如图7所示,上述装置包括:设置模块702,下面对本装置进行详细说明。
设置模块702,连接上述中的挂载模块502,设置为,设置上述预定用户的权限,其中,上述用户的权限包括以下至少之一:读写上述预定目录的权限、具名访问上述预定目录的权限、匿名访问上述预定目录的权限、以及保存上述FTP服务器运行期间的文件以及上述文件存放位置的权限。
在一个可选的实施例中,处理模块504包括:设置单元,设置为设置上述预定用户访问上述预定目录的信息,其中,上述预定用户的信息包括:用户名,用户密码;添加单元,设置为将上述信息添加到上述路由设备中。
在一个可选的实施例中,上述装置还包括:删除模块,设置为在将上述预定用户的信息添加到上述路由设备中,并确定上述存储设备与上述路由设备断开连接后,删除上述路由设备中添加的上述预定用户的信息;停止模块,设置为停止上述FTP服务器进程;卸载模块,设置为卸载上述预定目录上挂载的上 述文件系统。
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行上述任一项所述的方法。
根据本发明的又一个实施例,还提供了一种处理器,所述处理器设置为运行程序,其中,所述程序运行时执行上述任一项所述的方法。
在一个可选的实施例中,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。
本发明的实施例还提供了一种存储介质,该存储介质包括存储的程序,其中,上述程序运行时执行上述任一项所述的方法。
在本实施例中,上述存储介质可以被设置为存储用于执行以上各步骤的程序代码。
在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。
本发明的实施例还提供了一种处理器,该处理器设置为运行程序,其中,该程序运行时执行上述任一项方法中的步骤。
本实施例中的示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。
工业实用性
本公开提供的一种存储设备的访问方法、装置、存储介质及处理器,解决了存在的访问存储设备不方便以及用户体验差的技术问题,达到方便用户访问存储设备以及提高用户体验的效果。

Claims (12)

  1. 一种存储设备的访问方法,包括:
    将连接路由设备的所述存储设备中的文件系统挂载到所述路由设备的预定目录中;
    启动预先设置在所述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到所述路由设备中,其中,所述FTP服务器进程用于访问所述预定目录,所述预定用户用于通过所述FTP服务器访问所述预定目录。
  2. 根据权利要求1所述的方法,其中,将连接所述路由设备的所述存储设备中的所述文件系统挂载到所述路由设备的所述预定目录中包括:
    确定所述存储设备的读写类型;
    根据所述存储设备的读写类型,将所述存储设备中的所述文件系统挂载到所述预定目录中与所述读写类型对应的读写区域上。
  3. 根据权利要求1或2所述的方法,将连接所述路由设备的所述存储设备中的所述文件系统挂载到所述路由设备的所述预定目录中之后,所述方法还包括:
    设置所述预定用户的权限,其中,所述预定用户的权限包括以下至少之一:
    读写所述预定目录的权限、具名访问所述预定目录的权限、匿名访问所述预定目录的权限、以及保存所述FTP服务器运行期间的文件以及所述文件存放位置的权限。
  4. 根据权利要求1、2或3所述的方法,其中,将所述预定用户的信息添加到所述路由设备中包括:
    设置所述预定用户访问所述预定目录的信息,其中,所述预定用户的信息包括:用户名和用户密码;
    将所述信息添加到所述路由设备中。
  5. 根据权利要求1-4中任一项所述的方法,在将所述预定用户的信息添加到所述路由设备中之后,所述方法还包括:
    在确定所述存储设备与所述路由设备断开连接后,删除所述路由设备中添加的所述预定用户的信息;
    停止所述FTP服务器进程;
    卸载所述预定目录上挂载的所述文件系统。
  6. 一种存储设备的访问装置,包括:
    挂载模块,设置为将连接路由设备的所述存储设备中的文件系统挂载到所 述路由设备的预定目录中;
    处理模块,设置为启动预先设置在所述路由设备中的文件传输协议FTP服务器进程,并将预定用户的信息添加到所述路由设备中,其中,所述FTP服务器进程用于访问所述预定目录,所述预定用户用于通过所述FTP服务器访问所述预定目录。
  7. 根据权利要求6所述的装置,所述挂载模块包括:
    确定单元,设置为确定所述存储设备的读写类型;
    挂载单元,设置为根据所述存储设备的读写类型,将所述存储设备中的所述文件系统挂载到所述预定目录中与所述读写类型对应的读写区域上。
  8. 根据权利要求6或7所述的装置,其特征在于,所述装置还包括:
    设置模块,设置为在将连接所述路由设备的所述存储设备中的所述文件系统挂载到所述路由设备的所述预定目录中之后,设置所述预定用户的权限,其中,所述预定用户的权限包括以下至少之一:
    读写所述预定目录的权限、具名访问所述预定目录的权限、匿名访问所述预定目录的权限、以及保存所述FTP服务器运行期间的文件以及所述文件存放位置的权限。
  9. 根据权利要求6、7或8所述的装置,其中,所述处理模块包括:
    设置单元,设置为设置所述预定用户访问所述预定目录的信息,其中,所述预定用户的信息包括:用户名,用户密码;
    添加单元,设置为将所述信息添加到所述路由设备中。
  10. 根据权利要求6-9中任一项所述的装置,其特征在于,所述装置还包括:
    删除模块,设置为在将所述预定用户的信息添加到所述路由设备中,并确定所述存储设备与所述路由设备断开连接后,删除所述路由设备中添加的所述预定用户的信息;
    停止模块,设置为停止所述FTP服务器进程;
    卸载模块,设置为卸载所述预定目录上挂载的所述文件系统。
  11. 一种存储介质,所述存储介质包括存储的程序,其中,所述程序运行时执行权利要求1至5中任一项所述的方法。
  12. 一种处理器,所述处理器设置为运行程序,其中,所述程序运行时执行权利要求1至5中任一项所述的方法。
PCT/CN2018/083405 2017-08-09 2018-04-17 存储设备的访问方法、装置、存储介质及处理器 WO2019029183A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710677207.6 2017-08-09
CN201710677207.6A CN109388334A (zh) 2017-08-09 2017-08-09 存储设备的访问方法、装置、存储介质及处理器

Publications (1)

Publication Number Publication Date
WO2019029183A1 true WO2019029183A1 (zh) 2019-02-14

Family

ID=65272736

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083405 WO2019029183A1 (zh) 2017-08-09 2018-04-17 存储设备的访问方法、装置、存储介质及处理器

Country Status (2)

Country Link
CN (1) CN109388334A (zh)
WO (1) WO2019029183A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395537A (zh) * 2019-08-15 2021-02-23 奇安信安全技术(珠海)有限公司 网站防篡改的方法及装置、存储介质、电子装置
CN117827768A (zh) * 2024-03-05 2024-04-05 国网江西省电力有限公司电力科学研究院 一种基于ftp的u盘文件资源管理方法及系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986776A (zh) * 2014-05-28 2014-08-13 Tcl集团股份有限公司 一种路由器及基于路由器的下载方法
CN105117496A (zh) * 2015-09-28 2015-12-02 上海斐讯数据通信技术有限公司 一种共享路由器外部存储设备中数据的方法及系统
CN105589964A (zh) * 2015-12-23 2016-05-18 浪潮(北京)电子信息产业有限公司 一种远程挂载文件的方法与系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986776A (zh) * 2014-05-28 2014-08-13 Tcl集团股份有限公司 一种路由器及基于路由器的下载方法
CN105117496A (zh) * 2015-09-28 2015-12-02 上海斐讯数据通信技术有限公司 一种共享路由器外部存储设备中数据的方法及系统
CN105589964A (zh) * 2015-12-23 2016-05-18 浪潮(北京)电子信息产业有限公司 一种远程挂载文件的方法与系统

Also Published As

Publication number Publication date
CN109388334A (zh) 2019-02-26

Similar Documents

Publication Publication Date Title
JP6582554B2 (ja) シンクライアントシステム、サーバ装置、ポリシー管理装置、制御方法及び制御プログラム
KR102018490B1 (ko) 단말기와 연관된 소스 어드레스들을 검증
EP2911063A1 (en) Remote storage system and method using network attached storage (nas) device
CN103442053A (zh) 基于云服务平台实现远程访问存储终端的方法及系统
WO2014044075A1 (en) A data-sharing method, terminal, server, and system
US9413560B2 (en) Differentiated quality of service using security as a service
CN112805980B (zh) 用于移动设备管理的基于无查询设备配置确定的技术
TWM462408U (zh) 具自主備份能力的無線儲存裝置與無線儲存系統
WO2012034325A1 (zh) 移动终端文件的备份方法及装置
EP2445239B1 (en) Method and system for identifying an entity in a mobile telecommunications system
WO2014071841A1 (zh) 同步无线网络参数的方法、终端、服务器、系统及设备
CN105828094A (zh) 一种基于智能电视的私有云系统及其实现方法
CN104601666A (zh) 日志服务方法及云平台
WO2019029183A1 (zh) 存储设备的访问方法、装置、存储介质及处理器
CN104702634A (zh) 数据操作请求处理方法、装置及系统
CN103716230A (zh) 消息发送方法、装置及服务器
CN114025009B (zh) 转发请求的方法、系统、代理服务器和装置
US20140189055A1 (en) Migration of usage sessions between devices
CN109005068B (zh) 一种集群虚拟机qos的配置方法
US8413137B2 (en) Automated network backup peripheral device and method
CN109104774B (zh) 数据传输方法和系统
WO2016078291A1 (zh) 共享文件服务器的访问方法、装置及系统
WO2020068213A1 (en) Flexible unnumbered destination tunnels for virtual networks
WO2015196586A1 (zh) 虚拟桌面的配置、获取方法及装置
US10833939B2 (en) Providing positive confirmation of a mobile or portable computer wipe

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

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

Country of ref document: EP

Kind code of ref document: A1