CN113885804A - Data updating method and device and computer equipment - Google Patents

Data updating method and device and computer equipment Download PDF

Info

Publication number
CN113885804A
CN113885804A CN202111175838.0A CN202111175838A CN113885804A CN 113885804 A CN113885804 A CN 113885804A CN 202111175838 A CN202111175838 A CN 202111175838A CN 113885804 A CN113885804 A CN 113885804A
Authority
CN
China
Prior art keywords
data set
updated
stored
area
data
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.)
Pending
Application number
CN202111175838.0A
Other languages
Chinese (zh)
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.)
Hunan Goke Microelectronics Co Ltd
Original Assignee
Hunan Goke Microelectronics 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 Hunan Goke Microelectronics Co Ltd filed Critical Hunan Goke Microelectronics Co Ltd
Priority to CN202111175838.0A priority Critical patent/CN113885804A/en
Publication of CN113885804A publication Critical patent/CN113885804A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0614Improving the reliability of storage systems
    • G06F3/0619Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
    • 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
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

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)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data updating method, a data updating device and computer equipment. The data updating method comprises the following steps: receiving an update request corresponding to a stored data set; acquiring a data set to be updated corresponding to a stored data set, wherein the stored data set is stored in a first area of a storage system; storing the data set to be updated to a second area in the storage system; if any data to be updated in the data set to be updated fails to be stored in the second area, ending the updating process; and if all the data to be updated in the data set to be updated are stored in the second area, updating the metadata corresponding to the storage system, wherein the metadata is used for indicating the storage area corresponding to the stored data set and/or the data set to be updated in the storage system. In the covering and writing process of data updating, if a fault occurs, even if the data set to be updated of the new version cannot be successfully written, the stored data set of the old version can be stored.

Description

Data updating method and device and computer equipment
Technical Field
The present application relates to the field of data storage, and in particular, to a data updating method, device and computer apparatus.
Background
In the process of updating hard disk data, complete coverage is generally adopted, that is, all old version data are directly deleted, and new version data are written in the storage space where the old version data are originally stored. However, if the latest version of data is written in an overwriting manner, the overwriting fails due to abnormal conditions such as power failure. At this time, the latest version of the complete data cannot be written due to abnormal conditions such as power failure, and the overwritten old version of the data before power failure cannot be recovered.
Therefore, in the overwriting process of data updating, if a fault occurs, the prior art has the technical problems that the data of the new version cannot be successfully written, and meanwhile, the data of the old version cannot be recovered.
Disclosure of Invention
In order to solve the technical problem, the present application provides a data updating method, an apparatus and a computer device, and the specific scheme is as follows:
in a first aspect, an embodiment of the present application provides a data updating method, where the method includes:
receiving an update request corresponding to a stored data set;
acquiring a data set to be updated corresponding to the stored data set, wherein the stored data set is stored in a first area of a storage system;
storing the data set to be updated to a second area in the storage system, wherein the second area is any storage space in the storage system except the first area;
if any data to be updated in the data set to be updated fails to be stored in the second area, ending the updating process;
and if all the data to be updated in the data set to be updated are stored in the second area, updating the metadata corresponding to the storage system, wherein the metadata is used for indicating the storage area corresponding to the stored data set and/or the data set to be updated in the storage system.
According to a specific embodiment disclosed in the present application, the step of obtaining a dataset to be updated corresponding to the stored dataset includes:
acquiring at least two data sets to be updated corresponding to the stored data sets;
the step of storing the data set to be updated to a second area within the storage system comprises:
and respectively storing the data sets to be updated to different second areas in the storage system.
According to a specific embodiment of the present disclosure, after the step of updating the metadata corresponding to the storage system, the method further includes:
clearing the stored data set stored in the first region;
and writing the data set to be updated into the first area, and clearing the data set to be updated stored in the second area.
According to a specific embodiment of the present disclosure, after the step of updating the metadata corresponding to the storage system, the method further includes:
selecting a target data set from all data sets stored in the storage system according to a query instruction sent by first terminal equipment, wherein the target data set is the stored data set or any one of the data sets to be updated;
determining a target storage area corresponding to the target data set based on the metadata, wherein the target storage area comprises the first area or the second area;
returning the target data set stored in the target storage area to the first terminal device.
According to a specific embodiment of the present disclosure, after the step of updating the metadata corresponding to the storage system, the method further includes:
judging whether the real-time capacity value of the storage system reaches a preset upper limit value or not;
if the real-time capacity value of the storage system reaches a preset upper limit value, sending a prompt message that the capacity reaches the upper limit to a second terminal device which initiates the updating request;
and clearing a preset number of historical data sets in the storage system according to a clearing instruction returned by the second terminal device based on the prompt message, wherein the historical data sets comprise the stored data sets and the data sets to be updated.
In a second aspect, an embodiment of the present application provides a data updating apparatus, including:
a receiving module for receiving an update request for a stored data set;
the acquisition module is used for acquiring a data set to be updated corresponding to the stored data set, wherein the stored data set is stored in a first area of a storage system;
the starting module is used for storing the data set to be updated to a second area in the storage system, wherein the second area is any storage space in the storage system except the first area;
the first updating module is used for finishing the updating process if any data to be updated in the data set to be updated fails to be stored in the second area;
and a second updating module, configured to update metadata corresponding to the storage system if all the data to be updated in the data set to be updated is stored in the second area, where the metadata is used to indicate a storage area corresponding to the stored data set and/or the data set to be updated in the storage system.
According to a specific embodiment disclosed in the present application, the obtaining module is specifically configured to obtain at least two data sets to be updated corresponding to the stored data sets;
the starting module is specifically configured to store each data set to be updated in a different second area in the storage system.
According to a specific embodiment disclosed in the present application, the apparatus further comprises:
a clearing module for clearing the stored data set stored in the first region;
and the writing module is used for writing the data set to be updated into the first area and clearing the data set to be updated stored in the second area.
In a third aspect, the present application provides a computer device, which includes a processor and a memory, where the memory stores a computer program, and the computer program implements the method of any one of the embodiments of the first aspect when executed on the processor.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program that, when executed on a processor, implements the method of any one of the embodiments of the first aspect.
Compared with the prior art, the method has the following beneficial effects:
the application provides a data updating method, a data updating device and computer equipment. The data updating method comprises the following steps: receiving an update request corresponding to a stored data set; acquiring a data set to be updated corresponding to a stored data set, wherein the stored data set is stored in a first area of a storage system; storing the data set to be updated to a second area in the storage system; if any data to be updated in the data set to be updated fails to be stored in the second area, ending the updating process; and if all the data to be updated in the data set to be updated are stored in the second area, updating the metadata corresponding to the storage system, wherein the metadata is used for indicating the storage area corresponding to the stored data set and/or the data set to be updated in the storage system. According to the method and the device, in the process of overwriting and writing of data updating, another second area is selected to store updated data, so that if a fault occurs, even if a new version of the data set to be updated cannot be written successfully, an old version of the stored data set can be stored.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings required to be used in the embodiments will be briefly described below, and it should be understood that the following drawings only illustrate some embodiments of the present invention, and therefore should not be considered as limiting the scope of the present invention. Like components are numbered similarly in the various figures.
Fig. 1 is a schematic flow chart of a data updating method according to an embodiment of the present application;
fig. 2 is a second schematic flow chart of a data updating method according to an embodiment of the present application;
fig. 3 is a third schematic flow chart of a data updating method according to an embodiment of the present application;
fig. 4 is a fourth flowchart illustrating a data updating method according to an embodiment of the present application;
FIG. 5 is a block diagram of a data update apparatus according to an embodiment of the present application;
fig. 6 is a second block diagram of a data updating apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments.
The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present invention, are only intended to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the existence of, or adding to, one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which various embodiments of the present invention belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments of the present invention.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, a schematic flow chart of a data updating method provided in the embodiment of the present application is shown. As shown in fig. 1, the method mainly includes:
step S101, receiving an update request corresponding to a stored data set;
step S102, a data set to be updated corresponding to the stored data set is obtained, wherein the stored data set is stored in a first area of a storage system.
The stored data set refers to all old version data stored in the storage system, and the data set to be updated is a group of new version data corresponding to the stored data set. When implemented, the storage system may be any medium required for data storage, including but not limited to storage nodes, storage spaces, and the like.
Specifically, at each processing time, the currently most recently acquired set of data is defined as the data set to be updated, and the data set before this processing time is the stored data set. The first and second numbers herein merely refer to relative states of data, and do not define which data is specified. As the time updates, the specific reference objects of the stored data set and the data set to be updated are also updated.
Step S103, storing the data set to be updated to a second area in the storage system, wherein the second area is any storage space in the storage system except the first area.
In specific implementation, since the data set to be updated is a set of all data to be updated, a time period inevitably passes after the data set to be updated is stored in the second area in the storage system, and the time period is an update process, that is: and a continuous execution process of storing all the data to be updated in the data set to be updated into the second area. The second area may be a storage area with a preset capacity, or the total data amount of the data set to be updated at this time may be obtained first, and then the second area with the corresponding storage capacity is divided. The entire storage space of the storage system may be divided into a plurality of preset minimum units, and the second area may be formed of an integer number of minimum units. For example, if the capacity size of the minimum unit is defined as 1 and the data size of the current data set to be updated is defined as 2.5, any continuous 3 minimum units may be divided into corresponding second areas. Each minimum unit corresponds to a different storage address, that is, the storage address corresponding to each second area is also different.
In addition, when the integer number of minimum units is divided into the second region, a continuous number of minimum units meeting the number requirement may be randomly selected, or all the minimum units may be arranged according to a preset sequence and then combined into the second region in sequence, which is not specifically limited herein. Moreover, it will be appreciated that the first region and the second region need only be within the same storage system, and that the second region and the first region need not be within the same smaller unit of storage. For example, the storage system includes M different hard disks, and as for a first area in an nth hard disk, a corresponding second area may be another storage space in the nth hard disk, or a blank storage area in any one of the other hard disks except the nth hard disk in the storage system.
Step S104, if any data to be updated in the data set to be updated fails to be stored in the second area, the updating process is ended.
And if the power failure abnormity occurs before all the data to be updated in the data set to be updated are not stored in the second area, clearing the data to be updated stored in the second area, and ending the updating process. Specifically, before the update process is completely executed, if an abnormal fault occurs and the data to be updated in the data set to be updated is not completely stored in the second area, the data to be updated stored in the second area is cleared, and the storage space of the second area is released. The second area after the data is cleared can be used for continuously storing new data to be updated in the next updating operation.
The abnormal fault includes, but is not limited to, a power failure, and any other interrupt request with priority higher than that of the update process. If the abnormal fault occurs, the second area is cleared, and the updating process is ended.
Step S105, if all the data to be updated in the data set to be updated is stored in the second area, updating metadata corresponding to the storage system, where the metadata is used to indicate a storage area corresponding to the stored data set and/or the data set to be updated in the storage system.
If the faults such as power failure and the like do not occur, the updating process can be normally executed, and all the data sets to be updated are stored in the second area. After all the storage is completed, the metadata corresponding to the storage system can be updated. Metadata, also called intermediate data or relay data, is data for describing data, and mainly describes information of data attributes, such as functions of indicating storage locations, history data, resource lookup, file recording, and the like. Specifically, the version and storage location of the data set to be updated written this time in the second area may be recorded in the metadata. Of course, previously, the metadata would have been written to the previously stored version of the stored data set and its corresponding stored first region.
Steps S101-S105 are to write only one set of data sets to be updated in one data updating process. In particular, a plurality of data sets to be updated corresponding to the stored data sets may be written simultaneously, that is, a plurality of versions of new data may be updated simultaneously.
Specifically, at least two data sets to be updated corresponding to the stored data sets are obtained, and then the data sets to be updated are stored in different second areas in the storage system respectively.
When data is updated in the existing open source storage system, the flow is as follows:
for example, there are A, B and C different areas in the storage system, and in the prior art, only the a area is used as a storage space for the old version data and the new version data, and only one version of data can be stored in the a area at the same time. Before overwriting and writing in the hard disk each time, the data copy of the old version is written in another space of the hard disk for backup, and then overwriting and writing are carried out. If the all-covering write-in is successful, releasing the space occupied by the backup data, if the covering write-in is failed, copying and restoring the backed-up data in the hard disk by each hard disk, and then releasing the space occupied by the backup data. This adds an additional "copy old data for backup" process, which not only lengthens the time spent by the entire update process, but also is performed serially, and the execution of the subsequent update process must be started after the previous update process is completed.
The present application may be applied to an application scenario of a multi-version data set, for example, a plurality of data sets to be updated corresponding to the same group of stored data sets may be obtained, and the plurality of data sets to be updated may be used concurrently. The data updating method and the data updating device can store the data sets to be updated to different second areas in the storage system respectively, do not increase time additionally, support simultaneous updating of the data sets to be updated of a plurality of different versions, and achieve the purpose of improving the data updating performance of the hard disk.
Referring to fig. 2, a second flowchart of a data updating method provided in the embodiment of the present application is shown. As shown in fig. 2, after step S105, the method may further include:
step S201, clearing the stored data set stored in the first area.
Step S202, writing the data set to be updated into the first area, and clearing the data set to be updated stored in the second area.
After the data set to be updated is stored in the corresponding second area in the storage system, the stored data set of the old version stored in the first area may be cleared first, then the data set to be updated is written into the first area, and the data set to be updated stored in the second area is cleared. Therefore, the method can avoid the loss of the stored data set of the old version caused by abnormal faults in the data updating process in the storage stage, and can also clear the data of the old version with lower use degree in the later storage period, thereby reducing the occupation of the storage space of the storage system to the maximum extent.
In specific implementation, after step S202 is completed, the metadata corresponding to the storage system may be updated again.
Referring to fig. 3, a third schematic flow chart of a data updating method provided in the embodiment of the present application is provided, in which a process of querying stored multi-version data is added in the embodiment. As shown in fig. 3, after step S105, the method may further include:
step S301, selecting a target data set from all data sets stored in the storage system according to a query instruction sent by a first terminal device, wherein the target data set is the stored data set or any one of the data sets to be updated;
step S302, determining a target storage area corresponding to the target data set based on the metadata, wherein the target storage area includes the first area or the second area;
step S303, returning the target data set stored in the target storage area to the first terminal device.
After step S105, at least one stored data set and one data set to be updated are stored in the storage system. The first terminal device sending the query command includes, but is not limited to, a mobile phone, a tablet and a computer. The user can find out the stored data set and the data set to be updated which store each version in the current storage system by looking up the metadata, or can obtain the version of the target data set which needs to be inquired according to the inquiry instruction input by the user, then search the corresponding target storage area in the storage system according to the metadata, further obtain the target data set of the corresponding version and return the target data set to the user or the first terminal device. Wherein different versions of a data set may be associated with various types of reference data including, but not limited to, a time of modification, a name of a modifier, and other notes added by a user.
The user can determine a target data set to be queried according to the metadata and the reference data, and then sends a query instruction through the first terminal device. And after receiving the query instruction sent by the first terminal equipment, the server selects a target data set from all data sets stored in the storage system. Specifically, the query instruction includes at least two types, and the first type of query instruction is used for indicating: inquiring a target storage area corresponding to the latest version of the data set to be updated from the metadata, and then reading the latest version of the data set to be updated from the target storage area; the first query instruction is used for indicating that: and inquiring a target storage area corresponding to the data set to be updated of the specified version from the metadata, and then reading the data set to be updated of the specified version from the target storage area. And then returning the read target data set of the latest version or the specified version to the first terminal equipment.
Referring to fig. 4, a fourth flowchart of a data updating method provided in the embodiment of the present application is shown. As shown in fig. 4, after step S105, the method further includes:
step S401, judging whether the real-time capacity value of the storage system reaches a preset upper limit value;
step S402, if the real-time capacity value of the storage system reaches a preset upper limit value, sending a prompt message that the capacity reaches the upper limit to a second terminal device initiating the updating request;
step S403, clearing a preset number of historical data sets in the storage system according to a clearing instruction returned by the second terminal device based on the prompt information, where the historical data sets include the stored data set and the data set to be updated.
In specific implementation, the preset upper limit may be a user-defined upper limit of the storage capacity, for example: 70% of the maximum storage capacity of the storage system may also be the number of versions of the stored data set, and is not limited herein. And sending a prompt message that the capacity reaches the upper limit to a second terminal device initiating an updating request after the real-time capacity value of the storage system reaches the preset upper limit. After receiving the prompt message through the second terminal device, the user may send a clearing instruction to the server through the second terminal device, so as to clear the stored data set and/or the data set to be updated in the storage system. The clear instruction may be classified into the following categories:
the first type, a user is required to determine to execute a cleaning operation, and the user is required to input any number and version of data sets to be cleaned in real time;
in the second category, the second terminal device may send a clearing instruction to the server according to a preset clearing setting, only by determining to execute the clearing operation by the user, for example: and sequencing the historical data sets according to the updating time, and clearing a preset number of historical data sets according to the sequence. Wherein the historical data set comprises a stored data set and a data set to be updated;
and in the third category, the clearing operation is executed according to preset clearing setting after the server sends the prompt message that the capacity reaches the upper limit to the second terminal equipment without the user determining to execute the clearing operation.
According to the data updating method, when a single updating operation is executed on the storage system, the data set to be updated of a new version is directly stored in the second area of the storage system, and if all the data to be updated in the data set to be updated are stored successfully, the metadata corresponding to the storage system is modified. If the update fails, the second region is emptied, but the complete stored data set remains in the first region. Meanwhile, the multiple updating processes can be executed in the same batch without waiting for the previous updating process to be completed. The latest version of data or the specified version of data can be queried and read according to a query instruction sent by the device on the first terminal.
Corresponding to the above method embodiment, referring to fig. 5, the present invention further provides a data updating apparatus 500, where the data updating apparatus 500 includes:
a receiving module 501, configured to receive an update request corresponding to the stored data set;
an obtaining module 502, configured to obtain a data set to be updated corresponding to the stored data set, where the stored data set is stored in a first area of a storage system;
a starting module 503, configured to store the data set to be updated in a second area in the storage system, where the second area is any storage space in the storage system except for the first area;
a first updating module 504, configured to end the updating process if any one of the data sets to be updated fails to be stored in the second area;
a second updating module 505, configured to update metadata corresponding to the storage system if all the data to be updated in the data set to be updated is stored in the second area, where the metadata is used to indicate the storage areas corresponding to the stored data set and the data set to be updated in the storage system.
In specific implementation, the obtaining module 502 is specifically configured to obtain at least two data sets to be updated corresponding to the stored data sets;
the starting module 503 is specifically configured to store each data set to be updated in a different second area in the storage system.
In specific implementation, referring to fig. 6, fig. 6 is a second block diagram of a data updating apparatus according to an embodiment of the present application. As shown in fig. 6, the data updating apparatus 500 further includes:
a clearing module 506 for clearing the stored data set stored in the first region;
a writing module 507, configured to write the data set to be updated into the first area, and clear the data set to be updated stored in the second area.
Furthermore, a computer device is provided, the computer device comprising a processor and a memory, the memory storing a computer program, the computer program implementing the above-mentioned data updating method when executed on the processor.
Furthermore, a computer-readable storage medium is provided, which stores a computer program that, when executed on a processor, implements the above-described data updating method.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention or a part of the technical solution that contributes to the prior art in essence can be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention.

