CN114489492A - Data storage method, safety device and data storage system - Google Patents
Data storage method, safety device and data storage system Download PDFInfo
- Publication number
- CN114489492A CN114489492A CN202111668969.2A CN202111668969A CN114489492A CN 114489492 A CN114489492 A CN 114489492A CN 202111668969 A CN202111668969 A CN 202111668969A CN 114489492 A CN114489492 A CN 114489492A
- Authority
- CN
- China
- Prior art keywords
- memory
- data
- value
- storage
- access
- 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.)
- Granted
Links
- 238000013500 data storage Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000015654 memory Effects 0.000 claims abstract description 307
- 238000004364 calculation method Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012544 monitoring process Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 2
- 102200141461 rs104893769 Human genes 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0604—Improving or facilitating administration, e.g. storage management
- G06F3/0607—Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0611—Improving I/O performance in relation to response time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/062—Securing storage systems
- G06F3/0622—Securing storage systems in relation to access
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0644—Management of space entities, e.g. partitions, extents, pools
Abstract
The invention is suitable for the technical field of data storage, and provides a data storage method, a safety device and a data storage system, wherein the method comprises the following steps: determining a set access value of each memory according to the historical daily average access amount of the stored data and the rated storage values of various memories; storing the data to be stored into a temporary storage memory to become temporary storage data; when the storage time of the temporary storage data in the temporary storage reaches a preset time value, calculating to obtain the daily average access amount of the temporary storage data; and storing the temporary storage data into a memory according to the daily average access amount and the set access value of the temporary storage data, and recording a storage path. The invention comprises a plurality of types of memories, the reading speed of each type of memory is different, the data is stored in a grading way according to the access quantity of the data, the data with low daily access quantity is stored in the memory with low reading speed, and the relation between the storage cost and the data access speed is well balanced.
Description
Technical Field
The invention relates to the technical field of data storage, in particular to a data storage method, a safety device and a data storage system.
Background
With the advent of the information-oriented era, more and more electronic data are generated in the production and life processes, various storage systems are required to store the electronic data, and a large amount of data test the storage and reading capabilities of the storage systems. Therefore, it is desirable to provide a data storage method, a security device, and a data storage system, which aim to solve the above problems.
Disclosure of Invention
In view of the shortcomings in the prior art, an object of the present invention is to provide a data storage method, a security device, and a data storage system, so as to solve the problems in the background art.
The invention is realized in such a way that a data storage method comprises the following steps:
determining a set access value of each memory according to the historical daily average access amount of the stored data and rated storage values of various memories, wherein the reading speed of each memory is different;
storing the data to be stored into a temporary storage memory to become temporary storage data;
when the storage time of the temporary storage data in the temporary storage reaches a preset time value, calculating to obtain the daily average access amount of the temporary storage data;
and storing the temporary storage data into a memory according to the daily average access amount and the set access value of the temporary storage data, and recording a storage path.
As a further scheme of the invention: the step of determining the set access value of each memory according to the historical daily average access amount of the stored data and the rated storage values of various memories specifically comprises the following steps:
obtaining rated storage values of each type of memory, wherein the memory comprises a first type memory, a second type memory and a third type memory, the reading speed of the first type memory is higher than that of the second type memory, the reading speed of the second type memory is higher than that of the third type memory, and the rated storage values of the first type memory, the second type memory and the third type memory are A, B and C respectively;
acquiring historical daily average visit volume of stored data, wherein the historical daily average visit volume is S;
and calculating to obtain a set access value of each memory, wherein the set access value of the three types of memories is 0, the set access value of the two types of memories is S x C/(A + B + C), and the set access value of the one type of memories is S x (B + C)/(A + B + C).
As a further scheme of the invention: the step of storing the temporary storage data into the memory according to the daily average access amount and the set access value of the temporary storage data specifically includes:
acquiring the daily average visit quantity N of temporary storage data and the occupied space value M of the temporary storage data;
acquiring a total storage data value of a memory, wherein the total storage data value is K;
calculating to obtain a judgment access value, wherein the judgment access value is N K/M;
and comparing the judgment access value with the set access value, and storing the temporary storage data into a corresponding memory according to the comparison result.
As a further scheme of the invention: the step of comparing the determined access value with the set access value and storing the temporary storage data into the corresponding memory according to the comparison result specifically includes:
comparing the decision access value with the set access value;
when S + C/(A + B + C) > judges that the access value is not less than 0, temporarily storing the data into three types of memories;
when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S (C/(A + B + C), temporarily storing the temporarily stored data into a secondary memory;
and when the access value is judged to be more than or equal to S (B + C)/(A + B + C), temporarily storing the data into a class of memory.
As a further scheme of the invention: the method further comprises the following steps:
monitoring the used occupation ratio value of the memory;
when the used occupation ratio value of the memory reaches the set occupation ratio value, generating memory expansion information to remind a user to expand the memory;
when the memory is expanded, the rated storage value of the memory is automatically updated.
It is another object of the present invention to provide a data storage system, the system comprising:
the setting access value determining module is used for determining the setting access value of each memory according to the historical daily average access amount of the stored data and the rated storage values of various memories, and the reading speed of each memory is different;
the temporary storage module is used for storing the data to be stored into the temporary storage to become temporary storage data;
the daily average access amount calculation module is used for calculating the daily average access amount of the temporary storage data when the storage time of the temporary storage data in the temporary storage reaches a preset time value; and
and the data storage module is used for storing the temporary storage data into the memory according to the daily average access amount and the set access value of the temporary storage data and recording a storage path.
As a further scheme of the invention: the setting access value determination module includes:
the rated storage value determining unit is used for acquiring the rated storage value of each type of memory, and the memory comprises a first type of memory, a second type of memory and a third type of memory, wherein the reading speed of the first type of memory is higher than that of the second type of memory, the reading speed of the second type of memory is higher than that of the third type of memory, and the rated storage values of the first type of memory, the second type of memory and the third type of memory are A, B and C respectively;
the historical daily average visit amount acquisition unit is used for acquiring the historical daily average visit amount of the stored data, and the historical daily average visit amount is S; and
and the access value setting calculation unit is used for calculating and obtaining a set access value of each memory, the access values of the three types of memories are set to be 0, the access values of the two types of memories are set to be S (B + C)/(A + B + C), and the access values of the one type of memories are set to be S (B + C)/(A + B + C).
As a further scheme of the invention: the data storage module includes:
the device comprises an occupied space value determining unit, a storage unit and a control unit, wherein the occupied space value determining unit is used for acquiring the daily average visit quantity N of temporary storage data and the occupied space value M of the temporary storage data;
a total storage data value determining unit, configured to obtain a total storage data value of a memory, where the total storage data value is K; a judgment access value calculation unit, configured to calculate a judgment access value, where the judgment access value is N × K/M; and
and the numerical value comparison unit is used for comparing the judgment access value with the set access value and storing the temporary storage data into the corresponding memory according to the comparison result.
As a further scheme of the invention: the numerical value comparison unit includes:
a numerical value determination subunit for comparing the determination access value with the set access value;
the data storage subunit stores the temporarily stored data into the three types of memories when S x C/(A + B + C) > judges that the access value is not less than 0; when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S (C/(A + B + C), temporarily storing the temporarily stored data into a secondary memory; and when the access value is judged to be more than or equal to S (B + C)/(A + B + C), temporarily storing the data into a class of memory.
It is a further object of the present invention to provide a data storage security apparatus comprising a storage device, a processor and a computer program, wherein the computer program is stored in the storage device, and when executed by the processor, causes the processor to perform the steps of the data storage method.
The conference room reservation information receiving module is used for receiving conference room reservation information, and the conference room reservation information comprises conference room information, participant information and participant time information;
and the reservation information identification module is used for identifying the information of the attendees, generating a non-employee account when the information of the attendees comprises non-company working hours, automatically generating an account password, and sending the non-employee account and the corresponding account password to the reservation terminal.
Compared with the prior art, the invention has the beneficial effects that: the method comprises a plurality of types of memories, wherein the reading speed of each type of memory is different, the data is stored in a grading way according to the access amount of the data, specifically, a set access value of the memory is required to be set, and then the temporarily stored data is stored into the memory according to the daily average access amount and the set access value of the temporarily stored data, so that the data with high daily average access amount can be automatically stored into the memory with high reading speed, the data with low daily average access amount is stored into the memory with low reading speed, and the relation between the storage cost and the data access speed is well balanced.
Drawings
FIG. 1 is a flow chart of a data storage method.
Fig. 2 is a flowchart of determining a set access value for each memory in a data storage method.
Fig. 3 is a flowchart of a data storage method for storing temporary storage data in a memory.
Fig. 4 is a flowchart of a data storage method for storing temporary storage data into a corresponding memory according to a comparison result.
FIG. 5 is a flow chart of a method for monitoring a used fraction of a memory in a data storage system.
FIG. 6 is a schematic diagram of a data storage system.
Fig. 7 is a schematic structural diagram of a set access value determination module in a data storage system.
FIG. 8 is a block diagram of a data storage module in a data storage system.
FIG. 9 is a diagram illustrating a structure of a value comparison unit in a data storage system.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Specific implementations of the present invention are described in detail below with reference to specific embodiments.
As shown in fig. 1, an embodiment of the present invention provides a data storage method, where the method includes the following steps:
s100, determining a set access value of each memory according to the historical daily average access amount of the stored data and rated storage values of various memories, wherein the reading speed of each memory is different;
s200, storing the data to be stored into a temporary storage to become temporary storage data;
s300, when the storage time of the temporary storage data in the temporary storage reaches a preset time value, calculating the daily average visit amount of the temporary storage data;
and S400, storing the temporary storage data into a memory according to the daily average access amount and the set access value of the temporary storage data, and recording a storage path.
It should be noted that, with the advent of the information-oriented era, more and more electronic data are generated in the production and life processes, various storage systems are required to store the electronic data, and a large amount of data examines the storage and reading capabilities of the storage systems.
In the embodiment of the present invention, first, multiple types of memories are included, the access rate of each type of memory is different, and the set access value of each memory is determined according to the historical daily average access amount of stored data and the rated storage value of each type of memory, it can be understood that a memory with a lower access rate is used for storing data with a lower daily average access amount, and a memory with a higher access rate is used for storing data with a higher daily average access amount, so that the relationship between two key factors, i.e., the storage cost and the data access speed, can be well balanced, for example, if three types of memories are respectively: the read speed of the first type memory is higher than that of the second type memory, the read speed of the second type memory is higher than that of the third type memory, it is easy to understand that the set access value of the first type memory is higher than that of the second type memory, the set access value of the second type memory is higher than that of the third type memory, the first type memory is used for storing frequently accessed data, under the condition that rated storage values are the same, the cost of the first type memory is higher than that of the second type memory, and the cost of the second type memory is higher than that of the third type memory; it should be noted that, in the embodiment of the present invention, data is stored according to an access amount, when new data needs to be stored, the access amount of the new data is unknown, and therefore, the data to be stored needs to be stored in a temporary storage to become temporary storage data, when a storage time of the temporary storage data in the temporary storage reaches a preset time value, a daily average access amount of the temporary storage data is calculated, the preset time value is set by itself according to a requirement, and may be a week, a half month, a month, or the like, and finally, the temporary storage data is stored in a storage according to the daily average access amount of the temporary storage data and a set access value, and a storage path is recorded, so that data with a high daily average access amount can be automatically stored in a storage with a high reading speed, data with a low daily average access amount can be stored in a storage with a low reading speed, the relationship between storage cost and data access speed is well balanced.
As shown in fig. 2, as a preferred embodiment of the present invention, the step of determining the set access value of each memory according to the historical daily average access amount of the stored data and the rated storage values of various types of memories specifically includes:
s101, obtaining rated storage values of each type of memory, wherein the memory comprises a first type memory, a second type memory and a third type memory, the reading speed of the first type memory is higher than that of the second type memory, the reading speed of the second type memory is higher than that of the third type memory, and the rated storage values of the first type memory, the second type memory and the third type memory are A, B and C respectively;
s102, acquiring historical daily average visit volume of stored data, wherein the historical daily average visit volume is S;
and S103, calculating to obtain a set access value of each memory, wherein the set access value of the three types of memories is 0, the set access value of the two types of memories is S x C/(A + B + C), and the set access value of the first type of memory is S x (B + C)/(A + B + C).
In the embodiment of the present invention, before determining the set access value of the memory, it is necessary to obtain a rated storage value of the memory and a historical daily average access amount of the stored data, where the rated storage values of the first-class memory, the second-class memory and the third-class memory are A, B and C, respectively, and the historical daily average access amount is S, then the set access value of the third-class memory is calculated to be 0, the set access value of the second-class memory is S/(a + B + C), the set access value of the first-class memory is S (B + C)/(a + B + C), it is easy to understand that the third-class memory is the lowest-level memory, and no access lower limit is set, for example, a 20T, B is 30T, C50T, S is 200000 times, and the 200000 times is the historical daily average access amount of all data stored in the first-class memory, the second-class memory and the third-class memory, the historical daily average access amount can be obtained according to the historical access amount of the last week, month or quarter, and at this time, the set access value of the second-class memory is 100000 times, and the set access value of the first-class memory is 160000 times.
As shown in fig. 3, as a preferred embodiment of the present invention, the step of storing the temporary storage data in the memory according to the average daily access amount and the set access value of the temporary storage data specifically includes:
s401, acquiring the daily average visit quantity N of temporary storage data and the occupied space value M of the temporary storage data;
s402, acquiring a total storage data value of a memory, wherein the total storage data value is K;
s403, calculating to obtain a judgment access value, wherein the judgment access value is N × K/M;
s404, comparing the judgment access value with the set access value, and storing the temporary storage data into a corresponding memory according to the comparison result.
In the embodiment of the present invention, before temporarily storing the temporarily stored data in the memory, it is necessary to obtain an average daily access amount N of the temporarily stored data and an occupied space value M of the temporarily stored data, and obtain a total stored data value of the memory, where the total stored data value of the memory refers to a space value occupied by the current memory, the total stored data value is K, for example, the average daily access amount N is 20 times, the occupied space value M of the temporarily stored data is 8G, the total stored data value is K40T, and then a determination access value is calculated, where N/M is 10 times, 40 times, 1024/8 is 102400 times.
As shown in fig. 4, as a preferred embodiment of the present invention, the step of comparing the determination access value with the set access value and storing the temporary storage data into the corresponding memory according to the comparison result specifically includes:
s4041, comparing the determination access value with the set access value;
s4042, when S × C/(A + B + C) > judges that the access value is not less than 0, storing the temporarily stored data into the three types of memories;
s4043, when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S C/(A + B + C), temporarily storing the temporarily stored data into a two-type memory;
and S4044, when the access value is judged to be not less than S x (B + C)/(A + B + C), storing the temporarily stored data into a first type of memory.
In the embodiment of the present invention, the determination access value and the set access value are directly compared, and the temporary storage data is automatically stored in the corresponding memory according to the comparison result, for example, the set access value of the three-class memory is 0 times, the set access value of the two-class memory is 100000 times, the set access value of the one-class memory is 160000 times, and when the determination access value of the calculated temporary storage data is 102400 times, the temporary storage data is transferred to the two-class memory.
As shown in fig. 5, as a preferred embodiment of the present invention, the data storage method further includes:
s501, monitoring the used occupation ratio value of the memory;
s502, when the used proportion value of the memory reaches the set proportion value, generating memory capacity expansion information to remind a user to expand the memory;
and S503, after the memory is expanded, automatically updating the rated storage value of the memory.
In the embodiment of the present invention, it is easy to understand that, in order to avoid that the memory is full, the capacity expansion processing needs to be performed on the memory in time, when the used percentage value of the memory reaches the set percentage value, the capacity expansion information of the memory is generated to remind a user to perform capacity expansion on the memory, for example, the set percentage value is 90%, when the used percentage value of the memory reaches 90%, the embodiment of the present invention automatically generates the capacity expansion information of the memory to warn relevant workers to perform capacity expansion on the memory in time, and when the memory is subjected to capacity expansion, the embodiment of the present invention automatically updates the rated storage value of the expanded memory.
As shown in fig. 6, an embodiment of the present invention further provides a data storage system, where the system includes:
the access value setting module 100 is configured to determine a set access value of each memory according to a historical daily average access amount of stored data and rated storage values of various types of memories, where the reading speed of each type of memory is different;
the temporary storage module 200 is configured to store data to be stored into a temporary memory to become temporary storage data;
the daily average access amount calculation module 300 is used for calculating the daily average access amount of the temporarily stored data when the storage time of the temporarily stored data in the temporary memory reaches a preset time value; and
and the data storage module 400 is used for storing the temporary storage data into the memory according to the daily average access amount and the set access value of the temporary storage data and recording the storage path.
In the embodiment of the present invention, first, multiple types of memories are included, the access rate of each type of memory is different, and the set access value of each memory is determined according to the historical daily average access amount of stored data and the rated storage value of each type of memory, it can be understood that a memory with a lower access rate is used for storing data with a lower daily average access amount, and a memory with a higher access rate is used for storing data with a higher daily average access amount, so that the relationship between two key factors, i.e., the storage cost and the data access speed, can be well balanced, for example, if three types of memories are respectively: the read speed of the first type memory is higher than that of the second type memory, the read speed of the second type memory is higher than that of the third type memory, it is easy to understand that the set access value of the first type memory is higher than that of the second type memory, the set access value of the second type memory is higher than that of the third type memory, the first type memory is used for storing frequently accessed data, under the condition that rated storage values are the same, the cost of the first type memory is higher than that of the second type memory, and the cost of the second type memory is higher than that of the third type memory; it should be noted that, in the embodiment of the present invention, data is stored according to an access amount, when new data needs to be stored, the access amount of the new data is unknown, and therefore, the data to be stored needs to be stored in a temporary storage to become temporary storage data, when a storage time of the temporary storage data in the temporary storage reaches a preset time value, a daily average access amount of the temporary storage data is calculated, the preset time value is set by itself according to a requirement, and may be a week, a half month, a month, or the like, and finally, the temporary storage data is stored in a storage according to the daily average access amount of the temporary storage data and a set access value, and a storage path is recorded, so that data with a high daily average access amount can be automatically stored in a storage with a high reading speed, data with a low daily average access amount can be stored in a storage with a low reading speed, the relationship between storage cost and data access speed is well balanced.
As shown in fig. 7, as a preferred embodiment of the present invention, the setting access value determining module 100 includes:
a rated storage value determining unit 101, configured to obtain a rated storage value of each type of memory, where the memory includes a first type of memory, a second type of memory, and a third type of memory, where a reading speed of the first type of memory is greater than a reading speed of the second type of memory, a reading speed of the second type of memory is greater than a reading speed of the third type of memory, and the rated storage values of the first type of memory, the second type of memory, and the third type of memory are A, B and C, respectively;
a history average daily visit amount obtaining unit 102, configured to obtain a history average daily visit amount of the stored data, where the history average daily visit amount is S; and
the access value setting calculation unit 103 is configured to calculate a set access value of each memory, where the access value setting of the three types of memories is 0, the access value setting of the two types of memories is S × (a + B + C), and the access value setting of the one type of memory is S × (B + C)/(a + B + C).
In the embodiment of the present invention, before determining the set access value of the memory, it is necessary to obtain a rated storage value of the memory and a historical daily average access amount of the stored data, where the rated storage values of the first-class memory, the second-class memory and the third-class memory are A, B and C, respectively, and the historical daily average access amount is S, then the set access value of the third-class memory is calculated to be 0, the set access value of the second-class memory is S/(a + B + C), the set access value of the first-class memory is S (B + C)/(a + B + C), it is easy to understand that the third-class memory is the lowest-level memory, and no access lower limit is set, for example, a 20T, B is 30T, C50T, S is 200000 times, and the 200000 times is the historical daily average access amount of all data stored in the first-class memory, the second-class memory and the third-class memory, the historical daily average access amount can be obtained according to the historical access amount of the last week, month or quarter, and at this time, the set access value of the second-class memory is 100000 times, and the set access value of the first-class memory is 160000 times.
As shown in fig. 8, as a preferred embodiment of the present invention, the data storage module 400 includes:
an occupied space value determining unit 401, configured to obtain a daily average access amount N of the temporary storage data and an occupied space value M of the temporary storage data;
a total stored data value determining unit 402, configured to obtain a total stored data value of the memory, where the total stored data value is K;
a decision access value calculation unit 403, configured to calculate a decision access value, where N × K/M is the decision access value; and
and a value comparing unit 404, configured to compare the determination access value with the set access value, and store the temporary storage data in a corresponding memory according to a comparison result.
In the embodiment of the present invention, before temporarily storing the temporarily stored data in the memory, it is necessary to obtain an average daily access amount N of the temporarily stored data and an occupied space value M of the temporarily stored data, and obtain a total stored data value of the memory, where the total stored data value of the memory refers to a space value occupied by the current memory, the total stored data value is K, for example, the average daily access amount N is 20 times, the occupied space value M of the temporarily stored data is 8G, the total stored data value is K40T, and then a determination access value is calculated, where N/M is 10 times, 40 times, 1024/8 is 102400 times.
As shown in fig. 9, as a preferred embodiment of the present invention, the value comparing unit 404 includes:
a numerical value determination subunit 4041 configured to compare the determination access value with the set access value;
the data storage subunit 4042, when S × C/(a + B + C) > judges that the access value is not less than 0, stores the temporarily stored data into the three types of memories; when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S (C/(A + B + C), temporarily storing the temporarily stored data into a secondary memory; and when the access value is judged to be more than or equal to S (B + C)/(A + B + C), temporarily storing the data into a class of memory.
In the embodiment of the present invention, the determination access value and the set access value are directly compared, and the temporary storage data is automatically stored in the corresponding memory according to the comparison result, for example, the set access value of the three-class memory is 0 times, the set access value of the two-class memory is 100000 times, the set access value of the one-class memory is 160000 times, and when the determination access value of the calculated temporary storage data is 102400 times, the temporary storage data is transferred to the two-class memory.
The embodiment of the invention also provides a data storage safety device, which comprises a storage device, a processor and a computer program, wherein the computer program is stored in the storage device, and when the computer program is executed by the processor, the processor executes the specific steps in the data storage method.
The present invention has been described in detail with reference to the preferred embodiments thereof, and it should be understood that the invention is not limited thereto, but is intended to cover modifications, equivalents, and improvements within the spirit and scope of the present invention.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in various embodiments may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. A method of storing data, the method comprising the steps of:
determining a set access value of each memory according to the historical daily average access amount of the stored data and rated storage values of various memories, wherein the reading speed of each memory is different;
storing the data to be stored into a temporary storage memory to become temporary storage data;
when the storage time of the temporary storage data in the temporary storage reaches a preset time value, calculating to obtain the daily average access amount of the temporary storage data;
and storing the temporary storage data into a memory according to the daily average access amount and the set access value of the temporary storage data, and recording a storage path.
2. The data storage method according to claim 1, wherein the step of determining the set access value of each memory according to the historical daily average access amount of the stored data and the rated storage value of each type of memory specifically comprises:
obtaining rated storage values of each type of memory, wherein the memory comprises a first type memory, a second type memory and a third type memory, the reading speed of the first type memory is higher than that of the second type memory, the reading speed of the second type memory is higher than that of the third type memory, and the rated storage values of the first type memory, the second type memory and the third type memory are A, B and C respectively;
acquiring historical daily average visit volume of stored data, wherein the historical daily average visit volume is S;
and calculating to obtain a set access value of each memory, wherein the set access value of the three types of memories is 0, the set access value of the two types of memories is S x C/(A + B + C), and the set access value of the one type of memories is S x (B + C)/(A + B + C).
3. The data storage method according to claim 2, wherein the step of storing the temporary storage data into the memory according to the average daily access amount and the set access value of the temporary storage data specifically comprises:
acquiring the daily average visit quantity N of temporary storage data and the occupied space value M of the temporary storage data;
acquiring a total storage data value of a memory, wherein the total storage data value is K;
calculating to obtain a judgment access value, wherein the judgment access value is N x K/M;
and comparing the judgment access value with the set access value, and storing the temporary storage data into a corresponding memory according to the comparison result.
4. The data storage method according to claim 3, wherein the step of comparing the decision access value with the set access value and storing the temporary storage data into the corresponding memory according to the comparison result specifically comprises:
comparing the decision access value with the set access value;
when S + C/(A + B + C) > judges that the access value is not less than 0, temporarily storing the data into three types of memories;
when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S (C/(A + B + C), temporarily storing the temporarily stored data into a secondary memory;
and when the access value is judged to be more than or equal to S (B + C)/(A + B + C), temporarily storing the data into a class of memory.
5. A method of storing data according to claim 1, the method further comprising:
monitoring the used occupation ratio value of the memory;
when the used occupation ratio value of the memory reaches the set occupation ratio value, generating memory expansion information to remind a user to expand the memory;
when the memory is expanded, the rated storage value of the memory is automatically updated.
6. A data storage system, the system comprising:
the setting access value determining module is used for determining the setting access value of each memory according to the historical daily average access amount of the stored data and the rated storage values of various memories, and the reading speed of each memory is different;
the temporary storage module is used for storing the data to be stored into the temporary storage to become temporary storage data;
the daily average access amount calculation module is used for calculating the daily average access amount of the temporary storage data when the storage time of the temporary storage data in the temporary storage reaches a preset time value; and
and the data storage module is used for storing the temporary storage data into the memory according to the daily average access amount and the set access value of the temporary storage data and recording a storage path.
7. The data storage system of claim 6, wherein the set access value determination module comprises:
the rated storage value determining unit is used for acquiring the rated storage value of each type of memory, and the memory comprises a first type of memory, a second type of memory and a third type of memory, wherein the reading speed of the first type of memory is higher than that of the second type of memory, the reading speed of the second type of memory is higher than that of the third type of memory, and the rated storage values of the first type of memory, the second type of memory and the third type of memory are A, B and C respectively;
the historical daily average visit amount acquisition unit is used for acquiring the historical daily average visit amount of the stored data, and the historical daily average visit amount is S; and
and the access value setting calculation unit is used for calculating and obtaining a set access value of each memory, the access values of the three types of memories are set to be 0, the access values of the two types of memories are set to be S (B + C)/(A + B + C), and the access values of the one type of memories are set to be S (B + C)/(A + B + C).
8. The data storage system of claim 7, wherein the data storage module comprises:
the device comprises an occupied space value determining unit, a storage unit and a control unit, wherein the occupied space value determining unit is used for acquiring the daily average visit quantity N of temporary storage data and the occupied space value M of the temporary storage data;
a total storage data value determining unit, configured to obtain a total storage data value of a memory, where the total storage data value is K;
a judgment access value calculation unit, configured to calculate a judgment access value, where the judgment access value is N × K/M; and
and the numerical value comparison unit is used for comparing the judgment access value with the set access value and storing the temporary storage data into the corresponding memory according to the comparison result.
9. The data storage system of claim 8, wherein the value comparison unit comprises:
a numerical value determination subunit for comparing the determination access value with the set access value;
the data storage subunit stores the temporarily stored data into the three types of memories when S x C/(A + B + C) > judges that the access value is not less than 0; when S (B + C)/(A + B + C) > judges that the access value is larger than or equal to S (C/(A + B + C), temporarily storing the temporarily stored data into a secondary memory; and when the access value is judged to be more than or equal to S (B + C)/(A + B + C), temporarily storing the data into a class of memory.
10. A data storage security apparatus comprising a storage device, a processor and a computer program, wherein the computer program is stored in the storage device and when executed by the processor causes the processor to perform the steps of the data storage method of any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111668969.2A CN114489492B (en) | 2021-12-31 | 2021-12-31 | Data storage method, safety device and data storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111668969.2A CN114489492B (en) | 2021-12-31 | 2021-12-31 | Data storage method, safety device and data storage system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114489492A true CN114489492A (en) | 2022-05-13 |
CN114489492B CN114489492B (en) | 2024-01-30 |
Family
ID=81508190
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111668969.2A Active CN114489492B (en) | 2021-12-31 | 2021-12-31 | Data storage method, safety device and data storage system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114489492B (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040236747A1 (en) * | 2003-03-06 | 2004-11-25 | Swimmer Morton G. | Data processing systems |
US20080059718A1 (en) * | 2006-09-01 | 2008-03-06 | Sachie Tajima | Storage system, data relocation method thereof, and recording medium that records data relocation program |
WO2015179290A1 (en) * | 2014-05-20 | 2015-11-26 | Micron Technology, Inc. | Read cache memory |
CN107968818A (en) * | 2017-11-17 | 2018-04-27 | 北京联想超融合科技有限公司 | Storage method, device and the server cluster of data |
CN108932114A (en) * | 2018-07-09 | 2018-12-04 | 郑州云海信息技术有限公司 | A kind of method and device of data storage |
CN110727405A (en) * | 2019-10-10 | 2020-01-24 | 广州华多网络科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
US10579322B1 (en) * | 2017-05-22 | 2020-03-03 | Parallels International Gmbh | Connecting to remote access session based on proximity of mobile device |
US20200142828A1 (en) * | 2018-11-01 | 2020-05-07 | Vmware, Inc. | Efficient global cache partition and dynamic sizing for shared storage workloads |
CN112954244A (en) * | 2021-01-19 | 2021-06-11 | 普联技术有限公司 | Method, device and equipment for realizing storage of monitoring video and storage medium |
CN113778992A (en) * | 2021-09-14 | 2021-12-10 | 苏州瓦泊特智能科技有限公司 | Data partition storage method, system, computer equipment and storage medium |
-
2021
- 2021-12-31 CN CN202111668969.2A patent/CN114489492B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040236747A1 (en) * | 2003-03-06 | 2004-11-25 | Swimmer Morton G. | Data processing systems |
US20080059718A1 (en) * | 2006-09-01 | 2008-03-06 | Sachie Tajima | Storage system, data relocation method thereof, and recording medium that records data relocation program |
WO2015179290A1 (en) * | 2014-05-20 | 2015-11-26 | Micron Technology, Inc. | Read cache memory |
US10579322B1 (en) * | 2017-05-22 | 2020-03-03 | Parallels International Gmbh | Connecting to remote access session based on proximity of mobile device |
CN107968818A (en) * | 2017-11-17 | 2018-04-27 | 北京联想超融合科技有限公司 | Storage method, device and the server cluster of data |
CN108932114A (en) * | 2018-07-09 | 2018-12-04 | 郑州云海信息技术有限公司 | A kind of method and device of data storage |
US20200142828A1 (en) * | 2018-11-01 | 2020-05-07 | Vmware, Inc. | Efficient global cache partition and dynamic sizing for shared storage workloads |
CN110727405A (en) * | 2019-10-10 | 2020-01-24 | 广州华多网络科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
CN112954244A (en) * | 2021-01-19 | 2021-06-11 | 普联技术有限公司 | Method, device and equipment for realizing storage of monitoring video and storage medium |
CN113778992A (en) * | 2021-09-14 | 2021-12-10 | 苏州瓦泊特智能科技有限公司 | Data partition storage method, system, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114489492B (en) | 2024-01-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5623655A (en) | Data processing system that manages shared documents | |
CN110750267B (en) | Service information updating method, device, computer equipment and storage medium | |
CN107861991B (en) | Receipt data processing method and device, computer equipment and storage medium | |
CN108845869B (en) | Concurrent request control method, device, computer equipment and storage medium | |
CN110781214A (en) | Database reading and writing method and device, computer equipment and storage medium | |
CN108804708B (en) | Method and device for archiving and correcting business data table, computer equipment and storage medium | |
CN111339131A (en) | Data reading and writing method and system | |
JPH07160547A (en) | Film managing system | |
CN110727698A (en) | Database access method and device, computer equipment and storage medium | |
CN114489492A (en) | Data storage method, safety device and data storage system | |
US8166082B2 (en) | Variable length data storage device, variable length data storage method, variable length data reading method, and a program for the same | |
CN108984754B (en) | Client information updating method and device, computer equipment and storage medium | |
CN116541471B (en) | Database backup method and system based on snapshot technology | |
CN113778339A (en) | Data decentralized storage method and system | |
CN112948504A (en) | Data acquisition method and device, computer equipment and storage medium | |
CN115455266B (en) | Automatic electronic file acquisition and filing method and system | |
CN111190833B (en) | Sensitive data detection method and device, storage medium and equipment | |
CN114610581A (en) | Data processing system for acquiring application software | |
CN114546995B (en) | Dynamic data migration method and system based on graph database | |
CN112883590A (en) | System reliability verification test scheme determination method | |
CN111507566B (en) | Method, device, computer equipment and storage medium for generating article production list | |
CN110795275A (en) | Abnormal block identification method and device based on abnormal power failure process | |
CN111090542A (en) | Abnormal block identification method and device based on abnormal power failure and computer equipment | |
CN111433765A (en) | Log storage method, log reading method, intelligent battery and unmanned aerial vehicle | |
CN115309343B (en) | Data storage method and system for multi-stage detection |
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 |