CN106202262B - Information processing method and electronic equipment - Google Patents

Information processing method and electronic equipment Download PDF

Info

Publication number
CN106202262B
CN106202262B CN201610500351.8A CN201610500351A CN106202262B CN 106202262 B CN106202262 B CN 106202262B CN 201610500351 A CN201610500351 A CN 201610500351A CN 106202262 B CN106202262 B CN 106202262B
Authority
CN
China
Prior art keywords
read
write data
data volume
preset
write
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
CN201610500351.8A
Other languages
Chinese (zh)
Other versions
CN106202262A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610500351.8A priority Critical patent/CN106202262B/en
Publication of CN106202262A publication Critical patent/CN106202262A/en
Application granted granted Critical
Publication of CN106202262B publication Critical patent/CN106202262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files

Abstract

The invention discloses an information processing method and electronic equipment, comprising the following steps: detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system; acquiring a first read-write data volume of the first read-write request based on the first read-write request; acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period; and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.

Description

Information processing method and electronic equipment
Technical Field
The present invention relates to the field of electronic information technologies, and in particular, to an information processing method and an electronic device.
Background
The file system is a method or data structure used for defining files on a disk or a partition in an operating system of electronic equipment, namely a method for organizing files on the disk, and is responsible for establishing files for users, performing operations such as access, modification, unloading and the like on the files and controlling the reading and writing of the files.
However, in the process of implementing the technical solution of the invention in the embodiments of the present application, the inventors of the present application find that the above-mentioned technology has at least the following technical problems:
in the prior art, the technical problem that the bandwidth of a file system cannot be effectively and reasonably utilized exists.
Disclosure of Invention
The embodiment of the invention provides an information processing method and electronic equipment, which are used for solving the technical problem that the bandwidth of a file system cannot be effectively and reasonably utilized in the prior art.
An embodiment of the present application provides an information processing method, including:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
Optionally, the obtaining of the first preset read-write data volume of the first process in the current period specifically includes:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
Optionally, the obtaining a first preset read-write data volume of the first process in the current cycle based on the second read-write data volume and the second preset read-write data volume specifically includes:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
Optionally, when the sum of the first read-write data amount and the completed read-write data amount is smaller than the first preset read-write data amount, the method further includes:
judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not, and obtaining a first judgment result;
if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current time;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
Optionally, before the obtaining of the first preset read-write data volume of the first process in the current period, the method further includes:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
Another aspect of the embodiments of the present application provides an electronic device, including:
a housing;
a processor disposed within the housing, the processor being configured to:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
Optionally, the processor is configured to:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
Optionally, the processor is configured to:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
Optionally, when the sum of the first read-write data amount and the completed read-write data amount is smaller than the first preset read-write data amount, the processor is further configured to:
judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not, and obtaining a first judgment result;
if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current time;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
Optionally, before the first preset read-write data volume of the first process in the current period is obtained, the processor is further configured to:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
In another aspect, an embodiment of the present application further provides an electronic device, including:
the device comprises a detection obtaining unit, a processing unit and a processing unit, wherein the detection obtaining unit is used for detecting and obtaining a first read-write request corresponding to a first process at a first moment in a current period of a file system;
a first obtaining unit, configured to obtain a first read-write data volume of the first read-write request based on the first read-write request;
a second obtaining unit, configured to obtain a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and the processing unit is used for processing the first read-write request in the next adjacent period of the current period when the sum of the first read-write data volume and the finished read-write data volume is greater than the first preset read-write data volume.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
according to the technical scheme in the embodiment of the application, a first read-write request corresponding to a first process is detected and obtained at a first moment in the current period of the file system; acquiring a first read-write data volume of the first read-write request based on the first read-write request; acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period; and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
That is, in the present application, when the sum of the read-write bandwidth amount corresponding to the read-write request of a process in the file system at a certain time in the current period and the read-write data amount completed in the period exceeds the preset read-write data amount of the period, the read-write request at the time is delayed to the next period adjacent to the current period for processing, so as to avoid the process from occupying bandwidth resources allocated to other processes by the file system, thereby effectively solving the technical problem that the bandwidth of the file system cannot be effectively and reasonably utilized in the prior art, and achieving the technical effect of effectively and reasonably utilizing the bandwidth of the file system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention.
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present application;
fig. 2 is a flowchart of a specific implementation manner of step S103 in the first embodiment of the present application;
fig. 3 is a flowchart of a specific implementation manner of step S1032 in the first embodiment of the present application;
FIG. 4 is a flowchart of a specific implementation of steps that may also be performed in one embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a second embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The embodiment of the invention provides an information processing method and electronic equipment, which are used for solving the technical problem that the bandwidth of a file system cannot be effectively and reasonably utilized in the prior art.
In order to solve the technical problems, the general idea of the embodiment of the present application is as follows:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
In the method, when the sum of the read-write bandwidth amount corresponding to the read-write request of a process in the file system at a certain moment in the current period and the read-write data amount completed in the period exceeds the preset read-write data amount of the period, the read-write request at the moment is delayed to the next period adjacent to the current period for processing, so that the process can be prevented from occupying bandwidth resources allocated to other processes by the file system, the technical problem that the bandwidth of the file system cannot be effectively and reasonably utilized in the prior art is effectively solved, and the technical effect of effectively and reasonably utilizing the bandwidth of the file system is realized.
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the technical solutions of the present invention. All other embodiments obtained by a person skilled in the art without any inventive work based on the embodiments described in the present application are within the scope of the protection of the technical solution of the present invention.
Example one
Referring to fig. 1, an information processing method provided in an embodiment of the present application includes:
s101: detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
s102: acquiring a first read-write data volume of the first read-write request based on the first read-write request;
s103: acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
s104: and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
In a specific implementation process, the information processing method may be applied to an electronic device having a file system and capable of performing read/write operations such as access, modification, unloading and the like on a file, such as a mobile phone, a computer, a server and the like.
When the method in the embodiment of the present application is used for processing, step S101 is executed first, that is, a first read-write request corresponding to a first process is detected and obtained at a first time in a current period of a file system.
In the specific implementation process, the above example is continued, and in practical applications, the computer is provided with an operating system, such as an XP operating system, a Windows 7 system, and the like, and the file system is used as a method and a data structure for defining files on a disk or a partition in the operating system of the computer, and is responsible for establishing files for a user, and performing read-write operations such as access, modification, dump, and the like on the files. In a specific practical process, at a certain time in a current read-write cycle of the file system, for convenience of description, the time is taken as a first time, and then, at the first time in the current read-write cycle, when a first process needs to perform a first read-write operation based on the file system, a first read-write request is initiated to the file system, and at this time, the computer can detect and obtain the first read-write request initiated by the first process at the first time in the current cycle of the file system.
In practical applications, before the computer performs the step S101, the computer may further perform the following steps: and determining that the file system needs to control the read-write data volume of the first process in the current period.
In the specific implementation process, continuing with the above example, before the computer detects and obtains the first read-write request initiated by the first process at the first time of the current period of the file system, the computer may first determine whether the file system needs to perform bandwidth control on the read-write operation of the first process in the current period, and in practical applications, when the file system needs to control the read-write operation of a certain process, the computer may add a control flag, such as a control word, for performing the read-write bandwidth control on the process in an inode (index node) in the management information of the global control unit of the computer.
Then, when the computer detects that the first process initiates the first read-write request at the first moment of the current period of the file system, the computer can determine whether the first ongoing read-write bandwidth needs to be read or not by inquiring the control mark in the management information of the global control unit, and when the computer determines that the first ongoing read-write bandwidth needs to be read and controlled by inquiring the control mark in the management information of the global control unit, the computer can acquire the first read-write request initiated by the first process at the first moment of the current period of the file system.
After step S101 is executed, the method in this embodiment of the application may execute step S102, that is, based on the first read-write request, obtain a first read-write data volume of the first read-write request.
In the specific implementation process, continuing with the above example, after the computer detects and obtains the first read-write request initiated by the first process at the first time of the current period of the file system, the computer may obtain the read-write data volume corresponding to the first read-write request according to the obtained first read-write request of the first process, where for convenience of description, the read-write data volume of the first read-write request is referred to as the first read-write data volume, and in practical applications, the first read-write data volume may be 32kb, or 64kb, or of course, may be of other sizes, and this is not given in this list, nor is any limitation.
After step S102 is executed, the method in this embodiment of the application may execute step S103, that is, obtain a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process that has been completed in the current period.
In the specific implementation process, continuing with the above example, after the computer obtains the first read-write data volume corresponding to the first read-write request based on obtaining the first read-write request, the computer may obtain the preset read-write data volume that the file system allocates to the first process in the current period, where for convenience of description, the preset read-write data volume is the first preset read-write data volume, and the computer may also obtain the read-write data volume that the first process has completed in the current period, in an actual application, please refer to fig. 2, and the step S103 of obtaining the first preset read-write data volume of the first process in the current period may be specifically implemented in the following manner:
s1031: determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
s1032: and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
In the specific implementation process, continuing with the above example, after the computer obtains the first read-write data volume corresponding to the first read-write request based on the first read-write request, the computer determines that the file system is in the previous adjacent period of the current period, and the preset read-write data volume allocated to the first process is the second preset read-write data volume.
Then, the computer may obtain the first preset read-write data volume allocated to the first process by the file system in the current cycle according to the second preset read-write data volume obtained in the previous cycle adjacent to the current cycle of the first process and the actually completed second read-write data volume, in an actual application, referring to fig. 3, step S1032 may be further specifically implemented in the following manner:
s201: determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
s202: determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
s203: and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
In the specific implementation process, continuing to use the above example, after the computer determines the second preset read-write data amount and the actually completed second read-write data amount of the first process in the previous adjacent period of the current period, the computer may further determine that the first process exceeds the read-write data amount (also referred to as a missing bandwidth) of the second preset read-write data amount allocated to the first process by the file system in the previous adjacent period, in the actual application, the excess read-write data amount may be 0, which indicates that the read-write data amount required to be read and written by the first process in the previous adjacent period does not exceed the second preset read-write data amount allocated to the first process by the file system, and the excess read-write data amount may also be a value greater than 0, which indicates that the read-write data amount required to be read and written by the first process in the previous adjacent period exceeds the second preset read-write data amount allocated to the first process by the file system, and the part exceeding the second preset read-write data quantity allocated to the first process by the file system is the part exceeding the read-write data quantity, namely the actual bandwidth.
Then, the computer may further obtain a third amount of read-write data according to a difference between a second amount of read-write data actually completed by the first process in a previous adjacent period and a second preset amount of read-write data allocated to the first process by the file system in the previous adjacent period, where in practical application, the third amount of read-write data may be 0, which indicates that the second amount of read-write data actually completed by the first process in the previous adjacent period is consistent with the second preset amount of read-write data allocated to the first process by the file system in the previous adjacent period, and the third amount of read-write data may be a numerical value (negative number) smaller than 0, which indicates that the second amount of read-write data actually completed by the first process in the previous adjacent period is smaller than the second preset amount of read-write data allocated to the first process by the file system in the previous adjacent period.
After the computer obtains the excess read-write data amount of the first process exceeding the second preset read-write data amount allocated to the first process by the file system in the last adjacent period, the difference between the second read-write data amount actually completed by the first process in the last adjacent period and the second preset read-write data amount allocated to the first process by the file system in the last adjacent period, namely the third read-write data amount, and the second read-write data amount actually completed by the first process in the last adjacent period, the first preset read-write data amount allocated to the first process by the file system in the current period can be obtained according to the following formula (1):
Ai=Ui-1+αDi-1+β(Ui-1-Ai-1) (1)
wherein, in the above formula (1), AjFor the current period, the file system allocates to a first preset read-write data volume, A, of the first processj-1For a second predetermined read-write data quantity, Uj-1For writing data of a second quantity, Uj-1-Aj-1The difference between the second read-write data volume actually completed by the first process in the previous adjacent cycle and the second preset read-write data volume allocated to the first process by the file system in the previous adjacent cycle, that is, the third read-write data volume, Dj-1in order to exceed the read-write data volume, namely lack bandwidth, alpha is a bandwidth increasing coefficient, β is a bandwidth decreasing coefficient, j represents the current period, and j-1 represents the previous adjacent period of the current period.
After step S103 is executed, the method in this embodiment of the application may execute step S104, that is, when the sum of the first read-write data amount and the completed read-write data amount is greater than the first preset read-write data amount, process the first read-write request in a next adjacent cycle of the current cycle.
In a specific implementation process, continuing to use the above example, after the computer obtains the first preset read-write data amount allocated to the first process by the file system in the current cycle according to the above manner, the computer may determine whether the sum of the first read-write data amount corresponding to the first read-write request obtained by the first process in the current cycle and the read-write data amount already completed by the first process in the current cycle is greater than the first preset read-write data amount, and when it is determined that the sum of the first read-write data amount and the read-write data amount already completed is greater than the first preset read-write data amount, the computer may delay the first read-write request obtained by the first process in the current cycle to the next adjacent cycle of the current cycle for processing.
Therefore, by the above method, when the sum of the read-write bandwidth amount corresponding to the read-write request at a certain moment in the current period and the read-write data amount completed in the period exceeds the preset read-write data amount of the period, the read-write request at the moment is delayed to the next period adjacent to the current period for processing, so as to avoid the process from occupying bandwidth resources allocated to other processes by the file system, thereby effectively solving the technical problem that the bandwidth of the file system cannot be effectively and reasonably utilized in the prior art, and realizing the technical effect of effectively and reasonably utilizing the bandwidth of the file system.
In practical application, there may also be a case where the sum of the first read-write data amount corresponding to the first read-write request obtained by the first process in the current cycle and the read-write data amount already completed by the first process in the current cycle is smaller than a first preset read-write data amount, at this time, the computer may further execute the steps shown in fig. 4 to implement smooth control of the file read-write bandwidth, so as to ensure that the read-write service is smooth in one cycle of the file system, the service in the first half cycle runs at a high speed, and the service in the second half cycle runs completely blocked, and once the long-time blocking occurs, the service running error may be caused:
s301: judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not, and obtaining a first judgment result;
s302: if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current time;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
In the specific implementation process, continuing to use the above example, after the computer determines that the sum of the first read-write data amount of the first process and the read-write data amount already completed in the current period is less than the first preset read-write data amount, the computer then determines whether the sum of the first read-write data volume and the completed read-write data volume is greater than a first preset completed read-write data volume for a first time period, in practical applications, the first time period is a time period from a starting time of the current cycle to a first time in the current cycle, and the first time is not included, where the first time is a time when the first read/write request is detected, for example, the starting time of the current cycle is the first second, the length of the current cycle is 10 seconds, and the first time is the 5 th second, so the first time period may be from the starting time of the current cycle, that is, the first second to the fifth second, and does not include this time period of the fifth second.
Here, U represents the read-write data amount of the first process completed, d represents the first read-write data amount corresponding to the first read-write request, T represents the current cycle, T1 represents the first time period, a represents the first preset read-write data amount, and then the first preset completed read-write data amount of the first time period is T1Then, whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume of the first time period is judged, that is, whether the formula (2) is satisfied is judged:
U+d>(T1/T*A) (2)
if the sum of the first read-write data volume and the completed read-write data volume is less than or equal to a first preset read-write completion data volume in a first time period, that is, the formula (2) is not satisfied, then the computer will delay a first preset time period based on the current time, that is, the first time, and then process the first read-write request, where the first preset time period is: d/b × T, where b represents the size of data that is subjected to IOPS (read/write) once by the file system, b may be 4kb or 8kb in practical applications, and may also be other values, which are not limited herein, and T represents the time that the file system needs to consume for performing IOPS once, that is, the time required for reading and writing the data with the size of b.
Therefore, by the mode, the smooth control of the file read-write bandwidth can be realized, so that the read-write service is smooth in one period of the file system, the condition that the service in the first half period runs at high speed and the service in the second half period runs completely is avoided, and the service running error can be caused once the service is blocked for a long time.
Example two
Referring to fig. 5, based on the same inventive concept as the first embodiment, a second embodiment of the present application provides an electronic device, including:
a housing 1;
a processor 2 disposed within the housing, the processor being configured to:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
Optionally, the processor is configured to:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
Optionally, the processor is configured to:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
Optionally, when the sum of the first read-write data amount and the completed read-write data amount is smaller than the first preset read-write data amount, the processor is further configured to:
judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not, and obtaining a first judgment result;
if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current time;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
Optionally, before the first preset read-write data volume of the first process in the current period is obtained, the processor is further configured to:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
EXAMPLE III
Referring to fig. 6, based on the same inventive concept as the first embodiment of the present application, a third embodiment of the present application provides an electronic device, including:
the detection obtaining unit 10 is configured to, at a first time in a current period of the file system, detect and obtain a first read-write request corresponding to a first process;
a first obtaining unit 20, configured to obtain a first read-write data amount of the first read-write request based on the first read-write request;
a second obtaining unit 30, configured to obtain a first preset read-write data amount of the first process in the current period, and a read-write data amount that the first process has completed in the current period;
and the processing unit 40 is configured to process the first read-write request in a next adjacent cycle of the current cycle when a sum of the first read-write data amount and the completed read-write data amount is greater than the first preset read-write data amount.
Optionally, the first obtaining unit specifically includes:
a first determining unit, configured to determine a second preset read-write data size of the first process in a previous adjacent cycle of the current cycle, and determine a second read-write data size that the first process completes in the previous adjacent cycle;
and the second obtaining unit is used for obtaining a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
Optionally, the second obtaining unit specifically includes:
the second determining unit is used for determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
a third determining unit, configured to determine that a difference between the second read-write data amount and the second preset read-write data amount is a third read-write data amount;
and the first obtaining unit is used for obtaining the first preset read-write data volume based on the excess read-write data volume, the third read-write data volume and the second read-write data volume.
Optionally, the electronic device further includes:
the first judging unit is used for judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not and obtaining a first judging result;
the processing subunit is configured to, if the first determination result is negative, delay a first preset duration based on the current time and then process the first read-write request;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
Optionally, the electronic device further includes:
and the fourth determining unit is used for determining that the file system needs to control the read-write data volume of the first process in the current period.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
according to the technical scheme in the embodiment of the application, a first read-write request corresponding to a first process is detected and obtained at a first moment in the current period of the file system; acquiring a first read-write data volume of the first read-write request based on the first read-write request; acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period; and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
That is, in the present application, when the sum of the read-write bandwidth amount corresponding to the read-write request of a process in the file system at a certain time in the current period and the read-write data amount completed in the period exceeds the preset read-write data amount of the period, the read-write request at the time is delayed to the next period adjacent to the current period for processing, so as to avoid the process from occupying bandwidth resources allocated to other processes by the file system, thereby effectively solving the technical problem that the bandwidth of the file system cannot be effectively and reasonably utilized in the prior art, and achieving the technical effect of effectively and reasonably utilizing the bandwidth of the file system.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Specifically, the computer program instructions corresponding to the information processing method in the embodiment of the present application may be stored on a storage medium such as an optical disc, a hard disc, a usb disk, or the like, and when the computer program instructions corresponding to the information processing method in the storage medium are read or executed by an electronic device, the method includes the following steps:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period;
and when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle.
Optionally, the step of storing in the storage medium: the obtaining of the first preset read-write data volume of the first process in the current period specifically includes, when executed, the corresponding computer program instruction:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
Optionally, the step of storing in the storage medium: the obtaining, based on the second read-write data volume and the second preset read-write data volume, a first preset read-write data volume of the first process in the current cycle, where when executed, the corresponding computer program instruction specifically includes:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
Optionally, the storage medium further stores another computer program instruction, the another computer program instruction is executed when the sum of the first read-write data amount and the completed read-write data amount is smaller than the first preset read-write data amount, and the execution process includes the following steps:
judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period or not, and obtaining a first judgment result;
if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current time;
the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time.
Optionally, the storage medium further stores other computer program instructions, and the other computer program instructions are further stored in the step of: the obtaining of the first preset read-write data volume of the first process in the current period is executed before, and the executing process includes the following steps:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (9)

