WO2023201648A1 - File operation apparatus, computer device and operation device - Google Patents

File operation apparatus, computer device and operation device Download PDF

Info

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
Application number
PCT/CN2022/088274
Other languages
French (fr)
Chinese (zh)
Inventor
虎跃
秦涛
司马云瑞
邵俊骏
张文
葛世飞
裴鸿刚
Original Assignee
宇龙计算机通信科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宇龙计算机通信科技(深圳)有限公司 filed Critical 宇龙计算机通信科技(深圳)有限公司
Priority to PCT/CN2022/088274 priority Critical patent/WO2023201648A1/en
Publication of WO2023201648A1 publication Critical patent/WO2023201648A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information 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.

Abstract

Provided in the embodiments of the present application are a file operation apparatus, a computer device and an operation device, which can improve the system operating efficiency of a computer device and improve the use experience of a user. The file operation apparatus is suitable for a computer device, which is configured with a local memory and a cloud memory. The operation apparatus comprises: a file management system and a file operation system, which are configured to be run in a kernel space of a computer device, wherein the file management system is configured to migrate file data of a file from a local memory to a cloud memory according to a first migration command for the file; and the file operation system is configured to perform an operation on the file data of the file in the cloud memory according to an operation command for the file. By means of the technical solution, system resource waste caused by calling a system can be avoided, and it is not necessary to additionally install a specific application program, thereby improving the system operating efficiency of a computer device and improving the use experience of a user regarding the computer device.

Description

