CN114489492B - Data storage method, safety device and data storage system - Google Patents

Data storage method, safety device and data storage system Download PDF

Info

Publication number
CN114489492B
CN114489492B CN202111668969.2A CN202111668969A CN114489492B CN 114489492 B CN114489492 B CN 114489492B CN 202111668969 A CN202111668969 A CN 202111668969A CN 114489492 B CN114489492 B CN 114489492B
Authority
CN
China
Prior art keywords
memory
data
value
access
temporary storage
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
CN202111668969.2A
Other languages
Chinese (zh)
Other versions
CN114489492A (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.)
Huaneng Shandong Power Generation Co Ltd
Huaneng Yantai Bajiao Thermoelectricity Co Ltd
Huaneng Information Technology Co Ltd
Original Assignee
Huaneng Shandong Power Generation Co Ltd
Huaneng Yantai Bajiao Thermoelectricity Co Ltd
Huaneng Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaneng Shandong Power Generation Co Ltd, Huaneng Yantai Bajiao Thermoelectricity Co Ltd, Huaneng Information Technology Co Ltd filed Critical Huaneng Shandong Power Generation Co Ltd
Priority to CN202111668969.2A priority Critical patent/CN114489492B/en
Publication of CN114489492A publication Critical patent/CN114489492A/en
Application granted granted Critical
Publication of CN114489492B publication Critical patent/CN114489492B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • G06F3/0611Improving I/O performance in relation to response time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/062Securing storage systems
    • G06F3/0622Securing storage systems in relation to access
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention is applicable to 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 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, each type of memory has different reading speeds, the data is stored in a grading mode according to the access quantity of the data, and the data with low daily access quantity is stored in the memory with low reading speed, so that the relation between the storage cost and the data access speed is well balanced.

Description