1. An information processing method comprising:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request, wherein the first read-write data volume is the bandwidth resource volume of a file system required to be occupied by the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period, wherein the first preset read-write data volume is a bandwidth resource volume allocated to the first process by the file system in the current period;
when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle;
when the sum of the first read-write data volume and the finished read-write data volume is smaller than a first preset read-write data volume, judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period, and obtaining a first judgment result, wherein the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time; and
and if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current moment.
2. The method according to claim 1, wherein the obtaining of the first preset read-write data volume of the first process in the current period specifically includes:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
3. The method of claim 2, wherein the obtaining the first preset read-write data volume of the first process in the current cycle based on the second read-write data volume and the second preset read-write data volume specifically includes:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
4. The method as claimed in claim 1, wherein before the obtaining of the first preset read-write data amount of the first process in the current cycle, the method further comprises:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
5. An electronic device, comprising:
a housing;
a processor disposed within the housing, the processor being configured to:
detecting and acquiring a first read-write request corresponding to a first process at a first moment in a current period of a file system;
acquiring a first read-write data volume of the first read-write request based on the first read-write request, wherein the first read-write data volume is the bandwidth resource volume of a file system required to be occupied by the first read-write request;
acquiring a first preset read-write data volume of the first process in the current period and a read-write data volume of the first process completed in the current period, wherein the first preset read-write data volume is a bandwidth resource volume allocated to the first process by the file system in the current period;
when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume, processing the first read-write request in a next adjacent cycle of the current cycle;
when the sum of the first read-write data volume and the finished read-write data volume is smaller than a first preset read-write data volume, judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period, and obtaining a first judgment result, wherein the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time; and
and if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current moment.
6. The electronic device of claim 5, wherein the processor is to:
determining a second preset read-write data volume of the first process in a previous adjacent period of the current period, and determining a second read-write data volume finished by the first process in the previous adjacent period;
and acquiring a first preset read-write data volume of the first process in the current period based on the second read-write data volume and the second preset read-write data volume.
7. The electronic device of claim 6, wherein the processor is to:
determining the excess read-write data quantity exceeding the second preset read-write data quantity in the last adjacent period;
determining the difference between the second read-write data volume and the second preset read-write data volume as a third read-write data volume;
and obtaining the first preset read-write data volume based on the exceeding read-write data volume, the third read-write data volume and the second read-write data volume.
8. The electronic device of claim 5, wherein before the obtaining of the first preset amount of read-write data of the first process in the current cycle, the processor is further configured to:
and determining that the file system needs to control the read-write data volume of the first process in the current period.
9. An electronic device, comprising:
the device comprises a detection obtaining unit, a processing unit and a processing unit, wherein the detection obtaining unit is used for detecting and obtaining a first read-write request corresponding to a first process at a first moment in a current period of a file system;
a first obtaining unit, configured to obtain a first read-write data volume of the first read-write request based on the first read-write request, where the first read-write data volume is a bandwidth resource volume of a file system that needs to be occupied by the first read-write request;
a second obtaining unit, configured to obtain a first preset read-write data amount of the first process in the current period and a read-write data amount that the first process has completed in the current period, where the first preset read-write data amount is a bandwidth resource amount allocated by the file system to the first process in the current period;
the processing unit is used for processing the first read-write request in the next adjacent period of the current period when the sum of the first read-write data volume and the finished read-write data volume is larger than the first preset read-write data volume; when the sum of the first read-write data volume and the finished read-write data volume is smaller than a first preset read-write data volume, judging whether the sum of the first read-write data volume and the finished read-write data volume is larger than a first preset finished read-write data volume in a first time period, and obtaining a first judgment result, wherein the first time period is a time period from the starting time of the current cycle to the first time and does not include the first time; and if the first judgment result is negative, processing the first read-write request after delaying a first preset time length on the basis of the current moment.
CN201610500351.8A 2016-06-29 2016-06-29 Information processing method and electronic equipment Active CN106202262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610500351.8A CN106202262B (en) 2016-06-29 2016-06-29 Information processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610500351.8A CN106202262B (en) 2016-06-29 2016-06-29 Information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106202262A CN106202262A (en) 2016-12-07
CN106202262B true CN106202262B (en) 2020-09-25

