CN108399046B - File operation request processing method and device - Google Patents

File operation request processing method and device Download PDF

Info

Publication number
CN108399046B
CN108399046B CN201710065337.4A CN201710065337A CN108399046B CN 108399046 B CN108399046 B CN 108399046B CN 201710065337 A CN201710065337 A CN 201710065337A CN 108399046 B CN108399046 B CN 108399046B
Authority
CN
China
Prior art keywords
file
operation request
file operation
path information
priority
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710065337.4A
Other languages
Chinese (zh)
Other versions
CN108399046A (en
Inventor
孟圣智
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201710065337.4A priority Critical patent/CN108399046B/en
Publication of CN108399046A publication Critical patent/CN108399046A/en
Application granted granted Critical
Publication of CN108399046B publication Critical patent/CN108399046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0635Configuration or reconfiguration of storage systems by changing the path, e.g. traffic rerouting, path reconfiguration

Abstract

The application discloses a file operation request processing method and device. One embodiment of the method comprises: intercepting a file operation request, wherein the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value used for indicating the priority of the file operation request; determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information; and replacing the priority value as the target priority value, and inserting the file operation request into a file operation request queue. The embodiment improves the isolation effect on the disk I/O resources.

Description

File operation request processing method and device
Technical Field
The present application relates to the field of computer technologies, in particular, to the field of internet technologies, and in particular, to a method and an apparatus for processing a file operation request.
Background
With the development of computer technology, it is more and more common to utilize virtualization technology to manage resources of a computer. Virtualization technology involves isolation of various resources, where I/O (Input/Output) resource isolation of a disk is an important factor affecting server application performance.
Generally, after receiving a file operation request, an existing method is to set a specified throughput and IOPS (Input/Output Operations Per Second) parameter to operate a file to which the file operation request is directed, so as to implement disk I/O resource isolation. However, this method for processing file operation requests can only limit the disk resources used by a single container on the block device, and in a scenario where a large number of containers are deployed in a mixed manner, a large number of file operation requests may exist at the same time, which results in a poor isolation effect of disk I/O resource isolation.
Disclosure of Invention
The present application aims to provide an improved file operation request processing method and apparatus to solve the technical problems mentioned in the above background section.
In a first aspect, the present application provides a file operation request processing method, including: intercepting a file operation request, wherein the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value used for indicating the priority of the file operation request; determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information; and the replacement priority value is the target priority value, and the file operation request is inserted into the file operation request queue.
In some embodiments, the method further comprises: determining whether other file operation requests except the file operation request exist in the file operation request queue; and updating the priority value contained in the other file operation requests in response to the fact that at least one other file operation request except the file operation request exists in the file operation request queue.
In some embodiments, updating the priority values included in the remaining file operation requests includes: and increasing the priority value contained in each of the at least one other file operation request by a preset value.
In some embodiments, the file for which each file operation request in the file operation request queue is directed is a directory file or a device file.
In some embodiments, the method further comprises: and operating the files to which the file operation requests in the file operation request queue aim at according to the sequence from high to low of the priority indicated by the priority numerical value.
In some embodiments, the method further comprises: and for each file operation request in the file operation request queue, performing resource allocation on the file operation request, and operating the file to which the file operation request aims based on the allocated resource.
In a second aspect, the present application provides a file operation request processing apparatus, including: the file processing device comprises an intercepting unit, a processing unit and a processing unit, wherein the intercepting unit is configured to intercept a file operation request, and the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value used for indicating the priority of the file operation request; the first determining unit is configured to determine path information matched with the file path information in a preset path information set and acquire a preset target priority value matched with the determined path information; and the replacing unit is configured to replace the priority value as a target priority value and insert the file operation request into the file operation request queue.
In some embodiments, the apparatus further comprises: the second determining unit is configured to determine whether other file operation requests except the file operation request exist in the file operation request queue; and the updating unit is configured to update the priority value contained in each of the at least one remaining file operation request in response to determining that at least one remaining file operation request other than the file operation request exists in the file operation request queue.
In some embodiments, the update unit is further configured to: and increasing the priority value contained in each of the at least one other file operation request by a preset value.
In some embodiments, the apparatus further comprises: and the operation unit is configured to operate the files to which the file operation requests in the file operation request queue aim according to the sequence of the priorities indicated by the priority numerical values from high to low.
In some embodiments, the file for which each file operation request in the file operation request queue is directed is a directory file or a device file.
In some embodiments, the apparatus further comprises: and the resource allocation unit is configured to allocate resources for each file operation request in the file operation request queue, and operate the file to which the file operation request is directed based on the allocated resources.
According to the file operation request processing method and device, the file operation request comprising the file path information and the priority value is intercepted, then the path information matched with the file path information is determined from the preset path information set so as to determine the target priority value, finally the priority value contained in the file operation request is replaced by the target priority value, and the file operation request is stored in the file operation request queue, so that the priority of the file operation request is reset, the disk I/O resources are accessed according to a reasonable sequence, and the isolation effect of disk I/O resource isolation is improved.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a file operation request processing method according to the present application;
FIG. 3 is a schematic diagram of an application scenario of a file operation request processing method according to the present application;
FIG. 4 is a flow diagram of yet another embodiment of a file operation request processing method according to the present application;
FIG. 5 is a schematic block diagram illustrating one embodiment of a file operation request processing apparatus according to the present application;
FIG. 6 is a schematic block diagram of a computer system suitable for use in implementing a server according to embodiments of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 illustrates an exemplary system architecture 100 to which the file operation request processing method or file operation request processing apparatus of the present application may be applied.
As shown in fig. 1, the system architecture 100 may include first servers 101, 102, 103, a second server 104, and a third server 105.
The first servers 101, 102, 103 may interact with the second server 104, for example, sending file operation requests, receiving information, and the like. The first servers 101, 102, and 103 may be independent servers, virtual dedicated servers established based on the second server 104, or containers established based on the second server 104.
The second server 104 may be various types of servers that provide various services, such as a database server, a high performance computing server, and the like. The second server 104 may perform processing such as analysis on data such as the received file operation request, and interact with the third server 105 based on the processing result, for example, perform operation on a file managed by the third server 105.
The third server 105 may be a server that provides various services, such as a file management server that provides file storage and management services. The file management server can manage and schedule the storage space of the file, and provides the logical structure, the physical structure, the storage method and the mapping from the identifier to the actual address of the file; the control operation and the access operation of the file and the sharing of the file can be realized; reliable file security and protection measures and the like can also be provided.
It should be noted that the first servers 101, 102, 103, the second server 104 and the third server 105 may be the same server.
It should be noted that the file operation request processing method provided in the embodiment of the present application is generally executed by the second server 104, and accordingly, the file operation request processing apparatus is generally disposed in the second server 104.
It should be understood that the number of first servers, second servers, and third servers in fig. 1 is merely illustrative. There may be any number of first, second and third servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a file operation request processing method according to the present application is shown. The file operation request processing method comprises the following steps:
step 201, intercepting a file operation request.
In this embodiment, an electronic device (for example, the second server 104 shown in fig. 1) on which the file operation request processing method operates may intercept a file operation request sent by another server (for example, the first servers 101, 102, 103 shown in fig. 1) connected to the electronic device, where the file operation request includes file path information of a file to which the file operation request is directed and a priority value indicating a priority of the file operation request, and the file operation request may be one or more. In practice, the first server may be one or more independent servers, or may be one or more virtual servers or containers constructed based on the electronic device. It should be noted that the file operation request can be used to request various operations on a file, such as opening a file, creating a file, deleting a file, establishing a synchronous link at another location for a file or directory, reading data from a file, writing data into a file, and so on. It should be further noted that the file path information may be a character string for describing a storage path of the file, where the character string may be composed of characters such as letters, numbers, symbols, and the like. In general, the file path information may further include a file name of the file. Further, the priority value may be any value (e.g., 1, 20, 100, etc.) for representing the priority of the file operation request.
It should be noted that the file for which the file operation request is directed may be a file managed in a server (for example, the third server 105 shown in fig. 1) connected to the electronic device and used for managing the file. In practice, the server for managing files may be a stand-alone server, or may be a file system in the electronic device. The file system may organize and allocate space of a file storage device (e.g., a magnetic disk, an optical disk, etc.) installed in the electronic device, and may also be responsible for storing files, protecting and retrieving stored files, and the like.
In some optional implementations of this embodiment, the file for which the file operation request is directed may be a directory file. The directory file may be configured to store a mapping relationship between a file name and an inode number. In practice, the index node number may be an identifier for indicating an index node, and the index node may be a data structure in an operating system, which contains various information related to a file, such as the time when a certain file was last accessed or modified, the size of the file, and the like.
In some optional implementations of this embodiment, the file for which the file operation request is directed may be a device file, where the device file may be a block device file that performs data transmission in units of blocks, such as a magnetic disk, an optical disk, and the like. In addition, the file to which the file operation request is directed may be a character device file.
In some optional implementations of the present embodiment, the file for which the file operation request is directed may be a common file, such as a plain text file, a binary file, a file in a data format, and so on. In addition, the file to which the file operation request is directed may also be a connection file, a pipe file, or the like.
Step 202, determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information.
In this embodiment, the electronic device may be preset with a path information set, where the path information set may include at least one piece of path information. Here, the path information may be a character string for describing a storage path of the file, or may be a regular expression set in advance based on the storage path of the file. In practice, the path information may also contain a file name. In addition, for each piece of path information in the path information set, the electronic device may store a preset priority value matching the path information, and pre-establish and store a mapping between the path information and the priority value, so that the electronic device finds the priority value matching each piece of path information based on the mapping. In practice, different types of files may be matched with different priority values. As an example, the priority value matched with the path information of the regular log file is 3, the priority value matched with the path information of the alarm log file is 2, and the like. It should be noted that different types of files may be matched with the same priority value.
In this embodiment, the electronic device may first extract any path information in the path information set; then, the electronic device may match the file path information received in step 201 with the extracted path information by using a character string matching method; in response to determining that the file path information matches the extracted path information, the electronic device may obtain a priority value matching the extracted path information based on the mapping and determine the extracted priority value as a target priority value; in response to determining that the file path information does not match the extracted path information, the electronic device may extract next path information that is not subjected to a matching operation from the set of path information and match the next path information with the file path information.
It should be noted that, after it is determined that the extracted path information matches with the file path information, the electronic device may not perform the matching operation of the next path information any more; otherwise, matching the path information which is not subjected to the matching operation in the path information set with the file operation information one by one until the matching is successful. In addition, if it is determined in sequence that all the information in the path information set do not match the file path information, the priority value received in step 201 is not operated.
It should be noted that the above string matching method is a well-known technology widely studied and applied at present, and is not described herein again.
Step 203, replacing the priority value as a target priority value, and inserting the file operation request into a file operation request queue.
In this embodiment, the electronic device may store a file operation request queue for storing file operation requests. The electronic device may first replace the priority value included in the file operation request received in step 201 with the target priority value determined in step 202; then, the file operation request received in step 201 is inserted into the file operation request queue, and the file to which the file operation request in the file operation request queue is directed is operated based on the size sequence of the priority numerical values included in the file operation requests in the file operation request queue.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the file operation request processing method according to the present embodiment. In the application scenario of fig. 3, first, the first servers 301, 302, 303 respectively send file operation requests 304, 305, 306 containing file path information and priority count values. Then, the second server 307 intercepts the file operation requests 304, 305, and 306, and determines path information in a preset path information set that matches the file path information included in each file operation request. Then, the second server 307 obtains preset target priority values matched with the determined path information, and replaces the priority values included in the file operation requests 304, 305, and 306 with corresponding target priority values, so as to obtain the replaced file operation requests 308, 309, and 310. Finally, the second server 307 stores the file operation requests 308, 309, and 310 in a file operation queue 311, so as to operate the file stored in the third server 312 and targeted by the file operation request in the file operation request queue 311.
The method provided by the embodiment of the application intercepts the file operation request comprising the file path information and the priority value, then determines the path information matched with the file path information from the preset path information set so as to determine the target priority value, finally replaces the priority value contained in the file operation request with the target priority value, and stores the file operation request into the file operation request queue, thereby realizing the resetting of the priority of the file operation request, so as to access the disk I/O resources according to a reasonable order, and improving the isolation effect of the disk I/O resource isolation.
With further reference to FIG. 4, a flow 400 of yet another embodiment of a file operation request processing method is shown. The process 400 of the file operation request processing method includes the following steps:
step 401, intercepting a file operation request.
In this embodiment, an electronic device (for example, the second server 104 shown in fig. 1) on which the file operation request processing method operates may intercept a file operation request sent by another server (for example, the first servers 101, 102, 103 shown in fig. 1) connected to the electronic device, where the file operation request includes file path information of a file to which the file operation request is directed and a priority value indicating a priority of the file operation request. It should be noted that the file for which the file operation request is directed may be a file managed in a server (for example, the third server 105 shown in fig. 1) connected to the electronic device and used for managing the file. It is noted that the file to which the file operation request is directed may be a directory file, a device file, a general file (e.g., a plain text file, a binary file, a file in data format, etc.), a connection file, a pipe file, and so on.
Step 402, determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information.
In this embodiment, the electronic device may preset a path information set, may further store a preset priority value matching each piece of path information, and previously establish and store a mapping between the path information and the priority value.
In this embodiment, the electronic device may first extract any path information in the path information set; then, the file path information can be matched with the extracted path information by using a character string matching method; in response to determining that the file path information matches the extracted path information, a priority value matching the extracted path information may be obtained based on the mapping and determined as a target priority value; in response to determining that the file path information does not match the extracted path information, extracting next path information which is not subjected to matching operation from the path information set, matching the next path information with the file path information, and repeating the steps until the matching is successful or no path information which is not subjected to matching operation exists in the path information set.
Step 403, replacing the priority value as the target priority value, and inserting the file operation request into the file operation request queue.
In this embodiment, the electronic device may store a file operation request queue for storing file operation requests. The electronic device may first replace the priority value included in the file operation request with the target priority value; and then, inserting the file operation request into the file operation request queue.
It should be noted that the specific operations in steps 401 to 403 are substantially the same as the specific operations in steps 201 to 203, and are not described herein again.
Step 404, determining whether the file operation request queue has other file operation requests except the file operation request.
In this embodiment, after the file operation request is inserted into the file operation request queue, the electronic device may further determine whether other file operation requests except the file operation request exist in the file operation request queue; in response to determining that there are no remaining file operation requests, the file to which the file operation request is directed may be directly operated. Step 405 may be performed in response to determining that there are remaining file operation requests.
Step 405, in response to determining that at least one other file operation request except the file operation request exists in the file operation request queue, updating the priority value included in the other file operation requests.
In this embodiment, in response to determining that at least one remaining file operation request other than the file operation request exists in the file operation request queue, the electronic device may update the priority value included in the remaining file operation requests. It should be noted that, for each remaining file operation request, the priority value included in the remaining file operation request may be used to indicate the priority of the remaining file operation request.
In some optional implementation manners of this embodiment, the electronic device may increase a priority value included in each of the at least one remaining file operation request by a first preset value, so as to update the priority value included in the remaining file operation request. The preset value may be any value.
In some optional implementation manners of this embodiment, the electronic device may first determine the remaining file operation requests with the priority value smaller than the second preset value, and then increase the priority value included in the determined remaining file operation requests by a preset third value, so as to update the priority value included in the remaining file operation requests. The second preset value and the third preset value may be any values.
In some optional implementation manners of this embodiment, the electronic device may further replace the priority value with a preset priority value that is preset and matches with the priority value, where the priority value is included in each of the at least one remaining file operation request. The preset priority value may be any value.
And 406, operating the files to which the file operation requests in the file operation request queue aim at according to the sequence of the priorities indicated by the priority numerical values from high to low.
In this embodiment, the electronic device may first rank the file operation requests in the file operation request queue according to a sequence from high to low of a priority indicated by a priority value; and then, operating the files for which the file operation requests aim at in sequence according to the arranged sequence. It should be noted that the file operation request can be used to request various operations on a file, such as opening a file, creating a file, deleting a file, establishing a synchronous link at another location for a file or directory, reading data from a file, writing data into a file, and so on.
In this embodiment, for each file operation request in the file operation request queue, the electronic device may further perform resource allocation for the file operation request, for example, set a throughput value when operating a file to which the file operation request is directed, an IOPS (Input/Output Operations Per Second), and the like. The electronic device may operate on the file to which the file operation request is directed based on the allocated resource.
As can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the flow 400 of the file operation request processing method in this embodiment highlights a step of updating the priority value included in the remaining file operation requests in the file request queue. Therefore, according to the scheme described in this embodiment, after the file operation request is inserted into the file operation request queue each time, the priority of the original file operation request can be set, so that the file to which the file operation request with a lower priority is directed cannot be operated. Therefore, the priority of the file operation request is further reset, so that the disk I/O resources are accessed according to a reasonable sequence, and the isolation effect of disk I/O resource isolation is further improved.
With further reference to fig. 5, as an implementation of the method shown in the above-mentioned figures, the present application provides an embodiment of a file operation request processing apparatus, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 5, the file operation request processing apparatus 500 according to the present embodiment includes: an intercepting unit 501, configured to intercept a file operation request, where the file operation request includes file path information of a file to which the file operation request is directed and a priority value indicating a priority of the file operation request; a first determining unit 502, configured to determine path information that matches the file path information in a preset path information set, and obtain a preset target priority value that matches the determined path information; the replacing unit 503 is configured to replace the priority value with the target priority value, and insert the file operation request into the file operation request queue.
In this embodiment, the intercepting unit 501 of the file operation request processing apparatus 500 may intercept a file operation request sent by a server (e.g., the first servers 101, 102, and 103 shown in fig. 1) connected to the file operation request processing apparatus 500, where the file operation request includes file path information of a file to which the file operation request is directed and a priority value indicating a priority of the file operation request. The file to which the file operation request is directed may be a file managed by a server (for example, the third server 105 shown in fig. 1) for managing a file connected to the file operation request processing apparatus 500.
In this embodiment, the first determining unit 502 may preset a path information set, may further store a preset priority value matching each path information, and preset and store a mapping between the path information and the priority value.
In this embodiment, the first determining unit 502 may first extract any path information in the path information set; then, the file path information can be matched with the extracted path information by using a character string matching method; in response to determining that the file path information matches the extracted path information, a priority value matching the extracted path information may be obtained based on the mapping and determined as a target priority value; in response to determining that the file path information does not match the extracted path information, extracting next path information which is not subjected to matching operation from the path information set, matching the next path information with the file path information, and repeating the steps until the matching is successful or no path information which is not subjected to matching operation exists in the path information set.
In this embodiment, the replacing unit 503 may store a file operation request queue for storing file operation requests. The replacing unit 503 may first replace the priority value included in the file operation request with the target priority value; and then, inserting the file operation request into the file operation request queue.
In some optional implementations of this embodiment, the file operation request processing apparatus 500 may further include a second determining unit 504 and an updating unit 505. The second determining unit 504 may be configured to determine whether the remaining file operation requests except the file operation request exist in the file operation request queue. The updating unit 505 may be configured to update the priority value included in each of the at least one remaining file operation request in response to determining that at least one remaining file operation request other than the file operation request exists in the file operation request queue.
In some optional implementation manners of this embodiment, the updating unit 505 may be further configured to increase a priority value included in each of the at least one remaining file operation request by a preset value.
In some optional implementations of the present embodiment, the file operation request processing apparatus 500 may further include an operation unit 506. The operation unit 506 may be configured to operate on the files in the file operation request queue according to the order from high to low of the priority indicated by the priority value.
In some optional implementations of this embodiment, the file operation request processing apparatus 500 may further include a resource allocation unit 507. The allocating unit 507 may be configured to, for each file operation request in the file operation request queue, allocate resources for the file operation request, and operate the file to which the file operation request is directed based on the allocated resources.
According to the device provided by the embodiment of the application, the file operation request comprising the file path information and the priority value is intercepted by the intercepting unit 501, then the first determining unit 502 determines the path information matched with the file path information from the preset path information set so as to determine the target priority value, and finally the replacing unit 503 replaces the priority value contained in the file operation request with the target priority value and stores the file operation request into the file operation request queue, so that the priority of the file operation request is reset, the disk I/O resources are accessed according to a reasonable order, and the isolation effect of disk I/O resource isolation is improved.
Referring now to FIG. 6, shown is a block diagram of a computer system 600 suitable for use in implementing a server according to embodiments of the present application. The terminal device/server shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 601. It should be noted that the computer readable medium described herein can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an interception unit, a first determination unit, and a replacement unit. The names of these units do not in some cases form a limitation on the unit itself, and for example, the intercepting unit may also be described as a "unit that intercepts file operation requests".
As another aspect, the present application also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be present separately and not assembled into the device. The computer readable medium carries one or more programs which, when executed by the apparatus, cause the apparatus to: intercepting a file operation request, wherein the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value of the file operation request; determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information; and replacing the priority value as the target priority value, and inserting the file operation request into a file operation request queue.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (14)

1. A file operation request processing method is characterized by comprising the following steps:
intercepting a file operation request, wherein the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value used for indicating the priority of the file operation request;
determining path information matched with the file path information in a preset path information set, and acquiring a preset target priority value matched with the determined path information, wherein the determining of the path information matched with the file path information in the preset path information set comprises: extracting any path information in the path information set, and matching the any path information with the file path information; in response to the path information not matching the file path information, extracting next path information from the set of path information, matching the extracted next path information with the file path information;
and replacing the priority value as the target priority value, and inserting the file operation request into a file operation request queue.
2. The file operation request processing method according to claim 1, further comprising:
determining whether other file operation requests except the file operation request exist in the file operation request queue;
and in response to determining that at least one other file operation request except the file operation request exists in the file operation request queue, updating the priority value contained in the other file operation requests.
3. The method according to claim 2, wherein the updating the priority value included in the remaining file operation requests comprises:
and increasing the priority value contained in each of the at least one other file operation request by a preset value.
4. The file operation request processing method according to claim 3, further comprising:
and operating the files to which the file operation requests in the file operation request queue aim at according to the order of the priority indicated by the priority numerical value from high to low.
5. The method according to claim 4, wherein the file for which each file operation request in the file operation request queue is directed is a directory file or a device file.
6. The file operation request processing method according to claim 4, further comprising:
and for each file operation request in the file operation request queue, performing resource allocation on the file operation request, and operating the file to which the file operation request aims based on the allocated resource.
7. A file operation request processing apparatus, characterized in that the apparatus comprises:
the file processing device comprises an intercepting unit, a processing unit and a processing unit, wherein the intercepting unit is configured to intercept a file operation request, and the file operation request comprises file path information of a file to which the file operation request aims and a priority numerical value used for indicating the priority of the file operation request;
a first determining unit, configured to determine path information that matches the file path information in a preset path information set, and acquire a preset target priority value that matches the determined path information, where determining the path information that matches the file path information in the preset path information set includes: extracting any path information in the path information set, and matching the any path information with the file path information; in response to the path information not matching the file path information, extracting next path information from the set of path information, matching the extracted next path information with the file path information;
and the replacing unit is configured to replace the priority value into the target priority value and insert the file operation request into a file operation request queue.
8. The file operation request processing apparatus according to claim 7, wherein the apparatus further comprises:
a second determining unit, configured to determine whether there are other file operation requests except the file operation request in the file operation request queue;
and the updating unit is configured to update the priority value contained in each of the at least one remaining file operation request in response to determining that at least one remaining file operation request except the file operation request exists in the file operation request queue.
9. The file operation request processing apparatus according to claim 8, wherein the updating unit is further configured to:
and increasing the priority value contained in each of the at least one other file operation request by a preset value.
10. The file operation request processing apparatus according to claim 9, wherein the apparatus further comprises:
and the operation unit is configured to operate the files to which the file operation requests in the file operation request queue aim according to the order from high to low of the priority indicated by the priority numerical value.
11. The apparatus according to claim 10, wherein the file for which each file operation request in the file operation request queue is directed is a directory file or a device file.
12. The file operation request processing apparatus according to claim 10, wherein the apparatus further comprises:
and the resource allocation unit is configured to allocate resources for each file operation request in the file operation request queue, and operate the file to which the file operation request is directed based on the allocated resources.
13. A server, characterized in that the server comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN201710065337.4A 2017-02-06 2017-02-06 File operation request processing method and device Active CN108399046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710065337.4A CN108399046B (en) 2017-02-06 2017-02-06 File operation request processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710065337.4A CN108399046B (en) 2017-02-06 2017-02-06 File operation request processing method and device

Publications (2)

Publication Number Publication Date
CN108399046A CN108399046A (en) 2018-08-14
CN108399046B true CN108399046B (en) 2021-03-19

Family

ID=63093599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710065337.4A Active CN108399046B (en) 2017-02-06 2017-02-06 File operation request processing method and device

Country Status (1)

Country Link
CN (1) CN108399046B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110888770B (en) * 2018-09-10 2023-07-07 百度在线网络技术(北京)有限公司 Method and device for transmitting information
CN109726184B (en) * 2018-12-25 2023-08-22 上海创功通讯技术有限公司 File synchronization method, device, network node and storage medium
CN111831431B (en) * 2020-06-30 2023-07-21 深圳市万翼数字技术有限公司 CAD file analysis method, related device and system
CN112333093A (en) * 2020-11-23 2021-02-05 迈普通信技术股份有限公司 Policy routing path determining method and device, network equipment and readable storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100453060B1 (en) * 2002-11-15 2004-10-15 삼성전자주식회사 Methods for fixing-up lastURL representing path name and file name of asset in MPV environment
CN101510181A (en) * 2009-03-19 2009-08-19 北京中星微电子有限公司 Bus arbitration method and bus arbitration apparatus
CN105468305A (en) * 2015-12-09 2016-04-06 浪潮(北京)电子信息产业有限公司 Data caching method, apparatus and system
CN106021535A (en) * 2016-05-25 2016-10-12 宁波萨瑞通讯有限公司 File ordering method and mobile device

Also Published As

Publication number Publication date
CN108399046A (en) 2018-08-14

Similar Documents

Publication Publication Date Title
CN108399046B (en) File operation request processing method and device
CN110719215B (en) Flow information acquisition method and device of virtual network
US11150949B2 (en) Resource release method, resource allocation method, devices, and computer program products
CN109710695B (en) Transaction request validity identification and initiation method, device, equipment and medium
CN108733449B (en) Method, apparatus, and computer-readable storage medium for managing virtual machines
CN114281663A (en) Test processing method, test processing device, electronic equipment and storage medium
CN108696554B (en) Load balancing method and device
CN116303126B (en) Caching method, data processing method and electronic equipment
CN111475424B (en) Method, apparatus, and computer readable storage medium for managing a storage system
CN111694992A (en) Data processing method and device
CN107526530B (en) Data processing method and device
CN114722108A (en) Customer service data processing method and device, electronic equipment and storage medium
CN113094415B (en) Data extraction method, data extraction device, computer readable medium and electronic equipment
US20200192784A1 (en) Estimating the number of coding styles by analyzing source code
CN113726885A (en) Method and device for adjusting flow quota
CN113779048A (en) Data processing method and device
CN112306372A (en) Method, apparatus and program product for processing data
CN112988559A (en) Request shunting method and device
CN114063879B (en) Method for processing operation command, electronic device and storage medium
CN109543024A (en) A kind of text handling method and device
US10769180B2 (en) Efficient dataflow processing for objects
CN114490583A (en) Data migration method and device, electronic equipment and storage medium
CN115098444A (en) Directory data processing method and device, electronic equipment and storage medium
CN114490891A (en) Data processing method, apparatus, device, medium, and program product
CN115705387A (en) File generation method and device, terminal equipment and computer medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant