CN111625853B - Snapshot processing method, device and equipment and readable storage medium - Google Patents

Snapshot processing method, device and equipment and readable storage medium Download PDF

Info

Publication number
CN111625853B
CN111625853B CN202010443876.9A CN202010443876A CN111625853B CN 111625853 B CN111625853 B CN 111625853B CN 202010443876 A CN202010443876 A CN 202010443876A CN 111625853 B CN111625853 B CN 111625853B
Authority
CN
China
Prior art keywords
target
state machine
snapshot
metadata
machine 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.)
Active
Application number
CN202010443876.9A
Other languages
Chinese (zh)
Other versions
CN111625853A (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.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry 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 Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202010443876.9A priority Critical patent/CN111625853B/en
Publication of CN111625853A publication Critical patent/CN111625853A/en
Application granted granted Critical
Publication of CN111625853B publication Critical patent/CN111625853B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a snapshot processing method, which comprises the following steps: acquiring changed state machine data, and determining an event tag corresponding to the state machine data; generating metadata corresponding to the state machine data by using the event tags, and putting the metadata into a metadata queue; acquiring target metadata from a metadata queue, and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata; when the method is used for acquiring data, only the changed state machine data is acquired, and the full data is not acquired; by acquiring the changed state machine data and carrying out snapshot processing on the changed state machine data, the quantity of the acquired and processed data can be reduced, the time required by snapshot processing is reduced, and the processing efficiency is improved; in addition, the invention also provides a snapshot processing device, snapshot processing equipment and a computer readable storage medium, and the snapshot processing device, the snapshot processing equipment and the computer readable storage medium also have the beneficial effects.

Description

Snapshot processing method, device and equipment and readable storage medium
Technical Field
The present invention relates to the field of snapshot technologies, and in particular, to a snapshot processing method, a snapshot processing apparatus, a snapshot processing device, and a computer-readable storage medium.
Background
The storage snapshot technique snia (storage Networking Industry association) is a technique for generating a fully available copy of a given data set, which includes an image of the corresponding data at a certain point in time (the point in time at which the copy begins). The snapshot may be a copy of the data it represents or may be a replica of the data.
In order to ensure the integrity of snapshot data, the related technologies all adopt a full snapshot mode to perform processing such as generation, update or deletion on snapshots, that is, all data are acquired and are utilized to perform snapshot processing, such a snapshot processing mode can cause delay and blockage of normal services, and the snapshot processing speed and efficiency are low.
Therefore, how to solve the problems of slow speed and low efficiency in snapshot processing in the related art is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of the above, the present invention provides a snapshot processing method, a snapshot processing apparatus, a snapshot processing device, and a computer readable storage medium, which solve the problems of slow speed and low efficiency when performing snapshot processing in the related art.
In order to solve the above technical problem, the present invention provides a snapshot processing method, including:
acquiring changed state machine data, and determining an event tag corresponding to the state machine data;
generating metadata corresponding to the state machine data by using the event tag, and putting the metadata into a metadata queue;
and acquiring target metadata from the metadata queue, and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event label in the target metadata.
Optionally, the obtaining the changed state machine data and determining an event tag corresponding to the state machine data includes:
acquiring the state machine data according to a preset period;
determining target record information corresponding to the state machine data from record information corresponding to a business system;
and analyzing the target record information to obtain the event label.
Optionally, the performing snapshot processing on the target state machine data corresponding to the target metadata according to the target event tag in the target metadata includes:
when the target event label is a newly added label, snapshot saving processing is carried out on the target state machine data;
when the target event label is a deletion label, determining a target snapshot in the target storage path, and deleting the target snapshot;
and when the target event label is an update label, determining the target snapshot in the target storage path, and updating the target snapshot by using the target state machine data.
Optionally, the performing snapshot saving processing on the target state machine data includes:
performing one-way encryption processing on the target state machine data to obtain checksum data;
and generating the target snapshot by using the target state machine data and the checksum data, and storing the target snapshot in the target storage path to finish snapshot storage processing.
Optionally, the method further comprises:
when a reading instruction is received, determining a snapshot to be read specified by the reading instruction;
performing one-way encryption processing on the state machine data to be read in the snapshot to be read to obtain verification data;
and when the verification data is the same as the check sum data to be read in the snapshot to be read, reading out the data of the state machine to be read.
Optionally, the generating metadata corresponding to the state machine data by using the event tag includes:
determining a classification label corresponding to the state machine data;
generating the metadata using the classification tag and the event tag.
Optionally, the obtaining target metadata from the metadata queue and performing snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata includes:
obtaining the target metadata from a head end of the metadata queue;
analyzing the target metadata to obtain the target classification label;
acquiring system storage configuration information, and determining the target storage path corresponding to the target classification label according to the system storage configuration information;
and under the target storage path, carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event label in the target metadata.
The invention also provides a snapshot processing device, which comprises:
the acquisition module is used for acquiring changed state machine data and determining an event label corresponding to the state machine data;
the metadata generation module is used for generating metadata corresponding to the state machine data by using the event tags and putting the metadata into a metadata queue;
and the processing module is used for acquiring target metadata from the metadata queue and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event label in the target metadata.
The invention also provides snapshot processing equipment, which comprises a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the snapshot processing method.
The present invention also provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the snapshot processing method described above.
The snapshot processing method provided by the invention obtains the changed state machine data and determines the event label corresponding to the state machine data; generating metadata corresponding to the state machine data by using the event tags, and putting the metadata into a metadata queue; and acquiring target metadata from the metadata queue, and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata.
Therefore, when the method is used for acquiring data, only the changed state machine data is acquired, and the full amount of data is not acquired. And the event tag is used for indicating which snapshot processing is performed on the state machine data, generating metadata after the event tag corresponding to the state machine data is determined, and putting the metadata into a metadata queue to wait for processing. And acquiring target metadata from the metadata queue, and performing snapshot processing on target state machine data corresponding to the target metadata to complete the snapshot processing process. By acquiring the changed state machine data, the quantity of acquired and processed data can be reduced, the time required by snapshot processing is reduced, the processing efficiency is improved, and the problems of low speed and low efficiency in snapshot processing in the related art are solved.
In addition, the invention also provides a snapshot processing device, snapshot processing equipment and a computer readable storage medium, and the snapshot processing device, the snapshot processing equipment and the computer readable storage medium also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a snapshot processing method according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific snapshot processing method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a snapshot processing apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a snapshot processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another snapshot processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a tree-like storage path structure according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In a possible implementation manner, please refer to fig. 1, where fig. 1 is a flowchart of a snapshot processing method according to an embodiment of the present invention. The method comprises the following steps:
s101: and acquiring the changed state machine data, and determining an event label corresponding to the state machine data.
In this embodiment, the data that needs to be snapshot-processed is state machine data, and the specific content, type, and data form of the state machine data are not limited in this embodiment, and may be data in any data form corresponding to any state machine in any state machine system in the service system, for example, state machine data corresponding to a certain state machine in the monitoring system. The state machine data may include a pointer entry, pointer status, counter, version number, additional extension fields, timestamp, etc. Specifically, a data set may be obtained first, and the data set is subjected to mapping conversion processing to obtain state machine data.
It should be noted that the data acquired in this embodiment is changed state machine data, and not all the state machine data. That is, all the state machine data that can be snapshot processed is not acquired and is uniformly snapshot processed. In the related art, all data needs to be acquired and subjected to uniform snapshot processing, and even if snapshot processing is not performed on all data, all data needs to be acquired, subjected to operations such as blocking and the like, and then snapshot processing is performed on parts of the data, which is still a way of uniformly processing all data capable of being subjected to snapshot processing, and thus the problems of low speed and low efficiency of acquiring and processing data are caused.
The frequency of acquiring the state machine data is not limited in this embodiment, and for example, the acquisition may be in real time, that is, after detecting that the state machine data changes, the changed state machine data is immediately acquired. The method for obtaining the state machine data is not limited in this embodiment, and for example, the operation of a state machine system in a service system may be monitored, and when some data in a certain state machine changes, the changed state machine data is obtained; or in order to reduce the computational pressure brought by monitoring the service system, the notification of the service system can be received, the service system generates and sends the notification after the data of a certain state machine changes during normal operation, and the corresponding changed data of the state machine is obtained after the notification of the service system is received.
After the changed state machine data is acquired, an event label corresponding to the state machine data needs to be determined. The event tag is used for indicating the change type of the state machine data, namely, what kind of change occurs to the state machine data, so that the snapshot processing is performed on the state machine data according to the event tag. The embodiment does not limit the method for acquiring the event tag, and the event tag may be acquired from a notification sent by a service system, or may be acquired from another path or file.
S102: and generating metadata corresponding to the state machine data by using the event tags, and putting the metadata into a metadata queue.
And after the event tag is obtained, generating metadata corresponding to the state machine data by using the event tag. The metadata is snapshot processing task information indicating what snapshot processing is performed on which state machine data. The metadata includes an event tag and may further include identity information used for representing state machine data, and specific content of the identity information is not limited, and may be, for example, a data number, a data name, and the like. Other data or information may be included, such as path information, permission level information, etc., among others.
In general, snapshot processing cannot be performed in parallel, that is, only one state machine data can be snapshot processed at a time, so that metadata is put into a metadata queue, and the metadata queue is used for storing and sorting the metadata, so as to perform snapshot processing on the state machine data corresponding to each metadata in sequence.
S103: and acquiring target metadata from the metadata queue, and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata.
The target metadata corresponds to target state machine data to be subjected to snapshot processing, and a specific determination method of the target metadata is not limited in this embodiment, and may be determined according to a time sequence, for example, or may be determined according to a high-low sequence of the permission levels when the metadata includes permission level information.
When snapshot processing is carried out, target metadata are obtained from the metadata queue, and a corresponding target event label is obtained by analyzing the target metadata. And after the target event label is determined, snapshot processing is carried out on the target state machine data corresponding to the target metadata according to the target event label, and the snapshot processing process of the target state machine data is completed. The present embodiment does not limit how to determine the target state machine data corresponding to the target metadata, and for example, a state machine data index may be generated, and the target state machine data corresponding to the target metadata may be determined by using the state machine data index. The embodiment of the specific process of snapshot processing is not limited, and reference may be made to related technologies.
It should be noted that, in one embodiment, the steps S101, S102 and S103 may be executed in parallel, that is, the step S103 may be executed at the same time as the steps S101 and S102 are executed; in another embodiment, the steps S101, S102 and S103 may be executed in series, that is, after the steps S101 and S102 are executed, the step S103 is executed. Because the method only processes the target state machine data when snapshot processing is carried out, only the snapshot data corresponding to the target state machine needs to be locked, all the snapshot data does not need to be locked, and the influence on normal service can be greatly reduced.
By applying the snapshot processing method provided by the embodiment of the invention, only the changed state machine data is acquired and the full data is not acquired when the data is acquired. And the event tag is used for indicating which snapshot processing is performed on the state machine data, generating metadata after the event tag corresponding to the state machine data is determined, and putting the metadata into a metadata queue to wait for processing. And acquiring target metadata from the metadata queue, and performing snapshot processing on target state machine data corresponding to the target metadata to complete the snapshot processing process. By acquiring the changed state machine data, the data acquisition and processing quantity can be reduced, the time required by snapshot processing is reduced, the processing efficiency is improved, and the problems of low speed and low efficiency in snapshot processing in the related art are solved.
Based on the above embodiment, in a possible implementation manner, to facilitate storage and search of snapshot data, different snapshot data may be stored in different storage paths according to different categories, respectively. Referring to fig. 2 in detail, fig. 2 is a flowchart of a snapshot processing method according to an embodiment of the present invention, including:
s201: and acquiring state machine data according to a preset period.
In this embodiment, the state machine data may be acquired according to a preset period. Specifically, each state machine data in the service system may be detected according to a preset period, and the state machine data is determined and acquired, or a notification sent by the service system may be acquired according to the preset period, and the state machine data is determined and acquired by using the notification.
S202: and determining target record information corresponding to the state machine data from the record information corresponding to the service system.
In this embodiment, in order to accurately obtain the event label corresponding to the state machine event and reduce the pressure of the service system, after the state machine data is determined, the target record information corresponding to the state machine data may be determined from the record information corresponding to the service system. The record information may be record information of the whole service system, or record information of a state machine system corresponding to the state machine data in the service system. The target record information record corresponds to the state machine data item and records the change condition of the state machine data. The specific form of the record information is not limited in this embodiment, and may be, for example, system log information; or may be other information such as memory information.
S203: and analyzing the target record information to obtain an event label.
And analyzing the target record information after the target record information is determined, so as to obtain the event label. The specific parsing manner is not limited in this embodiment, and may be set according to the format and content of the target record information.
S204: and determining a classification label corresponding to the state machine data.
In this embodiment, since the object of snapshot processing may be state machine data, and the types of the state machine data are multiple, the types of the obtained snapshot data are also multiple. In order to facilitate searching and storing of snapshot data, the snapshot data can be classified and stored under different storage paths according to information such as classification of state machine data. Specifically, after the event label is determined, a classification label corresponding to the state machine data may also be determined, where the classification label indicates a category to which the state machine data belongs. The specific determination method of the classification tag is not limited in this embodiment, and may be obtained from the target record information, or may be determined when the state machine data is obtained, for example.
S205: metadata is generated using the classification tags and the event tags.
After the classification tags are obtained, the classification tags and the event tags are used together to generate metadata. In addition, the metadata may further include other data or information, for example, the metadata may be timestamp information, or may be location information of the state machine data, that is, temporary location information of the state machine data before snapshot processing is performed. After the metadata is generated, the metadata is placed in a metadata queue.
S206: target metadata is obtained from the head end of the metadata queue.
In this embodiment, in order to process the state machine data as soon as possible and avoid that the data cannot be recovered when a fault occurs, a first-in first-out manner may be adopted to manage the metadata queue in this embodiment. Specifically, when metadata is placed in the metadata queue, the metadata is placed at the tail of the metadata queue, and when target metadata is determined, the target metadata is obtained from the head end of the metadata queue, that is, the metadata placed first in the current metadata queue is determined as the target metadata.
S207: and analyzing the target metadata to obtain a target classification label.
And analyzing the target metadata after the target metadata is determined to obtain a target classification label so as to determine a target storage path corresponding to the target metadata, and performing snapshot processing on target state machine data corresponding to the target metadata under the path.
S208: and acquiring system storage configuration information, and determining a target storage path corresponding to the target classification label according to the system storage configuration information.
The system storage configuration information is used to record storage paths corresponding to various types of state machine data, and the specific form of the configuration information is not limited. The system storage configuration information may be generated based on a storage path structure, and the storage path structure may be set as needed, for example, a tree. According to the system storage configuration information, a target storage path corresponding to the target classification label can be determined.
In one possible implementation, when the storage path structure is a tree, it may be a structure of namespace (subsystem) -state machine name-pointer item-pointer name-UID-timestamp or the like. For example, referring to fig. 6, fig. 6 is a schematic structural diagram of a tree-shaped storage path structure according to an embodiment of the present invention. The system comprises three root directories, namely a process, a resource and an imonitor, and a plurality of subdirectories are respectively arranged under the root directories. For example, when the target state machine data is the monitor subsystem GPU video memory information, the corresponding classification information is imoitor-GPU, and the corresponding target storage path is/mnt/data/hpc/imoitor/GPU/mem.
S209: and under the target storage path, carrying out snapshot processing on target state machine data corresponding to the target metadata according to the target event tag in the target metadata.
After the target storage path is determined, under the target storage path, snapshot processing is carried out on the target state machine data according to the target event label.
In a possible implementation manner, the target event tag may be a newly added tag, and when the target event tag is the newly added tag, snapshot saving processing may be performed on the target state machine data, that is, snapshot data corresponding to the target state machine data is generated;
in another possible implementation, the target event tag may be a delete tag, and when the target event tag is the delete tag, the target snapshot (i.e., the target snapshot data) is determined in the target storage path, i.e., the target snapshot data is deleted. Since the target event tag is a delete tag, specific data may not be obtained when the target snapshot data is obtained, and therefore, when it is detected that a certain state machine data is deleted when the service system is running, it may be set to 0 and used to perform a subsequent snapshot processing procedure.
In another possible implementation, the target event tag may be an update tag, and when the target event tag is the update tag, the target snapshot is determined in the target storage path, and the target snapshot is updated by using the target state machine data, that is, a new target snapshot is generated and an old target snapshot is replaced.
Based on the above embodiments, in one possible implementation manner, in order to ensure the security and the legitimacy of the snapshot data, when generating and updating the snapshot data, corresponding check sum data may be generated so as to perform security check at the time of data recovery. For example, when the target event tag is a new tag, the process of performing snapshot saving processing on the target state machine data includes:
step 11: and carrying out one-way encryption processing on the target state machine data to obtain checksum data.
The specific encryption method of the unidirectional encryption processing is not limited in this embodiment, and for example, the MD5 algorithm may be used, after the unidirectional encryption processing is performed on the target state machine data, checksum data corresponding to the target state machine data may be generated, and the specific content of the checksum data is related to the processing method of the unidirectional encryption processing, which is not limited in this embodiment.
Step 12: and generating a target snapshot by using the target state machine data and the checksum data, and storing the target snapshot in a target storage path to finish snapshot storage processing.
And after the checksum data is obtained, generating target snapshot data, namely a target snapshot, by using the checksum data and the target state machine data, and storing the target snapshot in a target storage path to finish snapshot storage processing.
Correspondingly, when the target event label is an update label, the target snapshot is generated by using the checksum data and the target state machine data after the checksum data is generated, and the existing snapshot data is replaced by using the target snapshot, so that the snapshot update processing is completed.
Further, when data recovery is performed, the validity and the security of the snapshot data can be verified by using checksum data, so that the snapshot data is prevented from being modified, specifically:
step 21: and when a reading instruction is received, determining the snapshot to be read specified by the reading instruction.
In this embodiment, it may be determined that data recovery is required after the read instruction is received, and the specified snapshot is read. The reading instruction may be sent by other devices or terminals, or may be manually input by a user, or may be automatically generated when a fault is detected.
Step 22: and performing unidirectional encryption processing on the state machine data to be read in the snapshot to be read to obtain verification data.
After determining the snapshot to be read, performing unidirectional encryption processing on the state machine data to be read in the snapshot to be read, where it should be noted that the unidirectional encryption processing method adopted here is the same as the unidirectional encryption processing method adopted in step 11. And after the data of the state machine to be read is subjected to unidirectional encryption processing, verification data can be obtained.
Step 23: and when the verification data is the same as the check data to be read and the data to be read in the snapshot to be read, reading the data of the state machine to be read.
And comparing the verification data with the check sum data to be read in the snapshot to be read, and when the verification data is the same as the check sum data to be read in the snapshot to be read, indicating that the snapshot to be read is not modified and the state machine data to be read is legal and safe, so that the state machine data to be read is read out to facilitate data recovery.
In the following, the snapshot processing apparatus provided in the embodiment of the present invention is introduced, and the snapshot processing apparatus described below and the snapshot processing method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a snapshot processing apparatus according to an embodiment of the present invention, including:
an obtaining module 310, configured to obtain changed state machine data, and determine an event tag corresponding to the state machine data;
the metadata generation module 320 is configured to generate metadata corresponding to the state machine data by using the event tag, and place the metadata into a metadata queue;
the processing module 330 is configured to obtain target metadata from the metadata queue, and perform snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata.
Optionally, the obtaining module 310 includes:
the period acquisition unit is used for acquiring state machine data according to a preset period;
the target recording information determining unit is used for determining target recording information corresponding to the state machine data from the recording information corresponding to the service system;
and the event label analyzing unit is used for analyzing the target record information to obtain the event label.
Optionally, the processing module 330 includes:
the storage unit is used for carrying out snapshot storage processing on the data of the target state machine when the target event label is a newly added label;
the deleting unit is used for determining the target snapshot in the target storage path and deleting the target snapshot when the target event label is a deleting label;
and the updating unit is used for determining the target snapshot in the target storage path and updating the target snapshot by using the target state machine data when the target event label is the update label.
Optionally, the saving unit includes:
the encryption subunit is used for carrying out unidirectional encryption processing on the target state machine data to obtain checksum data;
and the generation subunit is used for generating a target snapshot by using the target state machine data and the checksum data, and storing the target snapshot in a target storage path to complete snapshot storage processing.
Optionally, the method further comprises:
the reading instruction acquisition module is used for determining the snapshot to be read specified by the reading instruction when the reading instruction is received;
the verification data calculation module is used for performing one-way encryption processing on the state machine data to be read in the snapshot to be read to obtain verification data;
and the reading module is used for reading the data of the state machine to be read when the verification data is the same as the check sum data to be read in the snapshot to be read.
Optionally, the metadata generating module 320 includes:
the classification note determining unit is used for determining a classification label corresponding to the state machine data;
and the generating unit is used for generating the metadata by utilizing the classification label and the event label.
Optionally, the processing module 330 includes:
a head end obtaining unit for obtaining target metadata from a head end of the metadata queue;
the classification label analysis unit is used for analyzing the target metadata to obtain a target classification label;
the storage path determining unit is used for acquiring system storage configuration information and determining a target storage path corresponding to the target classification label according to the system storage configuration information;
and the processing unit is used for carrying out snapshot processing on the target state machine data corresponding to the target metadata according to the target event tag in the target metadata under the target storage path.
In the following, the snapshot processing apparatus provided in the embodiment of the present invention is introduced, and the snapshot processing apparatus described below and the snapshot processing method described above may be referred to correspondingly.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a snapshot processing apparatus according to an embodiment of the present invention. Wherein the snapshot processing device 400 may include a processor 401 and a memory 402, and may further include one or more of a multimedia component 403, an information input/information output (I/O) interface 404, and a communication component 405.
The processor 401 is configured to control the overall operation of the snapshot processing apparatus 400, so as to complete all or part of the steps in the snapshot processing method described above; the memory 402 is used to store various types of data to support operations at the snapshot processing device 400, which may include, for example, instructions for any application or method operating on the snapshot processing device 400, as well as application-related data. The Memory 402 may be implemented by any type or combination of volatile and non-volatile Memory devices, such as one or more of Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic or optical disk.
The multimedia components 403 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 402 or transmitted through the communication component 405. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 404 provides an interface between the processor 401 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 405 is used for wired or wireless communication between the snapshot processing device 400 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 405 may include: Wi-Fi part, Bluetooth part, NFC part.
The snapshot Processing apparatus 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components, and is used to execute the snapshot Processing method provided by the above embodiments.
In the following, the snapshot processing apparatus provided in the embodiment of the present invention is introduced, and the snapshot processing apparatus described below and the snapshot processing method described above may be referred to correspondingly.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another snapshot processing apparatus according to an embodiment of the present invention. The snapshot processing equipment comprises a state machine snapshot manager, a state machine device, a storage executor, a metadata queue, a state machine indexer and a security checker. The state machine snapshot manager is used for providing snapshot interfaces externally, namely a snapshot loading interface and a snapshot saving interface, so as to realize business logic of snapshot saving and loading. And the state machine device is used for generating metadata, placing the metadata into a metadata queue and controlling or operating other modules. The storage executor is used for executing specific snapshot storage and reading work. The metadata queue provides a state machine metadata enqueue interface and a state machine metadata dequeue interface, and is used for storing metadata and performing metadata enqueue and dequeue. The state machine indexer is used for determining a storage path corresponding to the state machine data. The safety checker is used for generating checksum data and carrying out validity check on the state machine data to be read when data recovery is carried out.
After the service system starts to operate, the snapshot processing device starts to operate, and may first perform full snapshot generation on state machine data in the service system, that is, generate snapshot data corresponding to all state machine objects. Specifically, the state machine device is started to acquire a full data set of the service system and convert the full data set into a state machine data set object, namely state machine data. When the full snapshot generation is not needed, the work of the service system can be monitored, and the state machine data is waited to be obtained. And after the state machine data are acquired, starting the state machine indexer, and generating a data index object according to the state machine data. The state machine device constructs and generates metadata information such as state machine event labels (namely event labels) and state machine data indexes, generates metadata and outputs the metadata to a metadata queue. In the following, for example, a new tag is added, after which a manager thread is started to monitor the metadata queue. When the metadata exists in the metadata queue, the target metadata is determined and taken out, and a data index object, an event tag and other information, such as a storage strategy, are analyzed from the target metadata. And acquiring target state machine data according to the state machine data index, and determining a storage path according to a storage strategy and the data index object. And performing single encryption on the target state machine data to generate an encryption summary, namely checksum data. And executing save persistence processing under a save path, and writing the data with save data and check sum data into a disk or a storage system.
In the following, the computer-readable storage medium provided by the embodiment of the present invention is introduced, and the computer-readable storage medium described below and the snapshot processing method described above may be referred to correspondingly.
The present invention further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the snapshot processing method described above.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should be further noted that, in this document, relationships such as first and second, etc., are used merely to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Also, the terms include, or any other variation is intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The snapshot processing method, the snapshot processing apparatus, the snapshot processing device, and the computer-readable storage medium provided by the present invention are described in detail above, and a specific example is applied in the present document to explain the principle and the implementation manner of the present invention, and the description of the above embodiment is only used to help understanding the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A snapshot processing method, comprising:
acquiring changed state machine data, and determining an event tag corresponding to the state machine data;
generating metadata corresponding to the state machine data by using the event tags, and putting the metadata into a metadata queue;
acquiring target metadata from the metadata queue, and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata;
performing snapshot processing on target state machine data corresponding to the target metadata according to the target event tag in the target metadata, including:
when the target event label is a newly added label, snapshot saving processing is carried out on the target state machine data;
when the target event label is a deletion label, determining a target snapshot in a target storage path, and deleting the target snapshot;
and when the target event label is an update label, determining the target snapshot in the target storage path, and updating the target snapshot by using the target state machine data.
2. The snapshot processing method according to claim 1, wherein the obtaining of the state machine data that has changed and determining the event tag corresponding to the state machine data includes:
acquiring the state machine data according to a preset period;
determining target record information corresponding to the state machine data from record information corresponding to a business system;
and analyzing the target record information to obtain the event label.
3. The snapshot processing method according to claim 1, wherein said snapshot saving processing on the target state machine data includes:
performing one-way encryption processing on the target state machine data to obtain checksum data;
and generating the target snapshot by using the target state machine data and the checksum data, and storing the target snapshot in the target storage path to finish snapshot storage processing.
4. The snapshot processing method of claim 3, further comprising:
when a reading instruction is received, determining a snapshot to be read specified by the reading instruction;
performing one-way encryption processing on the state machine data to be read in the snapshot to be read to obtain verification data;
and when the verification data is the same as the check sum data to be read in the snapshot to be read, reading out the data of the state machine to be read.
5. The snapshot processing method according to claim 1, wherein the generating metadata corresponding to the state machine data by using the event tag includes:
determining a classification label corresponding to the state machine data;
generating the metadata using the classification tag and the event tag.
6. The snapshot processing method according to claim 5, wherein said obtaining target metadata from the metadata queue and performing snapshot processing on target state machine data corresponding to the target metadata according to a target event tag in the target metadata comprises:
obtaining the target metadata from a head end of the metadata queue;
analyzing the target metadata to obtain a target classification label;
acquiring system storage configuration information, and determining the target storage path corresponding to the target classification label according to the system storage configuration information;
and under the target storage path, carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event label in the target metadata.
7. A snapshot processing apparatus, comprising:
the acquisition module is used for acquiring changed state machine data and determining an event label corresponding to the state machine data;
the metadata generation module is used for generating metadata corresponding to the state machine data by using the event tags and putting the metadata into a metadata queue;
the processing module is used for acquiring target metadata from the metadata queue and carrying out snapshot processing on target state machine data corresponding to the target metadata according to a target event label in the target metadata;
the processing module is specifically configured to obtain target metadata from the metadata queue, and perform snapshot saving processing on the target state machine data when the target event tag is a newly added tag; when the target event label is a deletion label, determining a target snapshot in a target storage path, and deleting the target snapshot; and when the target event label is an update label, determining the target snapshot in the target storage path, and updating the target snapshot by using the target state machine data.
8. A snapshot processing apparatus, comprising a memory and a processor, wherein:
the memory is used for storing a computer program;
the processor is configured to execute the computer program to implement the snapshot processing method according to any one of claims 1 to 6.
9. A computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the snapshot processing method of any one of claims 1 to 6.
CN202010443876.9A 2020-05-22 2020-05-22 Snapshot processing method, device and equipment and readable storage medium Active CN111625853B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010443876.9A CN111625853B (en) 2020-05-22 2020-05-22 Snapshot processing method, device and equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010443876.9A CN111625853B (en) 2020-05-22 2020-05-22 Snapshot processing method, device and equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111625853A CN111625853A (en) 2020-09-04
CN111625853B true CN111625853B (en) 2022-06-10

Family

ID=72271098

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010443876.9A Active CN111625853B (en) 2020-05-22 2020-05-22 Snapshot processing method, device and equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111625853B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113934761A (en) * 2021-10-20 2022-01-14 北京沃东天骏信息技术有限公司 Data processing method and device
CN114817134B (en) * 2022-04-30 2024-10-15 苏州浪潮智能科技有限公司 Snapshot task monitoring method, device, equipment and medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7136974B2 (en) * 2003-06-19 2006-11-14 Pillar Data Systems, Inc. Systems and methods of data migration in snapshot operations
CN109710454A (en) * 2018-11-08 2019-05-03 厦门集微科技有限公司 A kind of cloud host snapshot method and device
CN109684273A (en) * 2019-01-07 2019-04-26 郑州云海信息技术有限公司 A kind of snapshot management method, apparatus, equipment and readable storage medium storing program for executing
CN111125012A (en) * 2019-12-22 2020-05-08 浪潮(北京)电子信息产业有限公司 Snapshot generation method, device and equipment and readable storage medium

Also Published As

Publication number Publication date
CN111625853A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
CN109034993B (en) Account checking method, account checking equipment, account checking system and computer readable storage medium
US9787706B1 (en) Modular architecture for analysis database
KR102311032B1 (en) Database Synchronization
US9612936B2 (en) Correlation of source code with system dump information
US8677501B2 (en) Privilege violation detecting program
CN110569214A (en) Index construction method and device for log file and electronic equipment
US20120296878A1 (en) File set consistency verification system, file set consistency verification method, and file set consistency verification program
EP3084610A1 (en) Process for displaying test coverage data during code reviews
CN106844102B (en) Data recovery method and device
US20090049016A1 (en) Apparatus and method for file difference management
CN111625853B (en) Snapshot processing method, device and equipment and readable storage medium
WO2015196981A1 (en) Method and device for recognizing picture junk files
CN114416667A (en) Method and device for rapidly sharing network disk file, network disk and storage medium
CN111400361A (en) Data real-time storage method and device, computer equipment and storage medium
US11645234B2 (en) Rule-based collections of subset(s) of metadata in response to a trigger event occurring
CN111680104A (en) Data synchronization method and device, computer equipment and readable storage medium
CN109388617A (en) A kind of determination method and device of document time stamp confidence level
CN111078418B (en) Operation synchronization method, device, electronic equipment and computer readable storage medium
CN111694724B (en) Test method and device of distributed form system, electronic equipment and storage medium
CN112000971A (en) File permission recording method, system and related device
CN113467941A (en) Method and device for sharing information
JP2018181121A (en) Analyzer, analysis program, and analysis method
US11514163B2 (en) Terminal device, method for control of report of operation information performed by terminal device, and recording medium storing therein program for control of report of operation information performed by terminal device
JP2009181494A (en) Job processing system and job information acquisition method
CN112699372A (en) Vulnerability processing method and device and computer readable storage medium

Legal Events

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