Family

ID=57463478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610500351.8A Active CN106202262B (en) 2016-06-29 2016-06-29 Information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106202262B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107682280A (en) * 2017-09-22 2018-02-09 郑州云海信息技术有限公司 The method, apparatus and equipment of QOS flows control based on NFS
CN111176569A (en) * 2019-12-27 2020-05-19 浪潮电子信息产业股份有限公司 Flow quota method, device, system and equipment and readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014158A (en) * 2010-11-29 2011-04-13 北京兴宇中科科技开发股份有限公司 Cloud storage service client high-efficiency fine-granularity data caching system and method
CN102508740A (en) * 2011-10-26 2012-06-20 上海文广互动电视有限公司 Remote replication method of file system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1457894A3 (en) * 1995-10-26 2005-04-20 Matsushita Electric Industrial Co., Ltd. File system
CN101699413B (en) * 2009-10-30 2011-12-07 成都市华为赛门铁克科技有限公司 Hard disk data read-write control method, device and data storage system
CN102104614A (en) * 2009-12-22 2011-06-22 成都市华为赛门铁克科技有限公司 Data access method and device
CN103186537B (en) * 2011-12-27 2018-01-12 腾讯科技(北京)有限公司 A kind of data read-write method and device based on index order
US20150143021A1 (en) * 2012-12-26 2015-05-21 Unisys Corporation Equalizing wear on storage devices through file system controls

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014158A (en) * 2010-11-29 2011-04-13 北京兴宇中科科技开发股份有限公司 Cloud storage service client high-efficiency fine-granularity data caching system and method
CN102508740A (en) * 2011-10-26 2012-06-20 上海文广互动电视有限公司 Remote replication method of file system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于相变存储器的存储技术研究综述》;冒伟 等;《计算机学报》;20150531(第5期);945-957 *

