CN113157647B - Method and device for accessing mounted file - Google Patents

Method and device for accessing mounted file Download PDF

Info

Publication number
CN113157647B
CN113157647B CN202110330310.XA CN202110330310A CN113157647B CN 113157647 B CN113157647 B CN 113157647B CN 202110330310 A CN202110330310 A CN 202110330310A CN 113157647 B CN113157647 B CN 113157647B
Authority
CN
China
Prior art keywords
access
sub
equipment
target file
directory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110330310.XA
Other languages
Chinese (zh)
Other versions
CN113157647A (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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies 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 TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN202110330310.XA priority Critical patent/CN113157647B/en
Publication of CN113157647A publication Critical patent/CN113157647A/en
Application granted granted Critical
Publication of CN113157647B publication Critical patent/CN113157647B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • 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/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

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

Abstract

The application is applicable to the technical field of local area network access, and provides a method and a device for accessing a mounted file, wherein the method comprises the following steps: receiving a disk directory sent by each piece of sub equipment, and mounting the disk directory of each piece of sub equipment to the local to form an access directory; transmitting the access directory to an access device; receiving a first access request sent by the access equipment according to the access catalog; and forwarding the target file in the target device corresponding to the first access request to the access device. By the scheme, the disk catalogues of all the sub-devices in the local area network are mounted to the main device so as to be accessed through the main device, and the main device serves as an access hub to build an access bridge between the access devices and the sub-devices, so that each access device can randomly access files in different sub-devices or files in external devices externally connected to the sub-devices, and the technical problem that the files in the external devices corresponding to the sub-devices in the local area network cannot be accessed is solved.

Description

Method and device for accessing mounted file
Technical Field
The application belongs to the technical field of local area network access, and particularly relates to a method and a device for accessing a mounted file.
Background
SMB (SERVER MESSAGES Block) is a communication protocol for sharing files and printers on a local area network, and provides sharing services of resources such as files and printers between different computers in the local area network. The SMB protocol is a client/server type protocol by which clients can access shared file systems, printers, and other resources on a server.
The SMB protocol only supports accessing files in a mounting device (the mounting device refers to a device for mounting a file directory on a host, and may also be referred to as a sub device), but files in an external device (an external device, for example, a flash disk, a memory card, or a mobile hard disk) externally connected to the mounting device cannot be accessed, which is a technical problem that needs to be solved.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method, an apparatus, a main device, an access device, a first sub device, and a computer readable storage medium for accessing a mounted file, which can solve a technical problem that a file in an external device connected to the mounted device cannot be accessed.
A first aspect of an embodiment of the present application provides a method for accessing a mount file, where the method is applied to a master device, and the method includes:
Receiving a disk directory sent by each piece of sub equipment, and mounting the disk directory of each piece of sub equipment to the local to form an access directory; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
transmitting the access directory to the access device; the access device comprises each sub-device;
Receiving a first access request sent by the access equipment according to the access catalog;
and forwarding the target file in the target device corresponding to the access request to the access device.
A second aspect of an embodiment of the present application provides a method for accessing a mount file, where the method is applied to an access device, and the method includes:
transmitting a first local disk directory to a master device; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
Receiving the access catalogue sent by the master device;
Sending a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
Receiving a target file returned by the main equipment according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
Further, before the receiving the access directory sent by the master device, the method further includes:
Sending a first connection request to the master device;
Establishing connection with the main equipment through the first connection request;
Performing authentication interaction with the master device; the authentication interaction comprises protocol version negotiation, session establishment and authentication;
Sending an acquisition request to the main equipment under the condition that the authentication is passed;
And receiving the access directory returned by the master equipment according to the acquisition request.
Further, when the target device is changed from the first sub-device to the main device, after receiving the target file returned by the main device according to the first access request, the method includes:
Sending a third access request to the master device; the third access request is forwarded to the first sub-device through the main device; the third access request is used for accessing a second target file in the main device;
Receiving a second reset message forwarded by the main equipment; the second reset message is a message returned to the main device by the first sub-device according to the second reset message;
Sending a fourth connection request according to the second reset message;
Establishing connection with the main equipment through the fourth connection request;
Performing authentication interaction with the master device; the authentication interaction comprises protocol version negotiation, session establishment and authentication;
Sending a fourth access request to the master device if the authentication passes;
and receiving a second target file returned by the master device according to the fourth access request.
Further, when the target device is changed from the first sub-device to the second sub-device, after receiving the target file returned by the main device according to the first access request, the method includes:
sending a fifth access request to the master device; the fifth access request is used for accessing a third target file in the second sub-device; the fifth authentication request is forwarded to the third device through the master device;
Receiving a third reset message forwarded by the master device; the third reset message is a message which is returned to the main device by the first sub-device according to the fifth access request and forwarded by the main device;
sending a fifth connection request to the main equipment according to the third reset message, and establishing connection with the second sub-equipment; the destination address of the fifth connection request is the internet protocol address of the main device; the fifth connection request is forwarded to the third device through the master device;
Sending an authentication interaction message to the master device; the authentication interaction message is forwarded to the second sub-equipment through the main equipment;
Receiving a third reply message forwarded by the master device; the third reply message is a message which is returned to the main device by the second sub-device according to the authentication interaction message and forwarded by the main device;
If the authentication is successful according to the third reply message, a sixth access request is sent to the master device; the sixth access request is forwarded to the second sub-device through the main device;
receiving a third target file forwarded by the main equipment; and the third target file is a file which is returned to the main equipment by the second sub equipment according to the sixth access request and forwarded by the main equipment.
Further, after receiving the target file returned by the master device according to the first access request, the method includes:
sending a first closing request to a main device; the first closing request is forwarded to a first sub-device through the main device;
receiving a third reply message forwarded by the master device; the third reply message is a message which is returned to the main device by the first sub-device according to a first closing request and forwarded by the main device;
closing the connection with the first sub-equipment through the third reply message;
And receiving a second closing request sent by the main equipment, and closing the connection with the main equipment according to the second closing request.
A third aspect of an embodiment of the present application provides a method for accessing a mount file, where the method is applied to a first sub-device, and the method includes:
Sending a second local disk directory to the master device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for the master device to form access directories of all disks of each piece of sub-equipment;
receiving a first access request forwarded by a main device; the first access request is an access request sent to the master device by the access device according to the access directory;
According to the first access request, a first target file is sent to the main equipment; and forwarding the first target file to an access device through the main device.
Further, when the target device is changed from the first sub device to the master device, after the first target file is sent to the master device according to the first access request, the method includes:
Receiving a third access request forwarded by the master device; the third access request is used for accessing a second target file in the main device; the third access request is a request sent by the access device to the master device;
Sending a second reset message and a first prompt message to the main equipment according to the third access request; the second reset message is returned to the access device through the main device and is used for controlling the access device to resend the request; the first prompt message is used for controlling the main equipment to acquire a second target file according to the request sent by the access equipment again, and controlling the main equipment to return the second target file to the access equipment.
Further, when the target device is changed from the first sub-device to the second sub-device, after the target file is sent to the main device according to the first access request, the method includes:
Receiving a fifth access request forwarded by the master device; the fifth access request is used for accessing a third target file in the second sub-device; the fifth access request is a request sent by the access device to the master device;
According to the fifth access request, a third reset message and a second prompt message are sent to the main equipment; the third reset message is used for controlling the access equipment to resend the request; the second prompt message is used for controlling the main equipment to acquire a third target file according to the request sent by the access equipment again, and controlling the main equipment to return the third target file to the access equipment.
A fourth aspect of an embodiment of the present application provides an apparatus for accessing a mounted file, where the apparatus is applied to a host device, the apparatus includes:
the first receiving unit is used for receiving the disk catalogs sent by each piece of sub equipment, and mounting the disk catalogs of each piece of sub equipment to the local to form an access catalogs; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
a first sending unit, configured to send the access directory to an access device; the access device comprises each sub-device;
the second receiving unit is used for receiving a first access request record sent by the access equipment according to the access catalog;
and the forwarding unit is used for forwarding the target file in the target device corresponding to the access request to the access device.
A fifth aspect of an embodiment of the present application provides an apparatus for accessing a mounted file, the apparatus being applied to an access device, the apparatus comprising:
the second sending unit is used for sending the first local disk catalog to the main equipment; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
a third receiving unit, configured to receive the access directory sent by the master device;
A third sending unit, configured to send a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
a fourth receiving unit, configured to receive a target file returned by the master device according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
A sixth aspect of an embodiment of the present application provides an apparatus for accessing a mounted file, where the apparatus is applied to a first sub device, and the apparatus includes:
A fourth sending unit, configured to send a second local disk directory to the master device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
A fifth receiving unit, configured to receive a first access request forwarded by the master device; the first access request is an access request sent to the master device by the access device according to the access directory;
A fifth sending unit, configured to send the target file to the master device according to the first access request; and forwarding the target file to access equipment through the main equipment.
A seventh aspect of an embodiment of the present application provides a host device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of the first aspect described above when executing the computer program.
An eighth aspect of an embodiment of the present application provides an access device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of the second aspect described above when executing the computer program.
A ninth aspect of the embodiments of the present application provides a first sub-device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the method of the third aspect described above when said computer program is executed.
A tenth aspect of the embodiments of the present application provides a lan system, where the lan system includes a master device and an access device; the access device comprises an access device, a first sub-device and a second sub-device, wherein the main device is used for realizing the steps of the method in the first aspect, and the access device is used for realizing the steps of the method in the second aspect; the first sub-device is configured to implement the steps of the method described in the third aspect.
An eleventh aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the methods of the first, second and third aspects described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: according to the application, all the disks of each piece of sub equipment are mounted to the local to form the access catalog. An access directory is sent to an access device. And receiving a first access request sent by the access equipment according to the access directory. And forwarding the first target file in the first sub-device corresponding to the first access request to the access device. By the scheme, the disk catalogues of all the sub-devices in the local area network are mounted to the main device so as to be accessed through the main device, and the main device serves as an access hub to build an access bridge between the access devices and the sub-devices, so that each access device can randomly access files in different sub-devices or files in external devices externally connected to the sub-devices, and the technical problem that the files in the external devices corresponding to the sub-devices in the local area network cannot be accessed is solved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 shows a four-terminal interactive schematic flow chart provided by the application;
FIG. 2 shows a schematic flow chart of a method of accessing mounted files provided by the present application;
FIG. 3 is a schematic flow chart of step 204 in a method for accessing mounted files provided by the present application;
FIG. 4 is a schematic flow chart of step 2042 in a method for accessing mounted files provided by the present application;
FIG. 5 shows a schematic flow chart of a proxy policy provided by the present application;
FIG. 6 is a schematic flow chart of step 2043 in a method for accessing mounted files provided by the present application;
FIG. 7 shows a schematic flow chart of an address translation policy provided by the present application;
FIG. 8 is a schematic flow chart diagram illustrating another method of accessing mounted files provided by the present application;
FIG. 9 is a schematic flow chart diagram illustrating another method of accessing mounted files provided by the present application;
FIG. 10 is a schematic flow chart diagram illustrating another method of accessing mounted files provided by the present application;
FIG. 11 is a schematic flow chart diagram illustrating a method of accessing mounted files provided by the present application;
FIG. 12 is a schematic flow chart diagram of a method of accessing mounted files provided by the present application;
FIG. 13 is a schematic view showing an apparatus for accessing mounted files according to the present application
FIG. 14 is a schematic diagram of an apparatus for accessing mounted files according to the present application;
FIG. 15 is a schematic diagram of an apparatus for accessing mounted files according to the present application;
FIG. 16 is a schematic diagram of a host device according to an embodiment of the present invention;
FIG. 17 is a schematic diagram of an access device according to an embodiment of the present invention;
fig. 18 is a schematic diagram of a first sub-device according to an embodiment of the present invention.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to solve the technical problem that a file in an external device connected to a mounting device cannot be accessed, embodiments of the present application provide a method, an apparatus, a main device, an access device, a first sub device, and a computer readable storage medium for accessing the mounting file, which can solve the technical problem.
It should be noted that, in the present application, the "access device" is an upper concept, the "sub device" is a lower concept, and the access device may or may not be a sub device. The devices for accessing the access directory are collectively referred to herein as access devices. The access device may be an entity device or a virtual device, where the entity device includes, but is not limited to, each sub-device and an external device, and the virtual device includes a virtual device (i.e., a logic unit formed by software) built in the main device or each sub-device.
In order to better explain the technical scheme of the application, the application is used for explaining the integrity of the flow of four-terminal interaction (the four terminals are formed by the main equipment, the access equipment, the first sub equipment and the second sub equipment), and then the detailed explanation is used for executing steps of the main equipment, the access equipment and the first sub equipment one by one. Referring to fig. 1, fig. 1 shows a four-terminal interaction schematic flow chart provided by the present application.
As shown in fig. 1, a master device associates with each child device and synchronizes information. Each sub-device sends a respective corresponding disk directory to the master device. The master integrates the disk directories of each child device into an access directory (where the access directory also includes the master device local directory). The access device establishes a connection with the master device, respectively. After the connection is successful, the master device returns an access directory to the access device. The access device accesses files between different devices according to the access directory. The access flow is divided into three phases:
Stage one (flow of access device obtaining target file in first sub device): the access device sends a first access request to the master device according to the access directory. After receiving the first access request, the master device obtains the first target file from the first sub-device according to the proxy policy or the address translation policy (which will be described in detail in the following embodiments and will not be repeated here). The master forwards the first target file to the access device.
Stage two (the process that the access device jumps from the first sub-device to the main device to acquire the target file): the access device sends a third access request to the master device according to the access directory. After receiving the third access request, the master device forwards the third access request to the first sub-device. And the first sub-equipment returns a second reset message and a first prompt message to the main equipment after receiving the third access request. The master device sends a second reset message to the access device, and interacts with the access device according to the first prompt message (i.e., the following interaction process). And the access device sends a fourth connection request to the main device according to the second reset message. And after receiving the fourth connection request, the master device performs authentication interaction with the access device. After the authentication is successful, the access device sends a fourth access request to the master device. And the main equipment returns the second target file to the access equipment according to the fourth access request.
Stage three (the process that the access device jumps from the first sub-device to the second sub-device to acquire the target file): the access device sends a fifth access request to the master device according to the access directory. The master device, upon receiving the fifth access request, forwards the fifth access request to the first child device. And after the first sub-device receives the fifth access request, returning a third reset message and a second prompt message to the main device. And the master device sends a third reset message to the access device. And after receiving the second prompt message, the main equipment acquires a third target file in the second sub-equipment according to the proxy strategy or the address conversion strategy. The master forwards the third target file to the access device.
Stage four (access device closing access flow): the access device sends a first shutdown request to the master device. The master device forwards the first shutdown request to the first child device. And the first sub-device sends a third reply message to the main device according to the first closing request. And the master device forwards the third reply message to the access device. And the access equipment ends the access flow according to the third reply message. The first sub-device sends a second closing request to the main device and ends the access flow. And after receiving the second closing request, the master device ends the access flow. It can be understood that the closing access procedure of the second sub-device is the same as the closing access procedure of the first sub-device, and will not be described herein.
In the case of the above-described overall explanation, the present embodiment is described in detail with respect to the execution flow of the master device. Referring to fig. 2, fig. 2 is a schematic flow chart of a method for accessing a mounted file according to the present application. The method execution body is a main device, as shown in fig. 2, the method may include the following steps:
Step 201, a master device receives a disk directory sent by each sub device, and mounts the disk directory of each sub device to a local area to form an access directory; the disk catalog comprises a local disk catalog of the sub-equipment and an external disk catalog of the mounting equipment externally connected to the sub-equipment.
The application takes the main equipment as the hub of the whole access system, is used for summarizing the disk catalogs of all the sub-equipment and processing the access interaction.
Before performing step 201, the master device associates with each child device and synchronizes information. The synchronization information includes, but is not limited to, SMB user name, password, server port number, etc.
After the association and synchronization are completed, the master device aggregates the disk directories and the local directories sent by each sub-device into an access directory.
Step 202, the master device sends the access directory to the access device.
And establishing connection between the master device and the access device, and sending an access directory to the access device. The access device can initiate an access request to the main device according to the access catalog, and further realize file access between different devices and external devices corresponding to the different devices through subsequent access interaction.
Step 203, the master device receives a first access request sent by the access device according to the access directory.
The first access request may be used to access a target file in the master device, or may be used to access a target file of another device (other devices refer to devices other than the access device).
And step 204, the master device forwards the target file in the target device corresponding to the first access request to the access device.
If the first access request is used for accessing the second target file in the master device (i.e. the target device is the master device), the master device returns the second target file in the local to the access device. And after receiving the second target file, the access device sends a third closing request to the main device and finishes the access flow. And after receiving the third closing request, the master device ends the access flow.
If the first access request is for accessing the first target file in the first sub-device (i.e., the target device is the first sub-device), the following alternative embodiment shown in fig. 3 is executed:
As an alternative embodiment of the present application, step 204 includes the following steps 2041 to 2043. Referring to fig. 3, fig. 3 is a schematic flowchart of step 204 in a method for accessing a mounted file according to the present application.
Step 2041, the master device acquires first resource data; the first resource data comprises the data volume of the first target file and/or the local hardware occupancy rate.
The first resource data includes, but is not limited to, a combination of one or more data such as a data size and/or a native hardware occupancy of the first target file.
Because the hardware resources of the main device are limited, the method and the system determine whether the current hardware resources of the main device are sufficient or not according to multiple dimensions (namely, the data volume of the first target file and/or the occupancy rate of the local hardware, etc.).
Step 2042, if the first resource data is not greater than the threshold value, acquiring a first target file from the first sub-device according to the proxy policy, and forwarding the first target file to the access device; the proxy strategy is used for proxy interaction between the access device and the target device to obtain a target file returned by the target device.
And if the first resource data is not greater than the threshold value, proving that the hardware resources of the main equipment are sufficient. Therefore, the main device can use a proxy strategy, and the proxy access device interacts with the first sub-device to obtain the first target file in the first sub-device, and the specific process is as follows in the optional embodiment:
as an alternative embodiment of the present application, step 2042 includes steps A1 to A5 as follows. Referring to fig. 4, fig. 4 is a schematic flowchart of step 2042 in a method for accessing a mounted file according to the present application.
And step A1, if the data volume of the first target file is not greater than a first threshold value and the occupancy rate of the local hardware is not greater than a second threshold value, sending a second connection request to the first sub-equipment, and establishing connection with the first sub-equipment.
And step A2, the main device forwards the first access request to the first sub-device.
The master device also needs to perform authentication interactions with the first sub-device before performing step A2. Authentication interactions include, but are not limited to, protocol version negotiations, session establishment, authentication, and the like, or a combination of interactions.
And step A3, the main equipment receives a first target file returned by the first sub-equipment according to the first access request.
And step A4, the master device forwards the first target file to the access device.
It will be appreciated that in the process of steps A1 to A4, the master device interacts with the first sub-device as a proxy for the access device. Referring to fig. 5, fig. 5 shows a schematic flow chart of the proxy policy provided by the present application. In the view angle of the access device, the access device can obtain the first target file returned by the main device after only sending the first access request.
Step 2043, if the first resource data is greater than a threshold value, acquiring a first target file from the first sub-device according to an address conversion policy, and forwarding the first target file to the access device; the address conversion strategy is used for modifying the destination address of the request or the message sent by the access device into the internet protocol address of the target device, and forwarding the modified request or message to the target device to obtain the target file returned by the target device.
And if the first resource data is larger than the threshold value, proving that the hardware resources of the main equipment are insufficient. Therefore, the master device may forward the interaction message between the access device and the first sub-device by using the address translation policy (i.e. the master device only bears the action of forwarding), so as to obtain the first target file in the first sub-device, where the specific process is as follows in an optional embodiment:
As an alternative embodiment of the present application, step 2043 includes steps B1 through B4 as follows. Referring to fig. 6, fig. 6 is a schematic flowchart of step 2043 in a method for accessing a mounted file according to the present application.
And B1, if the data volume of the first target file is larger than a first threshold value or the occupancy rate of the local hardware is larger than a second threshold value, updating the current address conversion strategy into a first address conversion strategy.
And step B2, the master device sends a first reset message to the access device.
And B3, the main equipment forwards a third connection request sent by the access equipment according to the first reset message to the first sub-equipment according to the first address conversion strategy, and connection between the access equipment and the first sub-equipment is established.
Because the main device is used as a hub in the whole access system, when the access device accesses the file, the access device needs to pass through the main device, so that the destination IP address of the access device when sending a request or a message is always the IP address of the main device. However, because the current software and hardware resources of the main device are insufficient, after the main device receives the request or the message sent by the access device, the main device modifies the destination IP address of the request or the message into the IP address of the first sub-device so as to forward the request or the message to the first sub-device, thereby reducing the excessive software and hardware resources occupied by the main device due to the agent policy.
In step B3, the master device modifies the destination IP address of the third connection request to the IP address of the first sub-device, and forwards the modified third connection request to the first sub-device. To establish a connection between the access device and the first sub-device.
After the access device is connected with the first sub-device, the authentication interaction flow is needed to be carried out between the access device and the first sub-device, and the flow is as follows: the method comprises the steps that a master device receives a first authentication interaction message sent by an access device, modifies a destination IP address of the first authentication interaction message into an IP address of a first sub-device, and forwards the modified first authentication interaction message to the first sub-device; the first authentication interaction message is used for protocol version negotiation, session establishment and authentication. The main equipment receives a first reply message returned by the first sub-equipment according to the first authentication interaction message, and forwards the first reply message to the access equipment. The first reply message is used for indicating that the authentication is passed.
After the access device confirms that the authentication is passed, the access device sends a second access request to the master device.
And step B4, the main equipment forwards the second access request sent by the access equipment to the first sub-equipment according to the first address conversion strategy.
The method comprises the steps that a main device receives a second access request sent by an access device, modifies a destination IP protocol address of the second access request into an IP address of a first sub-device, and forwards the modified second access request to the first sub-device.
And B5, the main equipment receives a first target file returned by the first sub-equipment according to the second access request, and forwards the first target file to the access equipment.
It will be appreciated that in the process from step B1 to step B5, the master only forwards the message sent by the access device. Referring to fig. 7, fig. 7 shows a schematic flow chart of an address translation policy provided by the present application. Taking an access device as an example, in the view of the access device, the access device needs to perform a complete interaction process with the master device to obtain the first target file.
In this embodiment, all the disks of each sub-device are mounted locally to form an access directory. An access directory is sent to an access device. And receiving a first access request sent by the access equipment according to the access directory. And forwarding the first target file in the first sub-device corresponding to the first access request to the access device. By the scheme, the disk catalogues of all the sub-devices in the local area network are mounted to the main device so as to be accessed through the main device, and the main device serves as an access hub to build an access bridge between the access devices and the sub-devices, so that each access device can randomly access files in different sub-devices or files in external devices externally connected to the sub-devices, and the technical problem that the files in the external devices corresponding to the sub-devices in the local area network cannot be accessed is solved.
Optionally, on the basis of all the above embodiments, when the target device is changed from the first sub-device to the master device, the method further includes the following steps, please refer to fig. 8, fig. 8 shows a schematic flowchart of another method for accessing the mount file provided by the present application.
Step 801, a master device receives a third access request sent by the access device, and forwards the third access request to a first sub-device; the third access request is for accessing a second target file in the master device.
Step 802, the master device receives a second reset message returned by the first sub-device according to the third access request, and forwards the second reset message to the access device; the second reset message is used for controlling the access device to resend the request.
Since the target device is the first sub-device before executing the present embodiment, the master device, upon receiving the third access request, forwards the third access request to the first sub-device by default. Therefore, after the first sub-device receives the third access request, the first sub-device confirms that the third access request is a request for accessing the main device, and the first sub-device sends a second reset message to trigger the first main device to establish connection with the main device.
Step 803, the main device receives a first prompt message sent by the first sub-device; the first prompting message is used for indicating the main equipment to cancel the address conversion strategy and processing the message sent by the access sub-equipment.
Because the master device may have a history address translation policy when forwarding the message sent by the access device. To prevent the possible presence of historical address translation policies, access requests are misdirected. And the first sub-device sends a first prompt message to the main device after sending the second reset message so as to instruct the main device to cancel the address conversion strategy and process the message sent by the access device.
Step 804, the master device receives a fourth connection request sent by the access device according to the second reset message.
And after receiving the second reset message sent by the main device, the access device initiates a fourth connection request to the main device.
And step 805, the master device establishes a connection with the access device according to the fourth connection request.
After the connection between the main equipment and the access equipment is established, authentication interaction is carried out between the main equipment and the access equipment; the authentication interactions include protocol version negotiations, session establishment, and authentication. After the authentication interaction is completed, the access device sends a fourth access request to the master device.
Step 806, the master device receives a fourth access request sent by the access device, and returns a second target file corresponding to the fourth access request to the access device according to the fourth access request.
In this embodiment, when the target device is changed from the first sub-device to the master device, an address conversion policy may also exist in the master device, which results in mistransmission of the message. Therefore, in this embodiment, the first sub-device sends the second reset message to control the access device to resend the message, and sends the first prompt message to control the main device to process the subsequent message of the access device. And preventing message mistransmission.
Optionally, on the basis of all the above embodiments, when the target device is changed from the first sub-device to the second sub-device, the method further includes the following steps, please refer to fig. 9, fig. 9 shows a schematic flowchart of another method for accessing the mount file provided by the present application.
Step 901, a master device receives a fifth access request sent by the access device, and forwards the fifth access request to a first sub-device; the fifth access request is for accessing a third target file in the second sub-device.
Step 902, the master device receives a third reset message returned by the first sub-device according to the fifth access request, and forwards the third reset message to the access device; the third reset message is used for controlling the access device to resend the request.
Since the target device is the first sub-device before executing the present embodiment, the master device, upon receiving the fifth access request, forwards the fifth access request to the first sub-device by default. After the first sub-device receives the fifth access request, the first sub-device confirms that the fifth access request is a request for accessing the second sub-device, and the first sub-device sends a third reset message to control the access device to resend the connection request. .
Step 903, the main device receives a second prompting message sent by the first sub-device; the second prompting message is used for indicating the main equipment to cancel the address conversion strategy.
Because the master device may have a history address translation policy when forwarding the message sent by the access device, the history address translation policy is used for other child devices, resulting in an access request mistransmission. In order to prevent the access request from being mistransmitted, the first sub-device sends a second prompt message after sending the third reset message so as to instruct the main device to cancel the address conversion strategy.
Step 904, the master device acquires second resource data; the second resource data comprises the data volume and/or the local hardware occupancy rate of the third target file.
Step 905, if the second resource data is not greater than the threshold value, acquiring a third target file in the second sub-device according to the proxy policy, and forwarding the third target file to the access device.
Step 905 is the same as step 2042 in the above embodiment, and the specific implementation process can refer to step 2042, which is not repeated here.
Step 906, if the second resource data is greater than the threshold value, acquiring a third target file from the second sub-device according to the address conversion policy, and forwarding the third target file to the access device.
Step 906 is the same as step 2043 in the above embodiment, and the specific implementation process can refer to step 2043, which is not repeated here.
In this embodiment, when the target device is changed from the first sub-device to the second sub-device, there may be an error address conversion policy in the master device, which results in mistransmission of the message. Therefore, in this embodiment, the first sub-device sends the third reset message to control the access device to resend the message, and sends the second prompting message to control the main device to cancel the address conversion policy. And preventing message mistransmission.
Optionally, on the basis of all the above embodiments, the method further includes the following steps, please refer to fig. 10, and fig. 10 shows a schematic flowchart of another method for accessing a mounted file provided by the present application.
Step 101, the master device receives a first close request sent by the access device.
Step 102, the master device forwards the first close request to the target device.
Step 103, the master device receives a third reply message returned by the target device according to the first closing request.
Step 104, the master device forwards the third reply message to the access device; and the third reply message is used for closing the connection between the access equipment and the target equipment.
Step 105, the master device receives a second closing request sent by the first sub-device.
And step 106, the main equipment closes the connection with the first sub-equipment according to the second closing request.
In this embodiment, the access device, the master device and the target device mutually send a close request to end the access flow after the access flow is completed.
The present embodiment is described in detail with respect to an execution flow of an access device. Referring to fig. 11, fig. 11 is a schematic flowchart of a method for accessing a mounted file according to the present application. The method execution subject is an access device, as shown in fig. 11, and the method may include the following steps:
Step 111, the access device sends a first local disk directory to the master device; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment.
And step 112, the access device receives the access directory sent by the master device.
Step 113, the access device sends a first access request to the master device according to the access directory; the access directory is obtained by the main device mounting all the disks of each sub-device to the local.
Step 114, the access device receives a target file returned by the main device according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
It will be appreciated that in order to better distinguish between the different sub-devices, the initiator of the access request is referred to as the access device and the hosting of the target file is referred to as the first sub-device, the second sub-device and the master device.
The access device, the first sub-device and the second sub-device may be independent entity devices, or may be software logic modules integrated in the same device or between different devices.
In this embodiment, the access device accesses the files in the other sub-devices or the files in the external devices externally connected to the other sub-devices by using the access directory formed by the master device and sending the first access request to the master device according to the access directory. The technical problem that files in external equipment corresponding to the sub-equipment in the local area network cannot be accessed is solved.
The embodiment is described in detail with respect to an execution flow of the first sub-device. Referring to fig. 12, fig. 12 is a schematic flow chart of a method for accessing a mounted file according to the present application. The method execution body is a first sub-device, as shown in fig. 12, and the method may include the following steps:
Step 121, the first sub-device sends a second local disk directory to the main device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for enabling the main device to form access directories of all disks of each sub device.
Step 122, the first sub-device receives the first access request forwarded by the main device; the first access request is an access request sent by the access device to the master device according to the access directory.
Step 123, the first sub-device sends the first target file to the main device according to the first access request; and forwarding the first target file to an access device through the main device.
In this embodiment, the first sub-device returns the first target file to the master device according to the first access request forwarded by the master device, and forwards the first target file to the access device through the master device. The technical problem that files in external equipment corresponding to the sub-equipment in the local area network cannot be accessed is solved.
Referring to fig. 13, fig. 13 shows a schematic diagram of an apparatus for accessing a mounted file according to the present application, where the apparatus for accessing a mounted file shown in fig. 13 includes:
The first receiving unit 131 is configured to receive the disk directory sent by each piece of sub-equipment, and mount the disk directory of each piece of sub-equipment to a local place to form an access directory; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
a first transmitting unit 132, configured to transmit the access directory to an access device; the access device comprises each sub-device;
A second receiving unit 133, configured to receive a first access request record sent by an access device according to the access directory;
And the forwarding unit 134 is configured to forward the target file in the target device corresponding to the access request to the access device.
The device for accessing the mounted file provided by the application mounts all the magnetic discs of each piece of sub equipment to the local to form an access catalog. An access directory is sent to an access device. And receiving a first access request sent by the access equipment according to the access directory. And forwarding the first target file in the first sub-device corresponding to the first access request to the access device. By the scheme, the disk catalogues of all the sub-devices in the local area network are mounted to the main device so as to be accessed through the main device, and the main device serves as an access hub to build an access bridge between the access devices and the sub-devices, so that each access device can randomly access files in different sub-devices or files in external devices externally connected to the sub-devices, and the technical problem that the files in the external devices corresponding to the sub-devices in the local area network cannot be accessed is solved.
Referring to fig. 14, the present application provides an apparatus 14 for accessing a mounted file, where the apparatus is applied to an access device, and referring to fig. 14, fig. 14 shows a schematic diagram of an apparatus for accessing a mounted file provided by the present application, and an apparatus for accessing a mounted file shown in fig. 14 includes:
A second sending unit 141, configured to send the first local disk directory to the host device; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
A third receiving unit 142, configured to receive the access directory sent by the master device;
a third sending unit 143, configured to send a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
A fourth receiving unit 144, configured to receive a target file returned by the master device according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
According to the device for accessing the mounted file, the access device sends the first access request to the main device through the access catalog formed by the main device, so as to access the file in the sub device or the file in the external device externally connected to the sub device. The technical problem that files in external equipment corresponding to the sub-equipment in the local area network cannot be accessed is solved.
Referring to fig. 15, the present application provides an apparatus 15 for accessing a mounted file, where the apparatus is applied to a first piece of equipment, and referring to fig. 15, fig. 15 shows a schematic diagram of an apparatus for accessing a mounted file provided by the present application, and an apparatus for accessing a mounted file shown in fig. 15 includes:
A fourth transmitting unit 151, configured to transmit the second local disk directory to the host device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
A fifth receiving unit 152, configured to receive the first access request forwarded by the master device; the first access request is an access request sent to the master device by the access device according to the access directory; ;
A fifth transmitting unit 153, configured to transmit the target file to the master device according to the first access request; and forwarding the target file to access equipment through the main equipment.
According to the device for accessing the mounted file, the first sub-device returns the first target file to the main device according to the first access request forwarded by the main device, and the first target file is forwarded to the access device through the main device, so that the access device can access the file in the local or the file in the external device externally connected to the local. The technical problem that files in external equipment corresponding to the sub-equipment in the local area network cannot be accessed is solved.
Fig. 16 is a schematic diagram of a master device according to an embodiment of the present invention. As shown in fig. 16, a master device 16 of this embodiment includes: a processor 161, a memory 162, and a computer program 163 stored in the memory 163 and executable on the processor 161, such as a program for accessing a mounted file. The processor 161, when executing the computer program 163, implements the steps described above in each of the method embodiments for accessing mounted files, such as steps 201 through 204 shown in fig. 2. Or the processor 161, when executing the computer program 163, performs the functions of the units in the above-described device embodiments, such as the functions of the units 131 to 134 shown in fig. 13.
By way of example, the computer program 163 may be divided into one or more units, which are stored in the memory 162 and executed by the processor 161 to accomplish the present invention. The one or more elements may be a series of computer program instruction segments capable of performing the specified functions describing the execution of the computer program 163 in the one host device 16. For example, the specific functions of the computer program 163 that may be divided into units are as follows:
the first receiving unit is used for receiving the disk catalogs sent by each piece of sub equipment, and mounting the disk catalogs of each piece of sub equipment to the local to form an access catalogs; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
a first sending unit, configured to send the access directory to an access device; the access device comprises each sub-device;
the second receiving unit is used for receiving a first access request record sent by the access equipment according to the access catalog;
and the forwarding unit is used for forwarding the target file in the target device corresponding to the access request to the access device.
The main device can be a personal computer, a server, a mobile terminal, a tablet computer and the like. Including but not limited to a processor 161, a memory 162. It will be appreciated by those skilled in the art that fig. 16 is merely an example of one type of host device 16 and is not meant to be limiting as to one type of host device 16, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the one type of host device may also include input-output devices, network access devices, buses, etc.
Fig. 17 is a schematic diagram of an access device according to an embodiment of the present invention. As shown in fig. 17, an access device 17 of this embodiment includes: a processor 171, a memory 172 and a computer program 173, such as a program for accessing mounted files, stored in said memory 172 and executable on said processor 171. The processor 171, when executing the computer program 173, implements the steps of each of the above-described embodiments of the method for accessing the mounted file, for example, steps 101 to 104 shown in fig. 10. Or the processor 171 when executing the computer program 174 performs the functions of the units in the above-described embodiments of the apparatus, for example, the functions of the units 141 to 144 shown in fig. 14.
By way of example, the computer program 173 may be partitioned into one or more units that are stored in the memory 172 and executed by the processor 171 to accomplish the present invention. The one or more elements may be a series of computer program instruction segments capable of performing a specific function describing the execution of the computer program 173 in the one access device 17. For example, the specific functions of the computer program 173 that may be divided into units are as follows:
the second sending unit is used for sending the first local disk catalog to the main equipment; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
a third receiving unit, configured to receive the access directory sent by the master device;
A third sending unit, configured to send a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
a fourth receiving unit, configured to receive a target file returned by the master device according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
The access device can be a personal computer, a server, a mobile terminal, a tablet computer and the like. Including but not limited to a processor 171, a memory 172. It will be appreciated by those skilled in the art that fig. 17 is merely an example of one access device 17 and is not meant to be limiting of one access device 17, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the one access device may also include an input-output device, a network access device, a bus, etc.
Fig. 18 is a schematic diagram of a first sub-device according to an embodiment of the present invention. As shown in fig. 18, a first sub-device 18 of this embodiment includes: a processor 181, a memory 182 and a computer program 183 stored in said memory 182 and executable on said processor 181, for example a program for accessing a mounted file. The processor 181, when executing the computer program 183, implements the steps of each of the above-described embodiments of the method for accessing a mounted file, such as steps 111 to 113 shown in fig. 11. Or the processor 181, when executing the computer program 184, performs the functions of the units in the above-described device embodiments, for example, the functions of the units 151 to 153 shown in fig. 15.
By way of example, the computer program 183 may be partitioned into one or more units that are stored in the memory 182 and executed by the processor 181 to accomplish the present invention. The one or more elements may be a series of computer program instruction segments capable of performing a specific function describing the execution of the computer program 183 in the one first sub-device 18. For example, the computer program 183 may be divided into units having the following specific functions:
A fourth sending unit, configured to send a second local disk directory to the master device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
A fifth receiving unit, configured to receive a first access request forwarded by the master device; the first access request is an access request sent to the master device by the access device according to the access directory;
A fifth sending unit, configured to send the target file to the master device according to the first access request; and forwarding the target file to access equipment through the main equipment.
The first sub-device may be a personal computer, a server, a mobile terminal, a tablet computer, or the like. Including but not limited to a processor 181, a memory 182. It will be appreciated by those skilled in the art that fig. 18 is merely an example of one type of first sub-device 18 and is not meant to be limiting as to one type of first sub-device 18, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the one type of first sub-device may also include input and output devices, network access devices, buses, etc.
The processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (DIGITALSIGNAL PROCESSOR, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), off-the-shelf Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be an internal storage unit of the device, such as a hard disk or a memory of the device. The memory may be an external storage device of the device, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a secure digital (SecureDigital, SD) card, a flash memory card (FLASH CARD), or the like. Further, the memory may also include both an internal storage unit and an external storage device of the device. The memory is used for storing the computer program and other programs and data required by the roaming control device. The above memory may also be used to temporarily store data that has been output or is to be output.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to a detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is monitored" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon monitoring a [ described condition or event ]" or "in response to monitoring a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (16)

1. A method of accessing a mounted file, the method being applied to a host device, the method comprising:
Receiving a disk directory sent by each piece of sub equipment, and mounting the disk directory of each piece of sub equipment to the local to form an access directory; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
transmitting the access directory to an access device; the access device comprises each sub-device;
Receiving a first access request sent by the access equipment according to the access catalog;
And forwarding the target file in the target device corresponding to the first access request to the access device.
2. The method of claim 1, wherein when the target device is a first sub-device;
The forwarding the target file in the target device corresponding to the first access request to the access device includes:
acquiring first resource data; the first resource data comprise the data volume of the first target file and/or the occupancy rate of local hardware;
If the first resource data is not greater than the threshold value, acquiring a first target file from the first sub-equipment according to a proxy strategy, and forwarding the first target file to the access equipment; the proxy strategy is used for proxy interaction between the access equipment and the target equipment to obtain a target file returned by the target equipment;
If the first resource data is larger than a threshold value, acquiring a first target file from the first sub-equipment according to an address conversion strategy, and forwarding the first target file to the access equipment; the address conversion strategy is used for modifying the destination address of the request or the message sent by the access device into the internet protocol address of the target device, and forwarding the modified request or message to the target device to obtain the target file returned by the target device.
3. The method of claim 2, wherein if the first resource data is not greater than a threshold, obtaining a first target file in the first sub-device according to a proxy policy, and forwarding the first target file to the access device, comprises:
If the data volume of the first target file is not greater than a first threshold value and the occupancy rate of the local hardware is not greater than a second threshold value, a second connection request is sent to the first sub-equipment, and connection is established with the first sub-equipment;
Forwarding the first access request to the first sub-device;
receiving a first target file returned by the first sub-equipment according to the first access request;
Forwarding the first target file to the access device.
4. The method of claim 2, wherein if the first resource data is greater than a threshold, obtaining a first target file in the first sub-device according to an address translation policy, and forwarding the first target file to the access device, comprises:
If the data volume of the first target file is larger than a first threshold value or the occupancy rate of the local hardware is larger than a second threshold value, updating the current address conversion strategy into a first address conversion strategy;
Sending a first reset message to the access equipment;
According to the first address conversion strategy, forwarding a third connection request sent by the access device according to the first reset message to the first sub-device, and establishing connection between the access device and the first sub-device;
forwarding a second access request sent by the access device to the first sub-device according to the first address translation policy;
and receiving a first target file returned by the first sub-equipment according to the second access request, and forwarding the first target file to the access equipment.
5. The method of any of claims 2 to 4, wherein when the target device is changed from the first sub-device to a master device;
The method further comprises the steps of:
Receiving a third access request sent by the access device, and forwarding the third access request to the first sub-device; the third access request is used for accessing a second target file in the main device;
receiving a second reset message returned by the first sub-device according to the third access request, and forwarding the second reset message to the access device; the second reset message is used for controlling the access equipment to resend the request;
receiving a first prompt message sent by the first sub-equipment; the first prompting message is used for indicating the main equipment to cancel the address conversion strategy and processing the message sent by the access equipment;
receiving a fourth connection request sent by the access equipment according to the second reset message;
Establishing connection with the access equipment according to the fourth connection request;
and receiving a fourth access request sent by the access device, and returning a second target file corresponding to the fourth access request to the access device according to the fourth access request.
6. The method of any of claims 2 to 4, wherein when a target device is changed from the first sub-device to a second sub-device;
The method further comprises the steps of:
receiving a fifth access request sent by the access device, and forwarding the fifth access request to the first sub-device; the fifth access request is used for accessing a third target file in the second sub-device;
receiving a third reset message returned by the first sub-device according to the fifth access request, and forwarding the third reset message to the access device; the third reset message is used for controlling the access equipment to resend the request;
receiving a second prompt message sent by the first sub-equipment; the second prompting message is used for indicating the main equipment to cancel the address conversion strategy;
the main equipment acquires second resource data; the second resource data comprises the data volume of the third target file and/or the occupancy rate of the local hardware;
If the second resource data is not greater than the threshold value, acquiring a third target file from the second sub-equipment according to the proxy strategy, and forwarding the third target file to the access equipment;
And if the second resource data is larger than the threshold value, acquiring a third target file from the second sub-equipment according to the address conversion strategy, and forwarding the third target file to the access equipment.
7. A method of accessing a mounted file, the method being applied to an access device, the method comprising:
transmitting a first local disk directory to a master device; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
Receiving the access catalogue sent by the master device;
Sending a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
Receiving a target file returned by the main equipment according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
8. A method of accessing a mounted file, the method being applied to a first sub-device, the method comprising:
Sending a second local disk directory to the master device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for enabling the main device to form access directories of all disks of each piece of sub-equipment;
receiving a first access request forwarded by a main device; the first access request is an access request sent to the master device by the access device according to the access directory;
According to the first access request, a first target file is sent to the main equipment; and forwarding the first target file to an access device through the main device.
9. An apparatus for accessing a mounted file, the apparatus being applied to a host device, the apparatus comprising:
the first receiving unit is used for receiving the disk catalogs sent by each piece of sub equipment, and mounting the disk catalogs of each piece of sub equipment to the local to form an access catalogs; the disk catalogue comprises a local disk catalogue of the sub-equipment and an external disk catalogue of the mounting equipment externally connected to the sub-equipment;
a first sending unit, configured to send the access directory to an access device; the access device comprises each sub-device;
the second receiving unit is used for receiving a first access request record sent by the access equipment according to the access catalog;
and the forwarding unit is used for forwarding the target file in the target device corresponding to the access request to the access device.
10. An apparatus for accessing a mounted file, the apparatus being applied to an access device, the apparatus comprising:
the second sending unit is used for sending the first local disk catalog to the main equipment; the first local disk directory comprises a local disk directory of the access device and an external disk directory of the mounting device externally connected to the access device; the first local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
a third receiving unit, configured to receive the access directory sent by the master device;
A third sending unit, configured to send a first access request to the master device according to the access directory; the access catalog is obtained by mounting all disk catalogs of each piece of sub-equipment to the local by the main equipment;
a fourth receiving unit, configured to receive a target file returned by the master device according to the first access request; and the target file is obtained by forwarding the target file in the target device by the main device.
11. An apparatus for accessing a mounted file, the apparatus being applied to a first sub-device, the apparatus comprising:
A fourth sending unit, configured to send a second local disk directory to the master device; the second local disk directory comprises a local disk directory of the first sub-equipment and an external disk directory of the mounting equipment externally connected to the first sub-equipment; the second local disk directory is used for forming access directories of all disks of each piece of sub-equipment through the main equipment;
A fifth receiving unit, configured to receive a first access request forwarded by the master device; the first access request is an access request sent to the master device by the access device according to the access directory;
A fifth sending unit, configured to send the target file to the master device according to the first access request; and forwarding the target file to access equipment through the main equipment.
12. A host device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when the computer program is executed.
13. An access device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 7 when the computer program is executed by the processor.
14. A first sub-device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 8 when the computer program is executed by the processor.
15. A local area network system, wherein the local area network system comprises a master device and an access device; the access device comprising an access device, a first sub-device and a second sub-device, the master device being adapted to implement the steps of the method according to any of claims 1 to 6, the access device being adapted to implement the steps of the method according to any of claims 7; said first sub-device being adapted to implement the steps of the method according to any of the claims 8.
16. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 6, 7 or 8.
CN202110330310.XA 2021-03-29 2021-03-29 Method and device for accessing mounted file Active CN113157647B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110330310.XA CN113157647B (en) 2021-03-29 2021-03-29 Method and device for accessing mounted file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110330310.XA CN113157647B (en) 2021-03-29 2021-03-29 Method and device for accessing mounted file

Publications (2)

Publication Number Publication Date
CN113157647A CN113157647A (en) 2021-07-23
CN113157647B true CN113157647B (en) 2024-04-26

Family

ID=76885373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110330310.XA Active CN113157647B (en) 2021-03-29 2021-03-29 Method and device for accessing mounted file

Country Status (1)

Country Link
CN (1) CN113157647B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164681A (en) * 2005-12-16 2007-06-28 Hitachi Information & Control Solutions Ltd Authentication method, authentication program, authentication system and memory card
CN103581749A (en) * 2013-10-31 2014-02-12 乐视致新电子科技(天津)有限公司 Method and device allowing television to have access to MTP mode externally-connected device
CN104408053A (en) * 2014-10-29 2015-03-11 上海斐讯数据通信技术有限公司 Mobile-terminal storage-card extending method
WO2016061978A1 (en) * 2014-10-23 2016-04-28 中兴通讯股份有限公司 Mobile storage mounting method and device
CN106484322A (en) * 2016-09-12 2017-03-08 华为技术有限公司 A kind of method of carry file system, device and equipment
CN106528158A (en) * 2016-11-18 2017-03-22 广东欧珀移动通信有限公司 Method and device for mounting memory card and mobile terminal
CN108052541A (en) * 2017-11-22 2018-05-18 中国科学院上海微系统与信息技术研究所 The realization of file system based on multi-level page-table bibliographic structure, access method, terminal
CN109240798A (en) * 2018-08-30 2019-01-18 郑州云海信息技术有限公司 The method and apparatus for managing the external equipment of virtual machine
CN112148678A (en) * 2020-09-18 2020-12-29 苏州浪潮智能科技有限公司 File access method, system, device and medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164681A (en) * 2005-12-16 2007-06-28 Hitachi Information & Control Solutions Ltd Authentication method, authentication program, authentication system and memory card
CN103581749A (en) * 2013-10-31 2014-02-12 乐视致新电子科技(天津)有限公司 Method and device allowing television to have access to MTP mode externally-connected device
WO2016061978A1 (en) * 2014-10-23 2016-04-28 中兴通讯股份有限公司 Mobile storage mounting method and device
CN104408053A (en) * 2014-10-29 2015-03-11 上海斐讯数据通信技术有限公司 Mobile-terminal storage-card extending method
CN106484322A (en) * 2016-09-12 2017-03-08 华为技术有限公司 A kind of method of carry file system, device and equipment
CN106528158A (en) * 2016-11-18 2017-03-22 广东欧珀移动通信有限公司 Method and device for mounting memory card and mobile terminal
CN108052541A (en) * 2017-11-22 2018-05-18 中国科学院上海微系统与信息技术研究所 The realization of file system based on multi-level page-table bibliographic structure, access method, terminal
CN109240798A (en) * 2018-08-30 2019-01-18 郑州云海信息技术有限公司 The method and apparatus for managing the external equipment of virtual machine
CN112148678A (en) * 2020-09-18 2020-12-29 苏州浪潮智能科技有限公司 File access method, system, device and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Implementation of External Memory Expansion Device for Large Image Processing;Choi 等;《 Broadcast Engineering》;20180101;第23卷(第5期);606-613 *
基于 Linux 的 USB 存储设备访问控制机制研究;龚演等;《计算机技术与发展》;20120310;第22卷(第3期);1-5 *

Also Published As

Publication number Publication date
CN113157647A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
US9866556B2 (en) Common internet file system proxy authentication of multiple servers
EP2633667B1 (en) System and method for on the fly protocol conversion in obtaining policy enforcement information
US7770208B2 (en) Computer-implemented method, apparatus, and computer program product for securing node port access in a switched-fabric storage area network
EP3200434A2 (en) Domain name resolution
US8645503B1 (en) Accelerated data uploading
CN110300133B (en) Cross-domain data transmission method, device, equipment and storage medium
EP2045750A2 (en) Methods and systems for creating and updating approved-file and trusted-domain databases
US20130111542A1 (en) Security policy tokenization
US20150244815A1 (en) Communication Method and Apparatus
CN110365701B (en) Client terminal equipment management method and device, computing equipment and storage medium
CN113014593B (en) Access request authentication method and device, storage medium and electronic equipment
CN112202750B (en) Control method for policy execution, policy execution system and computing device
KR20190052033A (en) Transient transaction server
CN110602130A (en) Terminal authentication system and method, equipment terminal and authentication server
EP3276914A1 (en) Data sharing method and device for virtual desktop
US20050177577A1 (en) Accessing data on remote storage servers
US7325065B1 (en) Identifying unauthorized communication systems using a system-specific identifier
CN113157647B (en) Method and device for accessing mounted file
US7562109B2 (en) Connectivity confirmation method for network storage device and host computer
CN103491141A (en) Application server and request processing method
CN111262779A (en) Method, device, server and system for acquiring data in instant messaging
CN112311716B (en) Data access control method, device and server based on openstack
CN113395326B (en) Network service-based login method, device and computer-readable storage medium
CN112637106B (en) Method and device for terminal to access website
US11647020B2 (en) Satellite service for machine authentication in hybrid environments

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