Data storage method, safety device and data storage system
Technical Field
The present invention relates to the field of data storage technologies, and in particular, to a data storage method, a security device, and a data storage system.
Background
With the advent of the information age, more and more electronic data are generated in the production and living processes, and various storage systems are required to store the electronic data, and a large amount of data is tested on the storage and reading capabilities of the storage systems, and it is understood that the faster the access rate is, the more expensive the memory with larger storage space is, and in order to reduce the data storage cost, a part of the storage systems can use the memory with slower access rate, but this results in lower efficiency of reading the data in the memory, and the relationship between two key factors of the data storage cost and the data access speed cannot be well balanced. Therefore, there is a need to provide a data storage method, a security device, and a data storage system, which aim to solve the above problems.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention aims to provide a data storage method, a safety device and a data storage system, so as to solve the problems existing in the background art.
The invention is thus embodied, a data storage 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 the rated storage values of various memories, wherein the reading speeds of the various memories are different;
storing the data to be stored into a temporary 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:
the method comprises the steps of obtaining rated storage values of each type of memory, wherein the memory comprises a first type of memory, a second type of memory and three types of memory, the reading speed of the first type of memory is larger than that of the second type of memory, the reading speed of the second type of memory is larger than that of the three types of memory, and the rated storage values of the first type of memory, the second type of memory and the three types of memory are A, B and C respectively;
acquiring historical daily average access quantity of stored data, wherein the historical daily average access quantity is S;
calculating to obtain a set access value of each memory, wherein the set access values of the three types of memories are 0, the set access values of the two types of memories are S.times.C/(A+B+C), and the set access values of the one type of memories are S.times. (B+C)/(A+B+C).
As a further scheme of the invention: the step of storing the temporary storage data in the memory according to the daily average access amount and the set access value of the temporary storage data specifically comprises the following steps:
acquiring a daily average access amount N of temporary storage data and an 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=N, K/M;
and comparing the determined 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 in the corresponding memory according to the comparison result specifically includes:
comparing the determined access value with the set access value;
when S/(A+B+C) > judging that the access value is more than or equal to 0, storing temporary storage data into three types of memories;
when S (B+C)/(A+B+C) > judging access value is greater than or equal to S C/(A+B+C), storing the temporary storage data into a second-class memory;
when the access value is more than or equal to S (B+C)/(A+B+C), the temporary storage data are stored into a type of memory.
As a further scheme of the invention: the method further comprises the steps of:
monitoring the occupied ratio of the memory;
when the occupied ratio of the memory reaches a set occupied ratio, generating memory capacity expansion information so as to remind a user to expand the memory;
when the memory is expanded, the rated memory 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 set access value determining module is used for 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, and the reading speeds of the various memories are 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 access amount calculation module is used for calculating the daily 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 access quantity and the set access value of the temporary storage data and recording the storage path.
As a further scheme of the invention: the set access value determining module includes:
the rated storage value determining unit is used for obtaining rated storage values of each type of memory, the memory comprises a first type of memory, a second type of memory and three types of memory, wherein the reading speed of the first type of memory is greater than that of the second type of memory, the reading speed of the second type of memory is greater than that of the three types of memory, and the rated storage values of the first type of memory, the second type of memory and the three types of memory are A, B and C respectively;
a historical daily average access amount obtaining unit, configured to obtain a historical daily average access amount of stored data, where the historical daily average access amount is S; and
the set access value calculation unit is used for calculating and obtaining set access values of each memory, the set access values of the three types of memories are 0, the set access values of the two types of memories are S+C/(A+B+C), and the set access values of the one type of memories are S+B+C)/(A+B+C).
As a further scheme of the invention: the data storage module includes:
the system comprises an occupied space value determining unit, a temporary storage unit and a storage unit, wherein the occupied space value determining unit is used for acquiring the daily average access quantity N of temporary storage data and the occupied space value M of the temporary storage data;
the total storage data value determining unit is used for obtaining the total storage data value of the memory, wherein 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=n×k/M; and
and the numerical value comparison unit is used for comparing the judging 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 configured to compare the determination access value with the set access value;
the data storage subunit is used for storing temporary storage data into three types of memories when S/(A+B+C) > judging that the access value is more than or equal to 0; when S (B+C)/(A+B+C) > judging access value is greater than or equal to S C/(A+B+C), storing the temporary storage data into a second-class memory; when the access value is more than or equal to S (B+C)/(A+B+C), the temporary storage data are stored into a type of memory.
Another object of the present invention is to provide a data storage security apparatus, including a storage device, a processor, and a computer program, wherein the storage device stores the computer program, and the computer program when executed by the processor, causes the processor to execute the steps of the data storage method.
The conference room reservation information receiving module is used for receiving conference room reservation information, wherein the conference room reservation information comprises conference room information, participant information and participant time information;
the reservation information identification module is used for identifying the information of the participants, generating a non-staff account when the information of the participants comprises the working hours of non-corporate staff, automatically generating an account password, and sending the non-staff account and the corresponding account password to the reservation terminal.
Compared with the prior art, the invention has the beneficial effects that: the invention comprises a plurality of types of memories, each type of memory has different reading speeds, the data are stored in a grading manner according to the access quantity of the data, specifically, the set access value of the memory is required to be set, then the temporary storage data are stored into the memory according to the daily average access quantity and the set access value of the temporary storage data, so that the data with high daily average access quantity can be automatically stored in the memory with high reading speed, the data with low daily average 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.
Drawings
FIG. 1 is a flow chart of a data storage method.
FIG. 2 is a flow chart of a method for determining a set access value for each memory in a data storage method.
FIG. 3 is a flow chart of a method for storing temporary storage data in a memory.
Fig. 4 is a flowchart of a data storage method for storing temporary storage data in a corresponding memory according to a comparison result.
FIG. 5 is a flow chart of monitoring the used occupancy of a memory in a data storage method.
FIG. 6 is a schematic diagram of a data storage system.
Fig. 7 is a schematic diagram of a configuration of a set access value determining module in a data storage system.
FIG. 8 is a schematic diagram of a data storage module in a data storage system.
FIG. 9 is a schematic diagram of a numerical 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 will be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Specific implementations of the invention are described in detail below in connection with specific embodiments.
As shown in fig. 1, an embodiment of the present invention provides a data storage method, which 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 the rated storage values of various memories, wherein the reading speeds of the various memories are different;
s200, storing the data to be stored into a temporary memory 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 to obtain the daily average access amount of the temporary storage data;
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 age, more and more electronic data are generated during the production and life process, and various storage systems are required to store the electronic data, and a large amount of data is tested on the storage and reading capabilities of the storage systems, and it is understood that the faster the access rate is, the more expensive the memory with larger storage space is, and in order to reduce the data storage cost, a part of the storage systems will use a memory with slower access rate, which will result in lower efficiency of reading the data in the memory, and how to balance two key factors of the data storage cost and the data access speed is the problem that the embodiments of the present invention aim to solve.
In the embodiment of the invention, firstly, the memory comprises multiple types of memories, the access rate of each type of memory is different, the set access value of each memory is determined according to the historical daily average access amount of stored data and the rated storage values of the various types of memories, it can be understood that the memory with lower access rate is used for storing data with lower daily average access amount, the memory with higher access rate is used for storing data with higher daily average access amount, and thus, the relation between two key factors of storage cost and data access speed can be well balanced, for example, three types of memories are respectively: the system comprises a first memory, a second memory and three memories, wherein the reading speed of the first memory is larger than that of the second memory, the reading speed of the second memory is larger than that of the three memories, the set access value of the first memory is larger than that of the second memory, the set access value of the second memory is larger than that of the three memories, the first memory is used for storing frequently accessed data, the cost of the first memory is larger than that of the second memory under the condition of the same rated storage value, and the cost of the second memory is larger than that of the three memories; it should be noted that, in the embodiment of the present invention, the data is stored according to the access amount, when a new data needs to be stored, the access amount of the new data is unknown, so that the data to be stored needs to be stored into the temporary storage device to be temporary storage data, when the storage time of the temporary storage device in the temporary storage device reaches a preset time value, the daily access amount of the temporary storage device is calculated, the preset time value is set by itself according to the requirement, and may be one week, half month or one month, etc., finally, the temporary storage device is stored into the storage device according to the daily access amount and the set access value of the temporary storage device, and the storage path is recorded, so that the data with high daily access amount can be automatically stored in the storage device with high reading speed, and the data with low daily access amount is stored in the storage device with low reading speed, so that the relationship between the storage cost and the 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 access amount of the stored data and the rated storage values of the various memories specifically includes:
s101, acquiring rated storage values of each type of memory, wherein the memory comprises a first type of memory, a second type of memory and three types 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 three types of memory, and the rated storage values of the first type of memory, the second type of memory and the three types of memory are A, B and C respectively;
s102, acquiring historical daily average access quantity of storage data, wherein the historical daily average access quantity is S;
s103, calculating to obtain a set access value of each memory, wherein the set access values of the three types of memories are 0, the set access values of the two types of memories are S (B+C)/(A+B+C), and the set access values of the two types of memories are S (C/(A+B+C).
In the embodiment of the present invention, before determining the set access value of the memory, the rated storage value of the memory and the historical daily average access amount of the stored data need to be obtained, 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, the access lower limit is not set, for example, a= T, B = T, C = T, S =200000 times, and the 200000 times refer to the historical daily average access amount of all data stored in the first class memory, the second class memory and the third class memory, and the historical daily average access amount may be obtained according to the historical access amount of the last week, month or the last quarter 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 temporary storage data in a memory according to a daily average access amount and a set access value of the temporary storage data specifically includes:
s401, acquiring daily access quantity N of temporary storage data and 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 decision access value, where the decision access value=n×k/M;
s404, comparing the determined 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 temporary storage data is stored in a memory, it is necessary to obtain a daily average access amount N of the temporary storage data and an occupied space value M of the temporary storage data, and obtain a total storage data value of the memory, where the total storage data value of the memory refers to a space value occupied by the memory at present, the total storage data value is K, for example, the daily average access amount n=20 times, the occupied space value m=8g of the temporary storage data, the total storage data value is k=40t, and then calculate to obtain a determination access value, where the determination access value=n×k/m=10× 40×1024/8=102400 times.
As shown in fig. 4, as a preferred embodiment of the present invention, the step of comparing the determined access value with the set access value and storing temporary storage data in a corresponding memory according to the comparison result specifically includes:
s4041, comparing the determined access value with the set access value;
s4042, when S/(A+B+C) > judging that the access value is more than or equal to 0, storing temporary storage data into three types of memories;
s4043, when S is greater than or equal to S/(A+B+C) > the judgment access value is greater than or equal to S, storing the temporary storage data into the second-class memory;
s4044, when the access value is more than or equal to S (B+C)/(A+B+C), storing the temporary storage data into a type of memory.
In the embodiment of the invention, the judging access value and the set access value are directly compared, temporary storage data is automatically stored in the corresponding memory according to the comparison result, for example, the set access value of three types of memories is 0 times, the set access value of two types of memories is 100000 times, the set access value of one type of memories is 160000 times, and when the judging access value of the temporary storage data obtained by calculation is 102400 times, the temporary storage data is transferred to the two types of memories.
As shown in fig. 5, as a preferred embodiment of the present invention, the data storage method further includes:
s501, monitoring the occupied ratio of a memory;
s502, when the occupied ratio of the memory reaches a set occupied ratio, generating memory capacity expansion information so as to remind a user to expand the memory;
s503, when the memory is expanded, the rated memory value of the memory is automatically updated.
In the embodiment of the invention, it is easy to understand that in order to avoid the memory being filled, the memory needs to be expanded in time, when the occupied ratio of the memory reaches the set occupied ratio, the memory expansion information is generated to remind a user to expand the memory, for example, the set occupied ratio is 90%, when the occupied ratio of the memory reaches 90%, the embodiment of the invention automatically generates the memory expansion information to warn related staff to expand the memory in time, and when the memory is expanded, the embodiment of the 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, including:
the set access value determining module 100 is configured to determine a set access value of each memory according to a historical daily average access amount of the stored data and rated storage values of various memories, where the reading speeds of the memories of each type are different;
a temporary storage module 200 for storing data to be stored into a temporary memory as temporary storage data;
the average daily access amount calculation module 300 calculates the average daily 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
the data storage module 400 is configured to store the temporary storage data in the memory according to the daily access amount and the set access value of the temporary storage data, and record the storage path.
In the embodiment of the invention, firstly, the memory comprises multiple types of memories, the access rate of each type of memory is different, the set access value of each memory is determined according to the historical daily average access amount of stored data and the rated storage values of the various types of memories, it can be understood that the memory with lower access rate is used for storing data with lower daily average access amount, the memory with higher access rate is used for storing data with higher daily average access amount, and thus, the relation between two key factors of storage cost and data access speed can be well balanced, for example, three types of memories are respectively: the system comprises a first memory, a second memory and three memories, wherein the reading speed of the first memory is larger than that of the second memory, the reading speed of the second memory is larger than that of the three memories, the set access value of the first memory is larger than that of the second memory, the set access value of the second memory is larger than that of the three memories, the first memory is used for storing frequently accessed data, the cost of the first memory is larger than that of the second memory under the condition of the same rated storage value, and the cost of the second memory is larger than that of the three memories; it should be noted that, in the embodiment of the present invention, the data is stored according to the access amount, when a new data needs to be stored, the access amount of the new data is unknown, so that the data to be stored needs to be stored into the temporary storage device to be temporary storage data, when the storage time of the temporary storage device in the temporary storage device reaches a preset time value, the daily access amount of the temporary storage device is calculated, the preset time value is set by itself according to the requirement, and may be one week, half month or one month, etc., finally, the temporary storage device is stored into the storage device according to the daily access amount and the set access value of the temporary storage device, and the storage path is recorded, so that the data with high daily access amount can be automatically stored in the storage device with high reading speed, and the data with low daily access amount is stored in the storage device with low reading speed, so that the relationship between the storage cost and the data access speed is well balanced.
As shown in fig. 7, as a preferred embodiment of the present invention, the set access value determining module 100 includes:
the rated storage value determining unit 101 is configured to obtain rated storage values of each type of memory, where the memory includes a first type of memory, a second type of memory, and three types of memory, where a reading speed of the first type of memory is greater than a reading speed of the second type of memory, and a reading speed of the second type of memory is greater than a reading speed of the three types of memory, and rated storage values of the first type of memory, the second type of memory, and the three types of memory are A, B and C, respectively;
a historical daily average access amount obtaining unit 102, configured to obtain a historical daily average access amount of the stored data, where the historical daily average access amount is S; and
the set access value calculating unit 103 is configured to calculate a set access value of each memory, where the set access values of the three types of memories are 0, the set access values of the two types of memories are s×c/(a+b+c), and the set access values of the one type of memories are s×b+c)/(a+b+c).
In the embodiment of the present invention, before determining the set access value of the memory, the rated storage value of the memory and the historical daily average access amount of the stored data need to be obtained, 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, the access lower limit is not set, for example, a= T, B = T, C = T, S =200000 times, and the 200000 times refer to the historical daily average access amount of all data stored in the first class memory, the second class memory and the third class memory, and the historical daily average access amount may be obtained according to the historical access amount of the last week, month or the last quarter 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 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 the decision access value=n×k/M; and
and a numerical value comparing unit 404, configured to compare the determined access value with the set access value, and store temporary storage data in a corresponding memory according to the comparison result.
In the embodiment of the present invention, before temporary storage data is stored in a memory, it is necessary to obtain a daily average access amount N of the temporary storage data and an occupied space value M of the temporary storage data, and obtain a total storage data value of the memory, where the total storage data value of the memory refers to a space value occupied by the memory at present, the total storage data value is K, for example, the daily average access amount n=20 times, the occupied space value m=8g of the temporary storage data, the total storage data value is k=40t, and then calculate to obtain a determination access value, where the determination access value=n×k/m=10× 40×1024/8=102400 times.
As shown in fig. 9, as a preferred embodiment of the present invention, the numerical comparison unit 404 includes:
a numerical value determination subunit 4041 configured to compare the determination access value with the set access value;
a data storage subunit 4042 for storing the temporary storage data into the three types of memories when s×c/(a+b+c) > the determination access value is equal to or greater than 0; when S (B+C)/(A+B+C) > judging access value is greater than or equal to S C/(A+B+C), storing the temporary storage data into a second-class memory; when the access value is more than or equal to S (B+C)/(A+B+C), the temporary storage data are stored into a type of memory.
In the embodiment of the invention, the judging access value and the set access value are directly compared, temporary storage data is automatically stored in the corresponding memory according to the comparison result, for example, the set access value of three types of memories is 0 times, the set access value of two types of memories is 100000 times, the set access value of one type of memories is 160000 times, and when the judging access value of the temporary storage data obtained by calculation is 102400 times, the temporary storage data is transferred to the two types of memories.
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 storage device stores the computer program, and the computer program when executed by the processor causes the processor to execute specific steps in the data storage method.
The foregoing description of the preferred embodiments of the present invention should not be taken as limiting the invention, but rather should be understood to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.
It should be understood that, although the steps in the flowcharts of the embodiments of the present invention are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in various embodiments may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or other steps.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile 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), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any adaptations, 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 within 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 (4)

