CN110334063B - File system operation method, device, equipment and computer readable storage medium - Google Patents
File system operation method, device, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN110334063B CN110334063B CN201910640102.2A CN201910640102A CN110334063B CN 110334063 B CN110334063 B CN 110334063B CN 201910640102 A CN201910640102 A CN 201910640102A CN 110334063 B CN110334063 B CN 110334063B
- Authority
- CN
- China
- Prior art keywords
- file system
- target
- file
- user
- name
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 93
- 238000013507 mapping Methods 0.000 claims abstract description 67
- 238000011017 operating method Methods 0.000 claims description 18
- 210000001503 joint Anatomy 0.000 claims description 5
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012360 testing method Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 2
- 238000011022 operating instruction Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003032 molecular docking Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/16—File or folder operations, e.g. details of user interfaces specifically adapted to file systems
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of financial science and technology, and discloses a file system operation method, a file system operation device, a file system operation equipment and a computer readable storage medium. The operation method of the file system comprises the following steps: when a file system operation instruction is received, acquiring a target file system name, a target storage path and target operation according to the file system operation instruction; determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system; and calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path. The method and the device can solve the problems of complex operation process and low operation efficiency of the file system in the prior art.
Description
Technical Field
The present invention relates to the technical field of financial science and technology (Fintech), and in particular, to a method, an apparatus, a device, and a computer readable storage medium for operating a file system.
Background
With the development of computer technology, more and more technologies (big data, distributed, blockchain Blockchain, artificial intelligence, etc.) are applied in the financial field, and the traditional financial industry is gradually changing to financial technology (Fintech), but due to the requirements of security and real-time performance of the financial industry, higher requirements are also put forward on the technologies.
In a computer, a file system (FILE SYSTEM) is a system that names files and places logical storage and retrieval of files. At present, many services of financial institutions such as banks face the requirement of accessing multiple file systems, for example, services in the big data field generally use a local file system and an HDFS (Hadoop Distributed FILE SYSTEM, distributed file system), however, since the definition of the file path of each existing file system is not uniform, the corresponding file path object must be instantiated first to perform file operation on each file system, corresponding instantiations of different file systems are different, and cannot be used generally, and users need to use different instantiations for different types of file systems. Therefore, the operation process of the existing file system is complex, and the operation efficiency is low.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a computer readable storage medium for operating a file system, and aims to solve the problems of complex operation process and low operation efficiency of the file system in the prior art.
To achieve the above object, the present invention provides a method of operating a file system, the method of operating a file system comprising:
When a file system operation instruction is received, acquiring a target file system name, a target storage path and target operation according to the file system operation instruction;
determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system;
And calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path.
Optionally, before the step of determining the file system object corresponding to the target file system name according to the preset mapping relationship, the method further includes:
Acquiring user information according to the file system operation instruction, and acquiring operation authority information of a user according to the user information;
judging whether a user has operation rights or not based on the name of the target file system, the target storage path, the target operation and the operation rights information;
If the user is judged to have the operation authority, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
if the user does not have the operation authority, generating corresponding prompt information without the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
Optionally, before the step of determining the file system object corresponding to the target file system name according to the preset mapping relationship, the method further includes:
Inquiring whether a mapping relation corresponding to the name of the target file system exists in the preset mapping relation;
If so, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
If the file system operation instruction does not exist, corresponding prompt information is generated and sent to a user side corresponding to the file system operation instruction.
Optionally, the operation method of the file system further includes:
When a file system object adding request is received, acquiring a target adding file system and a target adding file system object according to the file system object adding request;
And updating the preset mapping relation based on the target added file system and the target added file system object.
Optionally, the operation method of the file system further includes:
After the operation execution is completed, a corresponding operation execution result is generated and fed back to the user side corresponding to the file system operation instruction.
In addition, to achieve the above object, the present invention also provides an operating device of a file system, including:
the first acquisition module is used for acquiring a target file system name, a target storage path and target operation according to the file system operation instruction when the file system operation instruction is received;
The object determining module is used for determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system;
And the operation execution module is used for calling a target operation method corresponding to the target operation from the file system object and executing the target operation on a target file corresponding to the target storage path.
Optionally, the operating device of the file system further includes:
the second acquisition module is used for acquiring user information according to the file system operation instruction and acquiring operation authority information of a user according to the user information;
the permission judging module is used for judging whether a user has the operation permission or not based on the name of the target file system, the target storage path, the target operation and the operation permission information;
the object determining module is specifically configured to determine, if it is determined that the user has the operation right, a file system object corresponding to the target file system name according to a preset mapping relationship;
and the first sending module is used for generating corresponding prompt information without operation authority if the user does not have the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
Optionally, the operating device of the file system further includes:
The third acquisition module is used for acquiring a target added file system and a target added file system object according to the file system object adding request when the file system object adding request is received;
and the updating module is used for updating the preset mapping relation based on the target added file system and the target added file system object.
In addition, to achieve the above object, the present invention also provides an operating device of a file system, including: the system comprises a memory, a processor and an operating program of a file system stored on the memory and capable of running on the processor, wherein the operating program of the file system realizes the steps of the operating method of the file system when being executed by the processor.
In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium having stored thereon an operating program of a file system, which when executed by a processor, implements the steps of the operating method of a file system as described above.
The invention provides a file system operation method, a device, equipment and a computer readable storage medium, when a file system operation instruction is received, a target file system name, a target storage path and target operation are acquired according to the file system operation instruction, and then a file system object corresponding to the target file system name is determined according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system, further the target operation method corresponding to the target operation is called from the file system object, and the target operation is executed on a target file corresponding to the target storage path by adopting the target operation method. By the method, the butt joint of different types of file systems is realized, when the file system operation instruction is acquired, only the target information is required to be acquired, and then the file system object is determined, and the target operation method in the file system object can be called to execute the target operation.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method of operating a file system according to the present invention;
FIG. 3 is a functional block diagram of a first embodiment of an operating device of the file system according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware running environment according to an embodiment of the present invention.
The operation device of the file system in the embodiment of the invention can be a smart phone, or can be terminal devices such as a PC (Personal Computer ), a tablet personal computer, a portable computer and the like.
As shown in fig. 1, the operating device of the file system may include: a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., wi-Fi interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the operating device structure of the file system shown in fig. 1 does not constitute a limitation of the operating device of the file system, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an operating program of a file system may be included in a memory 1005, which is a type of computer storage medium.
In the terminal shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client and communicating data with the client; and the processor 1001 may be used to call an operation program of the file system stored in the memory 1005 and perform the following operations:
When a file system operation instruction is received, acquiring a target file system name, a target storage path and target operation according to the file system operation instruction;
determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system;
And calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path.
Further, the processor 1001 may call an operation program of the file system stored in the memory 1005, and further perform the following operations:
Acquiring user information according to the file system operation instruction, and acquiring operation authority information of a user according to the user information;
judging whether a user has operation rights or not based on the name of the target file system, the target storage path, the target operation and the operation rights information;
If the user is judged to have the operation authority, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
if the user does not have the operation authority, generating corresponding prompt information without the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
Further, the processor 1001 may call an operation program of the file system stored in the memory 1005, and further perform the following operations:
Inquiring whether a mapping relation corresponding to the name of the target file system exists in the preset mapping relation;
If so, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
If the file system operation instruction does not exist, corresponding prompt information is generated and sent to a user side corresponding to the file system operation instruction.
Further, the processor 1001 may call an operation program of the file system stored in the memory 1005, and further perform the following operations:
When a file system object adding request is received, acquiring a target adding file system and a target adding file system object according to the file system object adding request;
And updating the preset mapping relation based on the target added file system and the target added file system object.
Further, the processor 1001 may call an operation program of the file system stored in the memory 1005, and further perform the following operations:
After the operation execution is completed, a corresponding operation execution result is generated and fed back to the user side corresponding to the file system operation instruction.
Based on the above hardware structure, various embodiments of the operating method of the file system of the present invention are presented.
The invention provides an operation method of a file system.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a method for operating a file system according to the present invention.
In this embodiment, the method for operating the file system includes:
Step S10, when a file system operation instruction is received, acquiring a target file system name, a target storage path and target operation according to the file system operation instruction;
The method of operating the file system according to the present embodiment is implemented by an operating device of the file system, in which sdk (Software Development Kit ) packaged by a plurality of modules is integrated into the device, and the device is described as an example of a server. Specifically, the sdk encapsulated by multiple modules may include two modules FsFactory (file system factory) and SCHEAMCACHE (file system map cache), where FsFactory is used to obtain a target file system name from a received file system operation instruction, and further used to generate a target storage path (for specific generation mode, refer to the following); SCHEAMCACHE is configured to cache file system objects corresponding to multiple file systems (such as a local file system, an HDFS file system, etc.), and further cache a preset mapping relationship between the file systems and the file system objects, so that the corresponding file system objects can be determined according to the name of the target file system and the preset mapping relationship, where the file system objects include an operation method for a file (folder) in the file system, for example, an operation method for obtaining the size of the file (folder), creating and deleting the file (folder), and reading and writing the file.
In this embodiment, when a user needs to perform an operation on a certain file or folder of the file system, the user may log in corresponding software or App (Application) through a user side (such as a smart phone, a PC, etc.), and then select an operation execution option, and further, after relevant information is input as required, the file system operation instruction may be triggered. At this time, the server (i.e., the operating device of the file system) acquires the target file system name, the target storage path, and the target operation according to the file system operation instruction when receiving the file system operation instruction. Specifically, when receiving a file system operation instruction, the server may first obtain user input information carried in the file system operation instruction, and then determine a corresponding information obtaining method according to the type of the user input information, so as to obtain a target file system name, a target storage path and a target operation.
The user may input information in the following input modes, but the method for acquiring corresponding information is also as follows:
1) The user may input the target file system name, the string path content and the target operation, that is, the user input information includes the target file system name, the string path content and the target operation, at this time, the server may directly obtain the target file system name, the string path content and the target operation, and generate the target storage path according to the preset format by using the target file system name and the string path content, for example, the target file system name is local (local storage file), the string path is tmp/test. local:// tmp/test. Through the method, the target file system name, the target storage path and the target operation are obtained, and meanwhile, the target storage path with a unified format is intelligently generated according to the target file system name and the character string path content, namely, the storage paths of all the file systems are unified, and a user does not need to learn the definition of the file storage paths by all types of file systems and input according to the corresponding format.
2) The user can input a target storage path and target operation, namely, the user input information comprises the target storage path and the target operation, at the moment, the server can directly acquire the target storage path and the target operation, and meanwhile, the target file system name is extracted according to the target storage path, wherein the target storage path consists of a schema (file system name) and a path (path), such as hfs:// tmp/test.txt corresponds to a file on hfs, local:// tmp/test.txt corresponds to a local file, and the target file system name can be extracted from the target storage path. By the method, unified definition of the input format of the target storage path is realized, the target storage path is composed of the file system name and the path, and a user only needs to input according to the unified format without learning the definition format of multiple types of file systems on the file storage path.
It should be understood that, in the above two ways, the embodiment of the present invention realizes the unification of the storage paths of each file system, and further, different instantiations do not need to be performed according to the types of each file system.
Step S20, determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system;
After the target file system name, the target storage path and the target operation are acquired, determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system, that is, a general operation method is provided in the file system object, for example: obtaining the size of a file (folder), creating and deleting the file (folder), reading and writing the file and other operation methods. The user can complete the operation of the file system by only calling the operation method in the file system object. For example, the local file system and the HDFS file system operate on each file (folder). The preset mapping relation comprises a mapping relation between a target file system name and a file system object.
And step S30, calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path.
And after determining to obtain the file system object, calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path by adopting the target operation method.
For example, when a user needs to create a new file for a folder in any file system, after receiving a corresponding instruction, the server determines an object of the file system, and then only needs to call the create (String dest) method in the object of the file system to complete the target operation. In the prior art, if the file system is a local file system, it is required to determine whether the parent directory exists, instantiate the file system object, and then call CREATENEWFILE the method. If the file system object is the HDFS, the file system object of the HDFS is needed to be instantiated first, whether a parent directory exists or not is judged, then the CREATENEWFILE (PATH) method of the file system object of the HDFS is called, and a lot of configuration information is needed to be transmitted for initialization in the process of instantiation, so that the use complexity is increased.
Therefore, compared with the existing operation method of the file system, the embodiment of the invention simplifies the operation process of the file system and improves the operation efficiency. Meanwhile, the butt joint of different types of file systems can be realized, the operation of the file systems can be automatically realized only by inputting a trigger instruction according to the requirement of a user, the definition and the instantiation mode of the file storage path of each type of file system are not required to be learned by the user, the learning cost of the user can be saved, and the use is more convenient and simpler.
Further, after step S30, the operating method of the file system may further include the steps of:
After the operation execution is completed, a corresponding operation execution result is generated and fed back to the user side corresponding to the file system operation instruction.
In order to facilitate the user to know the execution result of the operation, the corresponding operation execution result can be generated after the operation execution is completed and fed back to the user end corresponding to the file system operation instruction. The operation execution result includes operation execution success, operation execution failure and the like, wherein when the operation execution fails, a corresponding failure reason can be fed back so as to be used for correction processing.
In the file system operation process of financial institutions such as banks, after the target file system name, the target storage path and the target operation are acquired, the file system object corresponding to the target file system name is determined according to the preset mapping relation, then the target operation method corresponding to the target operation is called from the file system object, the target operation method is adopted to execute the target operation on the target file corresponding to the target storage path, the file storage paths of different file systems are not required to be respectively instantiated, the operation process of the file system is simplified, the operation efficiency is improved, and meanwhile, enterprise users are not required to learn the definition and instantiation modes of various file systems on the file storage path, so that the learning cost of enterprise users can be saved.
The embodiment of the invention provides an operating method of a file system, which comprises the steps of firstly acquiring a target file system name, a target storage path and target operation according to a file system operating instruction when the file system operating instruction is received, and then determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises the operating method of the preset file system, further calling the target operating method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path by adopting the target operating method. By the method, the embodiment of the invention realizes the butt joint of different types of file systems, when the file system operation instruction is acquired, only the target information is acquired, and then the file system object is determined, and the target operation method in the file system object can be called to execute the target operation.
Further, based on the first embodiment shown in fig. 2, a second embodiment of the operating method of the file system of the present invention is proposed.
In this embodiment, before step S20, the operating method of the file system further includes:
Step A, obtaining user information according to the file system operation instruction, and obtaining operation authority information of a user according to the user information;
in this embodiment, after the target file system name, the target storage path and the target operation are obtained according to the file system operation instruction, user information may also be obtained according to the file system operation instruction, and then operation permission information of the user may be obtained according to the user information, so as to determine whether the user has operation permission. The user information may include, but is not limited to, a user name, a department to which the user belongs, a user level, and the like, and the operation authority information includes which operation authorities the user owns to which file systems and which files (folders). Specifically, a mapping relationship between the user information and the operation authority information may be preset, and then the operation authority information of the user may be obtained according to the mapping relationship between the user information and the preset user information and operation authority information.
Step B, judging whether a user has operation authority or not based on the name of the target file system, the target storage path, the target operation and the operation authority information;
Then, whether the user has the corresponding operation authority is judged based on the name of the target file system, the target storage path, the target operation and the obtained operation authority information. Of course, it should be noted that, in the actual application process, the information type required for determining whether the user owns the operation authority may be determined according to the information type specifically defined by the operation authority information, for example, if the operation authority information only defines the file system and the file (folder) with the operation authority, and the target operation is not limited, whether the user owns the operation authority may be determined based on the name of the target file system, the target storage path and the operation authority information.
If it is determined that the user has the operation authority, step S20 is executed: determining a file system object corresponding to the target file system name according to a preset mapping relation;
If the user is judged not to have the operation authority, executing the step C: generating corresponding prompt information without operation authority and sending the prompt information to a user end corresponding to the file system operation instruction.
If it is determined that the user has the operation authority, determining a file system object corresponding to the target file system name according to a preset mapping relationship, and further executing the subsequent steps, where the specific execution process may refer to the first embodiment and will not be described herein. If the user is judged not to have the operation authority, corresponding prompt information without the operation authority is generated and sent to a user side corresponding to the file system operation instruction so as to prompt the user that the user has no operation authority.
In this embodiment, by determining whether the user has the operation right, the user can be timely reminded when the user does not have the operation right, and meanwhile, the occupation of the server CPU (Central Processing Unit ) resources caused by the fact that the subsequent steps are continuously executed when the user does not have the operation right is avoided.
Further, based on the first embodiment shown in fig. 2, a third embodiment of the operating method of the file system of the present invention is proposed.
In this embodiment, before step S20, the operating method of the file system may further include:
Step D, inquiring whether a mapping relation corresponding to the name of the target file system exists in the preset mapping relation;
in this embodiment, after the target file system name, the target storage path and the target operation are obtained according to the file system operation instruction, whether the mapping relationship corresponding to the target file system name exists in the preset mapping relationship may also be queried.
If so, step S20 is performed: determining a file system object corresponding to the target file system name according to a preset mapping relation;
if not, executing the step E: generating corresponding prompt information and sending the prompt information to a user side corresponding to the file system operation instruction.
If so, determining a file system object corresponding to the target file system name according to a preset mapping relationship, and further executing subsequent steps, wherein the specific execution process can refer to the first embodiment and is not repeated herein. If the target file system does not exist, the file system mapping cache is described as not caching the target file system object, and at the moment, corresponding prompt information can be generated and sent to the user side corresponding to the file system operation instruction so as to inform the user that the target file system object does not exist currently.
Further, based on the above embodiments, a fourth embodiment of the operating method of the file system of the present invention is proposed.
In this embodiment, the method for operating a file system may further include:
f, when a file system object adding request is received, acquiring a target adding file system and a target adding file system object according to the file system object adding request;
Because the demands of the users are different, the file systems required to be operated by the users are also different, and all types of file system objects cannot be included in the file system mapping cache, in the embodiment, the users can add the corresponding types of file system objects according to the demands, so that the users can conveniently expand other types of file systems and interface with other file systems. Specifically, after the user logs in the corresponding software or App through the user terminal (such as a smart phone, a PC, etc.), the user selects a file system object adding option, and then inputs a file system object to be added, and then the file system object adding instruction can be triggered. At this time, the server may acquire the target addition file system and the target addition file system object according to the file system object addition request when receiving the file system object addition request.
And G, updating the preset mapping relation based on the target added file system and the target added file system object.
Then, based on the target addition file system and the target addition file system object, the preset mapping relation is updated. Namely, a mapping relation between the name of the target added file system and the target added file system object is established, and then a preset mapping relation is updated. Of course, the object added file system object is required to be cached in the file system mapping cache, so that subsequent calling is facilitated.
In this embodiment, a user may add a file system object according to a requirement, so that the user may conveniently expand objects of other file systems that do not exist in a preset mapping relationship of a file system mapping cache, and further achieve docking with other file systems.
The invention also provides an operating device of the file system.
Referring to fig. 3, fig. 3 is a schematic functional block diagram of a first embodiment of an operating device of a file system according to the present invention.
As shown in fig. 3, the operating device of the file system includes:
a first obtaining module 10, configured to obtain, when receiving a file system operation instruction, a target file system name, a target storage path, and a target operation according to the file system operation instruction;
An object determining module 20, configured to determine a file system object corresponding to the target file system name according to a preset mapping relationship, where the file system object includes an operation method of a preset file system;
and an operation execution module 30, configured to call a target operation method corresponding to the target operation from the file system object, and execute the target operation on a target file corresponding to the target storage path.
Further, the operating device of the file system further includes:
the second acquisition module is used for acquiring user information according to the file system operation instruction and acquiring operation authority information of a user according to the user information;
the permission judging module is used for judging whether a user has the operation permission or not based on the name of the target file system, the target storage path, the target operation and the operation permission information;
The object determining module 20 is specifically configured to determine, if it is determined that the user has the operation right, a file system object corresponding to the target file system name according to a preset mapping relationship;
and the first sending module is used for generating corresponding prompt information without operation authority if the user does not have the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
Further, the operating device of the file system further includes:
The query module is used for querying whether a mapping relation corresponding to the name of the target file system exists in the preset mapping relation;
The object determining module 20 is further specifically configured to determine, if a mapping relationship corresponding to the target file system name exists in the preset mapping relationship, a file system object corresponding to the target file system name according to the preset mapping relationship;
and the second sending module is used for generating corresponding prompt information and sending the prompt information to a user side corresponding to the file system operation instruction if the mapping relation corresponding to the target file system name does not exist in the preset mapping relation.
Further, the operating device of the file system further includes:
The third acquisition module is used for acquiring a target added file system and a target added file system object according to the file system object adding request when the file system object adding request is received;
and the updating module is used for updating the preset mapping relation based on the target added file system and the target added file system object.
Further, the operating device of the file system further includes:
And the result feedback module is used for generating a corresponding operation execution result after the operation execution is completed and feeding back the operation execution result to the user side corresponding to the file system operation instruction.
The function implementation of each module in the operating device of the file system corresponds to each step in the operating method embodiment of the file system, and the function and implementation process of each module are not described herein in detail.
The present invention also provides a computer-readable storage medium having stored thereon an operating program of a file system, which when executed by a processor, implements the steps of the operating method of a file system according to any of the above embodiments.
The specific embodiments of the computer readable storage medium of the present invention are substantially the same as the embodiments of the operating method of the file system described above, and will not be described herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (10)
1. A method of operating a file system, the method of operating a file system comprising:
Aiming at the butt joint of different types of file systems, when receiving a file system operation instruction, a user does not need to learn the definition and instantiation modes of each type of file system on a file storage path, and a target file system name, a target storage path and a target operation are acquired according to the file system operation instruction so as to realize the unification of the input format of the storage path of each file system;
determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system; the method of operation includes at least one of: obtaining the file size, creating the file, deleting the file and reading and writing the file;
calling a target operation method corresponding to the target operation from the file system object, and executing the target operation on a target file corresponding to the target storage path;
The obtaining the name of the target file system, the target storage path and the target operation according to the file system operation instruction includes:
And acquiring the name of the target file system, the content of the character string path and the target operation, and generating the target storage path according to a preset format by the name of the target file system and the content of the character string path, wherein the name of the target file system, the content of the character string path and the target operation are input by a user.
2. The method for operating a file system according to claim 1, wherein before the step of determining the file system object corresponding to the target file system name according to the preset mapping relationship, the method further comprises:
Acquiring user information according to the file system operation instruction, and acquiring operation authority information of a user according to the user information;
judging whether a user has operation rights or not based on the name of the target file system, the target storage path, the target operation and the operation rights information;
If the user is judged to have the operation authority, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
if the user does not have the operation authority, generating corresponding prompt information without the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
3. The method for operating a file system according to claim 1, wherein before the step of determining the file system object corresponding to the target file system name according to the preset mapping relationship, the method further comprises:
Inquiring whether a mapping relation corresponding to the name of the target file system exists in the preset mapping relation;
If so, executing the steps of: determining a file system object corresponding to the target file system name according to a preset mapping relation;
If the file system operation instruction does not exist, corresponding prompt information is generated and sent to a user side corresponding to the file system operation instruction.
4. A method of operating a file system according to any one of claims 1 to 3, wherein the method of operating a file system further comprises:
When a file system object adding request is received, acquiring a target adding file system and a target adding file system object according to the file system object adding request;
And updating the preset mapping relation based on the target added file system and the target added file system object.
5. A method of operating a file system according to any one of claims 1 to 3, wherein the method of operating a file system further comprises:
After the operation execution is completed, a corresponding operation execution result is generated and fed back to the user side corresponding to the file system operation instruction.
6. An operating device of a file system, characterized in that the operating device of the file system comprises:
The first acquisition module is used for aiming at the butt joint of different types of file systems, when receiving a file system operation instruction, a user does not need to learn the definition and the instantiation mode of each type of file system for a file storage path, and acquires a target file system name, a target storage path and target operation according to the file system operation instruction so as to realize the unification of the input format of the storage path of each file system;
the object determining module is used for determining a file system object corresponding to the target file system name according to a preset mapping relation, wherein the file system object comprises an operation method of a preset file system; the method of operation includes at least one of: obtaining the file size, creating the file, deleting the file and reading and writing the file;
an operation execution module, configured to invoke a target operation method corresponding to the target operation from the file system object, and execute the target operation on a target file corresponding to the target storage path;
The obtaining the name of the target file system, the target storage path and the target operation according to the file system operation instruction includes:
And acquiring the name of the target file system, the content of the character string path and the target operation, and generating the target storage path according to a preset format by the name of the target file system and the content of the character string path, wherein the name of the target file system, the content of the character string path and the target operation are input by a user.
7. The operating device of a file system according to claim 6, wherein the operating device of a file system further comprises:
the second acquisition module is used for acquiring user information according to the file system operation instruction and acquiring operation authority information of a user according to the user information;
the permission judging module is used for judging whether a user has the operation permission or not based on the name of the target file system, the target storage path, the target operation and the operation permission information;
the object determining module is specifically configured to determine, if it is determined that the user has the operation right, a file system object corresponding to the target file system name according to a preset mapping relationship;
and the first sending module is used for generating corresponding prompt information without operation authority if the user does not have the operation authority, and sending the prompt information to the user side corresponding to the file system operation instruction.
8. Operating device of a file system according to claim 6 or 7, characterized in that the operating device of a file system further comprises:
The third acquisition module is used for acquiring a target added file system and a target added file system object according to the file system object adding request when the file system object adding request is received;
and the updating module is used for updating the preset mapping relation based on the target added file system and the target added file system object.
9. An operating device of a file system, characterized in that the operating device of the file system comprises: memory, a processor and an operating program of a file system stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the operating method of a file system according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which an operating program of a file system is stored, which, when being executed by a processor, implements the steps of the operating method of a file system according to any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910640102.2A CN110334063B (en) | 2019-07-15 | 2019-07-15 | File system operation method, device, equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910640102.2A CN110334063B (en) | 2019-07-15 | 2019-07-15 | File system operation method, device, equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110334063A CN110334063A (en) | 2019-10-15 |
CN110334063B true CN110334063B (en) | 2024-05-14 |
Family
ID=68145284
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910640102.2A Active CN110334063B (en) | 2019-07-15 | 2019-07-15 | File system operation method, device, equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110334063B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114500485B (en) * | 2022-01-28 | 2024-10-18 | 北京沃东天骏信息技术有限公司 | Data processing method and device |
CN114756509B (en) * | 2022-05-19 | 2023-03-24 | 北京百度网讯科技有限公司 | File system operation method, system, device and storage medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101140548A (en) * | 2007-10-23 | 2008-03-12 | 北京握奇数据系统有限公司 | Method for operating data file by card operating system and smart card thereof |
CN101329681A (en) * | 2007-06-20 | 2008-12-24 | 国际商业机器公司 | Distributed lock manager for file system objects in a shared file system |
CN102768678A (en) * | 2012-06-14 | 2012-11-07 | 奇智软件(北京)有限公司 | File operation method and device |
CN102779244A (en) * | 2011-05-11 | 2012-11-14 | 奇智软件(北京)有限公司 | Method and device for carrying out file operation |
CN103415838A (en) * | 2012-03-21 | 2013-11-27 | 广州市飞元信息科技有限公司 | Virtual operating area supporting customized definition and operating method and system architecture thereof |
CN103765372A (en) * | 2011-08-26 | 2014-04-30 | 威睿公司 | Configuring object storage system for input/output operations |
CN106202220A (en) * | 2016-06-28 | 2016-12-07 | 北京百迈客云科技有限公司 | The method of data and device in a kind of reading object storage system |
CN106407417A (en) * | 2016-09-23 | 2017-02-15 | 维沃移动通信有限公司 | An application program data backup method and a mobile terminal |
CN108959592A (en) * | 2018-07-12 | 2018-12-07 | 广州市闲愉凡生信息科技有限公司 | File distribution system of cloud computing platform |
CN109388625A (en) * | 2018-10-11 | 2019-02-26 | 北京小米智能科技有限公司 | The method and device of configuration file is handled in more distributed file systems |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090265353A1 (en) * | 2008-04-16 | 2009-10-22 | Murali Vaddagiri | Method and system for extending role based access control across network file systems |
US9971787B2 (en) * | 2012-07-23 | 2018-05-15 | Red Hat, Inc. | Unified file and object data storage |
CN108427677B (en) * | 2017-02-13 | 2023-01-06 | 阿里巴巴集团控股有限公司 | Object access method and device and electronic equipment |
-
2019
- 2019-07-15 CN CN201910640102.2A patent/CN110334063B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101329681A (en) * | 2007-06-20 | 2008-12-24 | 国际商业机器公司 | Distributed lock manager for file system objects in a shared file system |
CN101140548A (en) * | 2007-10-23 | 2008-03-12 | 北京握奇数据系统有限公司 | Method for operating data file by card operating system and smart card thereof |
CN102779244A (en) * | 2011-05-11 | 2012-11-14 | 奇智软件(北京)有限公司 | Method and device for carrying out file operation |
CN103765372A (en) * | 2011-08-26 | 2014-04-30 | 威睿公司 | Configuring object storage system for input/output operations |
CN103415838A (en) * | 2012-03-21 | 2013-11-27 | 广州市飞元信息科技有限公司 | Virtual operating area supporting customized definition and operating method and system architecture thereof |
CN102768678A (en) * | 2012-06-14 | 2012-11-07 | 奇智软件(北京)有限公司 | File operation method and device |
CN106202220A (en) * | 2016-06-28 | 2016-12-07 | 北京百迈客云科技有限公司 | The method of data and device in a kind of reading object storage system |
CN106407417A (en) * | 2016-09-23 | 2017-02-15 | 维沃移动通信有限公司 | An application program data backup method and a mobile terminal |
CN108959592A (en) * | 2018-07-12 | 2018-12-07 | 广州市闲愉凡生信息科技有限公司 | File distribution system of cloud computing platform |
CN109388625A (en) * | 2018-10-11 | 2019-02-26 | 北京小米智能科技有限公司 | The method and device of configuration file is handled in more distributed file systems |
Non-Patent Citations (3)
Title |
---|
Reasoning about the POSIX file system: local update and global pathnames;Ntzik G 等;《Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications》;20151031;201-220 * |
区块链:构建数字经济的基础设施;曹红丽 等;《网络空间安全》;20190525;75-81 * |
支持事务的分布式消息队列中间件的设计与实现;裴鹏飞;《中国优秀硕士学位论文全文数据库 (信息科技辑)》;20190115;I138-861 * |
Also Published As
Publication number | Publication date |
---|---|
CN110334063A (en) | 2019-10-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11711432B1 (en) | Remote management of application settings | |
WO2020233306A1 (en) | Dynamic page generation method and apparatus, and computer device and storage medium | |
US10872000B2 (en) | Late connection binding for bots | |
US10609140B2 (en) | Dynamic resource management systems and methods | |
US10862979B2 (en) | Techniques for supporting remote micro-services as native functions in spreadsheet applications | |
US11416211B2 (en) | Database systems and methods for conversation-driven dynamic updates | |
US9953639B2 (en) | Voice recognition system and construction method thereof | |
US8543972B2 (en) | Gateway data distribution engine | |
US20110282940A1 (en) | Cloud-based web workers and storages | |
US20130110903A1 (en) | File fetch from a remote client device | |
US9053136B2 (en) | Systems and methods for identifying contacts as users of a multi-tenant database and application system | |
US11882154B2 (en) | Template representation of security resources | |
US11416677B2 (en) | Dynamic resource management systems and form integration methods | |
US20200142674A1 (en) | Extracting web api endpoint data from source code | |
US10324706B1 (en) | Automated software deployment for electromechanical systems | |
CN110334063B (en) | File system operation method, device, equipment and computer readable storage medium | |
CN111949314A (en) | Method and device for generating application installation package, server and storage medium | |
CN116226200A (en) | BFF architecture-based service interface data caching method, device and equipment | |
US9606844B2 (en) | Remotely-hosted interactive client-server session | |
US8578276B2 (en) | Dynamic adaptive cross-site custom interface | |
US7707222B2 (en) | Method and apparatus for providing access to information systems via e-mail | |
CN110442636B (en) | Data reading and writing method and device and data reading and writing equipment | |
US12001458B2 (en) | Multi-cloud object store access | |
CN117435215A (en) | Development environment deployment method, system, computer device and storage medium | |
CN105930431A (en) | Method, device and system for accessing database |
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 |