WO2023201648A1 - 文件的操作装置、计算机设备和操作设备 - Google Patents
文件的操作装置、计算机设备和操作设备 Download PDFInfo
- Publication number
- WO2023201648A1 WO2023201648A1 PCT/CN2022/088274 CN2022088274W WO2023201648A1 WO 2023201648 A1 WO2023201648 A1 WO 2023201648A1 CN 2022088274 W CN2022088274 W CN 2022088274W WO 2023201648 A1 WO2023201648 A1 WO 2023201648A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- subsystem
- data
- cloud storage
- file data
- Prior art date
Links
- 230000015654 memory Effects 0.000 claims abstract description 100
- 238000007726 management method Methods 0.000 claims description 222
- 238000000034 method Methods 0.000 claims description 51
- 230000008569 process Effects 0.000 claims description 40
- 238000012545 processing Methods 0.000 claims description 33
- 238000012546 transfer Methods 0.000 claims description 22
- 238000012216 screening Methods 0.000 claims description 20
- 238000013500 data storage Methods 0.000 claims description 8
- 238000001914 filtration Methods 0.000 claims description 8
- 239000002699 waste material Substances 0.000 abstract description 8
- 230000005012 migration Effects 0.000 abstract description 2
- 238000013508 migration Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 30
- 230000005540 biological transmission Effects 0.000 description 18
- 238000004590 computer program Methods 0.000 description 18
- 230000006870 function Effects 0.000 description 13
- 230000003287 optical effect Effects 0.000 description 5
- 230000009286 beneficial effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 238000013473 artificial intelligence Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 239000007787 solid Substances 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000009977 dual effect Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002265 prevention Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 101100226364 Arabidopsis thaliana EXT1 gene Proteins 0.000 description 1
- 101100226366 Arabidopsis thaliana EXT3 gene Proteins 0.000 description 1
- 102100029074 Exostosin-2 Human genes 0.000 description 1
- 101000918275 Homo sapiens Exostosin-2 Proteins 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000003550 marker Substances 0.000 description 1
- 208000034420 multiple type III exostoses Diseases 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
Definitions
- the present application relates to the field of computer technology, and more specifically, to a file operating device, computer equipment and operating equipment.
- Cloud Disk Cloud Disk
- Embodiments of the present application provide a file operating device, computer equipment, and operating equipment, which can improve the system operation efficiency of the computer equipment and enhance the user experience.
- a file operating device which is suitable for computer equipment.
- the computer equipment is configured with local storage and cloud storage.
- the operating device includes: a file management system and a file operating system configured to run in the kernel space of the computer equipment. ;
- the file management system is configured to move the file data of the file from the local storage to the cloud storage according to the first relocation command of the file;
- the file operating system is configured to move the file data of the file in the cloud storage according to the operation command of the file. Perform operations.
- the file operating device includes a file management system and a file operating system configured to run in the kernel space of the computer device.
- file management system file data of files can be moved from local storage to cloud storage, which can increase the overall storage capacity of computer equipment and improve users' experience in using computer equipment.
- cloud storage can increase the overall storage capacity of computer equipment and improve users' experience in using computer equipment.
- the memory of the computer device has cache space
- the file operating system includes: an operation execution subsystem and a cache management subsystem; the operation execution subsystem is configured to obtain the operation command of the file, and call the cache according to the operation command Management subsystem; the cache management subsystem is configured to operate file data of files in the cloud storage through the cache space.
- the operation execution subsystem can call the cache management subsystem according to the operation command of the file.
- the cache management subsystem is configured to perform file data processing on the file in the cloud storage through the cache space in the computer device memory.
- computer equipment operates cache space more efficiently. Therefore, through this technical solution, the efficiency of computer equipment operating file data can be improved, thereby improving the user's experience of using computer equipment.
- the operation command includes: a read command
- the cache management subsystem includes: a first cache management subsystem; the operation execution subsystem is configured to call the first cache management subsystem in the cache management subsystem according to the read command.
- the first cache management subsystem is configured to read the file data of the file from the cloud storage and write the file data of the file to the cache space, so that the file data of the file is read from the cache space.
- the cache management subsystem has an independent first cache management subsystem, which is easily called by the upper-level operation execution subsystem and is configured to process file read commands through the cache space in the memory. . Therefore, through the technical solution of this embodiment, while improving the efficiency of computer equipment in reading file data, it can also facilitate the subsequent location of problems that arise in the process of reading file data, and improve the use of the operating device and the computer equipment where it is located. reliability.
- the first cache management subsystem is further configured to synchronously store at least part of the file data of the file in the cache space.
- the computer device when the computer device subsequently receives a read command for the file, it can immediately read at least part of the file data of the file from the cache space without the need to read the file again from the cloud storage in real time. file data, thereby further improving the efficiency of the computer device in reading the file data, and further improving the user's experience in using the computer device.
- the operating device further includes: a network protocol system; the first cache management subsystem is configured to call the network protocol system to read the file data of the file from the cloud storage.
- a network protocol system 330 is set in the core of the computer device to implement network protocols, such as the HTTP protocol. , and realize data transmission between the local computer device and the cloud storage through the network protocol system 330, which can reduce the frequency of switching between user space and kernel space, thereby improving the access speed of the computer device to the cloud storage.
- network protocols such as the HTTP protocol.
- the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
- the first cache management subsystem is further configured to determine whether the file data of the file exists in the local storage; when it is determined that the file data of the file does not exist in the local storage, the first cache management subsystem File data configured to read files from cloud storage.
- the operating device after the operating device is configured to obtain a read command for a file, it does not directly read the file data of the file from the cloud storage, but first determines whether the file data of the file exists in the local storage. Prevent invalid file data from being read from cloud storage when local storage has updated file data.
- the waste of system resources can be avoided and the user's experience of using the computer equipment where the operating device is located can be further improved.
- the first cache management subsystem is further configured to determine whether the file data of the file exists in the cloud storage; when it is determined that the file data of the file exists in the cloud storage, the first cache management subsystem is Configured to determine whether file data for a file exists in local storage.
- the first cache management subsystem is configured to determine whether the file data of the file exists in the cloud storage, and determine whether the file data of the file exists in the local storage. Based on this dual judgment, a more accurate determination can be made
- the specific location of the file data of the file to be read improves the efficiency and accuracy of file reading by the operating device and the computer device where it is located, so as to further enhance the user's experience of using the computer device.
- the first cache management subsystem when it is determined that the file data of the file does not exist in the cloud storage or it is determined that the file data of the file exists in the local storage, the first cache management subsystem is further configured to call the local file system of the computer device to read the file's file data from local storage.
- the first cache management subsystem is configured to access the local storage, check the relocation mark of the file in the local storage, and determine whether the file data of the file exists in the cloud storage based on the relocation mark of the file.
- the file operating system is configured to check the relocation mark of the file in the local storage according to the operation command of the file to determine whether the file data of the file has been moved to the cloud storage, thereby further realizing the relocation of the file.
- the entire technical solution shields the location of the file data from the user.
- the file operating system running in the kernel space can access the local memory and check the relocation mark of the file in the local memory to determine the specific location of the file data.
- the operation command includes: a first write command
- the cache management subsystem includes: a second cache management subsystem
- the operation execution subsystem is configured to call the second cache management subsystem according to the first write command
- the second cache management subsystem is configured to write new file data of the file written by the user in the cache space to the cloud storage to overwrite the file data of the file in the cloud storage.
- the cache management subsystem has an independent second cache management subsystem, which is easily called by the upper-level operation execution subsystem and is configured to process the first file of the file through the cache space in the memory. Write commands. Therefore, through the technical solution of this embodiment, while improving the efficiency of computer equipment in writing file data in cloud storage, it can also facilitate the subsequent positioning of problems that occur during the writing process of file data, and improve the operating device and its location. Reliability of use of computer equipment.
- the second cache management subsystem is further configured to synchronously store at least part of the new file data of the file in the cache space.
- the computer device when the computer device subsequently receives a read command for the file, it can immediately read at least part of the new file data of the file from the cache space without the need to read the file again from the cloud storage in real time. new file data, thereby further improving the efficiency of the computer device in reading file data, and further improving the user's experience of using the computer device.
- the file is a cold file with an access frequency lower than a preset threshold
- the first write command is a write command corresponding to the cold file
- the operation execution subsystem in the operating device can be configured to obtain the first write command for the cold file and directly write the file data of the cold file.
- the file data of the cold file is prevented from occupying the storage space of the local storage of the computer device, thereby optimizing the overall performance of the computer device.
- the operation command includes: a second write command
- the cache management subsystem includes: a third cache management subsystem; the operation execution subsystem is configured to call the third cache management subsystem according to the second write command;
- the third cache management subsystem is configured to write new file data of the file written by the user in the cache space to the local storage, and delete file data of the file in the cloud storage.
- the file is a hot file whose access frequency is not lower than a preset threshold
- the second write command is a write command corresponding to the hot file
- the operation execution subsystem in the operating device can obtain the second write command for the hot file and directly write the file data of the hot file into the local memory. And delete the original file data of the hot file in the cloud storage.
- this technical solution can facilitate subsequent users to directly operate the file data of hot files in local storage, improving the user's operation speed on hot files.
- the file data of the hot file is no longer stored in the cloud storage, and the storage space in the cloud storage can be fully utilized to store more other file data.
- the user space of the computer device is provided with a filtering system
- the file operating system also includes: an information statistics subsystem; the information statistics subsystem is configured to count file information of open files opened by the file operating system, and the file information Used to feed back to the screening system, so that the screening system determines whether the opened file is a file that needs to be moved to the cloud storage based on the file information; the file management system is configured to receive the file relocation command sent by the screening system.
- the files moved to the cloud storage by the file management system are not random files in the local storage, but files determined by the screening system based on the file information of open files obtained by the information statistics subsystem. , this screening system can combine file information to determine that the obtained files are more suitable for relocation to cloud storage. Therefore, through this technical solution, the storage of file data in local storage devices can be optimized to a greater extent and the overall performance of computer equipment can be improved.
- the file information includes at least one of the following information: opening times, opening frequency, opening duration, generation time, and file size.
- the file management system includes: an instruction processing subsystem and a first execution subsystem; the instruction processing subsystem is configured to obtain the first relocation command of the file, and call the first execution subsystem according to the relocation command; The first execution subsystem is configured to transfer the file data of the file from the local storage to the cloud storage.
- the synchronization of the file data in the local storage of the computer device and the cloud storage can be facilitated, making it convenient for the user to use the file data through the cloud, and improving the user experience.
- the first execution subsystem can be easily called by the upper-layer instruction processing subsystem, and performs one-way transmission of file data from local storage to cloud storage, which is beneficial to subsequent processing of file data in the unit. Locate problems that arise during the transmission process and improve the reliability of the operating device and the computer equipment on which it is located.
- the operating device further includes: a network protocol system; the first execution subsystem is configured to call the network protocol system to transfer the file data of the file from the local storage to the cloud storage.
- the file management system further includes: a local management subsystem, the local management subsystem is configured to release the storage space occupied by the file data of the file in the local storage, and to write the relocation of the file in the local storage.
- Flag relocation flag is used to indicate that the file data of the file has been moved to cloud storage.
- the local management subsystem can release the storage space occupied in the local storage by the file data that has been transferred to the cloud storage, thereby saving the storage space in the local storage and ensuring that the local storage has sufficient capacity. The remaining storage space will not cause lag in the computer equipment and improve the user's experience of using the computer equipment.
- the local management subsystem also writes the relocation mark of the file in the local storage, so that the user can subsequently move the file to the cloud storage.
- the computer device can still access the local storage according to the user's operation command, and perform normal operations on the file data stored in the cloud storage according to the relocation mark in the local storage, so as to further enhance the user's experience of using the computer device.
- the first execution subsystem is further configured to determine whether the file data of the file exists in the cloud storage; when it is determined that the file data of the file does not exist in the cloud storage, the first execution subsystem is configured To transfer file data of files in local storage to cloud storage.
- the first execution subsystem determines whether the file data of the file exists in the cloud storage before executing the file data migration according to the first relocation command of the file, thereby preventing the wrong first relocation. Under the command, the relocation of file data is performed repeatedly or invalidly, causing a waste of system resources and affecting file storage performance.
- the first execution subsystem has an error prevention mechanism and can respond to abnormal instructions. Therefore, the overall performance of the operating device and the computer equipment where it is located can be improved.
- the file management system further includes: a second execution subsystem; the instruction processing subsystem is also configured to obtain a second relocation command of the file, and call the second execution subsystem according to the relocation command; the second execution subsystem The subsystem is configured to transfer the file data of the file from the cloud storage to the local storage.
- the second execution subsystem can be easily called by the upper-layer instruction processing subsystem, and perform one-way transmission of file data from cloud storage to local storage, which is beneficial to subsequent file data transfer in the one-way Locating problems that arise during the transmission process further improves the reliability of the operating device and the computer equipment in which it is located.
- the mutual transmission of file data between cloud storage and local storage can facilitate the synchronization of file data in the local storage of the computer device and the cloud storage, and facilitate the sharing of data in the cloud storage among multiple devices, which is convenient Improve the user experience by allowing users to use the file data through different devices.
- the operating device further includes: a local management subsystem, and the local management subsystem is configured to delete the relocation mark of the file in the local storage.
- the local management subsystem can also delete the relocation mark of the file to facilitate subsequent processing.
- the relocation mark can be checked in the local storage to accurately determine the location of the file data, and then perform effective subsequent operations.
- a second aspect provides a computer device configured to be connected to a cloud storage and a local storage.
- the computer device includes: a file operating device as in the first aspect or any possible implementation of the first aspect.
- a third aspect provides a file operation device, including: a cloud storage, a local storage, and a file operation device as in the first aspect or any possible implementation of the first aspect.
- the cloud storage includes: an information processor and a file data storage.
- the information processor is configured to process information data from the operating device, and operate the file data storage according to the processed information data.
- Figure 1 is a schematic frame diagram of a computer device provided by an embodiment of the present application.
- Figure 2 is a schematic frame diagram of a computer device provided by another embodiment of the present application.
- Figure 3 is a schematic structural block diagram of a file operating device provided by an embodiment of the present application.
- Figure 4 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 5 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 6 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 7 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 8 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 9 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 10 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 11 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 12 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 13 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
- Figure 14 is a schematic frame diagram of a computer device provided by another embodiment of the present application.
- Figure 15 is a schematic frame diagram of a file operating device provided by an embodiment of the present application.
- the file operating device provided by the embodiment of the present application may be applied to computer equipment.
- the computer device may be a handheld device such as a smartphone, a terminal device such as a personal computer, or a smart wearable device such as a smart watch, which is not particularly limited in this application.
- Figure 1 shows a schematic framework diagram of a computer device 1 provided by an embodiment of the present application.
- the computer device 1 includes: a hardware layer 10 , an operating system layer 20 running on the hardware layer 10 , and an application layer 30 running on the operating system layer 20 .
- the hardware layer 10 includes hardware such as processors, memory, and external storage.
- the operating system layer 20 is any one or more computer operating systems that implement business processing through processes, such as Linux operating system, Unix operating system, Android operating system, iOS operating system or Windows operating system, etc.
- the application layer 30 includes application programs such as browsers, address books, word processing software, and instant messaging software.
- the operating system layer 20 includes a kernel (Kernel) 201, which is the core of the operating system layer 20 and is responsible for managing the system's processes, memory, device drivers, files, network systems, etc., and determines the performance and stability of the system.
- the kernel 201 is a bridge connecting the application layer 30 and the hardware layer 10 .
- Figure 2 shows a schematic frame diagram of a computer device 1 provided by another embodiment of the present application.
- the application program (Application, APP) 301 is a computer program in the application layer 30. It is located in the user space (User Space) of the computer device 1 and can be used and designed by the user.
- User Space User Space
- the kernel 201 in the operating system layer 20 is located in the kernel space (Kernel Space) of the computer device 1 .
- the kernel 201 is independent of user-level applications.
- the kernel 201 has access to protected memory space and has full access to underlying hardware devices.
- the operating system layer 20 generally forces user processes not to directly operate the kernel 201.
- the kernel 201 may include: System Call Interface (SCI) 210, Memory Management Unit (MMU) 220, Process Management Program 230, Virtual File System (Virtual File System, VFS) 240, file system (File System, FS) 250 and device driver (Device Driver) program 260 and other functional modules.
- SCI System Call Interface
- MMU Memory Management Unit
- Process Management Program 230 Virtual File System (Virtual File System, VFS) 240, file system (File System, FS) 250 and device driver (Device Driver) program 260 and other functional modules.
- VFS Virtual File System
- File System File System
- FS File System
- device driver Device Driver
- the system call interface (SCI) 210 provides an interface for user space to access the kernel space.
- SCI system call interface
- the memory management unit (MMU) 220 is used to control data interaction between the memory and the processor in the computer device 1 . Specifically, the MMU 220 receives a memory access request from the processor and controls access to the memory based on the memory access request.
- the process management program 230 is a program that manages multiple processes in the operating system.
- the process management program 230 can be used to implement various functions such as process scheduling, interrupt processing, signal/process priority, context switching, process status management, and progress memory management.
- the virtual file system (VFS) 240 is an intermediate processing system between the file system (FS) 250 and the system call interface (SCI) 210.
- the computer device 1 can support multiple different types of file systems.
- the FS 250 can include: EXT2, EXT3, EXT4, F2FS, rootfs, proc and other types of file systems. .
- VFS 240 hides the specific details of the hardware of different file systems, separates file system operations from the specific hardware implementation of different file systems, and provides a unified interface for all devices.
- Device driver 260 is one of the main parts of kernel 201.
- the device driver 260 actually controls the interaction between the operating system layer 20 and the hardware layer 10 .
- the device driver 260 is also used to complete specific operation details related to the hardware devices in the hardware layer 10 .
- the device driver 260 is related to the control chip of the hardware device.
- the kernel 201 in the operating system layer 20 and the application program in the application layer 30 are both software modules in the computer device 1, which are specifically implemented as computer programs (or also called computer programs). code).
- the hardware layer 10 of the computer device 1 needs to include at least one processor 110 .
- the hardware layer 10 may also include memories such as a memory 120 and an external memory 130.
- the function of the processor 110 is mainly to interpret instructions of the computer program and process data in the computer program.
- the instructions of the computer program and the data in the computer program can be stored in the memory 120 and/or the external memory 130 of the computer device 1 .
- the processor 110 may be an integrated circuit chip with signal processing capabilities.
- the processor 110 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), or a field programmable gate array. , FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- the general-purpose processor is a microprocessor or the like.
- the processor 110 is a central processing unit (CPU).
- Each processor 110 includes at least one processing unit.
- this processing unit is also called a core and is the most important component of the processor. All calculations, receiving commands, storing commands, and processing data of the processor 110 are performed by the core.
- the memory 120 is also called main memory, and its function is to temporarily store the operation data in the processor 110 and the data exchanged with the external memory 130. There is a fast data reading and writing speed between the memory 120 and the processor 110 .
- the memory 120 can provide running space for processes in the computer device 1.
- the memory 120 stores computer programs for generating processes. After the computer program is run by the processor 110 to generate a process, the processor 110 allocates corresponding storage space for the process in the memory 120 .
- the memory 120 stores data generated during the running of the process, such as intermediate data, process data, etc., in the storage space corresponding to the above-mentioned process.
- the memory 120 may be a volatile memory.
- the volatile memory may be random access memory (Random Access Memory, RAM).
- RAM Random Access Memory
- many forms of RAM are available, such as static random access memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), and the like.
- the external memory 130 can also be called auxiliary memory, which refers to the memory in the computer device 1 except the memory 120 and cache.
- the external memory 130 can be a memory that can still save data after power is turned off.
- the external memory 130 can have a relatively large capacity and can store file data such as pictures, videos, text, and application programs in the computer device 1 to meet the user's needs.
- the external storage 130 can be a non-volatile memory, a magnetic disk, an optical disk, a U disk (also called a USB flash disk) or a Secure Digital Memory Card (SD Card) etc.
- the non-volatile memory may include at least one of the following memories: read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory ( Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM, EEPROM) and flash memory (FLASH).
- the disk can be a hard disk (Hard Disk) or a floppy disk (Soft Disk).
- the hard disk can include: solid state drive (Solid State Drive, SSD), hybrid hard drive (Hybrid Hard Drive, HHD) and mechanical hard drive (Hard Disk Drive, HDD) and so on.
- the computer device 1 in the embodiment of the application includes various software modules or hardware modules in computer systems in the prior art.
- the computer device 1 also includes: communication devices, sensor devices, peripheral devices with various functions, and so on.
- the storage space of the memory 120 mainly affects the running speed of the computer device 1. Therefore, the memory 120 can also be called "operation memory”.
- the storage space of the external memory 130 mainly affects the ability of the computer device 1 to store file data.
- the storage space of the external memory 130 can be understood as the storage space in the computer device 1 for storing file data.
- the computer device 1 when the computer device 1 is a mobile phone, its external memory 130 may be a non-volatile memory, such as FLASH and so on.
- the non-volatile memory is arranged inside the computer device 1. Due to various factors such as manufacturing cost, the storage space of the non-volatile memory has certain limitations. As the use time of mobile phones increases, more and more files are stored in the non-volatile memory. The remaining storage space of the non-volatile memory is insufficient, which will cause the phone to freeze, thus affecting the user's use of the phone. experience.
- the computer device 1 may also be other types of devices, and the external memory 130 may also be other types of memories. Regardless of the type of memory, as the usage time increases, it will face insufficient storage space, resulting in a poor user experience with the computer device 1 .
- cloud disk (or network disk) service came into being.
- the user needs to download a specific cloud disk application in the computer device 1.
- the cloud disk application is located in the user space of the computer device, and is used to implement file data interaction between the local storage (such as external memory 130) of the computer device 1 and the cloud disk.
- the cloud disk application needs to continuously call the system call interface 210 to enter the kernel space to access files in the local memory. This process consumes a large amount of system resources and affects system operating efficiency.
- using the cloud disk service requires downloading a specific cloud disk application. This method is not universal and the user experience is poor.
- the present application provides a file operating device that can solve the technical problems of low system operation efficiency of the above computer equipment and poor versatility of cloud disk services.
- FIG. 3 shows a schematic structural block diagram of a file operating device 300 provided by an embodiment of the present application.
- the operating device 300 is suitable for computer equipment, and the computer equipment is configured with local storage and cloud storage.
- the operating device 300 includes: a file management system 310 and a file operating system 320 configured to run in the kernel space of the computer device.
- the file management system 310 is configured to move the file data of the file from the local storage to the cloud storage according to the first relocation command of the file.
- the file operating system 320 is configured to operate the file data of the file in the cloud storage according to the operation command of the file.
- the computer device is configured with a local memory
- the local memory is used to store file data of various files in the computer device.
- the local memory may be the external memory 130 in the embodiment shown in Figure 2 above.
- the local memory includes but is not limited to at least one of the following memories: non-volatile memory, magnetic disk, optical disk, USB flash drive or secure digital card.
- the computer device is also configured with a cloud storage, which is a network storage tool that the computer device can connect to and access through the network.
- a cloud storage is a network storage tool that the computer device can connect to and access through the network.
- the cloud storage can be a network disk or a cloud disk.
- the cloud storage has a large storage space, which can greatly expand the storage capacity of computer equipment and improve users' experience in using computer equipment.
- the data transmission speed between computer equipment and cloud storage will become faster and faster, and the file data transmission speed between computer equipment and cloud storage will also be greatly improved. The improvement will not affect users' access and use of file data in cloud storage.
- the file operating device 300 may be a computer program storage medium in which a file management system 310 and a file operating system 320 are stored.
- the file management system 310 and the file operating system 320 may be for files.
- the computer program code is processed, and the file management system 310 and the file operating system 320 are configured to run in the kernel space of the computer device.
- the computer program code of the file management system 310 and the file operating system 320 is run by the processor of the computer device, the computer program code is located in the kernel space of the computer device.
- the file management system 310 is configured to move the file data of the file from the local storage to the cloud storage according to the first relocation command of the file. Specifically, the file management system 310 is configured to access the storage space where the file is located in the local storage according to the first relocation command of the file, and perform relocation of the file data of the file from the local storage to the cloud storage.
- the file data of the relocated file is copied from the local storage to the cloud storage, and the storage space storing the file data of the file in the local storage is released, that is, the storage space where the file data of the file was originally stored is The space can later be used to store other data, such as file data to store other files.
- the file used for relocation can be any file stored in the local storage, or the file can also be a specific file stored in the local storage.
- the file used for relocation can be used to store different types of information, such as source programs or executable programs, digital or text data, photos, music, videos, and so on.
- the embodiment of this application does not limit the specific type of file.
- the files used for relocation may include: files whose access frequency is less than a preset frequency, and/or files whose file size is less than a preset size.
- files whose access frequency is less than the preset frequency, and/or files whose file size is less than the preset size, to cloud storage will not affect the user's access to files with higher access frequency in local storage, nor will It can greatly increase the remaining storage space of the local memory to further improve the user's experience of using the computer device.
- the file operating system 320 is configured to operate the file data of the file in the cloud storage according to the operation command of the file.
- the operation commands of the file may include: read (read) command, write (write) command, etc.
- the operation command of the file in order to implement the operation on the file, in addition to indicating the operation type, may also include: file information used to indicate the file.
- the file information may include: file name, file path, etc.
- the file operating system 320 when the operation command of a file is a read command, the file operating system 320 is configured to read the file data of the file from the cloud storage and pass it to the upper-layer system to return the file data to the user. For another example, when the operation command of the file is a write command, the file operating system 320 is configured to re-write the file data of the file in the cloud storage based on the locally input file data.
- the file management system 310 and the file operating system located in the computer kernel space are used.
- 320 performs the relocation of file data in local storage and the operation of file data in cloud storage, which can avoid the waste of system resources caused by system calls and does not require additional loading of specific applications in user space.
- the file management system 310 and the file operating system 320 in the above-mentioned operating device 300 can implement the relocation and operation of file data via upper-layer system calls in the kernel of the computer device.
- the upper system of the operating device 300 includes but is not limited to a virtual file system (VFS).
- VFS virtual file system
- the VFS After receiving a relocation command or an operating command from a user space file, the VFS calls the operating device 300 in the embodiment of the present application.
- the file management system 310 or the file operating system 320 in the operating device 300 enables the file management system 310 in the operating device 300 to move the file data from the local storage to the cloud storage according to the file relocation command, or causes the file operating system 320 to move the file data according to the file operation. Commands implement operations on file data in cloud storage.
- the file operating device 300 includes a file management system 310 and a file operating system 320 configured to run in the kernel space of the computer device.
- the file management system 310 the file data of files can be moved from local storage to cloud storage, which can increase the overall storage capacity of the computer equipment and improve the user's experience of using the computer equipment.
- the file operating system 320 operations on file data of files in the cloud storage can be performed, avoiding the waste of system resources caused by system calls, and there is no need to additionally load specific applications in user space, thereby improving the operating efficiency of computer equipment. , and can also improve the versatility of computer equipment for using cloud storage to further enhance users' experience in using computer equipment.
- FIG. 4 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the above-mentioned file operating system 320 may include: an operation execution subsystem 321 and a cache management subsystem 322.
- the operation execution subsystem 321 is configured to obtain the operation command of the file, and call the cache management subsystem 322 according to the operation command.
- the cache management subsystem 322 is configured to operate the file data of the file in the cloud storage through the cache space in the memory of the computer device.
- the file operating system 320 in the operating device 300 may include two subsystems, in which the operation execution subsystem 321 may be understood as an upper-layer system of the cache management subsystem 322, which is configured to obtain updated information.
- the file operation command passed by the upper layer system, and the cache management subsystem 322 is called according to the operation command.
- Cache management subsystem 322 is configured to manage cache space in the computer device's memory.
- the cache space may be a local storage space in the memory of the computer device. Therefore, the computer device can read and write data from the cache space relatively quickly.
- the cache management subsystem 322 is configured to operate the file data of the file in the cloud storage through the cache space.
- the operation execution subsystem 321 calls the cache management subsystem 322 according to the obtained operation command of the first file.
- the cache management subsystem 322 is configured to write the file data of the first file in the cloud storage into the cache space, so that the The file data of the first file is read from the cache space, or the cache management subsystem 322 is configured to write the file data of the first file written by the user into the cache space, and then write the file data of the first file in the cache space.
- File data is rewritten to cloud storage.
- the operation execution subsystem 321 can call the cache management subsystem 322 according to the operation command of the file.
- the cache management subsystem 322 is configured to cache files in the cloud storage through the cache space in the computer device memory.
- the computer device operates the cache space more efficiently. Therefore, through the technical solutions of the embodiments of the present application, the efficiency of the computer device operating file data can be improved, thereby improving the user's experience of using the computer device.
- the file operation command includes a read command
- the cache management subsystem 322 includes a first cache management subsystem.
- the operation execution subsystem 321 is configured to call the first cache management subsystem in the cache management subsystem 322 according to the read command.
- the first cache management subsystem is configured to read the file from the cloud storage. The file data of the file is written into the cache space, so that the file data of the file is read from the cache space.
- the cache management subsystem 322 includes a first cache management subsystem, and the first cache management subsystem may be a partial program code block in the cache management subsystem 322 .
- the operation execution subsystem 321 obtains the read command of the file, it can call the first cache management subsystem in the cache management subsystem 322 according to the read command of the file.
- the first cache management subsystem can be understood as processing the file. Dedicated program code block for file read commands.
- the cache management subsystem 322 has an independent first cache management subsystem, which is easily called by the upper-level operation execution subsystem 321 and is configured to process files through the cache space in the memory. Read command. Therefore, through the technical solution of this embodiment, while improving the efficiency of computer equipment in reading file data, it can also facilitate the subsequent locating of problems that occur during the file data reading process, and improve the efficiency of the operating device 300 and the computer equipment where it is located. Use reliability.
- the first cache management subsystem is further configured to synchronously store at least part of the file data of the above file in the cache space.
- the first cache management subsystem in addition to being configured to read the file data of the file from the cache space, is also configured to synchronously store the file in the cache space. At least part of the file data for this file.
- the first cache management subsystem may synchronously store all the file data of the file in the cache space.
- the first cache management subsystem may synchronously store part of the file data of the file in the cache space.
- the computer device when the computer device subsequently receives a read command for the file, it can immediately read at least part of the file data of the file from the cache space without the need to read the file again from the cloud storage in real time. file data, thereby further improving the efficiency of the computer device in reading the file data, and further improving the user's experience in using the computer device.
- FIG. 5 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
- the operating device 300 also includes a network protocol system 330, and the first cache management subsystem 3221 is configured to call the network protocol system 330 to read the file data of the file from the cloud storage. .
- the network protocol system 330 can be used to convert local file data into network protocol data packets, so that the network protocol data packets can realize data transmission between the local computer device and the cloud storage through the network protocol.
- the network protocol includes but is not limited to Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP).
- the file to be read from the cloud storage is the first file, that is, the read command for the file obtained by the operation execution subsystem 321 is the read command for the first file.
- the first cache management subsystem 3221 is configured to call the network protocol system 330.
- the network protocol system 330 can obtain the file information used to indicate the first file from the first cache management subsystem 3221, and will be used to indicate the third file.
- the file information of a file is encapsulated into a request command network data packet, and then the request command network data packet is sent to the cloud storage.
- the cloud storage After receiving the request command network data packet, the cloud storage can determine the file data of the first file stored therein based on the file information carried in the request command network data packet. Then, the cloud storage sends the file network data packet carrying the file data of the first file to the local computer device. After the local network protocol system 330 of the computer device obtains the file network data packet, it parses it to obtain the file data of the first file, and the first cache management subsystem 3221 writes the parsed file data of the first file into the cache space. , and further reads the file data of the first file from the cache space to the upper layer.
- a network protocol system 330 is set in the core of the computer device to implement network protocols, such as HTTP. protocol, and realize data transmission between the local computer device and the cloud storage through the network protocol system 330, which can reduce the frequency of switching between user space and kernel space, thereby improving the access speed of the computer device to the cloud storage.
- network protocols such as HTTP. protocol
- HTTP HyperText Transfer Protocol
- the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
- the first cache management subsystem 3221 is also configured to determine whether the file data of the file exists in the local storage. If it is determined that the file data of the file does not exist in the local storage, the first cache management subsystem 3221 A cache management subsystem 3221 is configured to read the file data of the file from the cloud storage.
- the first cache management subsystem 3221 can first access the local memory. , determine whether the file data of the file exists in the local storage.
- the first cache management subsystem 3221 is configured to call the local file system in the kernel of the computer device (e.g., the file system 250 shown in Figure 2 above ) to read the file data for the file from the local storage.
- the first cache management subsystem 3221 reads the file data of the file from the cloud storage and writes the file data to the cache space, thereby facilitating the computer device to cache the file data.
- the file data in the cache space is read out and returned to the user.
- the file management system 310 After the file data of the file is moved from the local storage to the cloud storage by the file management system 310, in some cases, the user will update the file data of the file in the local storage. In this case, the file data stored in the local storage For more accurate file data.
- the operating device 300 after the operating device 300 is configured to obtain the read command of the file, it does not directly read the file data of the file from the cloud storage, but first determines whether the file data of the file exists. In the local storage, it prevents invalid file data from being read from the cloud storage when the local storage has updated file data. Through this solution, waste of system resources can be avoided and the user's experience of using the computer equipment where the operating device 300 is located can be further improved.
- the first cache management subsystem 3221 is also configured to determine whether the file data of the file exists in the cloud storage. When it is determined that the file data of the file exists in the cloud storage, the first cache management subsystem 3221 is configured to determine whether the file data of the file exists in the local storage.
- the first cache management subsystem 3221 before the first cache management subsystem 3221 determines whether the file data of the file exists in the local storage, the first cache management subsystem 3221 will first determine whether the file data of the file exists in the cloud storage. If the file data of the file exists in the cloud storage, the first cache management subsystem 3221 then determines whether the file data of the file still exists in the local storage.
- the first cache management subsystem can more accurately determine the specific location of the file data of the file to be read based on the dual judgment, thereby improving the efficiency and accuracy of file reading by the operating device and its computer equipment, so as to Further improve users’ experience with computer equipment.
- the first cache management subsystem 3221 may also be configured to call a local file system in the kernel of the computer device (for example, the file system shown in FIG. 2 above 250) to read the file data of the file from the local storage.
- a local file system in the kernel of the computer device for example, the file system shown in FIG. 2 above 250
- the first cache management subsystem 3221 is configured to determine whether the file data of the file exists in the cloud storage. According to the determination result, the first cache management subsystem 3221 can perform different actions, thereby accurately Reading the file data of the file improves the efficiency and accuracy of file reading by the operating device 300 and the computer equipment where it is located, so as to further enhance the user's experience of using the computer equipment.
- the first cache management subsystem 3221 is configured to access the local storage, check the relocation mark of the file in the local storage, and determine the file data of the file based on the relocation mark of the file. Whether it exists in cloud storage.
- a relocation mark can be written in the local storage to identify that the file data of the file has been moved to the cloud storage. . Therefore, after the operation execution subsystem 321 obtains the operation command of the file and calls the first cache management subsystem 3221, the first cache management subsystem 3221 can check the relocation mark of the file in the local memory, and based on the relocation The marked check result is used to determine whether the file data of the file exists in the cloud storage, so as to further perform subsequent operations.
- the file operating system 320 is configured to check the relocation mark of the file in the local storage according to the operation command of the file to determine whether the file data of the file has been moved to the cloud storage, thereby further implementing Operations on the file data of this file.
- the entire technical solution shields the location of the file data from the user.
- the file operating system 320 running in the kernel space can access the local memory and check the relocation mark of the file in the local memory, thereby determining the specific location of the file data of the file.
- FIG. 6 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
- the operation command of the above file includes a first write command
- the above cache management subsystem 322 includes: a second cache management subsystem 3222, wherein the operation execution subsystem 321 is configured as The second cache management subsystem 3222 is called according to the first write command of the file.
- the second cache management subsystem 3222 is configured to write the new file data of the file written by the user in the cache space to the cloud storage to overwrite it.
- the second cache management subsystem 3222 may be part of the program code blocks in the cache management subsystem 322 .
- the operation execution subsystem 321 when it is configured to obtain the first write command of the file, it can call the second cache management subsystem 3222 in the cache management subsystem 322 according to the first write command of the file.
- Cache management subsystem 3222 may be understood as the dedicated block of program code that handles the first write command of the file.
- the cache management subsystem 322 has an independent second cache management subsystem 3222, which is easily called by the upper-level operation execution subsystem 321 and is configured to process files through the cache space in the memory.
- the first write command Therefore, through the technical solution of this embodiment, while improving the efficiency of computer equipment in writing file data in cloud storage, it can also facilitate the subsequent locating of problems that occur during the writing process of file data, and improve the operating device 300 and its The reliability of the computer equipment in which it is used.
- the second cache management subsystem 3222 is further configured to synchronously store at least part of the new file data of the file in the cache space.
- the second cache management subsystem 3222 in addition to being configured to write new file data of files written by users in the cache space to the cloud storage, is also configured to Configure to synchronously store at least part of the file data for the file in the cache space.
- the second cache management subsystem 3222 can synchronously store all the new file data of the file in the cache space.
- the second cache management subsystem 3222 may synchronously store part of the new file data of the file in the cache space.
- the computer device when the computer device subsequently receives a read command for the file, it can immediately read at least part of the new file data of the file from the cache space without the need to read the file again from the cloud storage in real time. new file data, thereby further improving the efficiency of the computer device in reading file data, and further improving the user's experience of using the computer device.
- the second cache management subsystem 3222 may be configured to call the network protocol system 330 to write new file data of the file in the cache space to the cloud storage.
- the operation execution subsystem 321 is configured to obtain the first write command of the file to call the second cache management subsystem 3222.
- the second cache management subsystem 3222 is configured to call the network protocol system 330.
- the network protocol system 330 can encapsulate the new file data of the file written by the user in the cache space into a file network data packet, and then encapsulate the file network data packet. Send to cloud storage.
- the cloud storage can parse the file network data packet to obtain the new file data of the file.
- the cloud storage stores the new file data and the new file data overwrites the original file of the file in the cloud storage. data.
- the file to be written to the cloud storage is a cold file with an access frequency lower than a preset threshold
- the first write command is a write command corresponding to the cold file
- the operation execution subsystem 321 in the operating device 300 can be configured to obtain the first write command for the cold file and convert the file data of the cold file to Directly writing to the cloud storage, while saving the file data of the cold file through the cloud storage, avoids the file data of the cold file from occupying the storage space of the local storage of the computer device, thereby optimizing the overall performance of the computer device.
- Figure 7 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
- the file operation command includes a second write command
- the above-mentioned cache management subsystem 322 includes: a third cache management subsystem 3223, wherein the operation execution subsystem 321 is configured to perform the operation according to The second write command of the file calls the third cache management subsystem 3223.
- the third cache management subsystem 3223 is configured to write the new file data of the file written by the user in the cache space to the local storage and delete the cloud storage. The file data in the file.
- the third cache management subsystem 3223 may be a partial program code block in the cache management subsystem 322.
- the operation execution subsystem 321 when it is configured to obtain the second write command of the file, it can call the third cache management subsystem 3223 in the cache management subsystem 322 according to the second write command of the file.
- the cache management subsystem 3223 can be understood as a dedicated program code block that handles the second write command of the first file.
- the cache management subsystem 322 has an independent third cache management subsystem 3223, which is easily called by the upper-level operation execution subsystem 321 and is configured to process files through the cache space in the memory.
- the second write command can call the third cache management subsystem 3223 to call the local file system of the computer device to write new file data of the file written by the user in the cache space to the local memory, and the third cache management subsystem 3223 also The network protocol system 330 can be called to delete the original file data of the file in the cloud storage.
- the file to be written to the local storage is a hot file with an access frequency not lower than a preset threshold
- the second write command is a write command corresponding to the hot file
- the operation execution subsystem 321 in the operating device 300 can obtain the second write command for the hot file and directly write the file data of the hot file. local storage and delete the original file data of the hot file in the cloud storage.
- this technical solution can facilitate subsequent users to directly operate the file data of hot files in local storage, improving the user's operation speed on hot files.
- the file data of the hot file is no longer stored in the cloud storage, and the storage space in the cloud storage can be fully utilized to store more other file data.
- FIG. 8 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the user space of the computer device is provided with a filtering system
- the above-mentioned file operating system 320 also includes: an information statistics subsystem 323.
- the information statistics subsystem 323 is configured to count file information of open files opened by the file operating system 320.
- the file information is used to feed back to the screening system, so that the screening system determines whether the open file needs to be moved to the cloud based on the file information.
- memory file is configured to receive a file relocation command sent by the screening system.
- the file operating system 320 may include an information statistics subsystem 323 for counting file information of open files, where the file information of open files may include at least one of the following information: open times, opening frequency, opening duration, generation time and file size.
- the filtering system can determine whether the open file needs to be moved to cloud storage based on the file information of the open file.
- the screening system determines that an open file needs to be relocated to cloud storage, the screening system can send a relocation command for the file to the kernel, so that the file management system 310 in the kernel receives the relocation command for the file sent by the screening system.
- the above-mentioned screening system may be an artificial intelligence system, where the artificial intelligence system includes but is not limited to: a neural network.
- the artificial intelligence system can effectively filter files in the local storage according to specific needs.
- the files moved to the cloud storage by the file management system 310 are not random files in the local storage, but open files obtained through the screening system according to the statistics of the information statistics subsystem 323.
- the screening system can combine the file information to determine that the files are more suitable for relocation to cloud storage. Therefore, through this technical solution, the storage of file data in local storage devices can be optimized to a greater extent and the computer equipment can be improved. overall performance.
- the above-mentioned files that need to be moved to cloud storage are hot files.
- the file information of the above-mentioned open file is used to feed back to the screening system, so that the screening system determines whether the open file is a hot file or a cold file based on the file information, thereby determining whether the open file is a file that needs to be moved to cloud storage. .
- the file information of the opened file may at least include: the number of openings or the frequency of opening, and the filtering system may determine whether the open file is a hot file or a cold file based on the number of openings or the frequency of opening.
- the filtering system can determine that the hot file does not need to be moved to cloud storage.
- the filtering system can determine that the hot file does not need to be moved to cloud storage.
- the filtering system can determine that the cold file is a file that needs to be moved to cloud storage.
- the screening system is used to determine the hot file
- the file management system is used to move the hot file to the cloud storage. This technical solution will not affect the user's access to the hot file with higher access frequency in the local storage. , and can also greatly increase the remaining storage space of the local memory to further enhance the user's experience of using the computer device.
- FIG. 9 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the above-mentioned file management system 310 may include: an instruction processing subsystem 311 and an execution subsystem 312.
- the instruction processing subsystem 311 is configured to obtain the relocation command of the file, and call the execution subsystem 312 according to the relocation command.
- the execution subsystem 312 is configured to execute the transmission of file data of the file between the local storage and the cloud storage.
- the file management system 310 in the operating device 300 may include two subsystems, in which the instruction processing subsystem 311 may be understood as the upper-layer system of the execution subsystem 312, which is used to obtain the upper-layer system transfer file relocation command, and calls the execution subsystem 312 according to the relocation command.
- the execution subsystem 312 can be understood as a functional system for executing file data transfer between local storage and cloud storage.
- FIG. 10 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the operating device 300 also includes: a network protocol system 330.
- the execution subsystem 312 is configured to call the network protocol system 330 to execute the transmission of the file data between the local storage and the cloud storage.
- the execution subsystem 312 can call the network protocol system 330 to encapsulate the file data of the file to be relocated in the local storage into a file network data packet, and the file network data packet is transmitted to the cloud storage through the network protocol. So that the cloud storage can store the file data of the file to be relocated.
- the execution subsystem 312 may call the network protocol system 330 to encapsulate the file information indicating the file to be relocated into a request command network data packet, and then send the request command network data packet to the cloud storage.
- the cloud storage can command network data according to the request to encapsulate the file data of the file to be relocated into a file network data packet, and send the file network data packet back to the network protocol system 330, and the network protocol system 330 obtains the file network data After receiving the data packet, it is parsed to obtain the file data of the file to be relocated, and the execution subsystem 312 is used to store the file data of the file to be relocated in the local memory.
- the cooperation between the execution subsystem 312 and the network protocol system 330 can realize the overall relocation of file data, that is, the entire file data of the file to be relocated is encapsulated into a file network data packet, so that the file can be completely transferred at once. Transfer and relocate to cloud storage or local storage to prevent exceptions during the relocation process from affecting the storage of file data.
- a network protocol system 330 is set up in the core of the computer device to implement a network protocol, such as the HTTP protocol, and file relocation between the local and cloud storage of the computer device is implemented through the network protocol system 330.
- a network protocol such as the HTTP protocol
- file relocation between the local and cloud storage of the computer device is implemented through the network protocol system 330.
- This can Reduce the frequency of switching between user space and kernel space, thereby increasing the access speed from computer devices to cloud storage.
- the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
- FIG. 11 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the file management system 310 includes: an instruction processing subsystem 311 and a first execution subsystem 3121.
- the instruction processing subsystem 311 is configured to obtain the first relocation command of the file, and call the first execution subsystem 3121 according to the first relocation command.
- the first execution subsystem 3121 is configured to transfer the file data of the file from the local storage to the cloud storage.
- the first execution subsystem 3121 may be part of the program code blocks in the execution subsystem 312 in Figure 10 mentioned above.
- the synchronization of the file data in the local storage of the computer device and the cloud storage can be facilitated, making it convenient for the user to use the file data through the cloud, and improving the user experience.
- the first execution subsystem 3121 is easily called by the upper-layer instruction processing subsystem 311, and executes one-way transmission of file data from local storage to cloud storage, which is beneficial to subsequent processing of file data. Locating problems that occur during the one-way transmission process improves the reliability of the operating device 300 and the computer equipment in which it is located.
- the first execution subsystem 3121 is configured to call the network protocol system 330 in the above embodiment to transmit the file data of the file in the local storage to the cloud storage.
- the above-mentioned file management system 310 also includes: a local management subsystem 313, which is configured to release the file data of the file occupied in the local memory. storage space, and a relocation mark of the file is written in the local storage. The relocation mark is used to indicate that the file data of the file has been moved to the cloud storage.
- the local management subsystem in the file management system 310 313 is used to release the storage space occupied by the file data in the local storage.
- the local management subsystem 313 may truncate the file data size of the file to zero to release the storage space occupied by the file data.
- the local management subsystem 313 is also configured to write a relocation mark of the file in the local storage.
- the relocation mark is used to indicate that the file data of the file has been moved to the cloud storage.
- the user can first check the relocation mark of the file in the local storage, and operate the file data of the file based on the check result of the relocation mark. .
- the local management subsystem 313 can release the storage space occupied in the local storage by the file data that has been transferred to the cloud storage, thereby saving the storage space in the local storage and ensuring that the local storage has sufficient capacity. The remaining storage space will not cause the computer equipment to freeze, improving the user's experience of using the computer equipment.
- the local management subsystem 313 also writes the relocation mark of the file in the local storage, so that the user can subsequently move the file to the cloud storage.
- the computer device can still access the local storage according to the user's operation command, and perform normal operations on the file data stored in the cloud storage according to the relocation mark in the local storage, so as to further improve the user's use of the computer device. experience.
- the above-mentioned first execution subsystem 3121 is also configured to determine whether the file data of the file exists in the cloud storage. If it is determined that the file data of the file does not exist in the cloud storage, the first execution subsystem 3121 is configured to transfer the file data of the file in the local storage to the cloud storage.
- the first execution subsystem 3121 when the instruction processing subsystem 311 receives the first relocation command of the file and calls the first execution subsystem 3121, the first execution subsystem 3121 first determines whether the file already exists in the cloud storage. , when it is determined that the file does not exist in the cloud storage, it can be determined that the currently received first relocation command is a valid relocation command, and the subsequent file data of the file in the local storage is transferred to the cloud storage. On the contrary, if it is determined that the file has been stored in the cloud storage, it means that the first relocation command currently received is an error command and no subsequent actions will be performed.
- the first execution subsystem 3121 can determine whether the file already exists in the cloud storage by checking whether the relocation mark of the file exists in the local storage. Through this implementation, the local storage can be accessed conveniently, and whether the file currently to be relocated exists in the cloud storage can be determined based on the relocation mark therein. The entire solution is easy to implement and the determination speed is fast. Of course, in other examples, the first execution subsystem 3121 can also determine whether the file to be relocated already exists in the cloud storage through other methods. This embodiment of the present application does not limit this specific determination method.
- the first execution subsystem 3121 determines whether the file data of the file exists in the cloud storage before executing the file data relocation according to the first relocation command of the file, thereby preventing the wrong first relocation of the file. Under the relocation command, file data relocation is performed repeatedly or invalidly, causing a waste of system resources and affecting file storage performance.
- the first execution subsystem 3121 has an error prevention mechanism and can cope with abnormal instructions. Therefore, the overall performance of the operating device 300 and the computer equipment where it is located can be improved.
- FIG. 12 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the file management system 310 also includes: a second execution subsystem 3122.
- the instruction processing subsystem 311 is configured to obtain the second relocation command of the file, and call the second execution subsystem 3122 according to the second relocation command.
- the second execution subsystem 3122 is configured to transfer the file data of the file from the cloud storage to the local storage.
- the second execution subsystem 3122 may be part of the program code blocks in the execution subsystem 312 in Figure 10 mentioned above.
- the second relocation command is used to instruct the file data of the file to be relocated from the cloud storage to the local storage
- the execution subsystem 312 includes an independent second relocation command.
- the execution subsystem 3121 is called by the upper-layer instruction processing subsystem 311 and executes the above-mentioned second relocation command.
- the second execution subsystem 3122 is easily called by the upper-layer instruction processing subsystem 311, and performs one-way transmission of file data from cloud storage to local storage, which is beneficial to subsequent file data in the Locating problems that occur during the one-way transmission further improves the reliability of the operating device 300 and the computer equipment where it is located.
- the mutual transmission of file data between cloud storage and local storage can facilitate the synchronization of file data in the local storage of the computer device and the cloud storage, and facilitate the sharing of data in the cloud storage among multiple devices, which is convenient Improve the user experience by allowing users to use the file data through different devices.
- the second execution subsystem 3122 can call the network protocol system 330 in the above embodiment to transfer the file data of the file in the cloud storage to the local storage.
- the above-mentioned file management system 310 also includes: the above-mentioned local management subsystem 313.
- the local management subsystem 313 is configured to delete the relocation of the file in the local storage. mark.
- the file data of the file in the cloud storage after the file data of the file in the cloud storage is transferred to the local storage, it can be identified in the local storage that the file data of the file has not been relocated. For example, a relocation flag in local storage that identifies the file as being moved to cloud storage can be deleted.
- the local management subsystem 313 can also delete the relocation mark of the file to facilitate subsequent During the operation of the file data of the file, the relocation mark can be checked in the local storage to accurately determine the location of the file data, and then perform effective subsequent operations.
- FIG. 13 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
- the operating device 300 may include: a file management system 310, a file operating system 320, and a network protocol system 330.
- the file management system 310 may include: an instruction processing subsystem 311, an execution subsystem 312, and a local management subsystem 313.
- the file operating system 320 may include: an operation execution subsystem 321, a cache management subsystem 322, and an information statistics subsystem 323.
- each subsystem in the file management system 310, each subsystem in the file operating system 320, and the network protocol system 330 can be configured to perform the relevant steps of the embodiments shown in Figures 3 to 12 above.
- the file management system 310 can interact with the file operating system 320 .
- the file management system 310 may call the file operating system 320 to write the relocation mark in the local storage or delete the relocation mark. Remove the relocation marker.
- the file management system 310 and the file operating system 320 may be located at the lower level of the virtual file system (VFS) 240 shown in Figure 2, and both can receive relevant information sent by the VFS 240 to Perform the corresponding function.
- VFS virtual file system
- the computer device where the file operating device 300 is located may further include relevant functional modules as shown in FIG. 2 in addition to the functional systems shown in FIG. 13 .
- Figure 14 shows a schematic structural block diagram of a computer device 3 provided by an embodiment of the present application.
- the computer device 3 is configured to be connected to cloud storage and local storage.
- the computer device 3 includes the file operating device 300 in any of the above embodiments.
- the cloud storage includes but is not limited to a cloud disk or a network disk.
- Local storage includes but is not limited to non-volatile memory, magnetic disks, optical disks, USB flash drives or secure digital cards.
- the file operating device 300 may be a computer program storage medium in which a file management system 310 and a file operating system 320 running in the kernel space of the computer device 3 are stored.
- the computer device 3 may also include a processor for calling the file management system 310 and the file operating system 320 in the operating device 300 to perform related operations on files in cloud storage and local storage.
- the computer device 3 includes but is not limited to a terminal device, such as a mobile phone, a personal computer, etc.
- Figure 15 shows a schematic structural block diagram of a file operating device 4 provided by an embodiment of the present application.
- the file operating device 4 includes: cloud storage 410, local storage 420, and the file operating device 300 in any of the above embodiments.
- the relevant technical solutions of the cloud storage 410, the local storage 420 and the operating device 300 please refer to the relevant descriptions of the above embodiments.
- the cloud storage 410 may include: an information processor and a file data storage.
- the information processor is configured to process the information data from the operating device 300 and to process the information data according to the processed information data.
- This file data memory operates.
- the information data formed by the file management system 310 and the file operating system 320 in the operating device 300 can be sent to the information processor 411 in the cloud storage 410.
- the information data can be a request command network packet or a file network data packet.
- the information processor 411 can perform data analysis on the request command network packet or file network data packet according to the network protocol to obtain the request command data or file data. Further, the information processor 411 can read the file data from the file data storage 412 according to the parsed request command data, or the information processor 411 can store the parsed file data into the file data storage 412 .
- the above embodiments are implemented in whole or in part by software, hardware, firmware or any other combination.
- the above-described embodiments are implemented in whole or in part in the form of a computer program product.
- the computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on the computer, the processes or functions described in the embodiments of the present application are generated in whole or in part.
- the computer is a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in or transmitted from one computer-readable storage medium to another, e.g., from a website, computer, server, or data center. Wired (such as infrared, wireless, microwave, etc.) transmission to another website, computer, server or data center.
- the computer-readable storage medium is any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more sets of available media.
- the available media are magnetic media (eg, floppy disks, hard disks, tapes), optical media (eg, DVD), or semiconductor media, such as solid state drives.
- At least one refers to one or more, and “plurality” refers to two or more.
- At least one of the following” or similar expressions thereof refers to any combination of these items, including any combination of a single item (items) or a plurality of items (items).
- at least one of a, b, or c means: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c are single or multiple.
- the size of the sequence numbers of the above-mentioned processes does not mean the order of execution.
- the execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present application.
- the implementation process constitutes any limitation.
- the device embodiments described above are only illustrative.
- the division of the system is only a logical function division.
- Another point is that the coupling or direct coupling or communication connection between each other shown or discussed is the indirect coupling or communication connection through some interfaces, devices or modules, which is electrical, mechanical or other forms.
- each functional system in various embodiments of the present application can be integrated into a processing device, optionally, each module physically exists alone, or two or more modules are integrated into one module.
- the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
- the technical solution of the present application is essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product.
- the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (either a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other various media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
本申请实施例提供一种文件的操作装置、计算机设备和操作设备,能够提高计算机设备的***运行效率且提升用户的使用体验。该文件的操作装置适用于计算机设备,该计算机设备配置有本地存储器和云端存储器,操作装置包括:被配置为运行于计算机设备的内核空间的文件管理***和文件操作***;其中,文件管理***被配置为根据文件的第一搬迁命令,将文件的文件数据由本地存储器搬迁至云端存储器;文件操作***被配置为根据文件的操作命令,对云端存储器中文件的文件数据进行操作。通过该技术方案,能够避免因***调用造成的***资源浪费,也不需要额外装载特定应用程序,从而提升计算机设备的***运行效率以及用户对于计算机设备的使用体验。
Description
本申请涉及计算机技术领域,并且更为具体地,涉及一种文件的操作装置、计算机设备和操作设备。
随着科学技术的发展和提升,用户对于计算机设备的存储容量要求越来越高。为了解决计算机设备的本地存储容量较为有限的问题,目前市场上出现了多种云盘(Cloud Disk)服务方案。
在主流的云盘服务方案中,用户需要在其计算机设备中下载特定的应用程序(Application,App),通过该特定APP,用户才能实现计算机设备本地存储文件上传至特定的云端存储器。在计算机设备的软件***架构中,用户下载的APP位于用户空间(User Space)中,对于该用户空间中部分指令的执行,需要通过***调用进入内核空间(Kernel Space)执行内核代码才能实现,该***调用造成***资源的开销较大,会影响***运行效率。且在该方式中,使用云盘服务需要下载特定的APP,该方式不具有通用性造成用户使用体验也较差。
鉴于此,如何提高计算机设备的***运行效率且提升用户的使用体验,是一项亟待解决的技术问题。
发明内容
本申请实施例提供一种文件的操作装置、计算机设备和操作设备,能够提高计算机设备的***运行效率且提升用户的使用体验。
第一方面,提供一种文件的操作装置,适用于计算机设备,该计算机设备配置有本地存储器和云端存储器,操作装置包括:被配置为运行于计算机设备的内核空间的文件管理***和文件操作***;其中,文件管理***被配置为根据文件的第一搬迁命令,将文件的文件数据由本地存储器搬迁至云端存储器;文件操作***被配置为根据文件的操作命令,对云端存储器中文件的文件数据进行操作。
通过本申请实施例的技术方案,文件的操作装置包括被配置为运行于计算机设备的内核空间的文件管理***和文件操作***。通过该文件管理***,能够实现文件的文件数据由本地存储器搬迁云端存储,可以提升计算机设备整体的存储容量,提升用户对计算机设备的使用体验。通过该文件操作***,能够执行对云端存储器中文件的文件数据的操作,避免因***调用造成的***资源浪费,也不需要额外在用户空间装载特定应用程序,从而可以提升计算机设备的***运行效率,也可以提升计算机设备对于云端存储器使用的通用性,以进一步提升用户对于计算机设备的使用体验。
在一些可能的实施方式中,计算机设备的内存具有缓存空间,文件操作***包括:操作执行子***和缓存管理子***;操作执行子***被配置为获取文件的操作命令,并根据操作命令调用缓存管理子***;缓存管理子***被配置为通过缓存空间对云端存储 器中文件的文件数据进行操作。
在该实施方式的技术方案中,操作执行子***能够根据文件的操作命令调用缓存管理子***,该缓存管理子***被配置为通过计算机设备内存中的缓存空间对云端存储器中文件的文件数据进行操作,计算机设备对缓存空间的操作效率较高,因而通过该技术方案,可以提高计算机设备对文件数据的操作效率,从而提升用户对于计算机设备的使用体验。
在一些可能的实施方式中,操作命令包括:读命令,缓存管理子***包括:第一缓存管理子***;操作执行子***被配置为根据读命令调用缓存管理子***中的第一缓存管理子***;第一缓存管理子***被配置为从云端存储器中读取文件的文件数据,并将文件的文件数据写入至缓存空间,以使得文件的文件数据由缓存空间读出。
在该实施方式的技术方案中,缓存管理子***中具有独立的第一缓存管理子***,其便于被上层的操作执行子***调用,且被配置为通过内存中的缓存空间处理文件的读命令。因此,通过该实施方式的技术方案,在提高计算机设备读取文件数据的效率的同时,还可以便于后续对于文件数据读取过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。
在一些可能的实施方式中,第一缓存管理子***还被配置为在缓存空间中同步存储文件的至少部分文件数据。
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分文件数据,而不需要实时的再次从云端存储器中读取该文件的文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。
在一些可能的实施方式中,操作装置还包括:网络协议***;第一缓存管理子***被配置为调用网络协议***以从云端存储器中读取文件的文件数据。
相比于在用户空间实现网络协议,用户空间与内核空间具有频繁的切换频率的技术方案,通过该实施方式的技术方案,在计算机设备的内核设置网络协议***330以实现网络协议,例如HTTP协议,并通过该网络协议***330实现计算机设备本地与云端存储器之间的数据传输,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。
在一些可能的实施方式中,第一缓存管理子***还被配置为判断文件的文件数据是否存在于本地存储器;在确定文件的文件数据不存在于本地存储器的情况下,第一缓存管理子***被配置为从云端存储器中读取文件的文件数据。
通过该实施方式的技术方案,在操作装置被配置为获取文件的读命令后,不是直接从云端存储器中读取该文件的文件数据,而是先判断该文件的文件数据是否存在于本地存储器,防止在本地存储器具有更新的文件数据的情况下,从云端存储器中读取到失效的文件数据。通过该方案,能够避免***资源的浪费且能进一步提高用户对操作装置所在的计算机设备的使用体验。
在一些可能的实施方式中,第一缓存管理子***还被配置为判断文件的文件数据是否存在于云端存储器;在确定文件的文件数据存在于云端存储器的情况下,第一缓存管理子***被配置为判断文件的文件数据是否存在于本地存储器。
在该实施方式的技术方案中,第一缓存管理子***被配置为判断文件的文件数据是否存在于云端存储器,且判断文件的文件数据是否存在于本地存储器,根据该双重判断,可以较为准确确定待读取文件的文件数据的具***置,提升操作装置及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。
在一些可能的实施方式中,在确定文件的文件数据不存在于云端存储器或确定文件的文件数据存在于本地存储器的情况下,第一缓存管理子***还被配置为调用计算机设备的本地文件***以从本地存储器中读取文件的文件数据。
在一些可能的实施方式中,第一缓存管理子***被配置为访问本地存储器,并在本地存储器中检查文件的搬迁标记,根据文件的搬迁标记,判断文件的文件数据是否存在于云端存储器。
在该实施方式的技术方案中,文件操作***被配置为根据文件的操作命令,在本地存储器中检查文件的搬迁标记,以判断该文件的文件数据是否已搬迁至云端存储器,从而进一步实现对该文件的文件数据的操作。整个技术方案对用户屏蔽了文件数据的所在位置,可通过运行于内核空间的文件操作***访问本地存储器并在本地存储器中检查文件的搬迁标记,从而确定该文件的文件数据的具***置。通过该技术方案,能够保持计算机设备原生的用户空间,不涉及用户空间中原生的服务改动,避免了需要在用户空间区分文件的所在位置,从而提升用户对计算机设备的使用体验。
在一些可能的实施方式中,操作命令包括:第一写命令,缓存管理子***包括:第二缓存管理子***;操作执行子***被配置为根据第一写命令调用第二缓存管理子***;第二缓存管理子***被配置为将缓存空间中用户写入的文件的新文件数据写入至云端存储器,以覆盖云端存储器中文件的文件数据。
在该实施方式的技术方案中,缓存管理子***中具有独立的第二缓存管理子***,其便于被上层的操作执行子***调用,且被配置为通过内存中的缓存空间处理文件的第一写命令。因此,通过该实施方式的技术方案,在提高计算机设备在云端存储器中写入文件数据的效率的同时,还可以便于后续对于文件数据写入过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。
在一些可能的实施方式中,第二缓存管理子***还被配置为在缓存空间同步存储文件的至少部分新文件数据。
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分新文件数据,而不需要实时的再次从云端存储器中读取该文件的新文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。
在一些可能的实施方式中,文件为访问频率低于预设阈值的冷文件,第一写命令为对应于冷文件的写命令。
通过该实施方式的技术方案,对于访问频率较低的冷文件,操作装置中的操作执行子***可被配置为获取针对于该冷文件的第一写命令,将该冷文件的文件数据直接写入云端存储器,在通过云端存储器保存该冷文件的文件数据的同时,避免该冷文件的文件数据占用计算机设备的本地存储器的存储空间,从而优化计算机设备的整体性能。
在一些可能的实施方式中,操作命令包括:第二写命令,缓存管理子***包括:第三缓存管理子***;操作执行子***被配置为根据第二写命令调用第三缓存管理子***; 第三缓存管理子***被配置为将缓存空间中用户写入的文件的新文件数据写入至本地存储器,并删除云端存储器中文件的文件数据。
在一些可能的实施方式中,文件为访问频率不低于预设阈值的热文件,第二写命令为对应于热文件的写命令。
通过该实施方式的技术方案,对于访问频率较高的热文件,操作装置中的操作执行子***可获取针对于该热文件的第二写命令,将该热文件的文件数据直接写入本地存储器且删除云端存储器中该热文件的原有文件数据。一方面,通过该技术方案,可以便于后续用户能够直接对本地存储器中热文件的文件数据进行操作,提升用户对热文件的操作速度。另一方面,云端存储器中不再存储有该热文件的文件数据,也能充分利用云端存储器中的存储空间存储更多的其它文件数据。
在一些可能的实施方式中,计算机设备的用户空间设置有筛选***,文件操作***还包括:信息统计子***;信息统计子***被配置为统计文件操作***打开的打开文件的文件信息,文件信息用于反馈给筛选***,以使得筛选***根据文件信息确定打开文件是否为需要搬迁至云端存储器的文件;文件管理***被配置为接收筛选***发送的文件的搬迁命令。
在该实施方式的技术方案中,被文件管理***搬迁至云端存储器中的文件不是本地存储器中的随机文件,而是经由筛选***根据信息统计子***统计得到的打开文件的文件信息确定得到的文件,该筛选***能够结合文件信息确定得到的文件更为适宜搬迁至云端存储器,因此,通过该技术方案,能够更大程度优化本地存储设备中文件数据的存储,提升计算机设备的整体性能。
在一些可能的实施方式中,文件信息包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。
在一些可能的实施方式中,文件管理***包括:指令处理子***和第一执行子***;指令处理子***被配置为获取文件的第一搬迁命令,且根据搬迁命令调用第一执行子***;第一执行子***被配置为将文件的文件数据由本地存储器传输至云端存储器。
通过该实施方式的技术方案,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,方便于用户通过云端对该文件数据的使用,提升用户的使用体验。另外,通过该实施方式的技术方案,该第一执行子***便于被上层的指令处理子***调用,且执行文件数据由本地存储器至云端存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。
在一些可能的实施方式中,操作装置还包括:网络协议***;第一执行子***被配置为调用网络协议***以将文件的文件数据由本地存储器传输至云端存储器。
在一些可能的实施方式中,文件管理***还包括:本地管理子***,本地管理子***被配置为释放文件的文件数据在本地存储器中占用的存储空间,且在本地存储器中写入文件的搬迁标记,搬迁标记用于指示文件的文件数据已搬迁至云端存储器。
通过本申请实施例的技术方案,该本地管理子***能够释放已被传输至云端存储器的文件数据在本地存储器中占用的存储空间,从而节省本地存储器中的存储空间,保证本地存储器具有较为充足的剩余存储空间,不会造成计算机设备的卡顿,提升用户对计算机设备的使用体验。与此同时,在第一执行子***将本地存储器中文件的文件数据传 输至云端存储器之后,本地管理子***还在本地存储器中写入了该文件的搬迁标记,使得用户后续在对该文件的操作中,计算机设备仍然能够根据用户的操作命令访问本地存储器,且根据该本地存储器中的搬迁标记,对存储于云端存储器中的文件数据进行正常操作,以进一步提升用户对计算机设备的使用体验。
在一些可能的实施方式中,第一执行子***还被配置为判断文件的文件数据是否存在于云端存储器;在确定文件的文件数据不存在于云端存储器的情况下,第一执行子***被配置为将本地存储器中文件的文件数据传输至云端存储器。
通过该实施方式的技术方案,第一执行子***在根据文件的第一搬迁命令执行对文件的文件数据搬迁之前,判断该文件的文件数据是否存在于云端存储器,从而防止在错误的第一搬迁命令下,重复或无效的执行对文件数据的搬迁,造成***资源的浪费且影响文件的存储性能。通过该实施方式的技术方案,第一执行子***具有防错机制,能够应对异常指令,因而,可以提高该操作装置及其所在计算机设备的整体性能。
在一些可能的实施方式中,文件管理***还包括:第二执行子***;指令处理子***还被配置为获取文件的第二搬迁命令,且根据搬迁命令调用第二执行子***;第二执行子***被配置为将文件的文件数据由云端存储器传输至本地存储器。
通过本申请实施例的技术方案,该第二执行子***便于被上层的指令处理子***调用,且执行文件数据由云端存储器至本地存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,进一步提升操作装置及其所在计算机设备的使用可靠性。另外,云端存储器与本地存储器之间的文件数据相互传输,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,有利于实现该云端存储器中的数据在多设备中进行共享,方便于用户通过不同设备对该文件数据的使用,提升用户的使用体验。
在一些可能的实施方式中,操作装置还包括:本地管理子***,本地管理子***被配置为在本地存储器中删除文件的搬迁标记。
通过该申请实施例的技术方案,在第二执行子***将文件的文件数据由云端存储器传输至本地存储器的情况下,本地管理子***还可将删除该文件的搬迁标记,以便于后续在对该文件的文件数据进行操作的过程中,可以在本地存储器中检查搬迁标记,准确确定文件数据所在的位置,进而执行有效的后续操作。
第二方面,提供一种计算机设备,被配置为连接于云端存储器和本地存储器,计算机设备包括:如第一方面或第一方面中任一可能的实施方式中的文件的操作装置。
第三方面,提供一种文件的操作设备,包括:云端存储器、本地存储器以及如第一方面或第一方面中任一可能的实施方式中的文件的操作装置。
在一些可能的实施方式中,云端存储器包括:信息处理器和文件数据存储器,信息处理器被配置为对来自操作装置的信息数据进行处理,并根据处理后的信息数据对文件数据存储器进行操作。
图1是本申请一实施例提供的计算机设备的示意性框架图。
图2是本申请另一实施例提供的计算机设备的示意性框架图。
图3是本申请一实施例提供的文件的操作装置的示意性结构框图。
图4是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图5是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图6是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图7是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图8是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图9是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图10是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图11是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图12是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图13是本申请另一实施例提供的文件的操作装置的示意性结构框图。
图14是本申请另一实施例提供的计算机设备的示意性框架图。
图15是本申请一实施例提供的文件的操作设备的示意性框架图。
下面将结合附图,对本申请实施例中的技术方案进行描述。
本申请实施例提供的文件的操作装置可适用于计算机设备。可选地,该计算机设备可以是智能手机等手持设备,个人计算机等终端设备,或智能手表等智能穿戴设备,本申请并未特别限定。
图1示出了本申请实施例提供的计算机设备1的一种示意性框架图。
如图1所示,该计算机设备1包括:硬件层10、运行在硬件层10之上的操作***层20,以及运行在操作***层20上的应用层30。该硬件层10包括处理器、内存和外存等硬件。该操作***层20是任意一种或多种通过进程(process)实现业务处理的计算机操作***,例如,Linux操作***、Unix操作***、Android操作***、iOS操作***或Windows操作***等。该应用层30包含浏览器、通讯录、文字处理软件、即时通信软件等应用程序。
具体地,操作***层20包括内核(Kernel)201,其为操作***层20的核心,负责管理***的进程、内存、设备驱动程序、文件和网络***等等,决定着***的性能和稳定性。该内核201是连接应用层30和硬件层10的桥梁。
在图1所示实施例的基础上,图2示出了本申请另一实施例提供的计算机设备1的示意性框架图。
如图2所示,应用程序(Application,APP)301为应用层30中的计算机程序,其位于计算机设备1的用户空间(User Space),能够由用户进行使用和设计。
相对于用户空间,操作***层20中的内核201位于计算机设备1的内核空间(Kernel Space)。该内核201独立于用户级的应用程序,该内核201可以访问受保护的内存空间,也有访问底层硬件设备的所有权限。为了保证内核201的安全,操作***层20一般都强制用户进程不能直接操作该内核201。
可选地,在该内核空间中,内核201可包括:***调用接口(System Call Interface,SCI)210,内存管理单元(Memory Management Unit,MMU)220,进程管理程序230, 虚拟文件***(Virtual File System,VFS)240,文件***(File System,FS)250以及设备驱动(Device Driver)程序260等多种功能模块。
具体地,在该内核201中,***调用接口(SCI)210提供了用户空间访问内核空间的一个接口。在不同的计算机设备1的硬件架构下,通过SCI 210进入内核空间的方法是不同的。
内存管理单元(MMU)220用于控制计算机设备1中的内存与处理器之间的数据交互。具体地,MMU 220从处理器接收内存访问请求,并基于该内存访问请求控制针对内存的访问。
进程管理程序230为管理操作***中多个进程的程序。该进程管理程序230能够用于实现:进程调度、中断处理、信号/进程优先级、上下文切换、进程状态管理、进度内存管理等多种功能。
虚拟文件***(VFS)240为文件***(FS)250与***调用接口(SCI)210之间的中间处理***。在本申请实施例中,计算机设备1可以支持多种不同类型的文件***,作为示例而非限定,FS 250中可以包括:EXT2,EXT3,EXT4,F2FS,rootfs,proc等多种类型的文件***。
为了支撑不同的文件***,VFS 240隐藏了不同文件***的硬件的具体细节,把文件***操作和不同文件***的具体硬件实现分离开来,为所有的设备提供了统一的接口。
设备驱动程序260是内核201的主要部分之一。该设备驱动程序260实际控制操作***层20和硬件层10之间的交互。具体地,该设备驱动程序260除了提供一组操作***层20可理解的抽象接口完成和操作***层20之间的交互以外,还用于完成与硬件层10中硬件设备相关的具体操作细节。一般而言,设备驱动程序260和硬件设备的控制芯片有关。
可以理解的是,在本申请实施例中,上述操作***层20中的内核201以及应用层30中的应用程序均为计算机设备1中的软件模块,其具体实现为计算机程序(或者也称计算机代码)。为了实现该程序功能,如图2所示,计算机设备1的硬件层10需包括至少一个处理器110。除处理器110以外,硬件层10还可以包括内存120和外存130等存储器。
具体地,处理器110的功能主要是解释计算机程序的指令以及处理计算机程序中的数据。其中,该计算机程序的指令以及计算机程序中的数据能够保存在计算机设备1的内存120和/或外存130中。
可选地,处理器110可能是集成电路芯片,具有信号的处理能力。作为示例而非限定,处理器110是可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。其中,通用处理器是微处理器等。例如,该处理器110是中央处理单元(central processing unit,CPU)。
其中,每个处理器110包括至少一个处理单元。可选地,该处理单元也称为核心(core),是处理器最重要的组成部分。处理器110所有的计算、接受命令、存储命令、处理数据都由核心执行。
内存120也称为主存,其作用是用于暂时存放处理器110中的运算数据,以及与外 存130交换的数据。该内存120与处理器110之间具有较快的数据读写速度。另外,该内存120能够为计算机设备1中的进程提供运行空间,例如,内存120中保存用于生成进程的计算机程序。计算机程序被处理器110运行而生成进程后,处理器110在内存120中为该进程分配对应的存储空间。内存120在上述进程对应的存储空间中保存进程运行期间产生的数据,例如,中间数据,或过程数据等等。
作为示例而非限定,在本申请实施例中,内存120可以是易失性存储器。其中,该易失性存储器可以是随机存取存储器(Random Access Memory,RAM)。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)等等。
外存130也可称之为辅存,是指除计算机设备1内除了内存120及缓存以外的存储器。可选地,该外存130可以为断电后仍能保存数据的存储器。且该外存130可具有相对较大的容量,能够存储计算机设备1中的图片、视频、文字等文件数据以及应用程序,满足用户的使用需求。
作为示例而非限定,在本申请实施例中,外存130可以为非易失性存储器、磁盘、光盘、U盘(也称USB闪存盘)或者安全数码卡(Secure Digital Memory Card,SD Card)等等。其中,非易失性存储器可以包括以下存储器中的至少一种:只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)和闪存(FLASH)。另外,磁盘可以是硬盘(Hard Disk)或者是软盘(Soft Disk),该硬盘可以包括:固态硬盘(Solid State Drive,SSD)、混合硬盘(Hybrid Hard Drive,HHD)以及机械硬盘(Hard Disk Drive,HDD)等等。
应理解,以上列举的计算机设备1的结构仅为示例性说明,本申请并未限定于此,本申请实施例的计算机设备1包括现有技术中计算机***中的各种软件模块或者硬件模块,例如,对于硬件模块来讲,计算机设备1还包括:通信装置、传感器装置以及各种功能的外设装置等等。
对于上述计算机设备1,内存120的存储空间主要影响计算机设备1的运行速度,因此,该内存120也可称之为“运存”。而外存130的存储空间主要影响计算机设备1存储文件数据的能力,该外存130的存储空间可理解为计算机设备1中用于存储文件数据的存储空间。
作为一种示例,在计算机设备1为手机的情况下,其外存130可以为非易失性存储器,例如FLASH等等。该非易失性存储器设置于计算机设备1的内部,受限于制造成本等多种因素,该非易失性存储器的存储空间具有一定的限制。随着手机使用时间的增长,该非易失性存储器中存储的文件越来越多,该非易失性存储器的剩余存储空间不足,会造成手机卡顿的现象,从而影响用户对手机的使用体验。
当然,在其它示例中,计算机设备1也可以为其它类型的设备,外存130也可以为其它类型的存储器。不论哪种类型的存储器,随着使用时间的增长,其均会面临存储空间不足的情况,导致用户对计算机设备1的使用体验不佳。
为了解决上述问题,云盘(或者也可称网盘)服务应运而生。用户为了使用该云盘服务,需要在计算机设备1中下载特定的云盘应用程序。该云盘应用程序位于计算机设备的用户空间中,且用于实现将计算机设备1的本地存储器(例如外存130)以及云盘之 间的文件数据交互。在该过程中,云盘应用程序需要不断的调用***调用接口210以进入内核空间,以实现对本地存储器中文件的访问,该过程***资源的开销较大,会影响***运行效率。另外,在该方式中,使用云盘服务需要下载特定的云盘应用程序,该方式不具有通用性且用户使用体验也较差。
鉴于此,本申请提供一种文件的操作装置,能够解决上述计算机设备的***运行效率较低且云盘服务通用性较差的技术问题。
图3示出了本申请实施例提供的一种文件的操作装置300的示意性结构框图。该操作装置300适用于计算机设备,且该计算机设备配置有本地存储器和云端存储器。
如图3所示,在本申请实施例中,操作装置300包括:被配置为运行于计算机设备的内核空间的文件管理***310和文件操作***320。其中,文件管理***310被配置为根据文件的第一搬迁命令,将该文件的文件数据由本地存储器搬迁至云端存储器。文件操作***320被配置为根据文件的操作命令,对云端存储器中该文件的文件数据进行操作。
具体地,在本申请实施例中,计算机设备配置有本地存储器,该本地存储器用于存储计算机设备中各种文件的文件数据。可选地,该本地存储器可以为上文图2所示实施例中的外存130,该本地存储器包括但不限于是以下各存储器中的至少一种:非易失性存储器、磁盘、光盘、U盘或者安全数码卡。
另外,在本申请实施例中,计算机设备还配置有云端存储器,该云端存储器为计算机设备能够通过网络连接并访问的网络存储工具。作为示例而非限定,该云端存储器可以网盘或者云盘。
该云端存储器具有大的存储空间,可以较大程度的扩展计算机设备的存储容量,提升用户对于计算机设备的使用体验。另外,随着目前通信网络的快速发展和5G时代的到来,计算机设备与云端存储器之间的数据传输速度也会越来越快,计算机设备与云端存储器之间的文件数据传输速度也会得到大幅提升,不会影响用户对云端存储器中文件数据的访问和使用。
具体地,本申请实施例提供的文件的操作装置300可为一种计算机程序存储介质,其中存储有文件管理***310和文件操作***320,该文件管理***310和文件操作***320可以为针对文件处理的计算机程序代码,且该文件管理***310和文件操作***320被配置为运行于计算机设备的内核空间。具体地,该文件管理***310和文件操作***320的计算机程序代码被计算机设备的处理器运行时,该计算机程序代码位于计算机设备的内核空间。
其中,文件管理***310被配置为根据文件的第一搬迁命令,将该文件的文件数据由本地存储器搬迁至云端存储器。具体地,文件管理***310被配置为根据文件的第一搬迁命令,访问本地存储器中该文件所在的存储空间,并执行将文件的文件数据由本地存储器搬迁至云端存储器。可选地,在搬迁过程中,被搬迁文件的文件数据由本地存储器拷贝至云端存储器,且本地存储器中存储该文件的文件数据的存储空间被释放,即原本存储有该文件的文件数据的存储空间后续可用于存储其它数据,例如存储其它文件的文件数据。
可选地,该用于搬迁的文件可以是本地存储器中存储的任意文件,或者,该文件也可以是本地存储器中存储的特定文件。
可选地,在本申请实施例中,该用于搬迁的文件可用于存储不同类型的信息,如源程序或可执行程序、数字或文本数据、照片、音乐、视频等等。本申请实施例对于文件的具体类型不做限定。
作为示例而非限定,该用于搬迁的文件可以包括:访问频率小于预设频率的文件,和/或,文件大小小于预设大小的文件。通过该实施方式,将访问频率小于预设频率的文件,和/或,文件大小小于预设大小的文件搬迁至云端存储器,不会影响用户对本地存储器中访问频率较高的文件的访问,也能较大程度的提升本地存储器的剩余存储空间,以进一步提升用户对计算机设备的使用体验。
在文件管理***310实现将文件的文件数据由本地存储器搬迁至云端存储器后,进一步地,文件操作***320被配置为根据文件的操作命令,对该云端存储器中的该文件的文件数据进行操作。
可选地,作为示例而非限定,该文件的操作命令可以包括:读(read)命令,写(write)命令等等。为了实现对该文件的操作,该文件的操作命令除了能够指示操作类型以外,还可包括:用于指示文件的文件信息。作为示例而非限定,该文件信息可以包括:文件名、文件路径等等。
作为示例,在文件的操作命令为读命令的情况下,文件操作***320被配置为从云端存储器中读取该文件的文件数据,并传递给上层***从而将文件数据返回给用户。又例如,在文件的操作命令为写命令的情况下,该文件操作***320被配置为根据本地输入的文件数据,重新在云端存储器中写入该文件的文件数据。
相比于通过位于用户空间的特定应用程序(APP)实现对云端存储器中文件数据操作的技术方案,在本申请实施例的技术方案中,通过位于计算机内核空间的文件管理***310和文件操作***320执行对本地存储器中文件数据的搬迁以及云端存储器中文件数据的操作,能够避免因***调用造成的***资源浪费,也不需要额外在用户空间装载特定应用程序。
可选地,在一些实施方式中,上述操作装置300中的文件管理***310和文件操作***320可经由计算机设备内核中的上层***调用以实现对文件数据的搬迁以及操作。可选地,该操作装置300的上层***包括但不限于是虚拟文件***(VFS),该VFS接收到来自用户空间的文件的搬迁命令或操作命令后,调用本申请实施例中的操作装置300中的文件管理***310或文件操作***320,以使得操作装置300中的文件管理***310根据文件的搬迁命令实现对本地存储器至云端存储器的文件数据搬迁,或者使得文件操作***320根据文件的操作命令实现对云端存储器中文件数据的操作。
综上,通过本申请实施例的技术方案,文件的操作装置300包括被配置为运行于计算机设备的内核空间的文件管理***310和文件操作***320。通过该文件管理***310,能够实现文件的文件数据由本地存储器搬迁云端存储,可以提升计算机设备整体的存储容量,提升用户对计算机设备的使用体验。通过该文件操作***320,能够执行对云端存储器中文件的文件数据的操作,避免因***调用造成的***资源浪费,也不需要额外在用户空间装载特定应用程序,从而可以提升计算机设备的运行效率,也可以提升计算机设备对于云端存储器使用的通用性,以进一步提升用户对于计算机设备的使用体验。
图4示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图4所示,在本申请实施例中,上述文件操作***320可以包括:操作执行子系 统321和缓存管理子***322。其中,该操作执行子***321被配置为获取文件的操作命令,并根据该操作命令调用缓存管理子***322。该缓存管理子***322被配置为通过计算机设备内存中的缓存(cache)空间对云端存储器中该文件的文件数据进行操作。
具体地,在本申请实施例中,操作装置300中的文件操作***320可以包括两个子***,其中,操作执行子***321可以理解为缓存管理子***322的上层***,其被配置为获取更上层***传递的文件的操作命令,并根据该操作命令调用缓存管理子***322。
缓存管理子***322被配置为对计算机设备内存中的缓存空间进行管理。具体地,该缓存空间可以为计算机设备的内存中的局部存储空间,因此,计算机设备能够较为快速的从该缓存空间中进行数据的读写。
鉴于此,在本申请实施例中,缓存管理子***322被配置为通过该缓存空间对云端存储器中文件的文件数据进行操作。例如,操作执行子***321根据获取的第一文件的操作命令调用缓存管理子***322,该缓存管理子***322被配置为将云端存储器中第一文件的文件数据写入缓存空间,以使得该第一文件的文件数据由缓存空间中读出,或者,该缓存管理子***322被配置为将用户写入的第一文件的文件数据写入缓存空间,再将缓存空间中该第一文件的文件数据重新写入云端存储器。
通过本申请实施例的技术方案,操作执行子***321能够根据文件的操作命令调用缓存管理子***322,该缓存管理子***322被配置为通过计算机设备内存中的缓存空间对云端存储器中文件的文件数据进行操作,计算机设备对缓存空间的操作效率较高,因而通过本申请实施例的技术方案,可以提高计算机设备对文件数据的操作效率,从而提升用户对于计算机设备的使用体验。
可选地,在一些实施方式中,文件的操作命令包括:读命令,缓存管理子***322包括:第一缓存管理子***。在该实施方式中,操作执行子***321被配置为根据该读命令调用缓存管理子***322中的第一缓存管理子***,该第一缓存管理子***被配置为从云端存储器中读取文件的文件数据,且将该文件的文件数据写入至缓存空间,以使得该文件的文件数据由该缓存空间中读出。
具体地,在该实施方式中,缓存管理子***322包括第一缓存管理子***,该第一缓存管理子***可为缓存管理子***322中的部分程序代码块。例如,当操作执行子***321获取文件的读命令后,其能够根据该文件的读命令调用缓存管理子***322中的第一缓存管理子***,该第一缓存管理子***可理解为处理该文件的读命令的专用程序代码块。
在该实施方式的技术方案中,缓存管理子***322中具有独立的第一缓存管理子***,其便于被上层的操作执行子***321调用,且被配置为通过内存中的缓存空间处理文件的读命令。因此,通过该实施方式的技术方案,在提高计算机设备读取文件数据的效率的同时,还可以便于后续对于文件数据读取过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。
在上述实施例的基础上,可选地,该第一缓存管理子***还被配置为在缓存空间中同步存储上述文件的至少部分文件数据。
具体地,在该实施方式中,第一缓存管理子***除了被配置为从该缓存空间中读出文件的文件数据以外,该第一缓存管理子***还被配置为在该缓存空间中同步存储该文 件的至少部分文件数据。作为一种示例,在该文件的文件数据小于预设大小的情况下,第一缓存管理子***可以将该文件的全部文件数据均同步存储于缓存空间中。或者,在另一示例中,在该文件的文件数据大于或等于预设大小的情况下,第一缓存管理子***可以将该文件的部分文件数据同步存储于缓存空间中。
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分文件数据,而不需要实时的再次从云端存储器中读取该文件的文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。
图5示出了本申请另一实施例提供的操作装置300的示意性结构框图。
如图5所示,在本申请实施例中,操作装置300还包括网络协议***330,第一缓存管理子***3221被配置为调用该网络协议***330以从云端存储器中读取文件的文件数据。
具体地,该网络协议***330可以用于实现本地文件数据至网络协议数据包之间的转换,以使得该网络协议数据包能够通过网络协议实现计算机设备本地与云端存储器之间的数据传输。作为示例而非限定,该网络协议包括但不限于是超文本传输协议(Hyper Text Transfer Protocol,HTTP)。
作为一种示例,在本申请实施例中,待从云端存储器中读取的文件为第一文件,即操作执行子***321获取的文件的读命令为第一文件的读命令。第一缓存管理子***3221被配置为调用网络协议***330,该网络协议***330能够从第一缓存管理子***3221中获取用于指示该第一文件的文件信息,并将用于指示该第一文件的文件信息封装为请求命令网络数据包,然后将该请求命令网络数据包发送至云端存储器。
该云端存储器接收到该请求命令网络数据包后,能够根据该请求命令网络数据包中携带的文件信息确定其中存储的第一文件的文件数据。然后,云端存储器将携带有第一文件的文件数据的文件网络数据包再发送至计算机设备本地。计算机设备本地的网络协议***330获取该文件网络数据包后,对其解析得到第一文件的文件数据,第一缓存管理子***3221将该解析得到的第一文件的文件数据写入至缓存空间,并进一步地从该缓存空间中读取第一文件的文件数据至上层。
相比于在用户空间实现网络协议,用户空间与内核空间具有频繁的切换频率的技术方案,通过本申请实施例的技术方案,在计算机设备的内核设置网络协议***330以实现网络协议,例如HTTP协议,并通过该网络协议***330实现计算机设备本地与云端存储器之间的数据传输,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。
可选地,在本申请实施例中,第一缓存管理子***3221还被配置为判断文件的文件数据是否存在于本地存储器,在确定该文件的文件数据不存在于本地存储器的情况下,第一缓存管理子***3221被配置为从云端存储器中读取该文件的文件数据。
具体地,在本申请实施例中,在操作执行子***321获取文件的读命令,并根据该读命令调用第一缓存管理子***3221后,该第一缓存管理子***3221可先访问本地存储器,判断该本地存储器中是否存在该文件的文件数据。
在确定该文件的文件数据存在于本地存储器的情况下,该第一缓存管理子***3221 被配置为调用计算机设备的内核中的本地文件***(例如,上文图2中所示的文件***250),以从该本地存储器中读取该文件的文件数据。
在该文件的文件数据不存在于本地存储器时,该第一缓存管理子***3221再从云端存储器中读取该文件的文件数据,并将该文件数据写入至缓存空间,从而便于计算机设备将该缓存空间中的文件数据读出并返回给用户。
当文件的文件数据由文件管理***310从本地存储器搬迁至云端存储器后,在一些情况下,用户会对本地存储器中该文件的文件数据进行更新,在该情况下,本地存储器中存储的文件数据为较为准确的文件数据。
因此,通过本申请实施例的技术方案,在操作装置300被配置为获取文件的读命令后,不是直接从云端存储器中读取该文件的文件数据,而是先判断该文件的文件数据是否存在于本地存储器,防止在本地存储器具有更新的文件数据的情况下,从云端存储器中读取到失效的文件数据。通过该方案,能够避免***资源的浪费且能进一步提高用户对操作装置300所在的计算机设备的使用体验。
可选地,在上文实施例的基础上,该第一缓存管理子***3221还被配置为判断文件的文件数据是否存在于云端存储器。在确定该文件的文件数据存在于云端存储器的情况下,第一缓存管理子***3221被配置为判断该文件的文件数据是否存在于本地存储器。
即在本实施方式中,第一缓存管理子***3221在判断文件的文件数据是否存在于本地存储器之前,该第一缓存管理子***3221会先判断文件的文件数据是否存在于云端存储器,在确定文件的文件数据存在于云端存储器的情况下,第一缓存管理子***3221再判断文件的文件数据是否还存在于本地存储器。通过该技术方案,第一缓存管理子***根据该双重判断,可以较为准确确定待读取文件的文件数据的具***置,从而提升操作装置及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。
在确定文件的文件数据不存在于云端存储器的情况下,第一缓存管理子***3221也可被配置为调用计算机设备的内核中的本地文件***(例如,上文图2中所示的文件***250),以从该本地存储器中读取该文件的文件数据。
通过本申请实施例的技术方案,第一缓存管理子***3221被配置为判断文件的文件数据是否存在于云端存储器,根据判断结果,第一缓存管理子***3221能够执行不同的动作,从而准确的对文件的文件数据进行读取,提升操作装置300及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。
可选地,在一些可能的实施方式中,第一缓存管理子***3221被配置为访问本地存储器,并在本地存储器中检查文件的搬迁标记,根据该文件的搬迁标记,判断该文件的文件数据是否存在于云端存储器。
具体地,在该实施方式中,若本地存储器中的文件已被文件管理***310搬迁至云端存储器,则可在本地存储器中写入搬迁标记,用于标识文件的文件数据已被搬迁至云端存储器。因而,在操作执行子***321获取该文件的操作命令,且调用第一缓存管理子***3221后,该第一缓存管理子***3221能够在本地存储器中检查该文件的搬迁标记,并根据该搬迁标记的检查结果,判断该文件的文件数据是否存在于云端存储器,从而进一步的执行后续操作。
在本申请实施例的技术方案中,文件操作***320被配置为根据文件的操作命令, 在本地存储器中检查文件的搬迁标记,以判断该文件的文件数据是否已搬迁至云端存储器,从而进一步实现对该文件的文件数据的操作。整个技术方案对用户屏蔽了文件数据的所在位置,可通过运行于内核空间的文件操作***320访问本地存储器并在本地存储器中检查文件的搬迁标记,从而确定该文件的文件数据的具***置。通过该技术方案,能够保持计算机设备原生的用户空间,不涉及用户空间中原生的服务改动,避免了需要在用户空间区分文件的所在位置,从而提升用户对计算机设备的使用体验。
图6示出了本申请另一实施例提供的操作装置300的示意性结构框图。
如图6所示,在本申请实施例中,上述文件的操作命令包括第一写命令,上述缓存管理子***322包括:第二缓存管理子***3222,其中,操作执行子***321被配置为根据文件的第一写命令调用该第二缓存管理子***3222,该第二缓存管理子***3222被配置为将缓存空间中用户写入的该文件的新文件数据写入至云端存储器,以覆盖云端存储器中该文件的原有文件数据。
具体地,在本申请实施例中,第二缓存管理子***3222可为缓存管理子***322中的部分程序代码块。具体地,当操作执行子***321被配置为获取文件的第一写命令后,其能够根据该文件的第一写命令调用缓存管理子***322中的第二缓存管理子***3222,该第二缓存管理子***3222可理解为处理该文件的第一写命令的专用程序代码块。
在该实施方式的技术方案中,缓存管理子***322中具有独立的第二缓存管理子***3222,其便于被上层的操作执行子***321调用,且被配置为通过内存中的缓存空间处理文件的第一写命令。因此,通过该实施方式的技术方案,在提高计算机设备在云端存储器中写入文件数据的效率的同时,还可以便于后续对于文件数据写入过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。
可选地,在一些实施方式中,该第二缓存管理子***3222还被配置为在缓存空间同步存储该文件的至少部分新文件数据。
具体地,在该实施方式中,第二缓存管理子***3222除了被配置为将缓存空间中用户写入的文件的新文件数据写入至云端存储器以外,该第二缓存管理子***3222还被配置为在该缓存空间中同步存储该文件的至少部分文件数据。作为一种示例,在该文件的新文件数据小于预设大小的情况下,第二缓存管理子***3222可以将该文件的全部新文件数据均同步存储于缓存空间中。或者,在另一示例中,在该文件的新文件数据大于或等于预设大小的情况下,第二缓存管理子***3222可以将该文件的部分新文件数据同步存储于缓存空间中。
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分新文件数据,而不需要实时的再次从云端存储器中读取该文件的新文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。
可选地,如图6所示,在本申请实施例中,第二缓存管理子***3222可被配置为调用网络协议***330以将缓存空间中文件的新文件数据写入至云端存储器。
作为一种示例,在本申请实施例中,操作执行子***321被配置为获取的文件的第一写命令以调用第二缓存管理子***3222。该第二缓存管理子***3222被配置为调用网络协议***330,该网络协议***330能够将缓存空间中用户写入的文件的新文件数据封装为文件网络数据包,然后将该文件网络数据包发送至云端存储器。
该云端存储器接收到该文件网络数据包后,能够对该文件网络数据包进行解析得到文件的新文件数据,该云端存储器存储该新文件数据且该新文件数据覆盖云端存储器中该文件的原文件数据。
可选地,在上述申请实施例中,待写入云端存储器的文件为访问频率低于预设阈值的冷文件,第一写命令为对应于冷文件的写命令。
通过该实施方式的技术方案,对于访问频率较低的冷文件,操作装置300中的操作执行子***321可被配置为获取针对于该冷文件的第一写命令,将该冷文件的文件数据直接写入云端存储器,在通过云端存储器保存该冷文件的文件数据的同时,避免该冷文件的文件数据占用计算机设备的本地存储器的存储空间,从而优化计算机设备的整体性能。
图7示出了本申请另一实施例提供的操作装置300的示意性结构框图。
如图7所示,在本申请实施例中,文件的操作命令包括第二写命令,上述缓存管理子***322包括:第三缓存管理子***3223,其中,操作执行子***321被配置为根据文件的第二写命令调用该第三缓存管理子***3223,该第三缓存管理子***3223被配置为将缓存空间中用户写入的文件的新文件数据写入至本地存储器,并删除云端存储器中该文件的文件数据。
具体地,在本申请实施例中,该第三缓存管理子***3223可为缓存管理子***322中的部分程序代码块。具体地,当操作执行子***321被配置为获取文件的第二写命令后,其能够根据该文件的第二写命令调用缓存管理子***322中的第三缓存管理子***3223,该第三缓存管理子***3223可理解为处理该第一文件的第二写命令的专用程序代码块。
在该实施方式的技术方案中,缓存管理子***322中具有独立的第三缓存管理子***3223,其便于被上层的操作执行子***321调用,且被配置为通过内存中的缓存空间处理文件的第二写命令。具体地,该第三缓存管理子***3223能够调用计算机设备的本地文件***,以将缓存空间中用户写入的文件的新文件数据写入至本地存储器,且该第三缓存管理子***3223还能调用网络协议***330以删除云端存储器中该文件的原有文件数据。
因此,通过该实施方式的技术方案,在提高计算机设备在本地存储器中写入文件数据的效率的同时,也可以便于后续对于文件数据写入过程中出现的问题的定位,进一步提升操作装置300及其所在计算机设备的使用可靠性。
可选地,在上述申请实施例中,待写入本地存储器的文件为访问频率不低于预设阈值的热文件,第二写命令为对应于热文件的写命令。
通过该实施方式的技术方案,对于访问频率较高的热文件,操作装置300中的操作执行子***321可获取针对于该热文件的第二写命令,将该热文件的文件数据直接写入本地存储器且删除云端存储器中该热文件的原有文件数据。一方面,通过该技术方案,可以便于后续用户能够直接对本地存储器中热文件的文件数据进行操作,提升用户对热文件的操作速度。另一方面,云端存储器中不再存储有该热文件的文件数据,也能充分利用云端存储器中的存储空间存储更多的其它文件数据。
图8示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图8所示,在本申请实施例中,计算机设备的用户空间设置有筛选***,上述文 件操作***320还包括:信息统计子***323。该信息统计子***323被配置为统计文件操作***320打开的打开文件的文件信息,该文件信息用于反馈给筛选***,以使得该筛选***根据该文件信息确定打开文件是否为需要搬迁至云端存储器的文件。文件管理***310被配置为接收该筛选***发送的文件的搬迁命令。
具体地,在本申请实施例中,文件操作***320中可包括用于统计打开文件的文件信息的信息统计子***323,其中,该打开文件的文件信息可以包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。筛选***根据该打开文件的文件信息可确定该打开文件是否需要搬迁至云端存储器。在筛选***确定打开文件需要搬迁至云端存储器的情况下,该筛选***可向内核发送该文件的搬迁命令,以使得内核中的文件管理***310接收该筛选***发送的文件的搬迁命令。
作为示例而非限定,上述筛选***可以为人工智能***,其中,该人工智能***包括但不限于是:神经网络。通过该实施方式的技术方案,人工智能***可以根据特定需求,对本地存储器中的文件起到良好的筛选作用。
综上,在本申请实施例的技术方案中,被文件管理***310搬迁至云端存储器中的文件不是本地存储器中的随机文件,而是经由筛选***根据信息统计子***323统计得到的打开文件的文件信息确定得到的文件,该筛选***能够结合文件信息确定得到的文件更为适宜搬迁至云端存储器,因此,通过该技术方案,能够更大程度优化本地存储设备中文件数据的存储,提升计算机设备的整体性能。
可选地,在一些实施方式中,上述需要搬迁至云端存储器的文件为热文件。
具体地,上述打开文件的文件信息用于反馈给筛选***,以使得该筛选***根据该文件信息确定打开文件为热文件或者为冷文件,从而确定该打开文件是否为需要搬迁至云端存储器的文件。
可选地,打开文件的文件信息可至少包括:打开次数或打开频率,该筛选***可根据该打开次数或打开频率确定打开文件为热文件或冷文件。在打开文件为打开次数或打开频率较高的热文件的情况下,筛选***可确定该热文件不为需要搬迁至云端存储器的文件,反之,在打开文件为打开次数或打开频率较低的冷文件的情况下,筛选***可确定该冷文件为需要搬迁至云端存储器的文件。
通过本申请实施例的技术方案,利用筛选***确定热文件,且利用文件管理***将该热文件搬迁至云端存储器,该技术方案不会影响用户对本地存储器中访问频率较高的热文件的访问,也能较大程度的提升本地存储器的剩余存储空间,以进一步提升用户对计算机设备的使用体验。
图9示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图9所示,在本申请实施例中,上述文件管理***310可以包括:指令处理子***311和执行子***312。其中,该指令处理子***311被配置为获取文件的搬迁命令,且根据该搬迁命令调用执行子***312。该执行子***312被配置为执行该文件的文件数据在本地存储器与云端存储器之间的传输。
具体地,在本申请实施例中,操作装置300中的文件管理***310可以包括两个子***,其中,指令处理子***311可以理解为执行子***312的上层***,其用于获取上层***传递的文件的搬迁命令,并根据该搬迁命令调用执行子***312,该执行子***312可理解为用于执行在本地存储器与云端存储器之间传输文件数据的功能***。
图10示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图10所示,操作装置300还包括:网络协议***330。其中,执行子***312被配置为调用该网络协议***330以执行文件的文件数据在本地存储器与云端存储器之间的传输。
具体地,在一些实施方式中,执行子***312可调用网络协议***330,将本地存储器中待搬迁文件的文件数据封装为文件网络数据包,该文件网络数据包通过网络协议传输至云端存储器,以使得该云端存储器能够存储该待搬迁文件的文件数据。
或者,在另一些实施方式中,执行子***312可调用网络协议***330,将用于指示待搬迁文件的文件信息封装为请求命令网络数据包,然后将该请求命令网络数据包发送至云端存储器,以使得该云端存储器能够根据该请求命令网络数据将待搬迁文件的文件数据封装为文件网络数据包,并将该文件网络数据包发回至网络协议***330,网络协议***330获取该文件网络数据包后,对其解析得到待搬迁文件的文件数据,执行子***312用于将该待搬迁文件的文件数据存储于本地存储器。
可选地,该执行子***312与网络协议***330的相互配合能够实现文件数据的整体搬迁,即将待搬迁文件的全部文件数据整体封装为文件网络数据包,从而使得该文件能够一次性完整的传输搬迁至云端存储器或本地存储器,防止搬迁过程中出现异常影响文件数据的存储。
通过本申请实施例的技术方案,在计算机设备的内核设置网络协议***330以实现网络协议,例如HTTP协议,并通过该网络协议***330实现计算机设备本地与云端存储器之间的文件搬迁,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。
图11示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图11所示,在本申请实施例中,文件管理***310包括:指令处理子***311和第一执行子***3121。其中,指令处理子***311被配置为获取文件的第一搬迁命令,且根据该第一搬迁命令调用第一执行子***3121。该第一执行子***3121被配置为将文件的文件数据由本地存储器传输至云端存储器。在该实施例中,第一执行子***3121可以为上述图10中执行子***312中的部分程序代码块。
通过该实施方式的技术方案,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,方便于用户通过云端对该文件数据的使用,提升用户的使用体验。另外,通过该实施方式的技术方案,该第一执行子***3121便于被上层的指令处理子***311调用,且执行文件数据由本地存储器至云端存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。
可选地,在本申请实施例中,第一执行子***3121被配置为调用上文实施例中的网络协议***330以将本地存储器中文件的文件数据传输至云端存储器。
可选地,如图11所示,在本申请实施例中,上述文件管理***310还包括:本地管理子***313,该本地管理子***313被配置为释放文件的文件数据在本地存储器中占用的存储空间,且在该本地存储器中写入该文件的搬迁标记,该搬迁标记用于指示该文件的文件数据已搬迁至云端存储器。
具体地,在本申请实施例中,在文件管理***310中的第一执行子***3121将文件的文件数据由本地存储器传输至云端存储器的情况下,该文件管理***310中的本地管理子***313用于释放该文件的文件数据在本地存储器中占用的存储空间。例如,本地管理子***313可将该文件的文件数据大小截断为零,以释放该文件数据占用的存储空间。
进一步地,该本地管理子***313还用于在本地存储器中写入该文件的搬迁标记,该搬迁标记用于指示该文件的文件数据已搬迁至云端存储器。在计算机设备后续运行过程中,若用户需要对该文件的文件数据进行操作,可首先在本地存储器中检查该文件的搬迁标记,并根据该搬迁标记的检查结果,对该文件的文件数据进行操作。
通过本申请实施例的技术方案,该本地管理子***313能够释放已被传输至云端存储器的文件数据在本地存储器中占用的存储空间,从而节省本地存储器中的存储空间,保证本地存储器具有较为充足的剩余存储空间,不会造成计算机设备的卡顿,提升用户对计算机设备的使用体验。与此同时,在第一执行子***3121将本地存储器中文件的文件数据传输至云端存储器之后,本地管理子***313还在本地存储器中写入了该文件的搬迁标记,使得用户后续在对该文件的操作中,计算机设备仍然能够根据用户的操作命令访问本地存储器,且根据该本地存储器中的搬迁标记,对存储于云端存储器中的文件数据进行正常操作,以进一步提升用户对计算机设备的使用体验。
可选地,在一些实施方式中,上述第一执行子***3121还被配置为:判断文件的文件数据是否存在于云端存储器。在确定该文件的文件数据不存在于云端存储器的情况下,第一执行子***3121被配置为将本地存储器中文件的文件数据传输至云端存储器。
具体地,在该实施方式中,当指令处理子***311接收文件的第一搬迁命令,且调用第一执行子***3121后,该第一执行子***3121首先确定该文件是否已存在于云端存储器,在确定该文件不存在于云端存储器的情况下,可确定当前接收的第一搬迁命令为有效搬迁命令,执行后续将本地存储器中该文件的文件数据传输至云端存储器。反之,在确定该文件已存储于云端存储器的情况下,则说明当前接收的第一搬迁命令为错误命令,不执行后续动作。
作为示例而非限定,该第一执行子***3121可通过检查本地存储器中是否存在该文件的搬迁标记,以判断该文件是否已存在于云端存储器。通过该实施方式,可以便捷的对本地存储器进行访问,且根据其中的搬迁标记判断当前待搬迁的文件是否存在于云端存储器,整个方案易于实施且判断速度较快。当然,在其它示例中,第一执行子***3121还可通过其它方式判断待搬迁的文件是否已存在于云端存储器,本申请实施例对该具体的判断方式不做限定。
通过该实施方式的技术方案,第一执行子***3121在根据文件的第一搬迁命令执行对文件的文件数据搬迁之前,判断该文件的文件数据是否存在于云端存储器,从而防止在错误的第一搬迁命令下,重复或无效的执行对文件数据的搬迁,造成***资源的浪费且影响文件的存储性能。通过该实施方式的技术方案,第一执行子***3121具有防错机制,能够应对异常指令,因而,可以提高该操作装置300及其所在计算机设备的整体性能。
图12示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图12所示,在本申请实施例中,文件管理***310还包括:第二执行子***3122。 其中,指令处理子***311被配置为获取文件的第二搬迁命令,且根据该第二搬迁命令调用第二执行子***3122。该第二执行子***3122被配置为将文件的文件数据由云端存储器传输至本地存储器。在该实施例中,第二执行子***3122可以为上述图10中执行子***312中的部分程序代码块。
具体地,在本申请实施例中,与上述第一搬迁命令相反,该第二搬迁命令用于指示将该文件的文件数据由云端存储器搬迁至本地存储器,且执行子***312包括独立的第二执行子***3121,其被上层的指令处理子***311调用,并执行上述第二搬迁命令。
通过本申请实施例的技术方案,该第二执行子***3122便于被上层的指令处理子***311调用,且执行文件数据由云端存储器至本地存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,进一步提升操作装置300及其所在计算机设备的使用可靠性。另外,云端存储器与本地存储器之间的文件数据相互传输,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,有利于实现该云端存储器中的数据在多设备中进行共享,方便于用户通过不同设备对该文件数据的使用,提升用户的使用体验。
可选地,在本申请实施例中,第二执行子***3122能够调用上文实施例中的网络协议***330以实现将云端存储器中文件的文件数据传输至本地存储器。
可选地,如图12所示,在本申请实施例中,上述文件管理***310还包括:上述本地管理子***313,该本地管理子***313被配置为在本地存储器中删除该文件的搬迁标记。
具体地,在本申请实施例中,在将云端存储器中文件的文件数据传输至本地存储器后,可在本地存储器中标识该文件的文件数据未被搬迁。例如,可删除本地存储器中用于标识该文件已被搬迁至云端存储器的搬迁标记。
通过该申请实施例的技术方案,在第二执行子***3122将文件的文件数据由云端存储器传输至本地存储器的情况下,本地管理子***313还可将删除该文件的搬迁标记,以便于后续在对该文件的文件数据进行操作的过程中,可以在本地存储器中检查搬迁标记,准确确定文件数据所在的位置,进而执行有效的后续操作。
图13示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。
如图13所示,在本申请实施例中,操作装置300可包括:文件管理***310、文件操作***320以及网络协议***330。
具体地,文件管理***310可包括:指令处理子***311、执行子***312以及本地管理子***313。另外,文件操作***320可包括:操作执行子***321、缓存管理子***322以及信息统计子***323。
在本申请实施例中,文件管理***310中的各子***、文件操作***320中的各子***、以及网络协议***330可被配置为执行上文图3至图12所示实施例的相关功能,具体方案可参见上文实施例的相关描述,此处不做过多赘述。
另外,参见图13所示,文件管理***310可与文件操作***320产生交互。作为示例,文件管理***310中的本地管理子***313在向本地存储器写入搬迁标记或删除搬迁标记时,该文件管理***310可调用文件操作***320以执行在本地存储器中写入搬迁标记或删除搬迁标记。
可选地,在一些实施方式中,该文件管理***310和文件操作***320可位于图2 中所示的虚拟文件***(VFS)240的下层,两者能够接收VFS 240发送的相关信息,以执行相应的功能。
可选地,在本申请实施例中,文件的操作装置300所在的计算机设备除了可包括如图13中所示的各功能***以外,还可以进一步包括如图2中所示的相关功能模块。
图14示出了本申请实施例提供的一种计算机设备3的示意性结构框图。
如图14所示,该计算机设备3被配置为连接于云端存储器以及本地存储器,该计算机设备3包括:上文任一实施例中的文件的操作装置300。
具体地,在本申请实施例中,云端存储器包括但不限于是云盘或者网盘。本地存储器包括但不限于是非易失性存储器、磁盘、光盘、U盘或者安全数码卡。
另外,文件的操作装置300可以为一种计算机程序存储介质,其中存储有运行于计算机设备3的内核空间的文件管理***310以及文件操作***320。
可选地,该计算机设备3还可包括处理器,其用于调用操作装置300中的文件管理***310以及文件操作***320,以执行对云端存储器和本地存储器中文件的相关操作。
可选地,该计算机设备3包括但不限于是终端设备,例如,手机、个人计算机等等。
图15示出了本申请实施例提供的一种文件的操作设备4的示意性结构框图。
如图15所示,该文件的操作设备4包括:云端存储器410、本地存储器420以及上文任一实施例中的文件的操作装置300。
具体地,该云端存储器410、本地存储器420以及操作装置300的相关技术方案可以参见上文实施例的相关描述。
可选地,在一些实施方式中,云端存储器410可包括:信息处理器和文件数据存储器,该信息处理器被配置为对来自操作装置300的信息数据进行处理,并根据处理后的信息数据对该文件数据存储器进行操作。
作为示例,操作装置300中文件管理***310和文件操作***320形成的信息数据可发送至云端存储器410中的信息处理器411,例如,该信息数据可以为请求命令网络包或者文件网络数据包。该信息处理器411可根据网络协议对该请求命令网络包或者文件网络数据包进行数据解析,以得到请求命令数据或者文件数据。进一步地,该信息处理器411能够根据解析得到的请求命令数据从文件数据存储器412中读取文件数据,或者,该信息处理器411能够将解析得到的文件数据存储到文件数据存储器412。
上述实施例,全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令或计算机程序。在计算机上加载或执行所述计算机指令或计算机程序时,全部或部分地产生按照本申请实施例所述的流程或功能。
可选地,所述计算机为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令能够存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。
所述计算机可读存储介质是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质,例如固态硬盘。
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示存在三种关系,例如,A和/或B,表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c是单个或者多个。
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
本领域普通技术人员能够意识到,结合本文中所公开的实施例描述的各示例的***及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员能够对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的几个实施例中,应该理解到,所揭露的***和装置,能够通过其它的方式实现。
例如,以上所描述的装置实施例仅仅是示意性的,例如,所述***的划分,仅仅为一种逻辑功能划分,实际实现时能够有另外的划分方式,例如多个模块或组件结合或者集成到另一个***,或一些特征能够被忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接是通过一些接口,装置或模块的间接耦合或通信连接,是电性,机械或其它的形式。
可选地,在本申请各个实施例中的各功能***能够集成在一个处理装置中,可选地,是各个模块单独物理存在,或者两个或两个以上模块集成在一个模块中。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,能够存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分能够以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种能够存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。
Claims (25)
- 一种文件的操作装置,其特征在于,适用于计算机设备,所述计算机设备配置有本地存储器和云端存储器,所述操作装置包括:被配置为运行于所述计算机设备的内核空间的文件管理***和文件操作***;其中,所述文件管理***被配置为根据文件的第一搬迁命令,将所述文件的文件数据由所述本地存储器搬迁至所述云端存储器;所述文件操作***被配置为根据所述文件的操作命令,对所述云端存储器中所述文件的文件数据进行操作。
- 根据权利要求1所述的操作装置,其特征在于,所述计算机设备的内存具有缓存空间,所述文件操作***包括:操作执行子***和缓存管理子***;所述操作执行子***被配置为获取所述文件的操作命令,并根据所述操作命令调用所述缓存管理子***;所述缓存管理子***被配置为通过所述缓存空间对所述云端存储器中所述文件的文件数据进行操作。
- 根据权利要求2所述的操作装置,其特征在于,所述操作命令包括:读命令,所述缓存管理子***包括:第一缓存管理子***;所述操作执行子***被配置为根据所述读命令调用所述缓存管理子***中的第一缓存管理子***;所述第一缓存管理子***被配置为从所述云端存储器中读取所述文件的文件数据,并将所述文件的文件数据写入至所述缓存空间,以使得所述文件的文件数据由所述缓存空间读出。
- 根据权利要求3所述的操作装置,其特征在于,所述第一缓存管理子***还被配置为在所述缓存空间中同步存储所述文件的至少部分文件数据。
- 根据权利要求3或4所述的操作装置,其特征在于,所述操作装置还包括:网络协议***;所述第一缓存管理子***被配置为调用所述网络协议***以从所述云端存储器中读取所述文件的文件数据。
- 根据权利要求3至5中任一项所述的操作装置,其特征在于,所述第一缓存管理子***还被配置为判断所述文件的文件数据是否存在于所述本地存储器;在确定所述文件的文件数据不存在于所述本地存储器的情况下,所述第一缓存管理子***被配置为从所述云端存储器中读取所述文件的文件数据。
- 根据权利要求6所述的操作装置,其特征在于,所述第一缓存管理子***还被配置为判断所述文件的文件数据是否存在于所述云端存储器;在确定所述文件的文件数据存在于所述云端存储器的情况下,所述第一缓存管理子***被配置为判断所述文件的文件数据是否存在于所述本地存储器。
- 根据权利要求7所述的操作装置,其特征在于,在确定所述文件的文件数据不存在于所述云端存储器或确定所述文件的文件数据存在于所述本地存储器的情况下,所述第一缓存管理子***还被配置为调用所述计算机设备的本地文件***以从所述本地存储器中读取所述文件的文件数据。
- 根据权利要求7或8所述的操作装置,其特征在于,所述第一缓存管理子***被配置为访问所述本地存储器,并在所述本地存储器中检查所述文件的搬迁标记,根据所述文件的搬迁标记,判断所述文件的文件数据是否存在于所述云端存储器。
- 根据权利要求2至9中任一项所述的操作装置,其特征在于,所述操作命令包括:第一写命令,所述缓存管理子***包括:第二缓存管理子***;所述操作执行子***被配置为根据所述第一写命令调用所述第二缓存管理子***;所述第二缓存管理子***被配置为将所述缓存空间中用户写入的所述文件的新文件数据写入至所述云端存储器,以覆盖所述云端存储器中所述文件的文件数据。
- 根据权利要求10所述的操作装置,其特征在于,所述第二缓存管理子***还被配置为在所述缓存空间同步存储所述文件的至少部分新文件数据。
- 根据权利要求10或11所述的操作装置,其特征在于,所述文件为访问频率低于预设阈值的冷文件,所述第一写命令为对应于所述冷文件的写命令。
- 根据权利要求2至12中任一项所述的操作装置,其特征在于,所述操作命令包括:第二写命令,所述缓存管理子***包括:第三缓存管理子***;所述操作执行子***被配置为根据所述第二写命令调用所述第三缓存管理子***;所述第三缓存管理子***被配置为将所述缓存空间中用户写入的所述文件的新文件数据写入至所述本地存储器,并删除所述云端存储器中所述文件的文件数据。
- 根据权利要求13所述的操作装置,其特征在于,所述文件为访问频率不低于预设阈值的热文件,所述第二写命令为对应于所述热文件的写命令。
- 根据权利要求1至14中任一项所述的操作装置,其特征在于,所述计算机设备的用户空间设置有筛选***,所述文件操作***还包括:信息统计子***;所述信息统计子***被配置为统计所述文件操作***打开的打开文件的文件信息,所述文件信息用于反馈给所述筛选***,以使得所述筛选***根据所述文件信息确定所述打开文件是否为需要搬迁至所述云端存储器的所述文件;所述文件管理***被配置为接收所述筛选***发送的所述文件的搬迁命令。
- 根据权利要求15所述的操作装置,其特征在于,所述文件信息包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。
- 根据权利要求1至16中任一项所述的操作装置,其特征在于,所述文件管理***包括:指令处理子***和第一执行子***;所述指令处理子***被配置为获取所述文件的第一搬迁命令,且根据所述搬迁命令调用所述第一执行子***;所述第一执行子***被配置为将所述文件的文件数据由所述本地存储器传输至所述云端存储器。
- 根据权利要求17所述的操作装置,其特征在于,所述操作装置还包括:网络协议***;所述第一执行子***被配置为调用所述网络协议***以将所述文件的文件数据由所述本地存储器传输至所述云端存储器。
- 根据权利要求17或18所述的操作装置,其特征在于,所述文件管理***还包括:本地管理子***,所述本地管理子***被配置为释放所述文件的文件数据在所述本地存储器中占用的存储空间,且在所述本地存储器中写入所述文件的搬迁标记,所述搬 迁标记用于指示所述文件的文件数据已搬迁至所述云端存储器。
- 根据权利要求17至19中任一项所述的操作装置,其特征在于,所述第一执行子***还被配置为判断所述文件的文件数据是否存在于所述云端存储器;在确定所述文件的文件数据不存在于所述云端存储器的情况下,所述第一执行子***被配置为将所述本地存储器中所述文件的文件数据传输至所述云端存储器。
- 根据权利要求17至20中任一项所述的操作装置,其特征在于,所述文件管理***还包括:第二执行子***;所述指令处理子***还被配置为获取所述文件的第二搬迁命令,且根据所述搬迁命令调用所述第二执行子***;所述第二执行子***被配置为将所述文件的文件数据由所述云端存储器传输至所述本地存储器。
- 根据权利要求21所述的操作装置,其特征在于,所述操作装置还包括:本地管理子***,所述本地管理子***被配置为在所述本地存储器中删除所述文件的搬迁标记。
- 一种计算机设备,其特征在于,被配置为连接于云端存储器和本地存储器,所述计算机设备包括:如权利要求1至22中任一项所述的文件的操作装置。
- 一种文件的操作设备,其特征在于,包括:云端存储器、本地存储器以及如权利要求1至22中任一项所述的文件的操作装置。
- 根据权利要求24所述的操作设备,其特征在于,所述云端存储器包括:信息处理器和文件数据存储器,所述信息处理器被配置为对来自所述操作装置的信息数据进行处理,并根据处理后的信息数据对所述文件数据存储器进行操作。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/088274 WO2023201648A1 (zh) | 2022-04-21 | 2022-04-21 | 文件的操作装置、计算机设备和操作设备 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2022/088274 WO2023201648A1 (zh) | 2022-04-21 | 2022-04-21 | 文件的操作装置、计算机设备和操作设备 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023201648A1 true WO2023201648A1 (zh) | 2023-10-26 |
Family
ID=88418772
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/088274 WO2023201648A1 (zh) | 2022-04-21 | 2022-04-21 | 文件的操作装置、计算机设备和操作设备 |
Country Status (1)
Country | Link |
---|---|
WO (1) | WO2023201648A1 (zh) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295084A (zh) * | 2017-06-26 | 2017-10-24 | 深圳水晶石数字科技有限公司 | 一种基于云端的视频编辑***及方法 |
US20190243550A1 (en) * | 2018-02-06 | 2019-08-08 | Nutanix, Inc. | System and method for migrating storage while in use |
US10489344B1 (en) * | 2018-12-28 | 2019-11-26 | Nasuni Corporation | Cloud-native global file system with direct-to-cloud migration |
CN111628969A (zh) * | 2020-04-24 | 2020-09-04 | 山东电子职业技术学院 | 一种面向高性能科学计算的云计算方法 |
CN113238997A (zh) * | 2021-07-13 | 2021-08-10 | 云宏信息科技股份有限公司 | 终端设备用的云端数据操作方法、存储介质和终端设备 |
-
2022
- 2022-04-21 WO PCT/CN2022/088274 patent/WO2023201648A1/zh unknown
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107295084A (zh) * | 2017-06-26 | 2017-10-24 | 深圳水晶石数字科技有限公司 | 一种基于云端的视频编辑***及方法 |
US20190243550A1 (en) * | 2018-02-06 | 2019-08-08 | Nutanix, Inc. | System and method for migrating storage while in use |
US10489344B1 (en) * | 2018-12-28 | 2019-11-26 | Nasuni Corporation | Cloud-native global file system with direct-to-cloud migration |
CN111628969A (zh) * | 2020-04-24 | 2020-09-04 | 山东电子职业技术学院 | 一种面向高性能科学计算的云计算方法 |
CN113238997A (zh) * | 2021-07-13 | 2021-08-10 | 云宏信息科技股份有限公司 | 终端设备用的云端数据操作方法、存储介质和终端设备 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019201011A1 (zh) | ***的启动方法、装置、电子设备和存储介质 | |
US20190163364A1 (en) | System and method for tcp offload for nvme over tcp-ip | |
US9092426B1 (en) | Zero-copy direct memory access (DMA) network-attached storage (NAS) file system block writing | |
CN111930676B (zh) | 多处理器间的通信方法、装置、***及存储介质 | |
US10228993B2 (en) | Data dump for a memory in a data processing system | |
CN112671760A (zh) | 基于Socket的客户端跨平台网络通信方法及其相关设备 | |
CN108694135A (zh) | 用于在页高速缓存中持久性地高速缓存存储数据的方法和设备 | |
CN106708627A (zh) | 一种基于kvm的多虚拟机映射、多通路的fuse加速方法及*** | |
CN109359092B (zh) | 文件管理方法、桌面显示方法、装置、终端及介质 | |
WO2024113717A1 (zh) | 基于zns ssd的文件***控制方法、装置及设备 | |
CN114371811A (zh) | 用于存储管理的方法、电子设备和计算机程序产品 | |
CN105740413A (zh) | Linux平台上使用FUSE的文件移动方法 | |
US10783073B2 (en) | Chronologically ordered out-of-place update key-value storage system | |
CN114936189A (zh) | 应用程序的操作方法、装置、计算机设备和可读存储介质 | |
CN103902300B (zh) | 一种Android模拟器快速安装APK程序的方法及*** | |
WO2024119930A1 (zh) | 调度方法、装置、计算机设备和存储介质 | |
WO2021018052A1 (zh) | 一种垃圾回收方法及装置 | |
CN103617039A (zh) | 一种访问用户空间文件***的方法及装置 | |
WO2023201648A1 (zh) | 文件的操作装置、计算机设备和操作设备 | |
CN111782474A (zh) | 日志处理方法、装置、电子设备和介质 | |
WO2022242665A1 (zh) | 一种数据存储方法及相关装置 | |
US20230042551A1 (en) | Systems, methods, and apparatus for the management of device local memory | |
WO2023071043A1 (zh) | 文件聚合兼容方法、装置、计算机设备和存储介质 | |
CN115981892A (zh) | 日志读取方法、装置、电子设备及存储介质 | |
CN109254856A (zh) | 智能pos服务端提供接口给客户端的方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22937884 Country of ref document: EP Kind code of ref document: A1 |