1. A method of data storage, 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 the rated storage values of various memories, wherein the reading speeds of the various memories are different;
storing the data to be stored into a temporary 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;
storing the temporary storage data into a memory according to the daily access quantity and the set access value of the temporary storage data, and recording a storage path;
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:
the method comprises the steps of obtaining rated storage values of each type of memory, wherein the memory comprises a first type of memory, a second type of memory and three types of memory, the reading speed of the first type of memory is larger than that of the second type of memory, the reading speed of the second type of memory is larger than that of the three types of memory, and the rated storage values of the first type of memory, the second type of memory and the three types of memory are A, B and C respectively;
acquiring historical daily average access quantity of stored data, wherein the historical daily average access quantity is S;
calculating to obtain a set access value of each memory, wherein the set access values of the three types of memories are 0, the set access values of the two types of memories are S.times.C/(A+B+C), and the set access values of the one type of memories are S.times. (B+C)/(A+B+C);
the step of storing the temporary storage data in the memory according to the daily average access amount and the set access value of the temporary storage data specifically comprises the following steps:
acquiring a daily average access amount N of temporary storage data and an 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=N, K/M;
comparing the determined access value with the set access value, and storing the temporary storage data into a corresponding memory according to the comparison result;
the step of comparing the determined access value with the set access value and storing the temporary storage data in the corresponding memory according to the comparison result specifically includes:
comparing the determined access value with the set access value;
when S/(A+B+C) > judging that the access value is more than or equal to 0, storing temporary storage data into three types of memories;
when S (B+C)/(A+B+C) > judging access value is greater than or equal to S C/(A+B+C), storing the temporary storage data into a second-class memory;
when the access value is more than or equal to S (B+C)/(A+B+C), the temporary storage data are stored into a type of memory.
2. A method of data storage according to claim 1, wherein the method further comprises:
monitoring the occupied ratio of the memory;
when the occupied ratio of the memory reaches a set occupied ratio, generating memory capacity expansion information so as to remind a user to expand the memory;
when the memory is expanded, the rated memory value of the memory is automatically updated.
3. A data storage system, the system comprising:
the set access value determining module is used for 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, and the reading speeds of the various memories are 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 access amount calculation module is used for calculating the daily 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
the data storage module is used for storing the temporary storage data into the memory according to the daily access quantity and the set access value of the temporary storage data and recording the storage path;
the set access value determining module includes:
the rated storage value determining unit is used for obtaining rated storage values of each type of memory, the memory comprises a first type of memory, a second type of memory and three types of memory, wherein the reading speed of the first type of memory is greater than that of the second type of memory, the reading speed of the second type of memory is greater than that of the three types of memory, and the rated storage values of the first type of memory, the second type of memory and the three types of memory are A, B and C respectively;
a historical daily average access amount obtaining unit, configured to obtain a historical daily average access amount of stored data, where the historical daily average access amount is S; and
the set access value calculation unit is used for calculating and obtaining set access values of each memory, wherein the set access values of the three types of memories are 0, the set access values of the two types of memories are S+C/(A+B+C), and the set access values of the one type of memories are S+B+C)/(A+B+C);
the data storage module includes:
the system comprises an occupied space value determining unit, a temporary storage unit and a storage unit, wherein the occupied space value determining unit is used for acquiring the daily average access quantity N of temporary storage data and the occupied space value M of the temporary storage data;
the total storage data value determining unit is used for obtaining the total storage data value of the memory, wherein 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=n×k/M; and
the numerical value comparison unit is used for comparing the judging access value with the set access value and storing temporary storage data into a corresponding memory according to a comparison result;
the numerical value comparison unit includes:
a numerical value determination subunit configured to compare the determination access value with the set access value;
the data storage subunit is used for storing temporary storage data into three types of memories when S/(A+B+C) > judging that the access value is more than or equal to 0; when S (B+C)/(A+B+C) > judging access value is greater than or equal to S C/(A+B+C), storing the temporary storage data into a second-class memory; when the access value is more than or equal to S (B+C)/(A+B+C), the temporary storage data are stored into a type of memory.
4. A data storage security apparatus comprising a storage device, a processor and a computer program stored in the storage device, the computer program when executed by the processor causing the processor to perform the steps of the data storage method of any of claims 1-2.
CN202111668969.2A 2021-12-31 2021-12-31 Data storage method, safety device and data storage system Active CN114489492B (en)

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 CN114489492A (en) 2022-05-13
CN114489492B true 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 (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040236747A1 (en) * 2003-03-06 2004-11-25 Swimmer Morton G. Data processing systems
JP4859595B2 (en) * 2006-09-01 2012-01-25 株式会社日立製作所 Storage system, data relocation method thereof, and data relocation program
US10747668B2 (en) * 2018-11-01 2020-08-18 Vmware, Inc. Efficient global cache partition and dynamic sizing for shared storage workloads

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
CN114489492A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN109597571B (en) Data storage method, data reading method, data storage device, data reading device and computer equipment
CN107861991B (en) Receipt data processing method and device, computer equipment and storage medium
WO2018184520A1 (en) Service data processing method, device, server and storage medium
CN108845869B (en) Concurrent request control method, device, computer equipment and storage medium
CN112684247B (en) User electricity larceny detection method, device, computer equipment and storage medium
CN112347002B (en) flash data storage method, system, computer equipment and storage medium
CN111475115A (en) SSD flash life prediction method, device, equipment and readable medium
CN109062984A (en) A kind of data analysing method and analysis system based on label
CN114489492B (en) Data storage method, safety device and data storage system
CN110084476B (en) Case adjustment method, device, computer equipment and storage medium
CN114971891A (en) Risk prediction method and device, processor and electronic equipment
CN109669621B (en) File management method, file management system, electronic device and storage medium
CN111355246B (en) Prediction method, system and storage medium for reactive compensation of camera
CN115981895A (en) Cache management method and system during data reading
CN115760354A (en) Bank loan enterprise risk early warning system and method
CN113836233B (en) Audit data evidence-storing and tracing method and terminal based on blockchain
CN116679576A (en) Machine learning-based user behavior prediction method and system
CN110647507A (en) File system writing state determining method and device, electronic equipment and medium
CN110889524B (en) Power failure reservation application processing method and device, computer equipment and medium
CN117991996B (en) Data dynamic storage method, system and storage medium
CN110795275A (en) Abnormal block identification method and device based on abnormal power failure process
KR100504401B1 (en) Control method and system of a nonvolatile memory
CN116055464B (en) Download preservation path selection method, device and medium
CN111507566B (en) Method, device, computer equipment and storage medium for generating article production list
CN114911668B (en) Data resource monitoring method and system

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