Claims (10)

1. A method for updating data, the method comprising:
receiving an update request corresponding to a stored data set;
acquiring a data set to be updated corresponding to the stored data set, wherein the stored data set is stored in a first area of a storage system;
storing the data set to be updated to a second area in the storage system, wherein the second area is any storage space in the storage system except the first area;
if any data to be updated in the data set to be updated fails to be stored in the second area, ending the updating process;
and if all the data to be updated in the data set to be updated are stored in the second area, updating the metadata corresponding to the storage system, wherein the metadata is used for indicating the storage area corresponding to the stored data set and/or the data set to be updated in the storage system.
2. The method of claim 1, wherein the step of retrieving the dataset to be updated corresponding to the stored dataset comprises:
acquiring at least two data sets to be updated corresponding to the stored data sets;
the step of storing the data set to be updated to a second area within the storage system comprises:
and respectively storing the data sets to be updated to different second areas in the storage system.
3. The method of claim 1, wherein after the step of updating the metadata corresponding to the storage system, the method further comprises:
clearing the stored data set stored in the first region;
and writing the data set to be updated into the first area, and clearing the data set to be updated stored in the second area.
4. The method of claim 2, wherein after the step of updating the metadata corresponding to the storage system, the method further comprises:
selecting a target data set from all data sets stored in the storage system according to a query instruction sent by first terminal equipment, wherein the target data set is the stored data set or any one of the data sets to be updated;
determining a target storage area corresponding to the target data set based on the metadata, wherein the target storage area comprises the first area or the second area;
returning the target data set stored in the target storage area to the first terminal device.
5. The method of claim 1, wherein after the step of updating the metadata corresponding to the storage system, the method further comprises:
judging whether the real-time capacity value of the storage system reaches a preset upper limit value or not;
if the real-time capacity value of the storage system reaches a preset upper limit value, sending a prompt message that the capacity reaches the upper limit to a second terminal device which initiates the updating request;
and clearing a preset number of historical data sets in the storage system according to a clearing instruction returned by the second terminal device based on the prompt message, wherein the historical data sets comprise the stored data sets and the data sets to be updated.
6. An apparatus for updating data, the apparatus comprising:
a receiving module, configured to receive an update request corresponding to a stored data set;
the acquisition module is used for acquiring a data set to be updated corresponding to the stored data set, wherein the stored data set is stored in a first area of a storage system;
the starting module is used for storing the data set to be updated to a second area in the storage system, wherein the second area is any storage space in the storage system except the first area;
the first updating module is used for ending the updating process if any data to be updated in the data set to be updated fails to be stored in the second area;
and a second updating module, configured to update metadata corresponding to the storage system if all the data to be updated in the data set to be updated is stored in the second area, where the metadata is used to indicate a storage area corresponding to the stored data set and/or the data set to be updated in the storage system.
7. The apparatus according to claim 6, wherein the obtaining module is specifically configured to obtain at least two datasets to be updated corresponding to the stored datasets;
and respectively storing the data sets to be updated to different second areas in the storage system.
8. The apparatus of claim 6, further comprising:
a clearing module for clearing the stored data set stored in the first region;
and the writing module is used for writing the data set to be updated into the first area and clearing the data set to be updated stored in the second area.
9. A computer device, characterized in that the data update device comprises a processor and a memory, the memory storing a computer program which, when executed on the processor, implements the data update method of any one of claims 1 to 5.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements the data updating method of any one of claims 1 to 5.
CN202111175838.0A 2021-10-09 2021-10-09 Data updating method and device and computer equipment Pending CN113885804A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111175838.0A CN113885804A (en) 2021-10-09 2021-10-09 Data updating method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111175838.0A CN113885804A (en) 2021-10-09 2021-10-09 Data updating method and device and computer equipment