Also Published As

Publication number Publication date
CN106202262A (en) 2016-12-07

Similar Documents

Publication Publication Date Title
CN108089814B (en) Data storage method and device
US9396353B2 (en) Data allocation among devices with different data rates
US9298389B2 (en) Operating a memory management controller
CN110768912A (en) API gateway current limiting method and device
CN107807797B (en) Data writing method and device and server
CN107451006B (en) Techniques to limit performance variations in storage devices
CN108959118B (en) Data writing method and device
CN113625973B (en) Data writing method, device, electronic equipment and computer readable storage medium
CN109343793B (en) Data migration method and device
CN109710286B (en) System upgrading method, device, equipment and storage medium
CN112783831B (en) File migration method and device
CN106202262B (en) Information processing method and electronic equipment
CN114328281A (en) Method and device for processing abnormal power failure of solid state disk, electronic equipment and medium
CN109656479B (en) Method and device for constructing memory command sequence
CN109343796B (en) Data processing method and device
US8726101B2 (en) Apparatus and method for tracing memory access information
CN114297630A (en) Malicious data detection method and device, storage medium and processor
CN107229421B (en) Method and device for creating video data storage system, method and device for writing file into video data storage system and method and device for reading video data storage system
CN110750521A (en) Data migration method, device and equipment and computer readable storage medium
CN109558249B (en) Control method and device for concurrent operation
US11226738B2 (en) Electronic device and data compression method thereof
CN106557385B (en) Data snapshot method and storage device
CN104298614A (en) Method for storing data block in memory device and memory device
CN106201344B (en) Information processing method and electronic equipment
CN111078122B (en) Data processing method, device and equipment

Legal Events

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