文件的操作装置、计算机设备和操作设备Document operating devices, computer equipment and operating equipment 技术领域Technical field
本申请涉及计算机技术领域,并且更为具体地,涉及一种文件的操作装置、计算机设备和操作设备。The present application relates to the field of computer technology, and more specifically, to a file operating device, computer equipment and operating equipment.
背景技术Background technique
随着科学技术的发展和提升,用户对于计算机设备的存储容量要求越来越高。为了解决计算机设备的本地存储容量较为有限的问题,目前市场上出现了多种云盘(Cloud Disk)服务方案。With the development and improvement of science and technology, users have increasingly higher requirements for the storage capacity of computer equipment. In order to solve the problem of limited local storage capacity of computer equipment, there are currently a variety of cloud disk (Cloud Disk) service solutions on the market.
在主流的云盘服务方案中,用户需要在其计算机设备中下载特定的应用程序(Application,App),通过该特定APP,用户才能实现计算机设备本地存储文件上传至特定的云端存储器。在计算机设备的软件系统架构中,用户下载的APP位于用户空间(User Space)中,对于该用户空间中部分指令的执行,需要通过系统调用进入内核空间(Kernel Space)执行内核代码才能实现,该系统调用造成系统资源的开销较大,会影响系统运行效率。且在该方式中,使用云盘服务需要下载特定的APP,该方式不具有通用性造成用户使用体验也较差。In mainstream cloud disk service solutions, users need to download a specific application (Application, App) in their computer devices. Through this specific APP, users can upload files stored locally on their computer devices to a specific cloud storage. In the software system architecture of computer equipment, the APP downloaded by the user is located in the user space (User Space). The execution of some instructions in the user space requires system calls to enter the kernel space (Kernel Space) to execute the kernel code. System calls cause a large overhead of system resources and affect system operating efficiency. And in this method, using the cloud disk service requires downloading a specific APP. This method is not universal and results in a poor user experience.
鉴于此,如何提高计算机设备的系统运行效率且提升用户的使用体验,是一项亟待解决的技术问题。In view of this, how to improve the system operating efficiency of computer equipment and enhance user experience is an urgent technical problem that needs to be solved.
发明内容Contents of the invention
本申请实施例提供一种文件的操作装置、计算机设备和操作设备,能够提高计算机设备的系统运行效率且提升用户的使用体验。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.
第一方面,提供一种文件的操作装置,适用于计算机设备,该计算机设备配置有本地存储器和云端存储器,操作装置包括:被配置为运行于计算机设备的内核空间的文件管理系统和文件操作系统;其中,文件管理系统被配置为根据文件的第一搬迁命令,将文件的文件数据由本地存储器搬迁至云端存储器;文件操作系统被配置为根据文件的操作命令,对云端存储器中文件的文件数据进行操作。In a first aspect, a file operating device is provided, 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. ; Among them, 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.
通过本申请实施例的技术方案,文件的操作装置包括被配置为运行于计算机设备的内核空间的文件管理系统和文件操作系统。通过该文件管理系统,能够实现文件的文件数据由本地存储器搬迁云端存储,可以提升计算机设备整体的存储容量,提升用户对计算机设备的使用体验。通过该文件操作系统,能够执行对云端存储器中文件的文件数据的操作,避免因系统调用造成的系统资源浪费,也不需要额外在用户空间装载特定应用程序,从而可以提升计算机设备的系统运行效率,也可以提升计算机设备对于云端存储器使用的通用性,以进一步提升用户对于计算机设备的使用体验。Through the technical solution of the embodiment of the present application, 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. Through this 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. Through this file operating system, it is possible to perform operations on file data of files in cloud storage, 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 system 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.
在一些可能的实施方式中,计算机设备的内存具有缓存空间,文件操作系统包括:操作执行子系统和缓存管理子系统;操作执行子系统被配置为获取文件的操作命令,并根据操作命令调用缓存管理子系统;缓存管理子系统被配置为通过缓存空间对云端存储 器中文件的文件数据进行操作。In some possible implementations, the memory of the computer device has cache space, and 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.
在该实施方式的技术方案中,操作执行子系统能够根据文件的操作命令调用缓存管理子系统,该缓存管理子系统被配置为通过计算机设备内存中的缓存空间对云端存储器中文件的文件数据进行操作,计算机设备对缓存空间的操作效率较高,因而通过该技术方案,可以提高计算机设备对文件数据的操作效率,从而提升用户对于计算机设备的使用体验。In the technical solution of this embodiment, 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. In operation, 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.
在一些可能的实施方式中,操作命令包括:读命令,缓存管理子系统包括:第一缓存管理子系统;操作执行子系统被配置为根据读命令调用缓存管理子系统中的第一缓存管理子系统;第一缓存管理子系统被配置为从云端存储器中读取文件的文件数据,并将文件的文件数据写入至缓存空间,以使得文件的文件数据由缓存空间读出。In some possible implementations, the operation command includes: a read command, and 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. System; 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.
在该实施方式的技术方案中,缓存管理子系统中具有独立的第一缓存管理子系统,其便于被上层的操作执行子系统调用,且被配置为通过内存中的缓存空间处理文件的读命令。因此,通过该实施方式的技术方案,在提高计算机设备读取文件数据的效率的同时,还可以便于后续对于文件数据读取过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。In the technical solution of this embodiment, 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.
在一些可能的实施方式中,第一缓存管理子系统还被配置为在缓存空间中同步存储文件的至少部分文件数据。In some possible implementations, 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.
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分文件数据,而不需要实时的再次从云端存储器中读取该文件的文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。In this implementation, 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.
在一些可能的实施方式中,操作装置还包括:网络协议系统;第一缓存管理子系统被配置为调用网络协议系统以从云端存储器中读取文件的文件数据。In some possible implementations, 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.
相比于在用户空间实现网络协议,用户空间与内核空间具有频繁的切换频率的技术方案,通过该实施方式的技术方案,在计算机设备的内核设置网络协议系统330以实现网络协议,例如HTTP协议,并通过该网络协议系统330实现计算机设备本地与云端存储器之间的数据传输,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。Compared with the technical solution of implementing network protocols in user space, where user space and kernel space have frequent switching frequencies, through the technical solution of this embodiment, 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. In addition, the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
在一些可能的实施方式中,第一缓存管理子系统还被配置为判断文件的文件数据是否存在于本地存储器;在确定文件的文件数据不存在于本地存储器的情况下,第一缓存管理子系统被配置为从云端存储器中读取文件的文件数据。In some possible implementations, 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.
通过该实施方式的技术方案,在操作装置被配置为获取文件的读命令后,不是直接从云端存储器中读取该文件的文件数据,而是先判断该文件的文件数据是否存在于本地存储器,防止在本地存储器具有更新的文件数据的情况下,从云端存储器中读取到失效的文件数据。通过该方案,能够避免系统资源的浪费且能进一步提高用户对操作装置所在的计算机设备的使用体验。Through the technical solution of this embodiment, 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. Through this solution, 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.
在一些可能的实施方式中,第一缓存管理子系统还被配置为判断文件的文件数据是否存在于云端存储器;在确定文件的文件数据存在于云端存储器的情况下,第一缓存管理子系统被配置为判断文件的文件数据是否存在于本地存储器。In some possible implementations, 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.
在该实施方式的技术方案中,第一缓存管理子系统被配置为判断文件的文件数据是否存在于云端存储器,且判断文件的文件数据是否存在于本地存储器,根据该双重判断,可以较为准确确定待读取文件的文件数据的具体位置,提升操作装置及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。In the technical solution of this embodiment, 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.
在一些可能的实施方式中,在确定文件的文件数据不存在于云端存储器或确定文件的文件数据存在于本地存储器的情况下,第一缓存管理子系统还被配置为调用计算机设备的本地文件系统以从本地存储器中读取文件的文件数据。In some possible implementations, 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.
在一些可能的实施方式中,第一缓存管理子系统被配置为访问本地存储器,并在本地存储器中检查文件的搬迁标记,根据文件的搬迁标记,判断文件的文件数据是否存在于云端存储器。In some possible implementations, 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.
在该实施方式的技术方案中,文件操作系统被配置为根据文件的操作命令,在本地存储器中检查文件的搬迁标记,以判断该文件的文件数据是否已搬迁至云端存储器,从而进一步实现对该文件的文件数据的操作。整个技术方案对用户屏蔽了文件数据的所在位置,可通过运行于内核空间的文件操作系统访问本地存储器并在本地存储器中检查文件的搬迁标记,从而确定该文件的文件数据的具体位置。通过该技术方案,能够保持计算机设备原生的用户空间,不涉及用户空间中原生的服务改动,避免了需要在用户空间区分文件的所在位置,从而提升用户对计算机设备的使用体验。In the technical solution of this embodiment, 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. Operations on file data of files. 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. Through this technical solution, the native user space of the computer device can be maintained, without involving native service changes in the user space, and avoiding the need to distinguish the location of files in the user space, thus improving the user experience of using the computer device.
在一些可能的实施方式中,操作命令包括:第一写命令,缓存管理子系统包括:第二缓存管理子系统;操作执行子系统被配置为根据第一写命令调用第二缓存管理子系统;第二缓存管理子系统被配置为将缓存空间中用户写入的文件的新文件数据写入至云端存储器,以覆盖云端存储器中文件的文件数据。In some possible implementations, 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.
在该实施方式的技术方案中,缓存管理子系统中具有独立的第二缓存管理子系统,其便于被上层的操作执行子系统调用,且被配置为通过内存中的缓存空间处理文件的第一写命令。因此,通过该实施方式的技术方案,在提高计算机设备在云端存储器中写入文件数据的效率的同时,还可以便于后续对于文件数据写入过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。In the technical solution of this embodiment, 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.
在一些可能的实施方式中,第二缓存管理子系统还被配置为在缓存空间同步存储文件的至少部分新文件数据。In some possible implementations, 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.
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分新文件数据,而不需要实时的再次从云端存储器中读取该文件的新文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。In this implementation, 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.
在一些可能的实施方式中,文件为访问频率低于预设阈值的冷文件,第一写命令为对应于冷文件的写命令。In some possible implementations, the file is a cold file with an access frequency lower than a preset threshold, and the first write command is a write command corresponding to the cold file.
通过该实施方式的技术方案,对于访问频率较低的冷文件,操作装置中的操作执行子系统可被配置为获取针对于该冷文件的第一写命令,将该冷文件的文件数据直接写入云端存储器,在通过云端存储器保存该冷文件的文件数据的同时,避免该冷文件的文件数据占用计算机设备的本地存储器的存储空间,从而优化计算机设备的整体性能。Through the technical solution of this embodiment, for cold files with low access frequency, 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. Into the cloud storage, while saving the file data of the cold file through the cloud storage, 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.
在一些可能的实施方式中,操作命令包括:第二写命令,缓存管理子系统包括:第三缓存管理子系统;操作执行子系统被配置为根据第二写命令调用第三缓存管理子系统; 第三缓存管理子系统被配置为将缓存空间中用户写入的文件的新文件数据写入至本地存储器,并删除云端存储器中文件的文件数据。In some possible implementations, the operation command includes: a second write command, and 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.
在一些可能的实施方式中,文件为访问频率不低于预设阈值的热文件,第二写命令为对应于热文件的写命令。In some possible implementations, the file is a hot file whose access frequency is not lower than a preset threshold, and the second write command is a write command corresponding to the hot file.
通过该实施方式的技术方案,对于访问频率较高的热文件,操作装置中的操作执行子系统可获取针对于该热文件的第二写命令,将该热文件的文件数据直接写入本地存储器且删除云端存储器中该热文件的原有文件数据。一方面,通过该技术方案,可以便于后续用户能够直接对本地存储器中热文件的文件数据进行操作,提升用户对热文件的操作速度。另一方面,云端存储器中不再存储有该热文件的文件数据,也能充分利用云端存储器中的存储空间存储更多的其它文件数据。Through the technical solution of this embodiment, for hot files with high access frequency, 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. On the one hand, 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. On the other hand, 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.
在一些可能的实施方式中,计算机设备的用户空间设置有筛选系统,文件操作系统还包括:信息统计子系统;信息统计子系统被配置为统计文件操作系统打开的打开文件的文件信息,文件信息用于反馈给筛选系统,以使得筛选系统根据文件信息确定打开文件是否为需要搬迁至云端存储器的文件;文件管理系统被配置为接收筛选系统发送的文件的搬迁命令。In some possible implementations, the user space of the computer device is provided with a filtering system, and 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.
在该实施方式的技术方案中,被文件管理系统搬迁至云端存储器中的文件不是本地存储器中的随机文件,而是经由筛选系统根据信息统计子系统统计得到的打开文件的文件信息确定得到的文件,该筛选系统能够结合文件信息确定得到的文件更为适宜搬迁至云端存储器,因此,通过该技术方案,能够更大程度优化本地存储设备中文件数据的存储,提升计算机设备的整体性能。In the technical solution of this embodiment, 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.
在一些可能的实施方式中,文件信息包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。In some possible implementations, the file information includes at least one of the following information: opening times, opening frequency, opening duration, generation time, and file size.
在一些可能的实施方式中,文件管理系统包括:指令处理子系统和第一执行子系统;指令处理子系统被配置为获取文件的第一搬迁命令,且根据搬迁命令调用第一执行子系统;第一执行子系统被配置为将文件的文件数据由本地存储器传输至云端存储器。In some possible implementations, 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.
通过该实施方式的技术方案,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,方便于用户通过云端对该文件数据的使用,提升用户的使用体验。另外,通过该实施方式的技术方案,该第一执行子系统便于被上层的指令处理子系统调用,且执行文件数据由本地存储器至云端存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,提升操作装置及其所在计算机设备的使用可靠性。Through the technical solution of this embodiment, 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. In addition, through the technical solution of this embodiment, 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.
在一些可能的实施方式中,操作装置还包括:网络协议系统;第一执行子系统被配置为调用网络协议系统以将文件的文件数据由本地存储器传输至云端存储器。In some possible implementations, 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.
在一些可能的实施方式中,文件管理系统还包括:本地管理子系统,本地管理子系统被配置为释放文件的文件数据在本地存储器中占用的存储空间,且在本地存储器中写入文件的搬迁标记,搬迁标记用于指示文件的文件数据已搬迁至云端存储器。In some possible implementations, 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.
通过本申请实施例的技术方案,该本地管理子系统能够释放已被传输至云端存储器的文件数据在本地存储器中占用的存储空间,从而节省本地存储器中的存储空间,保证本地存储器具有较为充足的剩余存储空间,不会造成计算机设备的卡顿,提升用户对计算机设备的使用体验。与此同时,在第一执行子系统将本地存储器中文件的文件数据传 输至云端存储器之后,本地管理子系统还在本地存储器中写入了该文件的搬迁标记,使得用户后续在对该文件的操作中,计算机设备仍然能够根据用户的操作命令访问本地存储器,且根据该本地存储器中的搬迁标记,对存储于云端存储器中的文件数据进行正常操作,以进一步提升用户对计算机设备的使用体验。Through the technical solutions of the embodiments of this application, 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. At the same time, after the first execution subsystem transfers the file data of the file in the local storage to the cloud storage, 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. During operation, 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.
在一些可能的实施方式中,第一执行子系统还被配置为判断文件的文件数据是否存在于云端存储器;在确定文件的文件数据不存在于云端存储器的情况下,第一执行子系统被配置为将本地存储器中文件的文件数据传输至云端存储器。In some possible implementations, 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.
通过该实施方式的技术方案,第一执行子系统在根据文件的第一搬迁命令执行对文件的文件数据搬迁之前,判断该文件的文件数据是否存在于云端存储器,从而防止在错误的第一搬迁命令下,重复或无效的执行对文件数据的搬迁,造成系统资源的浪费且影响文件的存储性能。通过该实施方式的技术方案,第一执行子系统具有防错机制,能够应对异常指令,因而,可以提高该操作装置及其所在计算机设备的整体性能。Through the technical solution of this embodiment, 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. Through the technical solution of this embodiment, 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.
在一些可能的实施方式中,文件管理系统还包括:第二执行子系统;指令处理子系统还被配置为获取文件的第二搬迁命令,且根据搬迁命令调用第二执行子系统;第二执行子系统被配置为将文件的文件数据由云端存储器传输至本地存储器。In some possible implementations, 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.
通过本申请实施例的技术方案,该第二执行子系统便于被上层的指令处理子系统调用,且执行文件数据由云端存储器至本地存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,进一步提升操作装置及其所在计算机设备的使用可靠性。另外,云端存储器与本地存储器之间的文件数据相互传输,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,有利于实现该云端存储器中的数据在多设备中进行共享,方便于用户通过不同设备对该文件数据的使用,提升用户的使用体验。Through the technical solutions of the embodiments of the present application, 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. In addition, 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.
在一些可能的实施方式中,操作装置还包括:本地管理子系统,本地管理子系统被配置为在本地存储器中删除文件的搬迁标记。In some possible implementations, 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.
通过该申请实施例的技术方案,在第二执行子系统将文件的文件数据由云端存储器传输至本地存储器的情况下,本地管理子系统还可将删除该文件的搬迁标记,以便于后续在对该文件的文件数据进行操作的过程中,可以在本地存储器中检查搬迁标记,准确确定文件数据所在的位置,进而执行有效的后续操作。Through the technical solutions of the embodiments of this application, when the second execution subsystem transfers the file data of the file from the cloud storage to the local storage, the local management subsystem can also delete the relocation mark of the file to facilitate subsequent processing. 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.
第二方面,提供一种计算机设备,被配置为连接于云端存储器和本地存储器,计算机设备包括:如第一方面或第一方面中任一可能的实施方式中的文件的操作装置。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.
在一些可能的实施方式中,云端存储器包括:信息处理器和文件数据存储器,信息处理器被配置为对来自操作装置的信息数据进行处理,并根据处理后的信息数据对文件数据存储器进行操作。In some possible implementations, 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.
附图说明Description of the drawings
图1是本申请一实施例提供的计算机设备的示意性框架图。Figure 1 is a schematic frame diagram of a computer device provided by an embodiment of the present application.
图2是本申请另一实施例提供的计算机设备的示意性框架图。Figure 2 is a schematic frame diagram of a computer device provided by another embodiment of the present application.
图3是本申请一实施例提供的文件的操作装置的示意性结构框图。Figure 3 is a schematic structural block diagram of a file operating device provided by an embodiment of the present application.
图4是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 4 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图5是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 5 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图6是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 6 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图7是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 7 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图8是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 8 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图9是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 9 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图10是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 10 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图11是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 11 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图12是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 12 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图13是本申请另一实施例提供的文件的操作装置的示意性结构框图。Figure 13 is a schematic structural block diagram of a file operating device provided by another embodiment of the present application.
图14是本申请另一实施例提供的计算机设备的示意性框架图。Figure 14 is a schematic frame diagram of a computer device provided by another embodiment of the present application.
图15是本申请一实施例提供的文件的操作设备的示意性框架图。Figure 15 is a schematic frame diagram of a file operating device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面将结合附图,对本申请实施例中的技术方案进行描述。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.
本申请实施例提供的文件的操作装置可适用于计算机设备。可选地,该计算机设备可以是智能手机等手持设备,个人计算机等终端设备,或智能手表等智能穿戴设备,本申请并未特别限定。The file operating device provided by the embodiment of the present application may be applied to computer equipment. Optionally, 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.
图1示出了本申请实施例提供的计算机设备1的一种示意性框架图。Figure 1 shows a schematic framework diagram of a computer device 1 provided by an embodiment of the present application.
如图1所示,该计算机设备1包括:硬件层10、运行在硬件层10之上的操作系统层20,以及运行在操作系统层20上的应用层30。该硬件层10包括处理器、内存和外存等硬件。该操作系统层20是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或Windows操作系统等。该应用层30包含浏览器、通讯录、文字处理软件、即时通信软件等应用程序。As shown in FIG. 1 , 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.
具体地,操作系统层20包括内核(Kernel)201,其为操作系统层20的核心,负责管理系统的进程、内存、设备驱动程序、文件和网络系统等等,决定着系统的性能和稳定性。该内核201是连接应用层30和硬件层10的桥梁。Specifically, 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 .
在图1所示实施例的基础上,图2示出了本申请另一实施例提供的计算机设备1的示意性框架图。Based on the embodiment shown in Figure 1, Figure 2 shows a schematic frame diagram of a computer device 1 provided by another embodiment of the present application.
如图2所示,应用程序(Application,APP)301为应用层30中的计算机程序,其位于计算机设备1的用户空间(User Space),能够由用户进行使用和设计。As shown in Figure 2, 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.
相对于用户空间,操作系统层20中的内核201位于计算机设备1的内核空间(Kernel Space)。该内核201独立于用户级的应用程序,该内核201可以访问受保护的内存空间,也有访问底层硬件设备的所有权限。为了保证内核201的安全,操作系统层20一般都强制用户进程不能直接操作该内核201。Relative to the 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. In order to ensure the security of the kernel 201, the operating system layer 20 generally forces user processes not to directly operate the kernel 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等多种功能模块。Optionally, in the kernel space, 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.
具体地,在该内核201中,系统调用接口(SCI)210提供了用户空间访问内核空间的一个接口。在不同的计算机设备1的硬件架构下,通过SCI 210进入内核空间的方法是不同的。Specifically, in the kernel 201, the system call interface (SCI) 210 provides an interface for user space to access the kernel space. Under different hardware architectures of computer devices 1, the methods of entering the kernel space through SCI 210 are different.
内存管理单元(MMU)220用于控制计算机设备1中的内存与处理器之间的数据交互。具体地,MMU 220从处理器接收内存访问请求,并基于该内存访问请求控制针对内存的访问。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.
进程管理程序230为管理操作系统中多个进程的程序。该进程管理程序230能够用于实现:进程调度、中断处理、信号/进程优先级、上下文切换、进程状态管理、进度内存管理等多种功能。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.
虚拟文件系统(VFS)240为文件系统(FS)250与系统调用接口(SCI)210之间的中间处理系统。在本申请实施例中,计算机设备1可以支持多种不同类型的文件系统,作为示例而非限定,FS 250中可以包括:EXT2,EXT3,EXT4,F2FS,rootfs,proc等多种类型的文件系统。The virtual file system (VFS) 240 is an intermediate processing system between the file system (FS) 250 and the system call interface (SCI) 210. In the embodiment of this application, the computer device 1 can support multiple different types of file systems. As an example but not a limitation, the FS 250 can include: EXT2, EXT3, EXT4, F2FS, rootfs, proc and other types of file systems. .
为了支撑不同的文件系统,VFS 240隐藏了不同文件系统的硬件的具体细节,把文件系统操作和不同文件系统的具体硬件实现分离开来,为所有的设备提供了统一的接口。In order to support different 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.
设备驱动程序260是内核201的主要部分之一。该设备驱动程序260实际控制操作系统层20和硬件层10之间的交互。具体地,该设备驱动程序260除了提供一组操作系统层20可理解的抽象接口完成和操作系统层20之间的交互以外,还用于完成与硬件层10中硬件设备相关的具体操作细节。一般而言,设备驱动程序260和硬件设备的控制芯片有关。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 . Specifically, in addition to providing a set of abstract interfaces understandable by the operating system layer 20 to complete the interaction between the operating system layer 20 , the device driver 260 is also used to complete specific operation details related to the hardware devices in the hardware layer 10 . Generally speaking, the device driver 260 is related to the control chip of the hardware device.
可以理解的是,在本申请实施例中,上述操作系统层20中的内核201以及应用层30中的应用程序均为计算机设备1中的软件模块,其具体实现为计算机程序(或者也称计算机代码)。为了实现该程序功能,如图2所示,计算机设备1的硬件层10需包括至少一个处理器110。除处理器110以外,硬件层10还可以包括内存120和外存130等存储器。It can be understood that in the embodiment of the present application, 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). In order to realize the program function, as shown in FIG. 2 , the hardware layer 10 of the computer device 1 needs to include at least one processor 110 . In addition to the processor 110, the hardware layer 10 may also include memories such as a memory 120 and an external memory 130.
具体地,处理器110的功能主要是解释计算机程序的指令以及处理计算机程序中的数据。其中,该计算机程序的指令以及计算机程序中的数据能够保存在计算机设备1的内存120和/或外存130中。Specifically, 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 .
可选地,处理器110可能是集成电路芯片,具有信号的处理能力。作为示例而非限定,处理器110是可以是通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。其中,通用处理器是微处理器等。例如,该处理器110是中央处理单元(central processing unit,CPU)。Alternatively, the processor 110 may be an integrated circuit chip with signal processing capabilities. By way of example and not limitation, 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. Among them, the general-purpose processor is a microprocessor or the like. For example, the processor 110 is a central processing unit (CPU).
其中,每个处理器110包括至少一个处理单元。可选地,该处理单元也称为核心(core),是处理器最重要的组成部分。处理器110所有的计算、接受命令、存储命令、处理数据都由核心执行。Each processor 110 includes at least one processing unit. Optionally, 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.
内存120也称为主存,其作用是用于暂时存放处理器110中的运算数据,以及与外 存130交换的数据。该内存120与处理器110之间具有较快的数据读写速度。另外,该内存120能够为计算机设备1中的进程提供运行空间,例如,内存120中保存用于生成进程的计算机程序。计算机程序被处理器110运行而生成进程后,处理器110在内存120中为该进程分配对应的存储空间。内存120在上述进程对应的存储空间中保存进程运行期间产生的数据,例如,中间数据,或过程数据等等。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 . In addition, the memory 120 can provide running space for processes in the computer device 1. For example, 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.
作为示例而非限定,在本申请实施例中,内存120可以是易失性存储器。其中,该易失性存储器可以是随机存取存储器(Random Access Memory,RAM)。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)等等。As an example and not a limitation, in the embodiment of the present application, the memory 120 may be a volatile memory. Wherein, the volatile memory may be random access memory (Random Access Memory, RAM). By way of illustration, but not limitation, 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.
外存130也可称之为辅存,是指除计算机设备1内除了内存120及缓存以外的存储器。可选地,该外存130可以为断电后仍能保存数据的存储器。且该外存130可具有相对较大的容量,能够存储计算机设备1中的图片、视频、文字等文件数据以及应用程序,满足用户的使用需求。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. Optionally, the external memory 130 can be a memory that can still save data after power is turned off. And 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.
作为示例而非限定,在本申请实施例中,外存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)等等。As an example and not a limitation, in the embodiment of the present application, 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. Among them, 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). In addition, 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.
应理解,以上列举的计算机设备1的结构仅为示例性说明,本申请并未限定于此,本申请实施例的计算机设备1包括现有技术中计算机系统中的各种软件模块或者硬件模块,例如,对于硬件模块来讲,计算机设备1还包括:通信装置、传感器装置以及各种功能的外设装置等等。It should be understood that the structure of the computer device 1 listed above is only an illustrative description, and the application is not limited thereto. The computer device 1 in the embodiment of the application includes various software modules or hardware modules in computer systems in the prior art. For example, in terms of hardware modules, the computer device 1 also includes: communication devices, sensor devices, peripheral devices with various functions, and so on.
对于上述计算机设备1,内存120的存储空间主要影响计算机设备1的运行速度,因此,该内存120也可称之为“运存”。而外存130的存储空间主要影响计算机设备1存储文件数据的能力,该外存130的存储空间可理解为计算机设备1中用于存储文件数据的存储空间。For the above-mentioned computer device 1, 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.
作为一种示例,在计算机设备1为手机的情况下,其外存130可以为非易失性存储器,例如FLASH等等。该非易失性存储器设置于计算机设备1的内部,受限于制造成本等多种因素,该非易失性存储器的存储空间具有一定的限制。随着手机使用时间的增长,该非易失性存储器中存储的文件越来越多,该非易失性存储器的剩余存储空间不足,会造成手机卡顿的现象,从而影响用户对手机的使用体验。As an example, 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.
当然,在其它示例中,计算机设备1也可以为其它类型的设备,外存130也可以为其它类型的存储器。不论哪种类型的存储器,随着使用时间的增长,其均会面临存储空间不足的情况,导致用户对计算机设备1的使用体验不佳。Of course, in other examples, 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 .
为了解决上述问题,云盘(或者也可称网盘)服务应运而生。用户为了使用该云盘服务,需要在计算机设备1中下载特定的云盘应用程序。该云盘应用程序位于计算机设备的用户空间中,且用于实现将计算机设备1的本地存储器(例如外存130)以及云盘之 间的文件数据交互。在该过程中,云盘应用程序需要不断的调用系统调用接口210以进入内核空间,以实现对本地存储器中文件的访问,该过程系统资源的开销较大,会影响系统运行效率。另外,在该方式中,使用云盘服务需要下载特定的云盘应用程序,该方式不具有通用性且用户使用体验也较差。In order to solve the above problems, cloud disk (or network disk) service came into being. In order to use the cloud disk service, 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. During this process, 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. In addition, in this method, using the cloud disk service requires downloading a specific cloud disk application. This method is not universal and the user experience is poor.
鉴于此,本申请提供一种文件的操作装置,能够解决上述计算机设备的系统运行效率较低且云盘服务通用性较差的技术问题。In view of this, 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.
图3示出了本申请实施例提供的一种文件的操作装置300的示意性结构框图。该操作装置300适用于计算机设备,且该计算机设备配置有本地存储器和云端存储器。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.
如图3所示,在本申请实施例中,操作装置300包括:被配置为运行于计算机设备的内核空间的文件管理系统310和文件操作系统320。其中,文件管理系统310被配置为根据文件的第一搬迁命令,将该文件的文件数据由本地存储器搬迁至云端存储器。文件操作系统320被配置为根据文件的操作命令,对云端存储器中该文件的文件数据进行操作。As shown in Figure 3, in the embodiment of the present application, 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.
具体地,在本申请实施例中,计算机设备配置有本地存储器,该本地存储器用于存储计算机设备中各种文件的文件数据。可选地,该本地存储器可以为上文图2所示实施例中的外存130,该本地存储器包括但不限于是以下各存储器中的至少一种:非易失性存储器、磁盘、光盘、U盘或者安全数码卡。Specifically, in the embodiment of the present application, the computer device is configured with a local memory, and the local memory is used to store file data of various files in the computer device. Optionally, 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.
另外,在本申请实施例中,计算机设备还配置有云端存储器,该云端存储器为计算机设备能够通过网络连接并访问的网络存储工具。作为示例而非限定,该云端存储器可以网盘或者云盘。In addition, in this embodiment of the present application, 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. As an example and not a limitation, the cloud storage can be a network disk or a cloud disk.
该云端存储器具有大的存储空间,可以较大程度的扩展计算机设备的存储容量,提升用户对于计算机设备的使用体验。另外,随着目前通信网络的快速发展和5G时代的到来,计算机设备与云端存储器之间的数据传输速度也会越来越快,计算机设备与云端存储器之间的文件数据传输速度也会得到大幅提升,不会影响用户对云端存储器中文件数据的访问和使用。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. In addition, with the rapid development of current communication networks and the arrival of the 5G era, 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.
具体地,本申请实施例提供的文件的操作装置300可为一种计算机程序存储介质,其中存储有文件管理系统310和文件操作系统320,该文件管理系统310和文件操作系统320可以为针对文件处理的计算机程序代码,且该文件管理系统310和文件操作系统320被配置为运行于计算机设备的内核空间。具体地,该文件管理系统310和文件操作系统320的计算机程序代码被计算机设备的处理器运行时,该计算机程序代码位于计算机设备的内核空间。Specifically, the file operating device 300 provided by the embodiment of the present application 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. Specifically, when 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.
其中,文件管理系统310被配置为根据文件的第一搬迁命令,将该文件的文件数据由本地存储器搬迁至云端存储器。具体地,文件管理系统310被配置为根据文件的第一搬迁命令,访问本地存储器中该文件所在的存储空间,并执行将文件的文件数据由本地存储器搬迁至云端存储器。可选地,在搬迁过程中,被搬迁文件的文件数据由本地存储器拷贝至云端存储器,且本地存储器中存储该文件的文件数据的存储空间被释放,即原本存储有该文件的文件数据的存储空间后续可用于存储其它数据,例如存储其它文件的文件数据。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. Optionally, during the relocation process, 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.
可选地,该用于搬迁的文件可以是本地存储器中存储的任意文件,或者,该文件也可以是本地存储器中存储的特定文件。Optionally, 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.
可选地,在本申请实施例中,该用于搬迁的文件可用于存储不同类型的信息,如源程序或可执行程序、数字或文本数据、照片、音乐、视频等等。本申请实施例对于文件的具体类型不做限定。Optionally, in this embodiment of the present application, 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.
作为示例而非限定,该用于搬迁的文件可以包括:访问频率小于预设频率的文件,和/或,文件大小小于预设大小的文件。通过该实施方式,将访问频率小于预设频率的文件,和/或,文件大小小于预设大小的文件搬迁至云端存储器,不会影响用户对本地存储器中访问频率较高的文件的访问,也能较大程度的提升本地存储器的剩余存储空间,以进一步提升用户对计算机设备的使用体验。As an example and not a limitation, 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. Through this implementation, relocating 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.
在文件管理系统310实现将文件的文件数据由本地存储器搬迁至云端存储器后,进一步地,文件操作系统320被配置为根据文件的操作命令,对该云端存储器中的该文件的文件数据进行操作。After the file management system 310 moves the file data of the file from the local storage to the cloud storage, further, 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.
可选地,作为示例而非限定,该文件的操作命令可以包括:读(read)命令,写(write)命令等等。为了实现对该文件的操作,该文件的操作命令除了能够指示操作类型以外,还可包括:用于指示文件的文件信息。作为示例而非限定,该文件信息可以包括:文件名、文件路径等等。Optionally, as an example but not a limitation, the operation commands of the file may include: read (read) command, write (write) command, etc. In order to implement the operation on the file, in addition to indicating the operation type, the operation command of the file may also include: file information used to indicate the file. As an example and not a limitation, the file information may include: file name, file path, etc.
作为示例,在文件的操作命令为读命令的情况下,文件操作系统320被配置为从云端存储器中读取该文件的文件数据,并传递给上层系统从而将文件数据返回给用户。又例如,在文件的操作命令为写命令的情况下,该文件操作系统320被配置为根据本地输入的文件数据,重新在云端存储器中写入该文件的文件数据。As an example, 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.
相比于通过位于用户空间的特定应用程序(APP)实现对云端存储器中文件数据操作的技术方案,在本申请实施例的技术方案中,通过位于计算机内核空间的文件管理系统310和文件操作系统320执行对本地存储器中文件数据的搬迁以及云端存储器中文件数据的操作,能够避免因系统调用造成的系统资源浪费,也不需要额外在用户空间装载特定应用程序。Compared with the technical solution of operating file data in the cloud storage through a specific application program (APP) located in the user space, in the technical solution of the embodiment of the present application, 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.
可选地,在一些实施方式中,上述操作装置300中的文件管理系统310和文件操作系统320可经由计算机设备内核中的上层系统调用以实现对文件数据的搬迁以及操作。可选地,该操作装置300的上层系统包括但不限于是虚拟文件系统(VFS),该VFS接收到来自用户空间的文件的搬迁命令或操作命令后,调用本申请实施例中的操作装置300中的文件管理系统310或文件操作系统320,以使得操作装置300中的文件管理系统310根据文件的搬迁命令实现对本地存储器至云端存储器的文件数据搬迁,或者使得文件操作系统320根据文件的操作命令实现对云端存储器中文件数据的操作。Optionally, in some implementations, 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. Optionally, the upper system of the operating device 300 includes but is not limited to a virtual file system (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.
综上,通过本申请实施例的技术方案,文件的操作装置300包括被配置为运行于计算机设备的内核空间的文件管理系统310和文件操作系统320。通过该文件管理系统310,能够实现文件的文件数据由本地存储器搬迁云端存储,可以提升计算机设备整体的存储容量,提升用户对计算机设备的使用体验。通过该文件操作系统320,能够执行对云端存储器中文件的文件数据的操作,避免因系统调用造成的系统资源浪费,也不需要额外在用户空间装载特定应用程序,从而可以提升计算机设备的运行效率,也可以提升计算机设备对于云端存储器使用的通用性,以进一步提升用户对于计算机设备的使用体验。In summary, through the technical solution of the embodiment of the present application, 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. Through 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. Through 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.
图4示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 4 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图4所示,在本申请实施例中,上述文件操作系统320可以包括:操作执行子系 统321和缓存管理子系统322。其中,该操作执行子系统321被配置为获取文件的操作命令,并根据该操作命令调用缓存管理子系统322。该缓存管理子系统322被配置为通过计算机设备内存中的缓存(cache)空间对云端存储器中该文件的文件数据进行操作。As shown in Figure 4, in this 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. Wherein, 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.
具体地,在本申请实施例中,操作装置300中的文件操作系统320可以包括两个子系统,其中,操作执行子系统321可以理解为缓存管理子系统322的上层系统,其被配置为获取更上层系统传递的文件的操作命令,并根据该操作命令调用缓存管理子系统322。Specifically, in this embodiment of the present application, 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.
缓存管理子系统322被配置为对计算机设备内存中的缓存空间进行管理。具体地,该缓存空间可以为计算机设备的内存中的局部存储空间,因此,计算机设备能够较为快速的从该缓存空间中进行数据的读写。 Cache management subsystem 322 is configured to manage cache space in the computer device's memory. Specifically, 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.
鉴于此,在本申请实施例中,缓存管理子系统322被配置为通过该缓存空间对云端存储器中文件的文件数据进行操作。例如,操作执行子系统321根据获取的第一文件的操作命令调用缓存管理子系统322,该缓存管理子系统322被配置为将云端存储器中第一文件的文件数据写入缓存空间,以使得该第一文件的文件数据由缓存空间中读出,或者,该缓存管理子系统322被配置为将用户写入的第一文件的文件数据写入缓存空间,再将缓存空间中该第一文件的文件数据重新写入云端存储器。In view of this, in the embodiment of the present application, the cache management subsystem 322 is configured to operate the file data of the file in the cloud storage through the cache space. For example, 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.
通过本申请实施例的技术方案,操作执行子系统321能够根据文件的操作命令调用缓存管理子系统322,该缓存管理子系统322被配置为通过计算机设备内存中的缓存空间对云端存储器中文件的文件数据进行操作,计算机设备对缓存空间的操作效率较高,因而通过本申请实施例的技术方案,可以提高计算机设备对文件数据的操作效率,从而提升用户对于计算机设备的使用体验。Through the technical solution of the embodiment of the present application, 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. When operating file data, 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.
可选地,在一些实施方式中,文件的操作命令包括:读命令,缓存管理子系统322包括:第一缓存管理子系统。在该实施方式中,操作执行子系统321被配置为根据该读命令调用缓存管理子系统322中的第一缓存管理子系统,该第一缓存管理子系统被配置为从云端存储器中读取文件的文件数据,且将该文件的文件数据写入至缓存空间,以使得该文件的文件数据由该缓存空间中读出。Optionally, in some implementations, the file operation command includes a read command, and the cache management subsystem 322 includes a first cache management subsystem. In this embodiment, 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.
具体地,在该实施方式中,缓存管理子系统322包括第一缓存管理子系统,该第一缓存管理子系统可为缓存管理子系统322中的部分程序代码块。例如,当操作执行子系统321获取文件的读命令后,其能够根据该文件的读命令调用缓存管理子系统322中的第一缓存管理子系统,该第一缓存管理子系统可理解为处理该文件的读命令的专用程序代码块。Specifically, in this embodiment, 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 . For example, after 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.
在该实施方式的技术方案中,缓存管理子系统322中具有独立的第一缓存管理子系统,其便于被上层的操作执行子系统321调用,且被配置为通过内存中的缓存空间处理文件的读命令。因此,通过该实施方式的技术方案,在提高计算机设备读取文件数据的效率的同时,还可以便于后续对于文件数据读取过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。In the technical solution of this embodiment, 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.
在上述实施例的基础上,可选地,该第一缓存管理子系统还被配置为在缓存空间中同步存储上述文件的至少部分文件数据。Based on the above embodiment, optionally, 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.
具体地,在该实施方式中,第一缓存管理子系统除了被配置为从该缓存空间中读出文件的文件数据以外,该第一缓存管理子系统还被配置为在该缓存空间中同步存储该文 件的至少部分文件数据。作为一种示例,在该文件的文件数据小于预设大小的情况下,第一缓存管理子系统可以将该文件的全部文件数据均同步存储于缓存空间中。或者,在另一示例中,在该文件的文件数据大于或等于预设大小的情况下,第一缓存管理子系统可以将该文件的部分文件数据同步存储于缓存空间中。Specifically, in this embodiment, in addition to being configured to read the file data of the file from the cache space, the first cache management subsystem is also configured to synchronously store the file in the cache space. At least part of the file data for this file. As an example, when the file data of the file is smaller than the preset size, the first cache management subsystem may synchronously store all the file data of the file in the cache space. Or, in another example, when the file data of the file is greater than or equal to the preset size, the first cache management subsystem may synchronously store part of the file data of the file in the cache space.
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分文件数据,而不需要实时的再次从云端存储器中读取该文件的文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。In this implementation, 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.
图5示出了本申请另一实施例提供的操作装置300的示意性结构框图。FIG. 5 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
如图5所示,在本申请实施例中,操作装置300还包括网络协议系统330,第一缓存管理子系统3221被配置为调用该网络协议系统330以从云端存储器中读取文件的文件数据。As shown in Figure 5, in the 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. .
具体地,该网络协议系统330可以用于实现本地文件数据至网络协议数据包之间的转换,以使得该网络协议数据包能够通过网络协议实现计算机设备本地与云端存储器之间的数据传输。作为示例而非限定,该网络协议包括但不限于是超文本传输协议(Hyper Text Transfer Protocol,HTTP)。Specifically, 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. As an example and not a limitation, the network protocol includes but is not limited to Hyper Text Transfer Protocol (Hyper Text Transfer Protocol, HTTP).
作为一种示例,在本申请实施例中,待从云端存储器中读取的文件为第一文件,即操作执行子系统321获取的文件的读命令为第一文件的读命令。第一缓存管理子系统3221被配置为调用网络协议系统330,该网络协议系统330能够从第一缓存管理子系统3221中获取用于指示该第一文件的文件信息,并将用于指示该第一文件的文件信息封装为请求命令网络数据包,然后将该请求命令网络数据包发送至云端存储器。As an example, in this embodiment of the present application, 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.
该云端存储器接收到该请求命令网络数据包后,能够根据该请求命令网络数据包中携带的文件信息确定其中存储的第一文件的文件数据。然后,云端存储器将携带有第一文件的文件数据的文件网络数据包再发送至计算机设备本地。计算机设备本地的网络协议系统330获取该文件网络数据包后,对其解析得到第一文件的文件数据,第一缓存管理子系统3221将该解析得到的第一文件的文件数据写入至缓存空间,并进一步地从该缓存空间中读取第一文件的文件数据至上层。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.
相比于在用户空间实现网络协议,用户空间与内核空间具有频繁的切换频率的技术方案,通过本申请实施例的技术方案,在计算机设备的内核设置网络协议系统330以实现网络协议,例如HTTP协议,并通过该网络协议系统330实现计算机设备本地与云端存储器之间的数据传输,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。Compared with the technical solution of implementing network protocols in user space, where user space and kernel space have frequent switching frequencies, through the technical solution of the embodiment of the present application, 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. In addition, the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
可选地,在本申请实施例中,第一缓存管理子系统3221还被配置为判断文件的文件数据是否存在于本地存储器,在确定该文件的文件数据不存在于本地存储器的情况下,第一缓存管理子系统3221被配置为从云端存储器中读取该文件的文件数据。Optionally, in this embodiment of the present application, 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.
具体地,在本申请实施例中,在操作执行子系统321获取文件的读命令,并根据该读命令调用第一缓存管理子系统3221后,该第一缓存管理子系统3221可先访问本地存储器,判断该本地存储器中是否存在该文件的文件数据。Specifically, in this embodiment of the present application, after the operation execution subsystem 321 obtains the read command of the file and calls the first cache management subsystem 3221 according to the read command, 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.
在确定该文件的文件数据存在于本地存储器的情况下,该第一缓存管理子系统3221 被配置为调用计算机设备的内核中的本地文件系统(例如,上文图2中所示的文件系统250),以从该本地存储器中读取该文件的文件数据。In the event that the file data of the file is determined to exist in the local memory, 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.
在该文件的文件数据不存在于本地存储器时,该第一缓存管理子系统3221再从云端存储器中读取该文件的文件数据,并将该文件数据写入至缓存空间,从而便于计算机设备将该缓存空间中的文件数据读出并返回给用户。When the file data of the file does not exist in 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.
当文件的文件数据由文件管理系统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.
因此,通过本申请实施例的技术方案,在操作装置300被配置为获取文件的读命令后,不是直接从云端存储器中读取该文件的文件数据,而是先判断该文件的文件数据是否存在于本地存储器,防止在本地存储器具有更新的文件数据的情况下,从云端存储器中读取到失效的文件数据。通过该方案,能够避免系统资源的浪费且能进一步提高用户对操作装置300所在的计算机设备的使用体验。Therefore, through the technical solution of the embodiment of the present application, 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.
可选地,在上文实施例的基础上,该第一缓存管理子系统3221还被配置为判断文件的文件数据是否存在于云端存储器。在确定该文件的文件数据存在于云端存储器的情况下,第一缓存管理子系统3221被配置为判断该文件的文件数据是否存在于本地存储器。Optionally, based on the above embodiment, 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.
即在本实施方式中,第一缓存管理子系统3221在判断文件的文件数据是否存在于本地存储器之前,该第一缓存管理子系统3221会先判断文件的文件数据是否存在于云端存储器,在确定文件的文件数据存在于云端存储器的情况下,第一缓存管理子系统3221再判断文件的文件数据是否还存在于本地存储器。通过该技术方案,第一缓存管理子系统根据该双重判断,可以较为准确确定待读取文件的文件数据的具体位置,从而提升操作装置及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。That is, in this embodiment, 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. Through this technical solution, 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.
在确定文件的文件数据不存在于云端存储器的情况下,第一缓存管理子系统3221也可被配置为调用计算机设备的内核中的本地文件系统(例如,上文图2中所示的文件系统250),以从该本地存储器中读取该文件的文件数据。In the case where it is determined that the file data of the file does not exist in the cloud storage, 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.
通过本申请实施例的技术方案,第一缓存管理子系统3221被配置为判断文件的文件数据是否存在于云端存储器,根据判断结果,第一缓存管理子系统3221能够执行不同的动作,从而准确的对文件的文件数据进行读取,提升操作装置300及其所在计算机设备对文件读取效率以及准确性,以进一步提升用户对计算机设备的使用体验。Through the technical solution of the embodiment of the present application, 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.
可选地,在一些可能的实施方式中,第一缓存管理子系统3221被配置为访问本地存储器,并在本地存储器中检查文件的搬迁标记,根据该文件的搬迁标记,判断该文件的文件数据是否存在于云端存储器。Optionally, in some possible implementations, 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.
具体地,在该实施方式中,若本地存储器中的文件已被文件管理系统310搬迁至云端存储器,则可在本地存储器中写入搬迁标记,用于标识文件的文件数据已被搬迁至云端存储器。因而,在操作执行子系统321获取该文件的操作命令,且调用第一缓存管理子系统3221后,该第一缓存管理子系统3221能够在本地存储器中检查该文件的搬迁标记,并根据该搬迁标记的检查结果,判断该文件的文件数据是否存在于云端存储器,从而进一步的执行后续操作。Specifically, in this embodiment, if the file in the local storage has been moved to the cloud storage by the file management system 310, 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.
在本申请实施例的技术方案中,文件操作系统320被配置为根据文件的操作命令, 在本地存储器中检查文件的搬迁标记,以判断该文件的文件数据是否已搬迁至云端存储器,从而进一步实现对该文件的文件数据的操作。整个技术方案对用户屏蔽了文件数据的所在位置,可通过运行于内核空间的文件操作系统320访问本地存储器并在本地存储器中检查文件的搬迁标记,从而确定该文件的文件数据的具体位置。通过该技术方案,能够保持计算机设备原生的用户空间,不涉及用户空间中原生的服务改动,避免了需要在用户空间区分文件的所在位置,从而提升用户对计算机设备的使用体验。In the technical solution of the embodiment of the present application, 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. Through this technical solution, the native user space of the computer device can be maintained, without involving native service changes in the user space, and avoiding the need to distinguish the location of files in the user space, thus improving the user experience of using the computer device.
图6示出了本申请另一实施例提供的操作装置300的示意性结构框图。FIG. 6 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
如图6所示,在本申请实施例中,上述文件的操作命令包括第一写命令,上述缓存管理子系统322包括:第二缓存管理子系统3222,其中,操作执行子系统321被配置为根据文件的第一写命令调用该第二缓存管理子系统3222,该第二缓存管理子系统3222被配置为将缓存空间中用户写入的该文件的新文件数据写入至云端存储器,以覆盖云端存储器中该文件的原有文件数据。As shown in Figure 6, in the embodiment of the present application, the operation command of the above file includes a first write command, and 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 original file data of the file in cloud storage.
具体地,在本申请实施例中,第二缓存管理子系统3222可为缓存管理子系统322中的部分程序代码块。具体地,当操作执行子系统321被配置为获取文件的第一写命令后,其能够根据该文件的第一写命令调用缓存管理子系统322中的第二缓存管理子系统3222,该第二缓存管理子系统3222可理解为处理该文件的第一写命令的专用程序代码块。Specifically, in this embodiment of the present application, the second cache management subsystem 3222 may be part of the program code blocks in the cache management subsystem 322 . Specifically, when the operation execution subsystem 321 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.
在该实施方式的技术方案中,缓存管理子系统322中具有独立的第二缓存管理子系统3222,其便于被上层的操作执行子系统321调用,且被配置为通过内存中的缓存空间处理文件的第一写命令。因此,通过该实施方式的技术方案,在提高计算机设备在云端存储器中写入文件数据的效率的同时,还可以便于后续对于文件数据写入过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。In the technical solution of this embodiment, 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.
可选地,在一些实施方式中,该第二缓存管理子系统3222还被配置为在缓存空间同步存储该文件的至少部分新文件数据。Optionally, in some implementations, 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.
具体地,在该实施方式中,第二缓存管理子系统3222除了被配置为将缓存空间中用户写入的文件的新文件数据写入至云端存储器以外,该第二缓存管理子系统3222还被配置为在该缓存空间中同步存储该文件的至少部分文件数据。作为一种示例,在该文件的新文件数据小于预设大小的情况下,第二缓存管理子系统3222可以将该文件的全部新文件数据均同步存储于缓存空间中。或者,在另一示例中,在该文件的新文件数据大于或等于预设大小的情况下,第二缓存管理子系统3222可以将该文件的部分新文件数据同步存储于缓存空间中。Specifically, in this embodiment, in addition to being configured to write new file data of files written by users in the cache space to the cloud storage, the second cache management subsystem 3222 is also configured to Configure to synchronously store at least part of the file data for the file in the cache space. As an example, when the new file data of the file is smaller than the preset size, the second cache management subsystem 3222 can synchronously store all the new file data of the file in the cache space. Or, in another example, when the new file data of the file is greater than or equal to the preset size, the second cache management subsystem 3222 may synchronously store part of the new file data of the file in the cache space.
在该实施方式下,当计算机设备后续接收到该文件的读命令时,可以立刻从缓存空间中读取该文件的至少部分新文件数据,而不需要实时的再次从云端存储器中读取该文件的新文件数据,从而进一步提升计算机设备读取文件数据的效率,以进一步提高用户对于计算机设备的使用体验。In this implementation, 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.
可选地,如图6所示,在本申请实施例中,第二缓存管理子系统3222可被配置为调用网络协议系统330以将缓存空间中文件的新文件数据写入至云端存储器。Optionally, as shown in FIG. 6 , in this embodiment of the present application, 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.
作为一种示例,在本申请实施例中,操作执行子系统321被配置为获取的文件的第一写命令以调用第二缓存管理子系统3222。该第二缓存管理子系统3222被配置为调用网络协议系统330,该网络协议系统330能够将缓存空间中用户写入的文件的新文件数据封装为文件网络数据包,然后将该文件网络数据包发送至云端存储器。As an example, in the embodiment of the present application, 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.
该云端存储器接收到该文件网络数据包后,能够对该文件网络数据包进行解析得到文件的新文件数据,该云端存储器存储该新文件数据且该新文件数据覆盖云端存储器中该文件的原文件数据。After receiving the file network data packet, 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.
可选地,在上述申请实施例中,待写入云端存储器的文件为访问频率低于预设阈值的冷文件,第一写命令为对应于冷文件的写命令。Optionally, in the above application embodiment, the file to be written to the cloud storage is a cold file with an access frequency lower than a preset threshold, and the first write command is a write command corresponding to the cold file.
通过该实施方式的技术方案,对于访问频率较低的冷文件,操作装置300中的操作执行子系统321可被配置为获取针对于该冷文件的第一写命令,将该冷文件的文件数据直接写入云端存储器,在通过云端存储器保存该冷文件的文件数据的同时,避免该冷文件的文件数据占用计算机设备的本地存储器的存储空间,从而优化计算机设备的整体性能。Through the technical solution of this embodiment, for cold files with low access frequency, 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.
图7示出了本申请另一实施例提供的操作装置300的示意性结构框图。Figure 7 shows a schematic structural block diagram of an operating device 300 provided by another embodiment of the present application.
如图7所示,在本申请实施例中,文件的操作命令包括第二写命令,上述缓存管理子系统322包括:第三缓存管理子系统3223,其中,操作执行子系统321被配置为根据文件的第二写命令调用该第三缓存管理子系统3223,该第三缓存管理子系统3223被配置为将缓存空间中用户写入的文件的新文件数据写入至本地存储器,并删除云端存储器中该文件的文件数据。As shown in Figure 7, in the embodiment of the present application, the file operation command includes a second write command, and 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.
具体地,在本申请实施例中,该第三缓存管理子系统3223可为缓存管理子系统322中的部分程序代码块。具体地,当操作执行子系统321被配置为获取文件的第二写命令后,其能够根据该文件的第二写命令调用缓存管理子系统322中的第三缓存管理子系统3223,该第三缓存管理子系统3223可理解为处理该第一文件的第二写命令的专用程序代码块。Specifically, in this embodiment of the present application, the third cache management subsystem 3223 may be a partial program code block in the cache management subsystem 322. Specifically, when the operation execution subsystem 321 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.
在该实施方式的技术方案中,缓存管理子系统322中具有独立的第三缓存管理子系统3223,其便于被上层的操作执行子系统321调用,且被配置为通过内存中的缓存空间处理文件的第二写命令。具体地,该第三缓存管理子系统3223能够调用计算机设备的本地文件系统,以将缓存空间中用户写入的文件的新文件数据写入至本地存储器,且该第三缓存管理子系统3223还能调用网络协议系统330以删除云端存储器中该文件的原有文件数据。In the technical solution of this embodiment, 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. Specifically, the third cache management subsystem 3223 can 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.
因此,通过该实施方式的技术方案,在提高计算机设备在本地存储器中写入文件数据的效率的同时,也可以便于后续对于文件数据写入过程中出现的问题的定位,进一步提升操作装置300及其所在计算机设备的使用可靠性。Therefore, through the technical solution of this embodiment, while improving the efficiency of the computer device in writing file data in the local memory, it can also facilitate the subsequent location of problems that occur during the file data writing process, further improving the operating device 300 and The reliability of use of the computer equipment in which it is installed.
可选地,在上述申请实施例中,待写入本地存储器的文件为访问频率不低于预设阈值的热文件,第二写命令为对应于热文件的写命令。Optionally, in the above application embodiment, the file to be written to the local storage is a hot file with an access frequency not lower than a preset threshold, and the second write command is a write command corresponding to the hot file.
通过该实施方式的技术方案,对于访问频率较高的热文件,操作装置300中的操作执行子系统321可获取针对于该热文件的第二写命令,将该热文件的文件数据直接写入本地存储器且删除云端存储器中该热文件的原有文件数据。一方面,通过该技术方案,可以便于后续用户能够直接对本地存储器中热文件的文件数据进行操作,提升用户对热文件的操作速度。另一方面,云端存储器中不再存储有该热文件的文件数据,也能充分利用云端存储器中的存储空间存储更多的其它文件数据。Through the technical solution of this embodiment, for hot files with high access frequency, 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. On the one hand, 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. On the other hand, 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.
图8示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 8 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图8所示,在本申请实施例中,计算机设备的用户空间设置有筛选系统,上述文 件操作系统320还包括:信息统计子系统323。该信息统计子系统323被配置为统计文件操作系统320打开的打开文件的文件信息,该文件信息用于反馈给筛选系统,以使得该筛选系统根据该文件信息确定打开文件是否为需要搬迁至云端存储器的文件。文件管理系统310被配置为接收该筛选系统发送的文件的搬迁命令。As shown in Figure 8, in this embodiment of the present application, the user space of the computer device is provided with a filtering system, and 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. The file management system 310 is configured to receive a file relocation command sent by the screening system.
具体地,在本申请实施例中,文件操作系统320中可包括用于统计打开文件的文件信息的信息统计子系统323,其中,该打开文件的文件信息可以包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。筛选系统根据该打开文件的文件信息可确定该打开文件是否需要搬迁至云端存储器。在筛选系统确定打开文件需要搬迁至云端存储器的情况下,该筛选系统可向内核发送该文件的搬迁命令,以使得内核中的文件管理系统310接收该筛选系统发送的文件的搬迁命令。Specifically, in this embodiment of the present application, 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. When 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.
作为示例而非限定,上述筛选系统可以为人工智能系统,其中,该人工智能系统包括但不限于是:神经网络。通过该实施方式的技术方案,人工智能系统可以根据特定需求,对本地存储器中的文件起到良好的筛选作用。As an example and not a limitation, 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. Through the technical solution of this embodiment, the artificial intelligence system can effectively filter files in the local storage according to specific needs.
综上,在本申请实施例的技术方案中,被文件管理系统310搬迁至云端存储器中的文件不是本地存储器中的随机文件,而是经由筛选系统根据信息统计子系统323统计得到的打开文件的文件信息确定得到的文件,该筛选系统能够结合文件信息确定得到的文件更为适宜搬迁至云端存储器,因此,通过该技术方案,能够更大程度优化本地存储设备中文件数据的存储,提升计算机设备的整体性能。To sum up, in the technical solution of the embodiment of the present application, 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. For files determined by file information, 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.
可选地,在一些实施方式中,上述需要搬迁至云端存储器的文件为热文件。Optionally, in some implementations, the above-mentioned files that need to be moved to cloud storage are hot files.
具体地,上述打开文件的文件信息用于反馈给筛选系统,以使得该筛选系统根据该文件信息确定打开文件为热文件或者为冷文件,从而确定该打开文件是否为需要搬迁至云端存储器的文件。Specifically, 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. .
可选地,打开文件的文件信息可至少包括:打开次数或打开频率,该筛选系统可根据该打开次数或打开频率确定打开文件为热文件或冷文件。在打开文件为打开次数或打开频率较高的热文件的情况下,筛选系统可确定该热文件不为需要搬迁至云端存储器的文件,反之,在打开文件为打开次数或打开频率较低的冷文件的情况下,筛选系统可确定该冷文件为需要搬迁至云端存储器的文件。Optionally, 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. When the open file is a hot file with a high open count or a high open frequency, the filtering system can determine that the hot file does not need to be moved to cloud storage. On the contrary, when the open file is a cold file with a low open count or a low open frequency, the filtering system can determine that the hot file does not need to be moved to cloud storage. In the case of files, the filtering system can determine that the cold file is a file that needs to be moved to cloud storage.
通过本申请实施例的技术方案,利用筛选系统确定热文件,且利用文件管理系统将该热文件搬迁至云端存储器,该技术方案不会影响用户对本地存储器中访问频率较高的热文件的访问,也能较大程度的提升本地存储器的剩余存储空间,以进一步提升用户对计算机设备的使用体验。Through the technical solution of the embodiment of the present application, the screening system is used to determine the hot file, and 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.
图9示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 9 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图9所示,在本申请实施例中,上述文件管理系统310可以包括:指令处理子系统311和执行子系统312。其中,该指令处理子系统311被配置为获取文件的搬迁命令,且根据该搬迁命令调用执行子系统312。该执行子系统312被配置为执行该文件的文件数据在本地存储器与云端存储器之间的传输。As shown in Figure 9, in this embodiment of the present application, the above-mentioned file management system 310 may include: an instruction processing subsystem 311 and an execution subsystem 312. Wherein, 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.
具体地,在本申请实施例中,操作装置300中的文件管理系统310可以包括两个子系统,其中,指令处理子系统311可以理解为执行子系统312的上层系统,其用于获取上层系统传递的文件的搬迁命令,并根据该搬迁命令调用执行子系统312,该执行子系统312可理解为用于执行在本地存储器与云端存储器之间传输文件数据的功能系统。Specifically, in this embodiment of the present application, 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.
图10示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 10 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图10所示,操作装置300还包括:网络协议系统330。其中,执行子系统312被配置为调用该网络协议系统330以执行文件的文件数据在本地存储器与云端存储器之间的传输。As shown in Figure 10, 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.
具体地,在一些实施方式中,执行子系统312可调用网络协议系统330,将本地存储器中待搬迁文件的文件数据封装为文件网络数据包,该文件网络数据包通过网络协议传输至云端存储器,以使得该云端存储器能够存储该待搬迁文件的文件数据。Specifically, in some embodiments, 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.
或者,在另一些实施方式中,执行子系统312可调用网络协议系统330,将用于指示待搬迁文件的文件信息封装为请求命令网络数据包,然后将该请求命令网络数据包发送至云端存储器,以使得该云端存储器能够根据该请求命令网络数据将待搬迁文件的文件数据封装为文件网络数据包,并将该文件网络数据包发回至网络协议系统330,网络协议系统330获取该文件网络数据包后,对其解析得到待搬迁文件的文件数据,执行子系统312用于将该待搬迁文件的文件数据存储于本地存储器。Alternatively, in other embodiments, 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. , so that 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.
可选地,该执行子系统312与网络协议系统330的相互配合能够实现文件数据的整体搬迁,即将待搬迁文件的全部文件数据整体封装为文件网络数据包,从而使得该文件能够一次性完整的传输搬迁至云端存储器或本地存储器,防止搬迁过程中出现异常影响文件数据的存储。Optionally, 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.
通过本申请实施例的技术方案,在计算机设备的内核设置网络协议系统330以实现网络协议,例如HTTP协议,并通过该网络协议系统330实现计算机设备本地与云端存储器之间的文件搬迁,这样可以减少用户空间到内核空间之间的切换频率,从而提高计算机设备到云端存储器的访问速度。另外,采用HTTP协议也能极大的兼容目前已有的云端存储器产品。Through the technical solution of the embodiment of the present application, 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. This can Reduce the frequency of switching between user space and kernel space, thereby increasing the access speed from computer devices to cloud storage. In addition, the use of HTTP protocol can also be greatly compatible with existing cloud storage products.
图11示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 11 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图11所示,在本申请实施例中,文件管理系统310包括:指令处理子系统311和第一执行子系统3121。其中,指令处理子系统311被配置为获取文件的第一搬迁命令,且根据该第一搬迁命令调用第一执行子系统3121。该第一执行子系统3121被配置为将文件的文件数据由本地存储器传输至云端存储器。在该实施例中,第一执行子系统3121可以为上述图10中执行子系统312中的部分程序代码块。As shown in Figure 11, in this embodiment of the present application, the file management system 310 includes: an instruction processing subsystem 311 and a first execution subsystem 3121. Wherein, 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. In this embodiment, the first execution subsystem 3121 may be part of the program code blocks in the execution subsystem 312 in Figure 10 mentioned above.
通过该实施方式的技术方案,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,方便于用户通过云端对该文件数据的使用,提升用户的使用体验。另外,通过该实施方式的技术方案,该第一执行子系统3121便于被上层的指令处理子系统311调用,且执行文件数据由本地存储器至云端存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,提升操作装置300及其所在计算机设备的使用可靠性。Through the technical solution of this embodiment, 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. In addition, through the technical solution of this embodiment, 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.
可选地,在本申请实施例中,第一执行子系统3121被配置为调用上文实施例中的网络协议系统330以将本地存储器中文件的文件数据传输至云端存储器。Optionally, in the embodiment of the present application, 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.
可选地,如图11所示,在本申请实施例中,上述文件管理系统310还包括:本地管理子系统313,该本地管理子系统313被配置为释放文件的文件数据在本地存储器中占用的存储空间,且在该本地存储器中写入该文件的搬迁标记,该搬迁标记用于指示该文件的文件数据已搬迁至云端存储器。Optionally, as shown in Figure 11, in this embodiment of the present application, 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.
具体地,在本申请实施例中,在文件管理系统310中的第一执行子系统3121将文件的文件数据由本地存储器传输至云端存储器的情况下,该文件管理系统310中的本地管理子系统313用于释放该文件的文件数据在本地存储器中占用的存储空间。例如,本地管理子系统313可将该文件的文件数据大小截断为零,以释放该文件数据占用的存储空间。Specifically, in the embodiment of the present application, when the first execution subsystem 3121 in the file management system 310 transfers the file data of the file from the local storage 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. For example, 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.
进一步地,该本地管理子系统313还用于在本地存储器中写入该文件的搬迁标记,该搬迁标记用于指示该文件的文件数据已搬迁至云端存储器。在计算机设备后续运行过程中,若用户需要对该文件的文件数据进行操作,可首先在本地存储器中检查该文件的搬迁标记,并根据该搬迁标记的检查结果,对该文件的文件数据进行操作。Further, 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. During the subsequent operation of the computer equipment, if the user needs to operate the file data of the file, 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. .
通过本申请实施例的技术方案,该本地管理子系统313能够释放已被传输至云端存储器的文件数据在本地存储器中占用的存储空间,从而节省本地存储器中的存储空间,保证本地存储器具有较为充足的剩余存储空间,不会造成计算机设备的卡顿,提升用户对计算机设备的使用体验。与此同时,在第一执行子系统3121将本地存储器中文件的文件数据传输至云端存储器之后,本地管理子系统313还在本地存储器中写入了该文件的搬迁标记,使得用户后续在对该文件的操作中,计算机设备仍然能够根据用户的操作命令访问本地存储器,且根据该本地存储器中的搬迁标记,对存储于云端存储器中的文件数据进行正常操作,以进一步提升用户对计算机设备的使用体验。Through the technical solution of the embodiment of the present application, 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. At the same time, after the first execution subsystem 3121 transfers the file data of the file in the local storage to the cloud storage, 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. During the file operation, 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.
可选地,在一些实施方式中,上述第一执行子系统3121还被配置为:判断文件的文件数据是否存在于云端存储器。在确定该文件的文件数据不存在于云端存储器的情况下,第一执行子系统3121被配置为将本地存储器中文件的文件数据传输至云端存储器。Optionally, in some implementations, 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.
具体地,在该实施方式中,当指令处理子系统311接收文件的第一搬迁命令,且调用第一执行子系统3121后,该第一执行子系统3121首先确定该文件是否已存在于云端存储器,在确定该文件不存在于云端存储器的情况下,可确定当前接收的第一搬迁命令为有效搬迁命令,执行后续将本地存储器中该文件的文件数据传输至云端存储器。反之,在确定该文件已存储于云端存储器的情况下,则说明当前接收的第一搬迁命令为错误命令,不执行后续动作。Specifically, in this embodiment, 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.
作为示例而非限定,该第一执行子系统3121可通过检查本地存储器中是否存在该文件的搬迁标记,以判断该文件是否已存在于云端存储器。通过该实施方式,可以便捷的对本地存储器进行访问,且根据其中的搬迁标记判断当前待搬迁的文件是否存在于云端存储器,整个方案易于实施且判断速度较快。当然,在其它示例中,第一执行子系统3121还可通过其它方式判断待搬迁的文件是否已存在于云端存储器,本申请实施例对该具体的判断方式不做限定。As an example and not a limitation, 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.
通过该实施方式的技术方案,第一执行子系统3121在根据文件的第一搬迁命令执行对文件的文件数据搬迁之前,判断该文件的文件数据是否存在于云端存储器,从而防止在错误的第一搬迁命令下,重复或无效的执行对文件数据的搬迁,造成系统资源的浪费且影响文件的存储性能。通过该实施方式的技术方案,第一执行子系统3121具有防错机制,能够应对异常指令,因而,可以提高该操作装置300及其所在计算机设备的整体性能。Through the technical solution of this embodiment, 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. Through the technical solution of this embodiment, 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.
图12示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 12 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图12所示,在本申请实施例中,文件管理系统310还包括:第二执行子系统3122。 其中,指令处理子系统311被配置为获取文件的第二搬迁命令,且根据该第二搬迁命令调用第二执行子系统3122。该第二执行子系统3122被配置为将文件的文件数据由云端存储器传输至本地存储器。在该实施例中,第二执行子系统3122可以为上述图10中执行子系统312中的部分程序代码块。As shown in Figure 12, in this embodiment of the present application, the file management system 310 also includes: a second execution subsystem 3122. Wherein, 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. In this embodiment, the second execution subsystem 3122 may be part of the program code blocks in the execution subsystem 312 in Figure 10 mentioned above.
具体地,在本申请实施例中,与上述第一搬迁命令相反,该第二搬迁命令用于指示将该文件的文件数据由云端存储器搬迁至本地存储器,且执行子系统312包括独立的第二执行子系统3121,其被上层的指令处理子系统311调用,并执行上述第二搬迁命令。Specifically, in this embodiment of the present application, contrary to the above-mentioned first relocation command, 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, and 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.
通过本申请实施例的技术方案,该第二执行子系统3122便于被上层的指令处理子系统311调用,且执行文件数据由云端存储器至本地存储器的单向传输,有利于后续对于文件数据在该单向传输过程中出现的问题的定位,进一步提升操作装置300及其所在计算机设备的使用可靠性。另外,云端存储器与本地存储器之间的文件数据相互传输,可以便于实现计算机设备的本地存储器与云端存储器中的文件数据的同步,有利于实现该云端存储器中的数据在多设备中进行共享,方便于用户通过不同设备对该文件数据的使用,提升用户的使用体验。Through the technical solution of the embodiment of the present application, 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. In addition, 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.
可选地,在本申请实施例中,第二执行子系统3122能够调用上文实施例中的网络协议系统330以实现将云端存储器中文件的文件数据传输至本地存储器。Optionally, in this embodiment of the present application, 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.
可选地,如图12所示,在本申请实施例中,上述文件管理系统310还包括:上述本地管理子系统313,该本地管理子系统313被配置为在本地存储器中删除该文件的搬迁标记。Optionally, as shown in Figure 12, in this embodiment of the present application, 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.
具体地,在本申请实施例中,在将云端存储器中文件的文件数据传输至本地存储器后,可在本地存储器中标识该文件的文件数据未被搬迁。例如,可删除本地存储器中用于标识该文件已被搬迁至云端存储器的搬迁标记。Specifically, in this embodiment of the present application, 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.
通过该申请实施例的技术方案,在第二执行子系统3122将文件的文件数据由云端存储器传输至本地存储器的情况下,本地管理子系统313还可将删除该文件的搬迁标记,以便于后续在对该文件的文件数据进行操作的过程中,可以在本地存储器中检查搬迁标记,准确确定文件数据所在的位置,进而执行有效的后续操作。Through the technical solution of the embodiment of this application, when the second execution subsystem 3122 transfers the file data of the file from the cloud storage to the local storage, 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.
图13示出了本申请另一实施例提供的文件的操作装置300的示意性结构框图。FIG. 13 shows a schematic structural block diagram of a file operating device 300 provided by another embodiment of the present application.
如图13所示,在本申请实施例中,操作装置300可包括:文件管理系统310、文件操作系统320以及网络协议系统330。As shown in Figure 13, in this 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.
具体地,文件管理系统310可包括:指令处理子系统311、执行子系统312以及本地管理子系统313。另外,文件操作系统320可包括:操作执行子系统321、缓存管理子系统322以及信息统计子系统323。Specifically, the file management system 310 may include: an instruction processing subsystem 311, an execution subsystem 312, and a local management subsystem 313. In addition, the file operating system 320 may include: an operation execution subsystem 321, a cache management subsystem 322, and an information statistics subsystem 323.
在本申请实施例中,文件管理系统310中的各子系统、文件操作系统320中的各子系统、以及网络协议系统330可被配置为执行上文图3至图12所示实施例的相关功能,具体方案可参见上文实施例的相关描述,此处不做过多赘述。In the embodiment of the present application, 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. For functions and specific solutions, please refer to the relevant descriptions of the above embodiments, and will not be described in detail here.
另外,参见图13所示,文件管理系统310可与文件操作系统320产生交互。作为示例,文件管理系统310中的本地管理子系统313在向本地存储器写入搬迁标记或删除搬迁标记时,该文件管理系统310可调用文件操作系统320以执行在本地存储器中写入搬迁标记或删除搬迁标记。In addition, as shown in FIG. 13 , the file management system 310 can interact with the file operating system 320 . As an example, when the local management subsystem 313 in the file management system 310 writes a relocation mark to the local storage or deletes the relocation mark, 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.
可选地,在一些实施方式中,该文件管理系统310和文件操作系统320可位于图2 中所示的虚拟文件系统(VFS)240的下层,两者能够接收VFS 240发送的相关信息,以执行相应的功能。Optionally, in some implementations, 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.
可选地,在本申请实施例中,文件的操作装置300所在的计算机设备除了可包括如图13中所示的各功能系统以外,还可以进一步包括如图2中所示的相关功能模块。Optionally, in this embodiment of the present application, 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 .
图14示出了本申请实施例提供的一种计算机设备3的示意性结构框图。Figure 14 shows a schematic structural block diagram of a computer device 3 provided by an embodiment of the present application.
如图14所示,该计算机设备3被配置为连接于云端存储器以及本地存储器,该计算机设备3包括:上文任一实施例中的文件的操作装置300。As shown in FIG. 14 , 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.
具体地,在本申请实施例中,云端存储器包括但不限于是云盘或者网盘。本地存储器包括但不限于是非易失性存储器、磁盘、光盘、U盘或者安全数码卡。Specifically, in this embodiment of the present application, 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.
另外,文件的操作装置300可以为一种计算机程序存储介质,其中存储有运行于计算机设备3的内核空间的文件管理系统310以及文件操作系统320。In addition, 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.
可选地,该计算机设备3还可包括处理器,其用于调用操作装置300中的文件管理系统310以及文件操作系统320,以执行对云端存储器和本地存储器中文件的相关操作。Optionally, 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.
可选地,该计算机设备3包括但不限于是终端设备,例如,手机、个人计算机等等。Optionally, the computer device 3 includes but is not limited to a terminal device, such as a mobile phone, a personal computer, etc.
图15示出了本申请实施例提供的一种文件的操作设备4的示意性结构框图。Figure 15 shows a schematic structural block diagram of a file operating device 4 provided by an embodiment of the present application.
如图15所示,该文件的操作设备4包括:云端存储器410、本地存储器420以及上文任一实施例中的文件的操作装置300。As shown in Figure 15, the file operating device 4 includes: cloud storage 410, local storage 420, and the file operating device 300 in any of the above embodiments.
具体地,该云端存储器410、本地存储器420以及操作装置300的相关技术方案可以参见上文实施例的相关描述。Specifically, for 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.
可选地,在一些实施方式中,云端存储器410可包括:信息处理器和文件数据存储器,该信息处理器被配置为对来自操作装置300的信息数据进行处理,并根据处理后的信息数据对该文件数据存储器进行操作。Optionally, in some 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.
作为示例,操作装置300中文件管理系统310和文件操作系统320形成的信息数据可发送至云端存储器410中的信息处理器411,例如,该信息数据可以为请求命令网络包或者文件网络数据包。该信息处理器411可根据网络协议对该请求命令网络包或者文件网络数据包进行数据解析,以得到请求命令数据或者文件数据。进一步地,该信息处理器411能够根据解析得到的请求命令数据从文件数据存储器412中读取文件数据,或者,该信息处理器411能够将解析得到的文件数据存储到文件数据存储器412。As an example, 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. For example, 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. When implemented using software, 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.
可选地,所述计算机为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令能够存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。Optionally, 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.
所述计算机可读存储介质是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质,例如固态硬盘。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.
应理解,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示存在三种关系,例如,A和/或B,表示:单独存在A,同时存在A和B,单独存在B这三种情况,其中A,B是单数或者复数。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系,但也可能表示的是一种“和/或”的关系,具体可参考前后文进行理解。It should be understood that the term "and/or" in this article is only an association relationship describing related objects, indicating that there are three relationships, for example, A and/or B, which means: A alone exists, A and B exist simultaneously, alone There are three cases of B, where A and B are singular or plural. In addition, the character "/" in this article generally indicates that the related objects are an "or" relationship, but it may also indicate an "and/or" relationship. For details, please refer to the previous and later contexts for understanding.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c是单个或者多个。In this application, "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). For example, 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.
应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that in the various embodiments of the present application, 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.
本领域普通技术人员能够意识到,结合本文中所公开的实施例描述的各示例的系统及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员能够对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that the systems and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans will be able to implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统和装置,能够通过其它的方式实现。In the several embodiments provided in this application, it should be understood that the disclosed systems and devices can be implemented in other ways.
例如,以上所描述的装置实施例仅仅是示意性的,例如,所述系统的划分,仅仅为一种逻辑功能划分,实际实现时能够有另外的划分方式,例如多个模块或组件结合或者集成到另一个系统,或一些特征能够被忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接是通过一些接口,装置或模块的间接耦合或通信连接,是电性,机械或其它的形式。For example, the device embodiments described above are only illustrative. For example, the division of the system is only a logical function division. In actual implementation, there can be other division methods, such as the combination or integration of multiple modules or components. to another system, or some features can be ignored, or not implemented. 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.
可选地,在本申请各个实施例中的各功能系统能够集成在一个处理装置中,可选地,是各个模块单独物理存在,或者两个或两个以上模块集成在一个模块中。Optionally, 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.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,能够存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分能够以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等各种能够存储程序代码的介质。If 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. Based on this understanding, 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.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application. should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (25)

  1. 一种文件的操作装置,其特征在于,适用于计算机设备,所述计算机设备配置有本地存储器和云端存储器,所述操作装置包括:A file operating device, characterized in that it 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 device;
    其中,所述文件管理系统被配置为根据文件的第一搬迁命令,将所述文件的文件数据由所述本地存储器搬迁至所述云端存储器;Wherein, 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 operate the file data of the file in the cloud storage according to the operation command of the file.
  2. 根据权利要求1所述的操作装置,其特征在于,所述计算机设备的内存具有缓存空间,所述文件操作系统包括:操作执行子系统和缓存管理子系统;The operating device according to claim 1, characterized in that the memory of the computer device has cache space, and the file operating system includes: an operation execution subsystem and a cache management subsystem;
    所述操作执行子系统被配置为获取所述文件的操作命令,并根据所述操作命令调用所述缓存管理子系统;The operation execution subsystem is configured to obtain an operation command of the file and call the cache management subsystem according to the operation command;
    所述缓存管理子系统被配置为通过所述缓存空间对所述云端存储器中所述文件的文件数据进行操作。The cache management subsystem is configured to operate the file data of the file in the cloud storage through the cache space.
  3. 根据权利要求2所述的操作装置,其特征在于,所述操作命令包括:读命令,所述缓存管理子系统包括:第一缓存管理子系统;The operating device according to claim 2, characterized in that the operation command includes: a read command, and the cache management subsystem includes: a first cache management subsystem;
    所述操作执行子系统被配置为根据所述读命令调用所述缓存管理子系统中的第一缓存管理子系统;The operation execution subsystem is configured to call a 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 Read from the cache space.
  4. 根据权利要求3所述的操作装置,其特征在于,所述第一缓存管理子系统还被配置为在所述缓存空间中同步存储所述文件的至少部分文件数据。The operating device according to claim 3, wherein 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.
  5. 根据权利要求3或4所述的操作装置,其特征在于,所述操作装置还包括:网络协议系统;The operating device according to claim 3 or 4, characterized in that 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.
  6. 根据权利要求3至5中任一项所述的操作装置,其特征在于,所述第一缓存管理子系统还被配置为判断所述文件的文件数据是否存在于所述本地存储器;The operating device according to any one of claims 3 to 5, wherein the first cache management subsystem is further 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 is configured to read the file data of the file from the cloud storage.
  7. 根据权利要求6所述的操作装置,其特征在于,所述第一缓存管理子系统还被配置为判断所述文件的文件数据是否存在于所述云端存储器;The operating device according to claim 6, wherein 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 the file data of the file exists in the local storage.
  8. 根据权利要求7所述的操作装置,其特征在于,在确定所述文件的文件数据不存在于所述云端存储器或确定所述文件的文件数据存在于所述本地存储器的情况下,所述第一缓存管理子系统还被配置为调用所述计算机设备的本地文件系统以从所述本地存储器中读取所述文件的文件数据。The operating device according to claim 7, wherein 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 A cache management subsystem is further configured to call the local file system of the computer device to read the file data of the file from the local storage.
  9. 根据权利要求7或8所述的操作装置,其特征在于,所述第一缓存管理子系统被配置为访问所述本地存储器,并在所述本地存储器中检查所述文件的搬迁标记,根据所述文件的搬迁标记,判断所述文件的文件数据是否存在于所述云端存储器。The operating device according to claim 7 or 8, characterized in that the first cache management subsystem is configured to access the local storage and check the relocation mark of the file in the local storage. The relocation mark of the file is determined to determine whether the file data of the file exists in the cloud storage.
  10. 根据权利要求2至9中任一项所述的操作装置,其特征在于,所述操作命令包括:第一写命令,所述缓存管理子系统包括:第二缓存管理子系统;The operating device according to any one of claims 2 to 9, characterized in that the operation command includes: a first write command, and 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.
  11. 根据权利要求10所述的操作装置,其特征在于,所述第二缓存管理子系统还被配置为在所述缓存空间同步存储所述文件的至少部分新文件数据。The operating device according to claim 10, wherein 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.
  12. 根据权利要求10或11所述的操作装置,其特征在于,所述文件为访问频率低于预设阈值的冷文件,所述第一写命令为对应于所述冷文件的写命令。The operating device according to claim 10 or 11, wherein the file is a cold file with an access frequency lower than a preset threshold, and the first write command is a write command corresponding to the cold file.
  13. 根据权利要求2至12中任一项所述的操作装置,其特征在于,所述操作命令包括:第二写命令,所述缓存管理子系统包括:第三缓存管理子系统;The operating device according to any one of claims 2 to 12, wherein the operation command includes: a second write command, and 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.
  14. 根据权利要求13所述的操作装置,其特征在于,所述文件为访问频率不低于预设阈值的热文件,所述第二写命令为对应于所述热文件的写命令。The operating device according to claim 13, wherein the file is a hot file with an access frequency not lower than a preset threshold, and the second write command is a write command corresponding to the hot file.
  15. 根据权利要求1至14中任一项所述的操作装置,其特征在于,所述计算机设备的用户空间设置有筛选系统,所述文件操作系统还包括:信息统计子系统;The operating device according to any one of claims 1 to 14, characterized in that the user space of the computer device is provided with a filtering system, and the file operating system further 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 is used to feed back to the screening system, so that the screening system determines the file information based on the file information. Whether the opened file is the file that needs to be moved to the cloud storage;
    所述文件管理系统被配置为接收所述筛选系统发送的所述文件的搬迁命令。The file management system is configured to receive a relocation command for the file sent by the screening system.
  16. 根据权利要求15所述的操作装置,其特征在于,所述文件信息包括以下信息的至少一项:打开次数,打开频率、打开时长、生成时间和文件大小。The operating device according to claim 15, wherein the file information includes at least one of the following information: opening times, opening frequency, opening duration, generation time and file size.
  17. 根据权利要求1至16中任一项所述的操作装置,其特征在于,所述文件管理系统包括:指令处理子系统和第一执行子系统;The operating device according to any one of claims 1 to 16, characterized in that 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 file data of the file from the local storage to the cloud storage.
  18. 根据权利要求17所述的操作装置,其特征在于,所述操作装置还包括:网络协议系统;The operating device according to claim 17, characterized in that the operating device further includes: a network protocol system;
    所述第一执行子系统被配置为调用所述网络协议系统以将所述文件的文件数据由所述本地存储器传输至所述云端存储器。The first execution subsystem is configured to call the network protocol system to transmit the file data of the file from the local storage to the cloud storage.
  19. 根据权利要求17或18所述的操作装置,其特征在于,所述文件管理系统还包括:本地管理子系统,所述本地管理子系统被配置为释放所述文件的文件数据在所述本地存储器中占用的存储空间,且在所述本地存储器中写入所述文件的搬迁标记,所述搬 迁标记用于指示所述文件的文件数据已搬迁至所述云端存储器。The operating device according to claim 17 or 18, characterized in that the file management system further includes: a local management subsystem, the local management subsystem is configured to release the file data of the file in the local storage. storage space occupied in the local storage, and a relocation mark of the file is written in the local storage, where the relocation mark is used to indicate that the file data of the file has been moved to the cloud storage.
  20. 根据权利要求17至19中任一项所述的操作装置,其特征在于,所述第一执行子系统还被配置为判断所述文件的文件数据是否存在于所述云端存储器;The operating device according to any one of claims 17 to 19, wherein the first execution subsystem is further 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 is configured to transfer the file data of the file in the local storage to the cloud storage.
  21. 根据权利要求17至20中任一项所述的操作装置,其特征在于,所述文件管理系统还包括:第二执行子系统;The operating device according to any one of claims 17 to 20, wherein the file management system further includes: a second execution subsystem;
    所述指令处理子系统还被配置为获取所述文件的第二搬迁命令,且根据所述搬迁命令调用所述第二执行子系统;The instruction processing subsystem is further 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 is configured to transfer file data of the file from the cloud storage to the local storage.
  22. 根据权利要求21所述的操作装置,其特征在于,所述操作装置还包括:本地管理子系统,所述本地管理子系统被配置为在所述本地存储器中删除所述文件的搬迁标记。The operating device according to claim 21, characterized in that the operating device further includes: a local management subsystem, the local management subsystem is configured to delete the relocation mark of the file in the local storage.
  23. 一种计算机设备,其特征在于,被配置为连接于云端存储器和本地存储器,所述计算机设备包括:如权利要求1至22中任一项所述的文件的操作装置。A computer device, characterized in that it is configured to be connected to a cloud storage and a local storage, and the computer device includes: the file operating device according to any one of claims 1 to 22.
  24. 一种文件的操作设备,其特征在于,包括:云端存储器、本地存储器以及如权利要求1至22中任一项所述的文件的操作装置。A file operating device, characterized in that it includes: a cloud storage, a local storage, and the file operating device according to any one of claims 1 to 22.
  25. 根据权利要求24所述的操作设备,其特征在于,所述云端存储器包括:信息处理器和文件数据存储器,所述信息处理器被配置为对来自所述操作装置的信息数据进行处理,并根据处理后的信息数据对所述文件数据存储器进行操作。The operating device according to claim 24, characterized in that 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 according to The processed information data operates on the file data storage.
PCT/CN2022/088274 2022-04-21 2022-04-21 File operation apparatus, computer device and operation device WO2023201648A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/088274 WO2023201648A1 (en) 2022-04-21 2022-04-21 File operation apparatus, computer device and operation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/088274 WO2023201648A1 (en) 2022-04-21 2022-04-21 File operation apparatus, computer device and operation device

Publications (1)

Publication Number Publication Date
WO2023201648A1 true WO2023201648A1 (en) 2023-10-26

Family

ID=88418772

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/088274 WO2023201648A1 (en) 2022-04-21 2022-04-21 File operation apparatus, computer device and operation device

Country Status (1)

Country Link
WO (1) WO2023201648A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295084A (en) * 2017-06-26 2017-10-24 深圳水晶石数字科技有限公司 A kind of video editing system and method based on high in the clouds
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 (en) * 2020-04-24 2020-09-04 山东电子职业技术学院 Cloud computing method for high-performance scientific computing
CN113238997A (en) * 2021-07-13 2021-08-10 云宏信息科技股份有限公司 Cloud data operation method for terminal equipment, storage medium and terminal equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107295084A (en) * 2017-06-26 2017-10-24 深圳水晶石数字科技有限公司 A kind of video editing system and method based on high in the clouds
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 (en) * 2020-04-24 2020-09-04 山东电子职业技术学院 Cloud computing method for high-performance scientific computing
CN113238997A (en) * 2021-07-13 2021-08-10 云宏信息科技股份有限公司 Cloud data operation method for terminal equipment, storage medium and terminal equipment

Similar Documents

Publication Publication Date Title
WO2019201011A1 (en) System startup method and apparatus, electronic device and storage medium
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
WO2022156370A1 (en) Fpga-based dma device and dma data migration method
CN111930676B (en) Method, device, system and storage medium for communication among multiple processors
US10228993B2 (en) Data dump for a memory in a data processing system
CN108694135A (en) For the method and apparatus that persistently cache stores data in page cache
CN106708627A (en) Multi-virtual-machine mapping and multipath fuse acceleration method and system based on kvm
CN114371811A (en) Method, electronic device and computer program product for storage management
US10783073B2 (en) Chronologically ordered out-of-place update key-value storage system
CN114691300A (en) Hot migration method of virtual machine instance
CN109359092B (en) File management method, desktop display method, device, terminal and medium
CN103902300B (en) Method and system for rapidly installing APK program on Android simulator
WO2021018052A1 (en) Garbage collection method and apparatus
CN103617039A (en) Method and device for accessing user space file system
WO2023201648A1 (en) File operation apparatus, computer device and operation device
CN111782474A (en) Log processing method and device, electronic equipment and medium
WO2022242665A1 (en) Data storage method and related device
EP4130971A1 (en) Systems, methods, and apparatus for the management of device local memory
CN114936189A (en) Application program operation method and device, computer equipment and readable storage medium
WO2023071043A1 (en) File aggregation compatibility method and apparatus, computer device and storage medium
CN109254856A (en) Intelligent POS server-side provides interface to the method for client
CN114817154A (en) Shared file operation method and device, computer equipment and shared file system
CN114327404A (en) File processing method and device, electronic equipment and computer readable medium
WO2023201653A1 (en) File operation method and apparatus, computer device, and readable storage medium

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