Publications (1)

Publication Number Publication Date
CN113885804A true CN113885804A (en) 2022-01-04

Family

ID=79005760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111175838.0A Pending CN113885804A (en) 2021-10-09 2021-10-09 Data updating method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN113885804A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078993A (en) * 2007-03-13 2007-11-28 中兴通讯股份有限公司 Method for on-line upgrading of edition in terminal product without interrupting the operation
US20110004583A1 (en) * 2008-04-04 2011-01-06 Kazutoshi Honda Database system, database update method, database, and database update program
CN103577214A (en) * 2012-08-09 2014-02-12 罗森伯格(上海)通信技术有限公司 Method and device for updating application program
CN104699514A (en) * 2015-04-01 2015-06-10 江苏惠通集团有限责任公司 Remote-control end system updating method and device
CN108628556A (en) * 2017-03-17 2018-10-09 株式会社理光 Information processing unit, image forming apparatus, update method
CN110895444A (en) * 2018-09-12 2020-03-20 厦门歌乐电子企业有限公司 Electronic equipment and data reading and writing method
US20200409598A1 (en) * 2019-06-28 2020-12-31 Seagate Technology Llc Data storage system with recently freed page reference state

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101078993A (en) * 2007-03-13 2007-11-28 中兴通讯股份有限公司 Method for on-line upgrading of edition in terminal product without interrupting the operation
US20110004583A1 (en) * 2008-04-04 2011-01-06 Kazutoshi Honda Database system, database update method, database, and database update program
CN103577214A (en) * 2012-08-09 2014-02-12 罗森伯格(上海)通信技术有限公司 Method and device for updating application program
CN104699514A (en) * 2015-04-01 2015-06-10 江苏惠通集团有限责任公司 Remote-control end system updating method and device
CN108628556A (en) * 2017-03-17 2018-10-09 株式会社理光 Information processing unit, image forming apparatus, update method
CN110895444A (en) * 2018-09-12 2020-03-20 厦门歌乐电子企业有限公司 Electronic equipment and data reading and writing method
US20200409598A1 (en) * 2019-06-28 2020-12-31 Seagate Technology Llc Data storage system with recently freed page reference state

