Snapshot processing method and device and electronic device
By establishing a virtual snapshot between physical snapshots and target objects, the problem of conflict due to the complexity of the reference relationship in the existing technology was solved, and the security deletion of physical snapshot was achieved.
Patent Information
- Application Number
- CN201910209318.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-03-19
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2039-03-19
AI Technical Summary
In the prior art, the reference relationship of the disk or mirror to the snapshot is complicated, resulting in conflicts easily occur when deleting the snapshot.
By establishing a virtual snapshot between the physical snapshot and the target object, the virtual snapshot contains the reference relationship of the target object to the physical snapshot, so that the one-to-many relationship between a single physical snapshot and multiple target objects that reference it is transformed into a virtual snapshot and A one-to-one relationship between target objects.
The management of the reference relationship of the physical snapshot of the target object was realized, and conflicts were avoided when deleting the physical snapshot due to the complex reference relationship, ensuring the security deletion of physical snapshots.
Smart Images

Figure CN111722782B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a snapshot processing method and device and an electronic device. Background Art
[0002] Snapshots, as complete copies of a specific data set at a specific point in time, can be used in a variety of scenarios such as disk rollback, image creation, or image sharing. In enterprise-level data backup, snapshots play an increasingly important role.
[0003] In the process of implementing the present invention, the inventors found that the prior art has at least the following problems: In the prior art, the reference relationship between the disk or the image and the snapshot is relatively complex. When deleting the snapshot, conflicts often occur due to the complex reference relationship. Summary of the invention
[0004] The embodiments of the present invention provide a snapshot processing method and device as well as an electronic device to solve the defect in the prior art that conflicts are generated when deleting snapshots due to complex reference relationships.
[0005] To achieve the above object, an embodiment of the present invention provides a snapshot processing method, including:
[0006] receiving a reference instruction to generate a target object based on a physical snapshot;
[0007] According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, and the virtual snapshot includes a reference relationship between the target object and the physical snapshot.
[0008] The embodiment of the present invention further provides a snapshot processing device, including:
[0009] A receiving module, used for receiving a reference instruction for generating a target object based on a physical snapshot;
[0010] The first establishing module is used to establish a virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction, wherein the virtual snapshot includes a reference relationship between the target object and the physical snapshot.
[0011] An embodiment of the present invention further provides an electronic device, including:
[0012] Memory, used to store programs;
[0013] A processor, configured to run the program stored in the memory, to:
[0014] receiving a reference instruction to generate a target object based on a physical snapshot;
[0015] According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, and the virtual snapshot includes a reference relationship between the target object and the physical snapshot.
[0016] The snapshot processing method and device and the electronic device provided by the embodiments of the present invention establish a virtual snapshot between a physical snapshot and a target object, so that a one-to-many correspondence between a single physical snapshot and multiple target objects that reference it can be transformed into a one-to-one correspondence between the virtual snapshot and the target object, thereby managing the reference relationship between the target object and the physical snapshot, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, and realizing safe deletion of the physical snapshot.
[0017] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0019] Figure 1 A system block diagram of a business system provided by an embodiment of the present invention;
[0020] Figure 2 A flowchart of an embodiment of a snapshot processing method provided by the present invention;
[0021] Figure 3 A flowchart of another embodiment of the snapshot processing method provided by the present invention;
[0022] Figure 4 A flowchart of another embodiment of the snapshot processing method provided by the present invention;
[0023] Figure 5 A schematic diagram of the structure of an embodiment of a snapshot processing device provided by the present invention;
[0024] Figure 6 A schematic diagram of the structure of another embodiment of the snapshot processing device provided by the present invention;
[0025] Figure 7 A schematic structural diagram of an electronic device embodiment provided by the present invention. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] In the prior art, the reference relationship between the target object such as a disk or a mirror and the physical snapshot is relatively complex. When deleting a physical snapshot, conflicts often occur due to the existence of complex reference relationships. For example, after deleting a physical snapshot, the related operations of the target object that references the physical snapshot may not be performed; or, due to the existence of certain reference relationships, the physical snapshot cannot be deleted. Therefore, the present application proposes a snapshot processing solution, the main principle of which is: after receiving a reference instruction to generate a target object based on a physical snapshot, a virtual snapshot is first established between the physical snapshot and the target object, and the reference relationship between the target object and the physical snapshot is included in the virtual snapshot, so that the one-to-many correspondence between a single physical snapshot and multiple target objects that reference it can be transformed into a one-to-one correspondence between the virtual snapshot and the target object, so as to achieve the management of the reference relationship between the target object and the physical snapshot, thereby avoiding conflicts due to complex reference relationships when deleting the physical snapshot, so as to achieve safe deletion of the physical snapshot.
[0028] The method provided by the embodiment of the present invention can be applied to any business system with data processing capability. Figure 1 A system block diagram of a business system provided by an embodiment of the present invention, Figure 1 The structure shown is only one example of a business system to which the technical solution of the present invention can be applied. Figure 1 As shown, the business system can be used to perform the following Figure 2 , Figure 3 and Figure 4 The processing flow shown. In the business system, when a reference instruction for generating a target object based on a physical snapshot is received, a virtual snapshot having a one-to-one correspondence with the target object can be established according to the reference instruction, and the virtual snapshot contains the reference relationship between the target object and the physical snapshot. The one-to-many correspondence between a single physical snapshot and multiple target objects that reference it can be transformed into a one-to-one correspondence between the virtual snapshot and the target object, so as to manage the reference relationship between the target object and the physical snapshot, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, so as to achieve safe deletion of the physical snapshot.
[0029] The above embodiments are illustrations of the technical principles and exemplary application frameworks of the embodiments of the present invention. The specific technical solutions of the embodiments of the present invention are further described in detail below through multiple embodiments.
[0030] Embodiment 1
[0031] Figure 2 This is a flowchart of an embodiment of the snapshot processing method provided by the present invention. The execution subject of the method can be the above-mentioned business system, or various servers with data processing capabilities, or devices or chips integrated on these devices. Figure 2 As shown, the snapshot processing method includes the following steps:
[0032] S201, receiving a reference instruction for generating a target object based on a physical snapshot.
[0033] The embodiment of the present invention can be applied to scenarios such as disk rollback, image creation, and image sharing. The target object in the embodiment of the present invention may include but is not limited to an image and a disk. When a user wants to generate a target object based on a physical snapshot (for example, to perform a disk rollback for the physical snapshot, or to generate an image for the physical snapshot, etc.), a reference instruction of the target object to the physical snapshot is first generated.
[0034] S202: According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established.
[0035] In the embodiment of the present invention, when a reference instruction for generating a target object based on a physical snapshot is received, a virtual snapshot is created between the physical snapshot and the target object according to the reference instruction, and there is a one-to-one correspondence between the virtual snapshot and the target object, and the virtual snapshot contains a reference relationship between the target object and the physical snapshot. Therefore, when the target object references the physical snapshot, after a data read instruction for the physical snapshot is issued, the virtual snapshot having a one-to-one correspondence with the target object can address the corresponding physical snapshot according to the reference relationship between the target object and the physical snapshot contained therein, so that the physical snapshot sends the snapshot data to the target object.
[0036] The snapshot processing method provided by the embodiment of the present invention establishes a virtual snapshot between the physical snapshot and the target object, so that the one-to-many correspondence between a single physical snapshot and multiple target objects that reference it can be transformed into a one-to-one correspondence between the virtual snapshot and the target object, thereby realizing the management of the reference relationship between the target object and the physical snapshot, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, and realizing safe deletion of the physical snapshot.
[0037] Embodiment 2
[0038] Figure 3 FIG. 1 is a flowchart of another embodiment of the snapshot processing method provided by the present invention. Figure 3 As shown in the above Figure 2 Based on the illustrated embodiment, the snapshot processing method provided in this embodiment may further include the following steps:
[0039] S301, receiving a reference instruction for generating a target object based on a physical snapshot.
[0040] S302: According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established.
[0041] In the embodiment of the present invention, when a reference instruction for a physical snapshot is received from a target object, first, a virtual snapshot having a one-to-one correspondence with the target object is established according to the instruction. Steps S301 to S302 in this embodiment are similar to those in the above Figure 2 Steps S201 to S202 in the illustrated embodiment are the same, see Figure 2 The specific description of the illustrated embodiments will not be repeated here.
[0042] S303: When receiving a first deletion instruction to delete a target object, delete a virtual snapshot having a one-to-one correspondence with the target object.
[0043] In the embodiment of the present invention, when a target object with a reference relationship established is no longer used and the user wants to delete it, a first deletion instruction for instructing to delete the target object can be generated. When the first deletion instruction is received, the virtual snapshot having a one-to-one correspondence with the target object is deleted, so that the reference relationship between the target object and the physical snapshot is also released.
[0044] S304: upon receiving a read instruction for a physical snapshot from the user end, obtaining snapshot metadata for describing the physical snapshot according to the read instruction, and establishing a virtual snapshot having a one-to-one correspondence with the snapshot metadata.
[0045] In an embodiment of the present invention, a user can read a physical snapshot through a user terminal. When a read instruction for a physical snapshot is received from the user terminal, corresponding snapshot metadata is obtained, the snapshot metadata is used to describe the physical snapshot, and then a virtual snapshot is established between the physical snapshot and the snapshot metadata, the virtual snapshot and the snapshot metadata have a one-to-one correspondence, and the virtual snapshot contains a reference relationship between the snapshot metadata and the physical snapshot.
[0046] S305: When receiving a second deletion instruction to delete the snapshot metadata, delete the virtual snapshot that has a one-to-one correspondence with the snapshot metadata.
[0047] In the embodiment of the present invention, when the user wants to delete the snapshot metadata, a second deletion instruction for instructing to delete the snapshot metadata can be generated. When the second deletion instruction is received, the virtual snapshot having a one-to-one correspondence with the snapshot metadata is deleted, so that the reference relationship between the snapshot metadata and the physical snapshot is also released.
[0048] In addition, the execution order of steps S304 to S305 in the embodiment of the present invention and steps S301 to S303 above is not specific. Figure 3 This is just one example.
[0049] S306: After receiving the third deletion instruction to delete the physical snapshot, when the number of virtual snapshots corresponding to the physical snapshot is zero, delete the physical snapshot.
[0050] In the embodiment of the present invention, when the user wants to delete the physical snapshot, a third deletion instruction for instructing to delete the physical snapshot can be generated. After receiving the third deletion instruction, it is first necessary to determine the number of virtual snapshots corresponding to the physical snapshot. When the number is zero, the physical snapshot can be deleted without affecting the operation of the corresponding target object.
[0051] The snapshot processing method provided by the embodiment of the present invention establishes a virtual snapshot between a physical snapshot and a target object, or between a physical snapshot and snapshot metadata of a user end, so that a one-to-many correspondence between a single physical snapshot and multiple target objects and snapshot metadata that reference it can be transformed into a one-to-one correspondence between the virtual snapshot and the target object or snapshot metadata, thereby achieving management of the reference relationship between the target object and / or snapshot metadata and the physical snapshot, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, and achieving safe deletion of the physical snapshot.
[0052] Embodiment 3
[0053] Figure 4 FIG. 1 is a flowchart of another embodiment of the snapshot processing method provided by the present invention. Figure 4 As shown in the above Figure 2 and Figure 3 Based on the embodiment shown, each physical snapshot may be provided with a virtual snapshot count value for recording the number of virtual snapshots corresponding to the physical snapshot. The snapshot processing method provided in this embodiment may further include the following steps:
[0054] S401, receiving a reference instruction for generating a target object based on a physical snapshot.
[0055] S402: According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, and a count value of the virtual snapshot is incremented by one.
[0056] S403: When receiving a first deletion instruction to delete a target object, delete the virtual snapshot that has a one-to-one correspondence with the target object, and reduce the virtual snapshot count by one.
[0057] S404, when receiving a read instruction for a physical snapshot from the user end, according to the read instruction, obtain snapshot metadata for describing the physical snapshot, create a virtual snapshot having a one-to-one correspondence with the snapshot metadata, and add one to the virtual snapshot count value.
[0058] S405 , when receiving a second deletion instruction for deleting the snapshot metadata, deleting the virtual snapshot that has a one-to-one correspondence with the snapshot metadata, and performing a decrement operation on the virtual snapshot count value.
[0059] S406: After receiving the third deletion instruction to delete the physical snapshot, determine the virtual snapshot count value of the physical snapshot, and when the virtual snapshot count value is zero, delete the physical snapshot.
[0060] In the embodiment of the present invention, the above steps S401 to S405 are the same as the above steps S402 to S405. Figure 3 Steps S301 to S305 in the illustrated embodiment are basically the same, except that after executing the operations of creating a virtual snapshot in steps S402 and S404, the virtual snapshot count value needs to be increased by one, and after executing the operations of deleting a virtual snapshot in steps S403 and S405, the virtual snapshot count value needs to be decreased by one, respectively. Thus, when executing step S406, the number of references to the physical snapshot can be determined according to the virtual snapshot count value, and whether the physical snapshot can be deleted can be determined.
[0061] The snapshot processing method provided by the embodiment of the present invention establishes a virtual snapshot between a physical snapshot and a target object, or between a physical snapshot and snapshot metadata of a user end, so that a one-to-many correspondence between a single physical snapshot and multiple target objects and snapshot metadata that reference it can be transformed into a one-to-one correspondence between a virtual snapshot and the target object or snapshot metadata, thereby achieving management of the reference relationship between the target object and / or snapshot metadata and the physical snapshot; and intuitively reflects all reference relationships of the physical snapshot by setting a virtual snapshot count value, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, so as to achieve safe deletion of the physical snapshot.
[0062] Embodiment 4
[0063] Figure 5 A schematic diagram of a snapshot processing device according to an embodiment of the present invention is provided, which can be used to perform the following steps: Figure 2 The method steps shown. Figure 5 As shown, the snapshot processing device may include: a receiving module 51 and a first establishing module 52 .
[0064] The receiving module 51 is used to receive a reference instruction for generating a target object based on a physical snapshot; the first establishing module 52 is used to establish a virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction, and the virtual snapshot contains a reference relationship between the target object and the physical snapshot.
[0065] In the embodiment of the present invention, when the receiving module 51 receives a reference instruction for generating a target object based on a physical snapshot, the first establishing module 52 establishes a virtual snapshot between the physical snapshot and the target object according to the reference instruction received by the receiving module 51. There is a one-to-one correspondence between the virtual snapshot and the target object, and the virtual snapshot contains a reference relationship between the target object and the physical snapshot.
[0066] The snapshot processing device provided by the embodiment of the present invention establishes a virtual snapshot between a physical snapshot and a target object, so that a one-to-many correspondence between a single physical snapshot and multiple target objects that reference it can be transformed into a one-to-one correspondence between a virtual snapshot and a target object, thereby managing the reference relationship between the target object and the physical snapshot, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, and realizing safe deletion of the physical snapshot.
[0067] Embodiment 5
[0068] Figure 6 A schematic diagram of another embodiment of the snapshot processing device provided by the present invention can be used to perform the following steps: Figure 3 and Figure 4 The method steps shown. Figure 6 As shown in the above Figure 5 Based on the illustrated embodiment, the snapshot processing device provided by the embodiment of the present invention may further include: a data reading module 61. The data reading module 61 may be configured to send the data in the physical snapshot to the target object according to the reference relationship contained in the virtual snapshot when receiving a read instruction of the target object.
[0069] In an embodiment of the present invention, when the target object references the physical snapshot, after issuing a data read instruction for the physical snapshot, the data reading module 61 can obtain the reference relationship of the target object to the physical snapshot from the virtual snapshot that has a one-to-one correspondence with the target object, and address the corresponding physical snapshot, thereby sending the data in the physical snapshot to the target object.
[0070] Furthermore, the snapshot processing device provided by the embodiment of the present invention may further include: a first deletion module 62, which may be configured to delete the virtual snapshot having a one-to-one correspondence with the target object upon receiving a first deletion instruction to delete the target object.
[0071] In the embodiment of the present invention, when a target object with a reference relationship established is no longer used and the user wants to delete it, a first deletion instruction for instructing to delete the target object can be generated. When the first deletion module 62 receives the first deletion instruction, it deletes the virtual snapshot that has a one-to-one correspondence with the target object, so that the reference relationship between the target object and the physical snapshot is also released.
[0072] Furthermore, the snapshot processing device provided by the embodiment of the present invention may also include: a second establishment module 63, which can be used to, when receiving a read instruction from the user end for a physical snapshot, obtain snapshot metadata used to describe the physical snapshot according to the read instruction, and establish a virtual snapshot having a one-to-one correspondence with the snapshot metadata, wherein the virtual snapshot contains a reference relationship between the snapshot metadata and the physical snapshot.
[0073] In the embodiment of the present invention, the user can read the physical snapshot through the user terminal. When the second establishing module 63 receives the reading instruction for the physical snapshot from the user terminal, it obtains the corresponding snapshot metadata, which is used to describe the physical snapshot, and then establishes a virtual snapshot between the physical snapshot and the snapshot metadata. There is a one-to-one correspondence between the virtual snapshot and the snapshot metadata, and the virtual snapshot contains a reference relationship between the snapshot metadata and the physical snapshot.
[0074] The snapshot processing device provided by the embodiment of the present invention may further include: a second deletion module 64, which may be configured to delete the virtual snapshot having a one-to-one correspondence with the snapshot metadata upon receiving a second deletion instruction for deleting the snapshot metadata.
[0075] In the embodiment of the present invention, when the user wants to delete the snapshot metadata, a second deletion instruction for instructing to delete the snapshot metadata can be generated. When the second deletion module 64 receives the second deletion instruction, the virtual snapshot having a one-to-one correspondence with the snapshot metadata is deleted, so that the reference relationship between the snapshot metadata and the physical snapshot is also released.
[0076] Furthermore, the snapshot processing device provided by the embodiment of the present invention may also include: a third deletion module 65, which may be used to delete the physical snapshot after receiving a third deletion instruction to delete the physical snapshot when the number of virtual snapshots corresponding to the physical snapshot is zero.
[0077] In the embodiment of the present invention, when the user wants to delete the physical snapshot, a third deletion instruction for instructing to delete the physical snapshot can be generated. After receiving the third deletion instruction, the third deletion module 65 first needs to determine the number of virtual snapshots corresponding to the physical snapshot. When the number is zero, the physical snapshot can be deleted without affecting the operation of the corresponding target object.
[0078] Further, in the embodiment of the present invention, each physical snapshot may be provided with a virtual snapshot count value for recording the number of virtual snapshots corresponding to the physical snapshot. In this case, the snapshot processing device provided by the embodiment of the present invention may further include: a counting module 66. The counting module 66 may be used to add one to the virtual snapshot count value after the first establishment module 52 establishes a virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction; to decrement one to the virtual snapshot count value after the first deletion module 62 deletes the virtual snapshot having a one-to-one correspondence with the target object; to add one to the virtual snapshot count value after the second establishment module 63 establishes a virtual snapshot having a one-to-one correspondence with the snapshot metadata; or to decrement one to the virtual snapshot count value after the second deletion module 64 deletes the virtual snapshot having a one-to-one correspondence with the snapshot metadata; and the third deletion module 65 may be specifically used to determine the virtual snapshot count value of the physical snapshot after receiving the third deletion instruction for deleting the physical snapshot, and delete the physical snapshot when the virtual snapshot count value is zero.
[0079] The snapshot processing device provided by the embodiment of the present invention establishes a virtual snapshot between a physical snapshot and a target object, or between a physical snapshot and snapshot metadata of a user end, so that a one-to-many correspondence between a single physical snapshot and multiple target objects and snapshot metadata that reference it can be transformed into a one-to-one correspondence between a virtual snapshot and the target object or snapshot metadata, thereby achieving management of the reference relationship between the target object and / or snapshot metadata and the physical snapshot; and intuitively reflects all reference relationships of the physical snapshot by setting a virtual snapshot count value, thereby avoiding conflicts caused by complex reference relationships when deleting the physical snapshot, so as to achieve safe deletion of the physical snapshot.
[0080] Embodiment 6
[0081] The internal functions and structure of the snapshot processing device are described above. The device can be implemented as an electronic device for providing data cache services for at least one task. Each task is independently configured with a first cache and a second cache, and the task only reads data from the first cache. Figure 7 This is a schematic diagram of the structure of an electronic device embodiment provided by the present invention. Figure 7 As shown, the electronic device includes a memory 71 and a processor 72 .
[0082] The memory 71 is used to store programs. In addition to the above programs, the memory 71 can also be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc.
[0083] The memory 71 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as 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 disk or optical disk.
[0084] The processor 72 is coupled to the memory 71 and executes the program stored in the memory 71 to:
[0085] receiving a reference instruction to generate a target object based on a physical snapshot;
[0086] According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, and the virtual snapshot contains a reference relationship between the target object and the physical snapshot.
[0087] Further, if Figure 7 As shown, the electronic device may also include: a communication component 73, a power component 74, an audio component 75, a display 76 and other components. Figure 7 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 7 Components shown.
[0088] The communication component 73 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 73 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 73 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0089] The power supply assembly 74 provides power to various components of the electronic device. The power supply assembly 74 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.
[0090] The audio component 75 is configured to output and / or input audio signals. For example, the audio component 75 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 71 or sent via the communication component 73. In some embodiments, the audio component 75 also includes a speaker for outputting audio signals.
[0091] The display 76 includes a screen, which may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0092] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A snapshot processing method, characterized in that: include: receiving a reference instruction for generating a target object based on a physical snapshot; the physical snapshot is provided with a virtual snapshot count value for recording the number of virtual snapshots corresponding to the physical snapshot; According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, wherein the virtual snapshot includes a reference relationship between the target object and the physical snapshot; After establishing the virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction, the method further includes adding one to the virtual snapshot count value; after deleting the virtual snapshot having a one-to-one correspondence with the target object, the method further includes deducting one from the virtual snapshot count value; the method further includes, after receiving a third deletion instruction to delete the physical snapshot, determining the virtual snapshot count value of the physical snapshot, and deleting the physical snapshot when the virtual snapshot count value is zero.
2. The snapshot processing method according to claim 1, characterized in that: Also includes: When a read instruction of the target object is received, the data in the physical snapshot is sent to the target object according to the reference relationship contained in the virtual snapshot.
3. The snapshot processing method according to claim 1, characterized in that: Also includes: When a first deletion instruction for deleting the target object is received, the virtual snapshot having a one-to-one correspondence with the target object is deleted.
4. The snapshot processing method according to claim 3, characterized in that: Also includes: When receiving a read instruction from the user end for the physical snapshot, snapshot metadata for describing the physical snapshot is obtained according to the read instruction, and a virtual snapshot having a one-to-one correspondence with the snapshot metadata is established, wherein the virtual snapshot includes a reference relationship between the snapshot metadata and the physical snapshot.
5. The snapshot processing method according to claim 4, characterized in that: Also includes: When a second deletion instruction for deleting the snapshot metadata is received, the virtual snapshot having a one-to-one correspondence with the snapshot metadata is deleted.
6. The snapshot processing method according to claim 5, characterized in that: After the virtual snapshot having a one-to-one correspondence with the snapshot metadata is established, the method further includes: Adding one to the virtual snapshot count value; After deleting the virtual snapshot having a one-to-one correspondence with the snapshot metadata, the method further includes: The virtual snapshot count value is decremented by one.
7. A snapshot processing device, characterized in that: include: A receiving module, used for receiving a reference instruction for generating a target object based on a physical snapshot; the physical snapshot is provided with a virtual snapshot count value, used for recording the number of virtual snapshots corresponding to the physical snapshot; A first establishing module is used to establish a virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction, wherein the virtual snapshot contains a reference relationship between the target object and the physical snapshot; after establishing the virtual snapshot having a one-to-one correspondence with the target object according to the reference instruction, it also includes adding one to the virtual snapshot count value; after deleting the virtual snapshot having a one-to-one correspondence with the target object, it also includes subtracting one from the virtual snapshot count value; and after receiving a third deletion instruction to delete the physical snapshot, it also includes judging the virtual snapshot count value of the physical snapshot, and deleting the physical snapshot when the virtual snapshot count value is zero.
8. The snapshot processing device according to claim 7, characterized in that: Also includes: The data reading module is used to send the data in the physical snapshot to the target object according to the reference relationship contained in the virtual snapshot when receiving a read instruction of the target object.
9. The snapshot processing device according to claim 7, characterized in that: Also includes: The first deleting module is configured to delete the virtual snapshot having a one-to-one correspondence with the target object upon receiving a first deleting instruction to delete the target object.
10. The snapshot processing device according to claim 9, characterized in that: Also includes: The second establishing module is used to, when receiving a read instruction from the user end for the physical snapshot, obtain snapshot metadata for describing the physical snapshot according to the read instruction, and establish a virtual snapshot having a one-to-one correspondence with the snapshot metadata, wherein the virtual snapshot contains a reference relationship between the snapshot metadata and the physical snapshot.
11. The snapshot processing device according to claim 10, characterized in that: Also includes: The second deleting module is configured to delete the virtual snapshot having a one-to-one correspondence with the snapshot metadata upon receiving a second deleting instruction to delete the snapshot metadata.
12. The snapshot processing device according to claim 11, characterized in that: The device also includes: a counting module, configured to add one to a virtual snapshot count value after the second establishing module establishes a virtual snapshot having a one-to-one correspondence with the snapshot metadata; or to decrement one to the virtual snapshot count value after the second deleting module deletes the virtual snapshot having a one-to-one correspondence with the snapshot metadata.
13. An electronic device, characterized in that: include: Memory, used to store programs; A processor, configured to run the program stored in the memory, to: receiving a reference instruction for generating a target object based on a physical snapshot; the physical snapshot is provided with a virtual snapshot count value for recording the number of virtual snapshots corresponding to the physical snapshot; According to the reference instruction, a virtual snapshot having a one-to-one correspondence with the target object is established, the virtual snapshot including a reference relationship between the target object and the physical snapshot; after the virtual snapshot having a one-to-one correspondence with the target object is established according to the reference instruction, the virtual snapshot count value is increased by one; after the virtual snapshot having a one-to-one correspondence with the target object is deleted, the virtual snapshot count value is decreased by one; and after receiving a third deletion instruction to delete the physical snapshot, the virtual snapshot count value of the physical snapshot is determined, and when the virtual snapshot count value is zero, the physical snapshot is deleted.
Citation Information
Patent Citations
Transient point-in-time images for continuous data protection
US7523277B1