Similar Documents

Publication Publication Date Title
CN110018989B (en) Snapshot comparison method and device
US20150213100A1 (en) Data synchronization method and system
CN105630632A (en) Virtual machine recovery method and virtual machine management device
CN107329859B (en) Data protection method and storage device
CN112182010B (en) Dirty page refreshing method and device, storage medium and electronic equipment
CN111638995A (en) Metadata backup method, device and equipment and storage medium
CN105573788B (en) The method and apparatus of patch processing and the method and apparatus for generating patch
CN113254536A (en) Database transaction processing method, system, electronic device and storage medium
CN111382011B (en) File data access method and device and computer readable storage medium
CN115145697A (en) Database transaction processing method and device and electronic equipment
CN110737716B (en) Data writing method and device
CN114138192A (en) Storage node online upgrading method, device, system and storage medium
CN110795282B (en) Data rollback method, device, equipment and storage medium
CN111488124A (en) Data updating method and device, electronic equipment and storage medium
CN113885804A (en) Data updating method and device and computer equipment
JP4828917B2 (en) Storage system, computer system, host computer, and data replication method
CN112765151A (en) Random writing method and device based on distributed storage system and distributed storage system
US20030177131A1 (en) Data processing method, data processing apparatus, and data processing program
US7949632B2 (en) Database-rearranging program, database-rearranging method, and database-rearranging apparatus
CN115422135A (en) Data processing method and device
CN111209304B (en) Data processing method, device and system
US6510456B1 (en) Data transfer control method and system, data transfer control program file, and file storage medium
CN109254870B (en) Data backup method and device
CN111177091B (en) Video pre-distribution storage method, system and storage medium based on XFS file system
CN111984460B (en) Metadata recovery method and device

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